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:
commit
701ab978e5
3 changed files with 10 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
* Add git_source to `Gemfile` for plugin generator.
|
||||||
|
|
||||||
|
*Yoshiyuki Hirano*
|
||||||
|
|
||||||
* Add `--skip-action-cable` option to the plugin generator.
|
* Add `--skip-action-cable` option to the plugin generator.
|
||||||
|
|
||||||
*bogdanvlviv*
|
*bogdanvlviv*
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
source 'https://rubygems.org'
|
source 'https://rubygems.org'
|
||||||
|
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
||||||
|
|
||||||
<% if options[:skip_gemspec] -%>
|
<% if options[:skip_gemspec] -%>
|
||||||
<%= '# ' if options.dev? || options.edge? -%>gem 'rails', '<%= Array(rails_version_specifier).join("', '") %>'
|
<%= '# ' if options.dev? || options.edge? -%>gem 'rails', '<%= Array(rails_version_specifier).join("', '") %>'
|
||||||
|
|
|
@ -82,6 +82,11 @@ class PluginGeneratorTest < Rails::Generators::TestCase
|
||||||
assert_file "test/integration/navigation_test.rb", /ActionDispatch::IntegrationTest/
|
assert_file "test/integration/navigation_test.rb", /ActionDispatch::IntegrationTest/
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_inclusion_of_git_source
|
||||||
|
run_generator [destination_root]
|
||||||
|
assert_file "Gemfile", /git_source/
|
||||||
|
end
|
||||||
|
|
||||||
def test_inclusion_of_a_debugger
|
def test_inclusion_of_a_debugger
|
||||||
run_generator [destination_root, "--full"]
|
run_generator [destination_root, "--full"]
|
||||||
if defined?(JRUBY_VERSION) || RUBY_ENGINE == "rbx"
|
if defined?(JRUBY_VERSION) || RUBY_ENGINE == "rbx"
|
||||||
|
|
Loading…
Reference in a new issue