Methods
- A
- B
- C
- D
- F
- G
- M
- N
- O
- R
- S
- V
- W
Class Public methods
new(*args)
Link
Class Protected methods
Instance Public methods
create_app_files()
Link
create_config_files()
Link
create_images_directory()
Link
create_javascript_files()
Link
create_lib_files()
Link
create_public_stylesheets_files()
Link
create_root_files()
Link
# File railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb, line 165 def create_root_files build(:readme) build(:rakefile) build(:gemspec) unless options[:skip_gemspec] build(:license) build(:gitignore) unless options[:skip_git] build(:gemfile) unless options[:skip_gemfile] end
create_script_files()
Link
create_test_dummy_files()
Link
create_test_files()
Link
finish_template()
Link
name()
Link
# File railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb, line 217 def name @name ||= begin # same as ActiveSupport::Inflector#underscore except not replacing '-' underscored = original_name.dup underscored.gsub!(/([A-Z]+)([A-Z][a-z])/,'\1_\2') underscored.gsub!(/([a-z\d])([A-Z])/,'\1_\2') underscored.downcase! underscored end end
Instance Protected methods
app_templates_dir()
Link
application_definition()
Link
Also aliased as: store_application_definition!
# File railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb, line 283 def application_definition @application_definition ||= begin dummy_application_path = File.expand_path("#{dummy_path}/config/application.rb", destination_root) unless options[:pretend] || !File.exists?(dummy_application_path) contents = File.read(dummy_application_path) contents[(contents.index(/module ([\w]+)\n(.*)class Application/))..-1] end end end
camelized()
Link
create_dummy_app(path = nil)
Link
# File railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb, line 235 def create_dummy_app(path = nil) dummy_path(path) if path say_status :vendor_app, dummy_path mute do build(:generate_test_dummy) store_application_definition! build(:test_dummy_config) build(:test_dummy_clean) # ensure that script/rails has proper dummy_path build(:script, true) end end
dummy_path(path = nil)
Link
full?()
Link
get_builder_class()
Link
mountable?()
Link
mute(&block)
Link
original_name()
Link
rakefile_test_tasks()
Link
store_application_definition!()
Link
valid_const?()
Link
# File railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb, line 273 def valid_const? if camelized =~ /^\d/ raise Error, "Invalid plugin name #{original_name}. Please give a name which does not start with numbers." elsif RESERVED_NAMES.include?(name) raise Error, "Invalid plugin name #{original_name}. Please give a name which does not match one of the reserved rails words." elsif Object.const_defined?(camelized) raise Error, "Invalid plugin name #{original_name}, constant #{camelized} is already in use. Please choose another plugin name." end end