Class: Rapid::App::Skeleton
- Inherits:
-
Skeleton::Base
- Object
- Skeleton::Base
- Rapid::App::Skeleton
- Defined in:
- lib/rapid/app/skeleton.rb
Instance Method Summary collapse
- #analytics ⇒ Object
- #assets ⇒ Object
- #async ⇒ Object
- #bones ⇒ Object
- #coverage ⇒ Object
- #cucumber ⇒ Object
- #database ⇒ Object
- #deploy ⇒ Object
- #development ⇒ Object
- #email ⇒ Object
- #exceptions ⇒ Object
-
#initialize(options = {}) ⇒ Skeleton
constructor
A new instance of Skeleton.
- #other ⇒ Object
- #production ⇒ Object
- #rails ⇒ Object
- #roodi ⇒ Object
- #rspec ⇒ Object
- #scheduler ⇒ Object
- #test ⇒ Object
- #test_unit ⇒ Object
Constructor Details
Instance Method Details
#analytics ⇒ Object
193 194 195 196 |
# File 'lib/rapid/app/skeleton.rb', line 193 def analytics directory 'app/helpers/analytics', :if => 'analytics' template 'app/helpers/analytics/google_helper.rb', :if => 'analytics.google' end |
#assets ⇒ Object
55 56 57 58 59 60 |
# File 'lib/rapid/app/skeleton.rb', line 55 def assets gem 'sass-rails', :group => :assets, :if => 'assets' gem 'coffee-rails', :group => :assets, :if => 'assets' gem 'uglifier', :group => :assets, :if => 'assets' end |
#async ⇒ Object
172 173 174 175 176 177 178 179 180 181 |
# File 'lib/rapid/app/skeleton.rb', line 172 def async gem 'delayed_job', :if => 'async.delayed_job' script 'script/delayed_job', :if => 'async.delayed_job' # migration 'create_jobs', :if => 'async.delayed_job' gem 'delayed_job_active_record', :if => ['async.delayed_job', 'database.active_record'] # TODO resque end |
#bones ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/rapid/app/skeleton.rb', line 13 def bones section :rails section :assets section :email section :database section :development section :test section :production section :exceptions section :deploy section :scheduler section :async section :other true end |
#coverage ⇒ Object
143 144 145 |
# File 'lib/rapid/app/skeleton.rb', line 143 def coverage gem 'rcov', :group => :test, :if => 'test.coverage' end |
#cucumber ⇒ Object
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 |
# File 'lib/rapid/app/skeleton.rb', line 115 def cucumber gem 'cucumber-rails', :group => :test, :if => 'test.cucumber' gem 'capybara', :group => :test, :if => 'test.cucumber' gem 'launchy', :group => :test, :if => 'test.cucumber' template 'config/cucumber.yml', :if => 'test.cucumber' directory 'features', :if => 'test.cucumber' template 'features/step_definitions/email_steps.rb', :if => ['test.cucumber', 'email'] template 'features/step_definitions/web_steps/browsing_steps.rb', :if => 'test.cucumber' template 'features/step_definitions/web_steps/debug_steps.rb', :if => 'test.cucumber' template 'features/step_definitions/web_steps/form_steps.rb', :if => 'test.cucumber' template 'features/step_definitions/web_steps/step_scoper.rb', :if => 'test.cucumber' template 'features/support/email.rb', :if => ['test.cucumber', 'email'] template 'features/support/env.rb', :if => 'test.cucumber' template 'features/support/paths.rb', :if => 'test.cucumber' template 'features/support/selectors.rb', :if => 'test.cucumber' template 'features/support/with_scope.rb', :if => 'test.cucumber' template 'lib/tasks/cucumber.rake', :if => 'test.cucumber' end |
#database ⇒ Object
70 71 72 73 74 75 76 77 78 79 |
# File 'lib/rapid/app/skeleton.rb', line 70 def database directory 'db/migrate', :if => 'database.active_record' gem 'sqlite3', :if => 'database.sqlite3' gem 'mysql', :if => 'database.mysql' gem 'mongoid', :if => 'database.mongoid' gem 'bson_ext', :if => 'database.mongoid' gem 'SystemTimer', :if => 'database.mongoid' end |
#deploy ⇒ Object
157 158 159 160 161 162 163 164 165 |
# File 'lib/rapid/app/skeleton.rb', line 157 def deploy gem 'capistrano', :group => :development, :if => 'deploy.capistrano' gem 'capistrano-ext', :group => :development, :if => 'deploy.capistrano' template 'config/deploy.rb', :if => 'deploy.capistrano' template 'config/deploy/production.rb', :if => ['deploy', 'deploy.capistrano.production'] directory 'config/deploy', :if => 'deploy.capistrano' end |
#development ⇒ Object
81 82 83 |
# File 'lib/rapid/app/skeleton.rb', line 81 def development template 'config/environments/development.rb', :if => 'development' end |
#email ⇒ Object
62 63 64 65 66 67 68 |
# File 'lib/rapid/app/skeleton.rb', line 62 def email template 'config/initializers/email.rb', :if => 'email.smtp' template 'app/mailers/test_mailer.rb', :if => 'email.test' template 'lib/tasks/test_mailer.rake', :if => 'email.test' view 'test_mailer/test_email.text.erb', :if => 'email.test' end |
#exceptions ⇒ Object
151 152 153 154 155 |
# File 'lib/rapid/app/skeleton.rb', line 151 def exceptions gem 'airbrake', :if => 'exceptions.airbrake' template 'config/initializers/airbrake.rb', :if => 'exceptions.airbrake' end |
#other ⇒ Object
183 184 185 186 187 188 189 190 191 |
# File 'lib/rapid/app/skeleton.rb', line 183 def other gem 'kaminari', :if => 'paginate' gem 'net_http_exception_fix', :if => 'net.http' gem 'fakeweb', :group => :test, :if => ['net.http', 'test'] gem 'crummy', :if => 'breadcrumbs' gem 'carrierwave', :if => 'upload' gem 'haml', :if => 'haml' analytics end |
#production ⇒ Object
147 148 149 |
# File 'lib/rapid/app/skeleton.rb', line 147 def production template 'config/environments/production.rb', :if => 'production' end |
#rails ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/rapid/app/skeleton.rb', line 30 def rails gem 'rails', '3.2.1' template 'app/controllers/application_controller.rb' template 'app/helpers/application_helper.rb' template 'config/application.rb' template 'config/boot.rb' template 'config/environment.rb' template 'config/routes.rb' template 'config.ru' template 'config/initializers/backtrace_silencers.rb' template 'config/initializers/mime_types.rb' template 'config/initializers/secret_token.rb' template 'config/initializers/session_store.rb' template 'config/initializers/wrap_parameters.rb' script 'script/rails' directory 'doc' directory 'lib/tasks' directory 'log' directory 'tmp' end |
#roodi ⇒ Object
138 139 140 141 |
# File 'lib/rapid/app/skeleton.rb', line 138 def roodi template 'config/roodi.yml', :if => 'test.roodi' gem 'roodi', :group => :test, :if => 'test.roodi' end |
#rspec ⇒ Object
102 103 104 105 106 107 108 109 110 111 112 113 |
# File 'lib/rapid/app/skeleton.rb', line 102 def rspec gem "rspec-rails", :group => :test, :if => 'test.rspec' gem 'database_cleaner', :group => :test, :if => ['test.rspec', 'database'] gem 'factory_girl_rails', :group => :test, :if => ['test.rspec', 'database'] template 'rspec', :to => '.rspec', :if => 'test.rspec' template 'spec/factories.rb', :if => ['test.rspec', 'database'] template 'spec/spec_helper.rb', :if => 'test.rspec' directory 'spec/support', :if => 'test.rspec' directory 'spec', :if => 'test.rspec' end |
#scheduler ⇒ Object
167 168 169 170 |
# File 'lib/rapid/app/skeleton.rb', line 167 def scheduler gem 'whenever', :if => 'scheduler' template 'config/schedule.rb', :if => 'scheduler' end |
#test ⇒ Object
85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/rapid/app/skeleton.rb', line 85 def test template 'config/environments/test.rb', :if => 'test' section :test_unit section :rspec section :cucumber section :roodi section :coverage template 'lib/tasks/test.rake', :if => 'test.rake.all' end |
#test_unit ⇒ Object
97 98 99 100 |
# File 'lib/rapid/app/skeleton.rb', line 97 def test_unit directory 'test', :if => 'test.unit' template 'test/test_helper.rb', :if => 'test.unit' end |