magic_recipes 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.markdown +47 -0
  3. data/Rakefile +27 -0
  4. data/bin/g_cap +45 -0
  5. data/bin/git_cap +35 -0
  6. data/lib/generators/magic_recipes/capify_generator.rb +40 -0
  7. data/lib/generators/magic_recipes/templates/Capfile.tt +7 -0
  8. data/lib/generators/magic_recipes/templates/deploy.rb.tt +68 -0
  9. data/lib/magic_recipes/assets.rb +98 -0
  10. data/lib/magic_recipes/db.rb +40 -0
  11. data/lib/magic_recipes/gems.rb +19 -0
  12. data/lib/magic_recipes/git.rb +31 -0
  13. data/lib/magic_recipes/nginx.rb +58 -0
  14. data/lib/magic_recipes/nodejs.rb +26 -0
  15. data/lib/magic_recipes/passenger.rb +25 -0
  16. data/lib/magic_recipes/postgresql.rb +51 -0
  17. data/lib/magic_recipes/private_pub.rb +77 -0
  18. data/lib/magic_recipes/rbenv.rb +46 -0
  19. data/lib/magic_recipes/rvm.rb +43 -0
  20. data/lib/magic_recipes/templates/nginx_passenger.erb +27 -0
  21. data/lib/magic_recipes/templates/nginx_private_pub.erb +13 -0
  22. data/lib/magic_recipes/templates/nginx_thin.erb +30 -0
  23. data/lib/magic_recipes/templates/nginx_unicorn.erb +30 -0
  24. data/lib/magic_recipes/templates/postgresql.yml.erb +8 -0
  25. data/lib/magic_recipes/templates/private_pub_yml.erb +10 -0
  26. data/lib/magic_recipes/templates/thin_app_yml.erb +18 -0
  27. data/lib/magic_recipes/templates/thin_private_pub_yml.erb +19 -0
  28. data/lib/magic_recipes/templates/unicorn.rb.erb +8 -0
  29. data/lib/magic_recipes/templates/unicorn_init.erb +84 -0
  30. data/lib/magic_recipes/thin.rb +44 -0
  31. data/lib/magic_recipes/unicorn.rb +44 -0
  32. data/lib/magic_recipes.rb +75 -0
  33. data/lib/tasks/magic_recipes_tasks.rake +4 -0
  34. data/spec/dummy/README.rdoc +261 -0
  35. data/spec/dummy/Rakefile +7 -0
  36. data/spec/dummy/app/assets/javascripts/application.js +15 -0
  37. data/spec/dummy/app/assets/stylesheets/application.css +13 -0
  38. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  39. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  40. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  41. data/spec/dummy/config/application.rb +65 -0
  42. data/spec/dummy/config/boot.rb +10 -0
  43. data/spec/dummy/config/database.yml +25 -0
  44. data/spec/dummy/config/environment.rb +5 -0
  45. data/spec/dummy/config/environments/development.rb +37 -0
  46. data/spec/dummy/config/environments/production.rb +67 -0
  47. data/spec/dummy/config/environments/test.rb +37 -0
  48. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  49. data/spec/dummy/config/initializers/inflections.rb +15 -0
  50. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  51. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  52. data/spec/dummy/config/initializers/session_store.rb +8 -0
  53. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  54. data/spec/dummy/config/locales/en.yml +5 -0
  55. data/spec/dummy/config/routes.rb +58 -0
  56. data/spec/dummy/config.ru +4 -0
  57. data/spec/dummy/log/development.log +0 -0
  58. data/spec/dummy/public/404.html +26 -0
  59. data/spec/dummy/public/422.html +26 -0
  60. data/spec/dummy/public/500.html +25 -0
  61. data/spec/dummy/public/favicon.ico +0 -0
  62. data/spec/dummy/script/rails +6 -0
  63. data/spec/spec_helper.rb +40 -0
  64. metadata +269 -0
@@ -0,0 +1,58 @@
1
+ Dummy::Application.routes.draw do
2
+ # The priority is based upon order of creation:
3
+ # first created -> highest priority.
4
+
5
+ # Sample of regular route:
6
+ # match 'products/:id' => 'catalog#view'
7
+ # Keep in mind you can assign values other than :controller and :action
8
+
9
+ # Sample of named route:
10
+ # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
11
+ # This route can be invoked with purchase_url(:id => product.id)
12
+
13
+ # Sample resource route (maps HTTP verbs to controller actions automatically):
14
+ # resources :products
15
+
16
+ # Sample resource route with options:
17
+ # resources :products do
18
+ # member do
19
+ # get 'short'
20
+ # post 'toggle'
21
+ # end
22
+ #
23
+ # collection do
24
+ # get 'sold'
25
+ # end
26
+ # end
27
+
28
+ # Sample resource route with sub-resources:
29
+ # resources :products do
30
+ # resources :comments, :sales
31
+ # resource :seller
32
+ # end
33
+
34
+ # Sample resource route with more complex sub-resources
35
+ # resources :products do
36
+ # resources :comments
37
+ # resources :sales do
38
+ # get 'recent', :on => :collection
39
+ # end
40
+ # end
41
+
42
+ # Sample resource route within a namespace:
43
+ # namespace :admin do
44
+ # # Directs /admin/products/* to Admin::ProductsController
45
+ # # (app/controllers/admin/products_controller.rb)
46
+ # resources :products
47
+ # end
48
+
49
+ # You can have the root of your site routed with "root"
50
+ # just remember to delete public/index.html.
51
+ # root :to => 'welcome#index'
52
+
53
+ # See how all your routes lay out with "rake routes"
54
+
55
+ # This is a legacy wild controller route that's not recommended for RESTful applications.
56
+ # Note: This route will make all actions in every controller accessible via GET requests.
57
+ # match ':controller(/:action(/:id))(.:format)'
58
+ end
@@ -0,0 +1,4 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run Dummy::Application
File without changes
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/404.html -->
21
+ <div class="dialog">
22
+ <h1>The page you were looking for doesn't exist.</h1>
23
+ <p>You may have mistyped the address or the page may have moved.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/422.html -->
21
+ <div class="dialog">
22
+ <h1>The change you wanted was rejected.</h1>
23
+ <p>Maybe you tried to change something you didn't have access to.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,25 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/500.html -->
21
+ <div class="dialog">
22
+ <h1>We're sorry, but something went wrong.</h1>
23
+ </div>
24
+ </body>
25
+ </html>
File without changes
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
+
4
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
5
+ require File.expand_path('../../config/boot', __FILE__)
6
+ require 'rails/commands'
@@ -0,0 +1,40 @@
1
+ # This file is copied to spec/ when you run 'rails generate rspec:install'
2
+ ENV["RAILS_ENV"] ||= 'test'
3
+ # => require File.expand_path("../../config/environment", __FILE__)
4
+ # => require File.expand_path("../../spec/dummy/config/environment", __FILE__)
5
+ require File.expand_path("../dummy/config/environment", __FILE__)
6
+ require 'rspec/rails'
7
+ require 'rspec/autorun'
8
+
9
+ # Requires supporting ruby files with custom matchers and macros, etc,
10
+ # in spec/support/ and its subdirectories.
11
+ Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
12
+
13
+ RSpec.configure do |config|
14
+ # ## Mock Framework
15
+ #
16
+ # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
17
+ #
18
+ # config.mock_with :mocha
19
+ # config.mock_with :flexmock
20
+ # config.mock_with :rr
21
+
22
+ # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
23
+ config.fixture_path = "#{::Rails.root}/spec/fixtures"
24
+
25
+ # If you're not using ActiveRecord, or you'd prefer not to run each of your
26
+ # examples within a transaction, remove the following line or assign false
27
+ # instead of true.
28
+ config.use_transactional_fixtures = true
29
+
30
+ # If true, the base class of anonymous controllers will be inferred
31
+ # automatically. This will be the default behavior in future versions of
32
+ # rspec-rails.
33
+ config.infer_base_class_for_anonymous_controllers = false
34
+
35
+ # Run specs in random order to surface order dependencies. If you find an
36
+ # order dependency and want to debug it, you can fix the order by providing
37
+ # the seed, which is printed after each run.
38
+ # --seed 1234
39
+ config.order = "random"
40
+ end
metadata ADDED
@@ -0,0 +1,269 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: magic_recipes
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - torsten wetzel
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-07-30 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rails
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: 3.2.6
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 3.2.6
30
+ - !ruby/object:Gem::Dependency
31
+ name: capistrano
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - '='
36
+ - !ruby/object:Gem::Version
37
+ version: 2.9.0
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - '='
44
+ - !ruby/object:Gem::Version
45
+ version: 2.9.0
46
+ - !ruby/object:Gem::Dependency
47
+ name: rspec-rails
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ - !ruby/object:Gem::Dependency
63
+ name: factory_girl_rails
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ type: :development
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ - !ruby/object:Gem::Dependency
79
+ name: capybara
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ type: :development
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
94
+ - !ruby/object:Gem::Dependency
95
+ name: guard-rspec
96
+ requirement: !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - ! '>='
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
102
+ type: :development
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ - !ruby/object:Gem::Dependency
111
+ name: rb-fsevent
112
+ requirement: !ruby/object:Gem::Requirement
113
+ none: false
114
+ requirements:
115
+ - - ! '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ! '>='
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
126
+ - !ruby/object:Gem::Dependency
127
+ name: growl
128
+ requirement: !ruby/object:Gem::Requirement
129
+ none: false
130
+ requirements:
131
+ - - ! '>='
132
+ - !ruby/object:Gem::Version
133
+ version: '0'
134
+ type: :development
135
+ prerelease: false
136
+ version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
138
+ requirements:
139
+ - - ! '>='
140
+ - !ruby/object:Gem::Version
141
+ version: '0'
142
+ - !ruby/object:Gem::Dependency
143
+ name: cucumber-rails
144
+ requirement: !ruby/object:Gem::Requirement
145
+ none: false
146
+ requirements:
147
+ - - ! '>='
148
+ - !ruby/object:Gem::Version
149
+ version: '0'
150
+ type: :development
151
+ prerelease: false
152
+ version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
154
+ requirements:
155
+ - - ! '>='
156
+ - !ruby/object:Gem::Version
157
+ version: '0'
158
+ - !ruby/object:Gem::Dependency
159
+ name: database_cleaner
160
+ requirement: !ruby/object:Gem::Requirement
161
+ none: false
162
+ requirements:
163
+ - - ! '>='
164
+ - !ruby/object:Gem::Version
165
+ version: '0'
166
+ type: :development
167
+ prerelease: false
168
+ version_requirements: !ruby/object:Gem::Requirement
169
+ none: false
170
+ requirements:
171
+ - - ! '>='
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
174
+ description: ! 'Our capistrano recipes for nginx, passenger, thin, private_pub ..
175
+ some code is taken from Ryan Bates´s railscast #337.'
176
+ email:
177
+ - torstenwetzel@berlinmagic.com
178
+ executables: []
179
+ extensions: []
180
+ extra_rdoc_files: []
181
+ files:
182
+ - bin/g_cap
183
+ - bin/git_cap
184
+ - lib/generators/magic_recipes/capify_generator.rb
185
+ - lib/generators/magic_recipes/templates/Capfile.tt
186
+ - lib/generators/magic_recipes/templates/deploy.rb.tt
187
+ - lib/magic_recipes/assets.rb
188
+ - lib/magic_recipes/db.rb
189
+ - lib/magic_recipes/gems.rb
190
+ - lib/magic_recipes/git.rb
191
+ - lib/magic_recipes/nginx.rb
192
+ - lib/magic_recipes/nodejs.rb
193
+ - lib/magic_recipes/passenger.rb
194
+ - lib/magic_recipes/postgresql.rb
195
+ - lib/magic_recipes/private_pub.rb
196
+ - lib/magic_recipes/rbenv.rb
197
+ - lib/magic_recipes/rvm.rb
198
+ - lib/magic_recipes/templates/nginx_passenger.erb
199
+ - lib/magic_recipes/templates/nginx_private_pub.erb
200
+ - lib/magic_recipes/templates/nginx_thin.erb
201
+ - lib/magic_recipes/templates/nginx_unicorn.erb
202
+ - lib/magic_recipes/templates/postgresql.yml.erb
203
+ - lib/magic_recipes/templates/private_pub_yml.erb
204
+ - lib/magic_recipes/templates/thin_app_yml.erb
205
+ - lib/magic_recipes/templates/thin_private_pub_yml.erb
206
+ - lib/magic_recipes/templates/unicorn.rb.erb
207
+ - lib/magic_recipes/templates/unicorn_init.erb
208
+ - lib/magic_recipes/thin.rb
209
+ - lib/magic_recipes/unicorn.rb
210
+ - lib/magic_recipes.rb
211
+ - lib/tasks/magic_recipes_tasks.rake
212
+ - spec/dummy/app/assets/javascripts/application.js
213
+ - spec/dummy/app/assets/stylesheets/application.css
214
+ - spec/dummy/app/controllers/application_controller.rb
215
+ - spec/dummy/app/helpers/application_helper.rb
216
+ - spec/dummy/app/views/layouts/application.html.erb
217
+ - spec/dummy/config/application.rb
218
+ - spec/dummy/config/boot.rb
219
+ - spec/dummy/config/database.yml
220
+ - spec/dummy/config/environment.rb
221
+ - spec/dummy/config/environments/development.rb
222
+ - spec/dummy/config/environments/production.rb
223
+ - spec/dummy/config/environments/test.rb
224
+ - spec/dummy/config/initializers/backtrace_silencers.rb
225
+ - spec/dummy/config/initializers/inflections.rb
226
+ - spec/dummy/config/initializers/mime_types.rb
227
+ - spec/dummy/config/initializers/secret_token.rb
228
+ - spec/dummy/config/initializers/session_store.rb
229
+ - spec/dummy/config/initializers/wrap_parameters.rb
230
+ - spec/dummy/config/locales/en.yml
231
+ - spec/dummy/config/routes.rb
232
+ - spec/dummy/config.ru
233
+ - spec/dummy/log/development.log
234
+ - spec/dummy/public/404.html
235
+ - spec/dummy/public/422.html
236
+ - spec/dummy/public/500.html
237
+ - spec/dummy/public/favicon.ico
238
+ - spec/dummy/Rakefile
239
+ - spec/dummy/README.rdoc
240
+ - spec/dummy/script/rails
241
+ - spec/spec_helper.rb
242
+ - MIT-LICENSE
243
+ - Rakefile
244
+ - README.markdown
245
+ homepage: http://berlinmagic.com
246
+ licenses: []
247
+ post_install_message:
248
+ rdoc_options: []
249
+ require_paths:
250
+ - lib
251
+ required_ruby_version: !ruby/object:Gem::Requirement
252
+ none: false
253
+ requirements:
254
+ - - ! '>='
255
+ - !ruby/object:Gem::Version
256
+ version: '0'
257
+ required_rubygems_version: !ruby/object:Gem::Requirement
258
+ none: false
259
+ requirements:
260
+ - - ! '>='
261
+ - !ruby/object:Gem::Version
262
+ version: '0'
263
+ requirements: []
264
+ rubyforge_project:
265
+ rubygems_version: 1.8.23
266
+ signing_key:
267
+ specification_version: 3
268
+ summary: MagicRecipes .. some capistrano recipes for our deployment.
269
+ test_files: []