- A
- B
- C
- D
- E
- F
- G
- M
- N
- V
We want to exit on failure to be kind to other libraries This is only when accessing via CLI
Source: show
# File railties/lib/rails/commands/application.rb, line 24 def self.exit_on_failure? true end
Source: show
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 152 def initialize(*args) raise Error, "Options should be given after the application name. For details run: rails --help" if args[0].blank? super if !options[:skip_active_record] && !DATABASES.include?(options[:database]) raise Error, "Invalid value for --database option. Supported for preconfiguration are: #{DATABASES.join(", ")}." end end
Source: show
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 184 def create_active_record_files return if options[:skip_active_record] build(:database_yml) end
Source: show
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 172 def create_app_files build(:app) end
Source: show
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 180 def create_boot_file template "config/boot.rb" end
Source: show
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 176 def create_config_files build(:config) end
Source: show
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 189 def create_db_files build(:db) end
Source: show
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 193 def create_doc_files build(:doc) end
Source: show
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 197 def create_lib_files build(:lib) end
Source: show
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 201 def create_log_files build(:log) end
Source: show
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 205 def create_public_files build(:public_directory) end
Source: show
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 164 def create_root_files build(:readme) build(:rakefile) build(:configru) build(:gitignore) unless options[:skip_git] build(:gemfile) unless options[:skip_gemfile] end
Source: show
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 209 def create_script_files build(:script) end
Source: show
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 213 def create_test_files build(:test) unless options[:skip_test_unit] end
Source: show
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 217 def create_tmp_files build(:tmp) end
Source: show
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 221 def create_vendor_files build(:vendor) end
Source: show
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 225 def finish_template build(:leftovers) end
Source: show
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 262 def app_const @app_const ||= "#{app_const_base}::Application" end
Source: show
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 257 def app_const_base @app_const_base ||= defined_app_const_base || app_name.gsub(/\W/, '_').squeeze('_').camelize end
Source: show
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 242 def app_name @app_name ||= defined_app_const_base? ? defined_app_name : File.basename(destination_root) end
Source: show
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 276 def app_secret SecureRandom.hex(64) end
Source: show
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 250 def defined_app_const_base Rails.respond_to?(:application) && defined?(Rails::Application) && Rails.application.is_a?(Rails::Application) && Rails.application.class.name.sub(/::Application$/, "") end
Source: show
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 246 def defined_app_name defined_app_const_base.underscore end
Define file as an alias to create_file for backwards compatibility.
Source: show
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 238 def file(*args, &block) create_file(*args, &block) end
Source: show
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 294 def get_builder_class defined?(::AppBuilder) ? ::AppBuilder : Rails::AppBuilder end
Source: show
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 280 def mysql_socket @mysql_socket ||= [ "/tmp/mysql.sock", # default "/var/run/mysqld/mysqld.sock", # debian/gentoo "/var/tmp/mysql.sock", # freebsd "/var/lib/mysql/mysql.sock", # fedora "/opt/local/lib/mysql/mysql.sock", # fedora "/opt/local/var/run/mysqld/mysqld.sock", # mac + darwinports + mysql "/opt/local/var/run/mysql4/mysqld.sock", # mac + darwinports + mysql4 "/opt/local/var/run/mysql5/mysqld.sock", # mac + darwinports + mysql5 "/opt/lampp/var/mysql/mysql.sock" # xampp for linux ].find { |f| File.exist?(f) } unless RbConfig::CONFIG['host_os'] =~ /mswin|mingw/ end
Source: show
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 266 def valid_const? if app_const =~ /^\d/ raise Error, "Invalid application name #{app_name}. Please give a name which does not start with numbers." elsif RESERVED_NAMES.include?(app_name) raise Error, "Invalid application name #{app_name}. Please give a name which does not match one of the reserved rails words." elsif Object.const_defined?(app_const_base) raise Error, "Invalid application name #{app_name}, constant #{app_const_base} is already in use. Please choose another application name." end end