提交 f85942b4 编写于 作者: R Rafael Mendonça França

Merge pull request #15056 from josemarluedke/single-quotes-on-plugin-gemfile

Change Gemfile’s double quotation marks in plugin generator
source "https://rubygems.org"
source 'https://rubygems.org'
<% if options[:skip_gemspec] -%>
<%= '# ' if options.dev? || options.edge? -%>gem "rails", "~> <%= Rails::VERSION::STRING %>"
<%= '# ' if options.dev? || options.edge? -%>gem 'rails', '~> <%= Rails::VERSION::STRING %>'
<% else -%>
# Declare your gem's dependencies in <%= name %>.gemspec.
# Bundler will treat runtime dependencies like base dependencies, and
......@@ -11,7 +11,7 @@ gemspec
<% if options[:skip_gemspec] -%>
group :development do
gem "<%= gem_for_database %>"
gem '<%= gem_for_database %>'
end
<% else -%>
# Declare any dependencies that are still in development here instead of in
......
......@@ -312,7 +312,7 @@ def test_skipping_gemspec
assert_no_file "bukkits.gemspec"
assert_file "Gemfile" do |contents|
assert_no_match('gemspec', contents)
assert_match(/gem "rails", "~> #{Rails.version}"/, contents)
assert_match(/gem 'rails', '~> #{Rails.version}'/, contents)
assert_match_sqlite3(contents)
assert_no_match(/# gem "jquery-rails"/, contents)
end
......@@ -323,7 +323,7 @@ def test_skipping_gemspec_in_full_mode
assert_no_file "bukkits.gemspec"
assert_file "Gemfile" do |contents|
assert_no_match('gemspec', contents)
assert_match(/gem "rails", "~> #{Rails.version}"/, contents)
assert_match(/gem 'rails', '~> #{Rails.version}'/, contents)
assert_match_sqlite3(contents)
end
end
......@@ -416,9 +416,9 @@ def default_files
def assert_match_sqlite3(contents)
unless defined?(JRUBY_VERSION)
assert_match(/group :development do\n gem "sqlite3"\nend/, contents)
assert_match(/group :development do\n gem 'sqlite3'\nend/, contents)
else
assert_match(/group :development do\n gem "activerecord-jdbcsqlite3-adapter"\nend/, contents)
assert_match(/group :development do\n gem 'activerecord-jdbcsqlite3-adapter'\nend/, contents)
end
end
end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册