- A
- C
- G
- J
- L
- R
- S
- T
PASSTHROUGH_OPTIONS | = | [ :skip_active_record, :skip_javascript, :database, :javascript, :quiet, :pretend, :force, :skip ] |
Source: show
# File railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb, line 11 def app if mountable? directory "app" empty_directory_with_gitkeep "app/assets/images/#{name}" elsif full? empty_directory_with_gitkeep "app/models" empty_directory_with_gitkeep "app/controllers" empty_directory_with_gitkeep "app/views" empty_directory_with_gitkeep "app/helpers" empty_directory_with_gitkeep "app/mailers" empty_directory_with_gitkeep "app/assets/images/#{name}" end end
Source: show
# File railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb, line 54 def config template "config/routes.rb" if full? end
Source: show
# File railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb, line 29 def gemfile template "Gemfile" end
Source: show
# File railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb, line 37 def gemspec template "%name%.gemspec" end
Source: show
# File railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb, line 75 def generate_test_dummy(force = false) opts = (options || {}).slice(*PASSTHROUGH_OPTIONS) opts[:force] = force opts[:skip_bundle] = true invoke Rails::Generators::AppGenerator, [ File.expand_path(dummy_path, destination_root) ], opts end
Source: show
# File railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb, line 41 def gitignore copy_file "gitignore", ".gitignore" end
Source: show
# File railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb, line 117 def javascripts return if options.skip_javascript? if mountable? template "#{app_templates_dir}/app/assets/javascripts/application.js.tt", "app/assets/javascripts/#{name}/application.js" elsif full? empty_directory_with_gitkeep "app/assets/javascripts/#{name}" end end
Source: show
# File railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb, line 45 def lib template "lib/%name%.rb" template "lib/tasks/%name%_tasks.rake" template "lib/%name%/version.rb" if full? template "lib/%name%/engine.rb" end end
Source: show
# File railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb, line 33 def license template "MIT-LICENSE" end
Source: show
# File railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb, line 7 def rakefile template "Rakefile" end
Source: show
# File railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb, line 25 def readme template "README.rdoc" end
Source: show
# File railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb, line 128 def script(force = false) return unless full? directory "script", :force => force do |content| "#{shebang}\n" + content end chmod "script", 0755, :verbose => false end
Source: show
# File railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb, line 108 def stylesheets if mountable? copy_file "#{app_templates_dir}/app/assets/stylesheets/application.css", "app/assets/stylesheets/#{name}/application.css" elsif full? empty_directory_with_gitkeep "app/assets/stylesheets/#{name}" end end
Source: show
# File railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb, line 58 def test template "test/test_helper.rb" template "test/%name%_test.rb" append_file "Rakefile", "#{rakefile_test_tasks} task :default => :test " if full? template "test/integration/navigation_test.rb" end end
Source: show
# File railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb, line 92 def test_dummy_clean inside dummy_path do remove_file ".gitignore" remove_file "db/seeds.rb" remove_file "doc" remove_file "Gemfile" remove_file "lib/tasks" remove_file "app/assets/images/rails.png" remove_file "public/index.html" remove_file "public/robots.txt" remove_file "README" remove_file "test" remove_file "vendor" end end
Source: show
# File railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb, line 84 def test_dummy_config template "rails/boot.rb", "#{dummy_path}/config/boot.rb", :force => true template "rails/application.rb", "#{dummy_path}/config/application.rb", :force => true if mountable? template "rails/routes.rb", "#{dummy_path}/config/routes.rb", :force => true end end