1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #30110 from yhirano55/add_git_source

Add git_source to Gemfile for plugin generator
This commit is contained in:
Rafael Mendonça França 2017-08-11 17:44:21 -04:00
commit 701ab978e5
3 changed files with 10 additions and 0 deletions

View file

@ -1,3 +1,7 @@
* Add git_source to `Gemfile` for plugin generator.
*Yoshiyuki Hirano*
* Add `--skip-action-cable` option to the plugin generator.
*bogdanvlviv*

View file

@ -1,4 +1,5 @@
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
<% if options[:skip_gemspec] -%>
<%= '# ' if options.dev? || options.edge? -%>gem 'rails', '<%= Array(rails_version_specifier).join("', '") %>'

View file

@ -82,6 +82,11 @@ class PluginGeneratorTest < Rails::Generators::TestCase
assert_file "test/integration/navigation_test.rb", /ActionDispatch::IntegrationTest/
end
def test_inclusion_of_git_source
run_generator [destination_root]
assert_file "Gemfile", /git_source/
end
def test_inclusion_of_a_debugger
run_generator [destination_root, "--full"]
if defined?(JRUBY_VERSION) || RUBY_ENGINE == "rbx"