add bundler encoding fix, bump version
This commit is contained in:
parent
eeb743467d
commit
de06f3e3e3
@ -32,6 +32,9 @@ source :rubygems
|
|||||||
# ensure git hooks are installed when a gemfile is processed, see below
|
# ensure git hooks are installed when a gemfile is processed, see below
|
||||||
ensure_git_hooks!
|
ensure_git_hooks!
|
||||||
|
|
||||||
|
# need the bundler UTF-8 fix? ask for it by name!
|
||||||
|
bundler_encoding_fix!
|
||||||
|
|
||||||
# deploying to heroku and want 1.9.3 goodness?
|
# deploying to heroku and want 1.9.3 goodness?
|
||||||
ruby '1.9.3'
|
ruby '1.9.3'
|
||||||
|
|
||||||
|
@ -263,7 +263,6 @@ Feature: Gemfiles
|
|||||||
gem "two", {:require=>nil}
|
gem "two", {:require=>nil}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@wip
|
|
||||||
Scenario: Set the opposite environment in the environment defaults
|
Scenario: Set the opposite environment in the environment defaults
|
||||||
Given I have the file "Gemfile.penchant" with the content:
|
Given I have the file "Gemfile.penchant" with the content:
|
||||||
"""
|
"""
|
||||||
@ -423,3 +422,20 @@ Feature: Gemfiles
|
|||||||
# generated by penchant, environment: local
|
# generated by penchant, environment: local
|
||||||
ruby "1.9.3"
|
ruby "1.9.3"
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
Scenario: Ask for the Gemfile encoding fix
|
||||||
|
Given I have the file "Gemfile.penchant" with the content:
|
||||||
|
"""
|
||||||
|
bundler_encoding_fix!
|
||||||
|
"""
|
||||||
|
When I rebuild the Gemfile for "local" mode
|
||||||
|
Then the file "Gemfile" should have the following content:
|
||||||
|
"""
|
||||||
|
# generated by penchant, environment: local
|
||||||
|
if RUBY_VERSION =~ /1.9/
|
||||||
|
Encoding.default_external = Encoding::UTF_8
|
||||||
|
Encoding.default_internal = Encoding::UTF_8
|
||||||
|
end
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
@ -185,6 +185,15 @@ module Penchant
|
|||||||
passthrough :ruby, *args
|
passthrough :ruby, *args
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def bundler_encoding_fix!
|
||||||
|
self << (<<-RB)
|
||||||
|
if RUBY_VERSION =~ /1.9/
|
||||||
|
Encoding.default_external = Encoding::UTF_8
|
||||||
|
Encoding.default_internal = Encoding::UTF_8
|
||||||
|
end
|
||||||
|
RB
|
||||||
|
end
|
||||||
|
|
||||||
def gemspec
|
def gemspec
|
||||||
passthrough :gemspec
|
passthrough :gemspec
|
||||||
end
|
end
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
module Penchant
|
module Penchant
|
||||||
VERSION = "0.2.27"
|
VERSION = "0.2.28"
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user