ey_rails_wizard 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog.md +8 -0
- data/README.md +21 -17
- data/Rakefile +21 -6
- data/lib/rails_wizard.rb +5 -5
- data/lib/rails_wizard/command.rb +29 -23
- data/lib/rails_wizard/config.rb +6 -6
- data/lib/rails_wizard/{recipe.rb → scroll.rb} +10 -10
- data/lib/rails_wizard/{recipes.rb → scrolls.rb} +9 -9
- data/lib/rails_wizard/template.rb +23 -23
- data/sample.rb +2 -2
- data/{recipes → scrolls}/active_admin.rb +1 -1
- data/{recipes → scrolls}/activerecord.rb +0 -0
- data/{recipes → scrolls}/cancan.rb +0 -0
- data/{recipes → scrolls}/capybara.rb +0 -0
- data/{recipes → scrolls}/carrierwave.rb +0 -0
- data/{recipes → scrolls}/carrierwave_direct.rb +0 -0
- data/{recipes → scrolls}/cartographer.rb +0 -0
- data/{recipes → scrolls}/cucumber.rb +1 -1
- data/scrolls/delayed_job.rb +94 -0
- data/{recipes → scrolls}/devise.rb +2 -2
- data/{recipes → scrolls}/devise_invitable.rb +0 -0
- data/{recipes → scrolls}/env_yaml.rb +0 -0
- data/{recipes → scrolls}/event_calendar.rb +0 -0
- data/scrolls/eycloud.rb +62 -0
- data/{recipes → scrolls}/eycloud_recipes_on_deploy.rb +1 -1
- data/{recipes → scrolls}/factory_girl.rb +1 -1
- data/{recipes → scrolls}/ffaker.rb +0 -0
- data/{recipes → scrolls}/fixture_builder.rb +0 -0
- data/{recipes → scrolls}/forgery.rb +0 -0
- data/{recipes → scrolls}/git.rb +0 -0
- data/scrolls/github.rb +31 -0
- data/{recipes → scrolls}/haml.rb +0 -0
- data/{recipes → scrolls}/heroku.rb +0 -0
- data/{recipes → scrolls}/hoptoad.rb +1 -1
- data/{recipes → scrolls}/inherited_resources.rb +0 -0
- data/scrolls/intercom.rb +35 -0
- data/{recipes → scrolls}/jammit.rb +0 -0
- data/{recipes → scrolls}/jasmine.rb +0 -0
- data/{recipes → scrolls}/jquery.rb +0 -0
- data/{recipes → scrolls}/mini_magick.rb +0 -0
- data/{recipes → scrolls}/mongo_mapper.rb +0 -0
- data/{recipes → scrolls}/mongohq.rb +2 -2
- data/{recipes → scrolls}/mongoid.rb +0 -0
- data/{recipes → scrolls}/mootools.rb +0 -0
- data/{recipes → scrolls}/mysql.rb +12 -2
- data/scrolls/newrelic.rb +11 -0
- data/{recipes → scrolls}/nifty_generators.rb +1 -1
- data/{recipes → scrolls}/oa_oauth.rb +0 -0
- data/{recipes → scrolls}/omniauth.rb +0 -0
- data/{recipes → scrolls}/paper_trail.rb +0 -0
- data/{recipes → scrolls}/pow.rb +0 -0
- data/{recipes → scrolls}/prototype.rb +0 -0
- data/{recipes → scrolls}/puma.rb +0 -0
- data/{recipes → scrolls}/rails_admin.rb +0 -0
- data/{recipes → scrolls}/rails_basics.rb +9 -4
- data/{recipes → scrolls}/rails_dev_tweaks.rb +0 -0
- data/{recipes → scrolls}/rails_erd.rb +0 -0
- data/{recipes → scrolls}/rails_footnotes.rb +0 -0
- data/{recipes → scrolls}/ransack.rb +0 -0
- data/{recipes → scrolls}/redis.rb +4 -0
- data/scrolls/resque.rb +70 -0
- data/{recipes → scrolls}/rmagick.rb +0 -0
- data/{recipes → scrolls}/rspec.rb +0 -0
- data/{recipes → scrolls}/sass.rb +1 -1
- data/{recipes → scrolls}/sequel.rb +0 -0
- data/{recipes → scrolls}/settingslogic.rb +0 -0
- data/{recipes → scrolls}/shoulda_matchers.rb +0 -0
- data/scrolls/sidekiq.rb +23 -0
- data/{recipes → scrolls}/simple_form.rb +1 -1
- data/{recipes → scrolls}/slim.rb +0 -0
- data/{recipes → scrolls}/sqlite3.rb +0 -0
- data/{recipes → scrolls}/test_unit.rb +0 -0
- data/{recipes → scrolls}/thin.rb +0 -0
- data/{recipes → scrolls}/thinking_sphinx.rb +0 -0
- data/{recipes → scrolls}/twitter_bootstrap_rails.rb +1 -1
- data/{recipes → scrolls}/unicorn.rb +0 -0
- data/spec/rails_wizard/config_spec.rb +6 -6
- data/spec/rails_wizard/recipe_spec.rb +16 -16
- data/spec/rails_wizard/recipes/sanity_spec.rb +13 -13
- data/spec/rails_wizard/recipes_spec.rb +9 -9
- data/spec/rails_wizard/template_spec.rb +15 -15
- data/templates/helpers.erb +9 -9
- data/templates/layout.erb +7 -7
- data/templates/new_scroll.erb +20 -0
- data/templates/{recipe.erb → scroll.erb} +3 -3
- data/version.rb +1 -1
- metadata +88 -83
- data/recipes/delayed_job.rb +0 -16
- data/recipes/eycloud.rb +0 -30
- data/recipes/resque.rb +0 -37
data/templates/helpers.erb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
def
|
2
|
-
def
|
1
|
+
def scrolls; @scrolls end
|
2
|
+
def scroll?(name); @scrolls.include?(name) end
|
3
3
|
|
4
4
|
def say_custom(tag, text); say "\033[1m\033[36m" + tag.to_s.rjust(10) + "\033[0m" + " #{text}" end
|
5
|
-
def
|
6
|
-
def say_wizard(text); say_custom(@
|
5
|
+
def say_scroll(name); say "\033[1m\033[36m" + "scroll".rjust(10) + "\033[0m" + " Running #{name} scroll..." end
|
6
|
+
def say_wizard(text); say_custom(@current_scroll || 'wizard', text) end
|
7
7
|
|
8
8
|
def ask_wizard(question)
|
9
|
-
ask "\033[1m\033[30m\033[46m" + (@
|
9
|
+
ask "\033[1m\033[30m\033[46m" + (@current_scroll || "prompt").rjust(10) + "\033[0m\033[36m" + " #{question}\033[0m"
|
10
10
|
end
|
11
11
|
|
12
12
|
def yes_wizard?(question)
|
@@ -34,12 +34,12 @@ def multiple_choice(question, choices)
|
|
34
34
|
values[answer]
|
35
35
|
end
|
36
36
|
|
37
|
-
@
|
37
|
+
@current_scroll = nil
|
38
38
|
@configs = {}
|
39
39
|
|
40
40
|
@after_blocks = []
|
41
|
-
def after_bundler(&block); @after_blocks << [@
|
41
|
+
def after_bundler(&block); @after_blocks << [@current_scroll, block]; end
|
42
42
|
@after_everything_blocks = []
|
43
|
-
def after_everything(&block); @after_everything_blocks << [@
|
43
|
+
def after_everything(&block); @after_everything_blocks << [@current_scroll, block]; end
|
44
44
|
@before_configs = {}
|
45
|
-
def before_config(&block); @before_configs[@
|
45
|
+
def before_config(&block); @before_configs[@current_scroll] = block; end
|
data/templates/layout.erb
CHANGED
@@ -19,27 +19,27 @@ Rails.application.config.generators do |g|
|
|
19
19
|
end
|
20
20
|
RUBY
|
21
21
|
|
22
|
-
@
|
22
|
+
@scrolls = <%= resolve_scrolls.map(&:key).inspect %>
|
23
23
|
|
24
24
|
<%= render "helpers" %>
|
25
25
|
|
26
|
-
<%
|
27
|
-
<%= render '
|
26
|
+
<% resolve_scrolls.each do |scroll| %>
|
27
|
+
<%= render 'scroll', scroll.get_binding %>
|
28
28
|
<% end %>
|
29
29
|
|
30
30
|
<% if custom_code? %># >-----------------------------[ Custom Code ]-------------------------------<
|
31
31
|
|
32
32
|
<%= custom_code %><% end %>
|
33
33
|
|
34
|
-
@
|
34
|
+
@current_scroll = nil
|
35
35
|
|
36
36
|
# >-----------------------------[ Run Bundler ]-------------------------------<
|
37
37
|
|
38
38
|
say_wizard "Running Bundler install. This will take a while."
|
39
39
|
run 'bundle install'
|
40
40
|
say_wizard "Running after Bundler callbacks."
|
41
|
-
@after_blocks.each{|b| config = @configs[b[0]] || {}; @
|
41
|
+
@after_blocks.each{|b| config = @configs[b[0]] || {}; @current_scroll = b[0]; b[1].call}
|
42
42
|
|
43
|
-
@
|
43
|
+
@current_scroll = nil
|
44
44
|
say_wizard "Running after everything callbacks."
|
45
|
-
@after_everything_blocks.each{|b| config = @configs[b[0]] || {}; @
|
45
|
+
@after_everything_blocks.each{|b| config = @configs[b[0]] || {}; @current_scroll = b[0]; b[1].call}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
gem '<%= name %>'
|
2
|
+
|
3
|
+
__END__
|
4
|
+
|
5
|
+
name: <%= name.humanize.capitalize %>
|
6
|
+
description:
|
7
|
+
author: <%= `whoami`.strip %>
|
8
|
+
website:
|
9
|
+
|
10
|
+
requires: []
|
11
|
+
run_after: []
|
12
|
+
run_before: []
|
13
|
+
|
14
|
+
category: other # authentication, testing, persistence, javascript, css, services, deployment, and templating
|
15
|
+
# exclusive:
|
16
|
+
|
17
|
+
# config:
|
18
|
+
# - foo:
|
19
|
+
# type: boolean
|
20
|
+
# prompt: "Is foo true?"
|
@@ -1,10 +1,10 @@
|
|
1
1
|
# ><%= "[ #{name} ]".center(75,'-') %><
|
2
2
|
|
3
|
-
@
|
3
|
+
@current_scroll = "<%= key %>"
|
4
4
|
@before_configs["<%= key %>"].call if @before_configs["<%= key %>"]
|
5
|
-
|
5
|
+
say_scroll '<%= name %>'
|
6
6
|
|
7
7
|
<%= config.compile if config %>
|
8
|
-
@configs[@
|
8
|
+
@configs[@current_scroll] = config
|
9
9
|
|
10
10
|
<%= template %>
|
data/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ey_rails_wizard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,11 +10,11 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-03-
|
13
|
+
date: 2012-03-27 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: i18n
|
17
|
-
requirement: &
|
17
|
+
requirement: &70322801643620 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ! '>='
|
@@ -22,10 +22,10 @@ dependencies:
|
|
22
22
|
version: '0'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *70322801643620
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: activesupport
|
28
|
-
requirement: &
|
28
|
+
requirement: &70322801643120 !ruby/object:Gem::Requirement
|
29
29
|
none: false
|
30
30
|
requirements:
|
31
31
|
- - ~>
|
@@ -33,10 +33,10 @@ dependencies:
|
|
33
33
|
version: '3.0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *70322801643120
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: thor
|
39
|
-
requirement: &
|
39
|
+
requirement: &70322801642700 !ruby/object:Gem::Requirement
|
40
40
|
none: false
|
41
41
|
requirements:
|
42
42
|
- - ! '>='
|
@@ -44,10 +44,10 @@ dependencies:
|
|
44
44
|
version: '0'
|
45
45
|
type: :runtime
|
46
46
|
prerelease: false
|
47
|
-
version_requirements: *
|
47
|
+
version_requirements: *70322801642700
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: rspec
|
50
|
-
requirement: &
|
50
|
+
requirement: &70322801642160 !ruby/object:Gem::Requirement
|
51
51
|
none: false
|
52
52
|
requirements:
|
53
53
|
- - ~>
|
@@ -55,10 +55,10 @@ dependencies:
|
|
55
55
|
version: 2.5.0
|
56
56
|
type: :development
|
57
57
|
prerelease: false
|
58
|
-
version_requirements: *
|
58
|
+
version_requirements: *70322801642160
|
59
59
|
- !ruby/object:Gem::Dependency
|
60
60
|
name: bundler
|
61
|
-
requirement: &
|
61
|
+
requirement: &70322801641660 !ruby/object:Gem::Requirement
|
62
62
|
none: false
|
63
63
|
requirements:
|
64
64
|
- - ~>
|
@@ -66,10 +66,10 @@ dependencies:
|
|
66
66
|
version: 1.1.0
|
67
67
|
type: :development
|
68
68
|
prerelease: false
|
69
|
-
version_requirements: *
|
69
|
+
version_requirements: *70322801641660
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: rails
|
72
|
-
requirement: &
|
72
|
+
requirement: &70322801657580 !ruby/object:Gem::Requirement
|
73
73
|
none: false
|
74
74
|
requirements:
|
75
75
|
- - ! '>='
|
@@ -77,10 +77,10 @@ dependencies:
|
|
77
77
|
version: 3.0.0
|
78
78
|
type: :development
|
79
79
|
prerelease: false
|
80
|
-
version_requirements: *
|
80
|
+
version_requirements: *70322801657580
|
81
81
|
- !ruby/object:Gem::Dependency
|
82
82
|
name: ZenTest
|
83
|
-
requirement: &
|
83
|
+
requirement: &70322801657200 !ruby/object:Gem::Requirement
|
84
84
|
none: false
|
85
85
|
requirements:
|
86
86
|
- - ! '>='
|
@@ -88,7 +88,7 @@ dependencies:
|
|
88
88
|
version: '0'
|
89
89
|
type: :development
|
90
90
|
prerelease: false
|
91
|
-
version_requirements: *
|
91
|
+
version_requirements: *70322801657200
|
92
92
|
description: Quickly and easily create Rails application templates featuring dozens
|
93
93
|
of popular libraries tuned for Engine Yard Cloud
|
94
94
|
email:
|
@@ -113,72 +113,76 @@ files:
|
|
113
113
|
- lib/rails_wizard.rb
|
114
114
|
- lib/rails_wizard/command.rb
|
115
115
|
- lib/rails_wizard/config.rb
|
116
|
-
- lib/rails_wizard/
|
117
|
-
- lib/rails_wizard/
|
116
|
+
- lib/rails_wizard/scroll.rb
|
117
|
+
- lib/rails_wizard/scrolls.rb
|
118
118
|
- lib/rails_wizard/template.rb
|
119
|
-
- recipes/active_admin.rb
|
120
|
-
- recipes/activerecord.rb
|
121
|
-
- recipes/cancan.rb
|
122
|
-
- recipes/capybara.rb
|
123
|
-
- recipes/carrierwave.rb
|
124
|
-
- recipes/carrierwave_direct.rb
|
125
|
-
- recipes/cartographer.rb
|
126
|
-
- recipes/cucumber.rb
|
127
|
-
- recipes/delayed_job.rb
|
128
|
-
- recipes/devise.rb
|
129
|
-
- recipes/devise_invitable.rb
|
130
|
-
- recipes/env_yaml.rb
|
131
|
-
- recipes/event_calendar.rb
|
132
|
-
- recipes/eycloud.rb
|
133
|
-
- recipes/eycloud_recipes_on_deploy.rb
|
134
|
-
- recipes/factory_girl.rb
|
135
|
-
- recipes/ffaker.rb
|
136
|
-
- recipes/fixture_builder.rb
|
137
|
-
- recipes/forgery.rb
|
138
|
-
- recipes/git.rb
|
139
|
-
- recipes/haml.rb
|
140
|
-
- recipes/heroku.rb
|
141
|
-
- recipes/hoptoad.rb
|
142
|
-
- recipes/inherited_resources.rb
|
143
|
-
- recipes/jammit.rb
|
144
|
-
- recipes/jasmine.rb
|
145
|
-
- recipes/jquery.rb
|
146
|
-
- recipes/mini_magick.rb
|
147
|
-
- recipes/mongo_mapper.rb
|
148
|
-
- recipes/mongohq.rb
|
149
|
-
- recipes/mongoid.rb
|
150
|
-
- recipes/mootools.rb
|
151
|
-
- recipes/mysql.rb
|
152
|
-
- recipes/nifty_generators.rb
|
153
|
-
- recipes/oa_oauth.rb
|
154
|
-
- recipes/omniauth.rb
|
155
|
-
- recipes/paper_trail.rb
|
156
|
-
- recipes/pow.rb
|
157
|
-
- recipes/prototype.rb
|
158
|
-
- recipes/puma.rb
|
159
|
-
- recipes/rails_admin.rb
|
160
|
-
- recipes/rails_basics.rb
|
161
|
-
- recipes/rails_dev_tweaks.rb
|
162
|
-
- recipes/rails_erd.rb
|
163
|
-
- recipes/rails_footnotes.rb
|
164
|
-
- recipes/ransack.rb
|
165
|
-
- recipes/redis.rb
|
166
|
-
- recipes/resque.rb
|
167
|
-
- recipes/rmagick.rb
|
168
|
-
- recipes/rspec.rb
|
169
|
-
- recipes/sass.rb
|
170
|
-
- recipes/sequel.rb
|
171
|
-
- recipes/settingslogic.rb
|
172
|
-
- recipes/shoulda_matchers.rb
|
173
|
-
- recipes/simple_form.rb
|
174
|
-
- recipes/slim.rb
|
175
|
-
- recipes/sqlite3.rb
|
176
|
-
- recipes/test_unit.rb
|
177
|
-
- recipes/thin.rb
|
178
|
-
- recipes/thinking_sphinx.rb
|
179
|
-
- recipes/twitter_bootstrap_rails.rb
|
180
|
-
- recipes/unicorn.rb
|
181
119
|
- sample.rb
|
120
|
+
- scrolls/active_admin.rb
|
121
|
+
- scrolls/activerecord.rb
|
122
|
+
- scrolls/cancan.rb
|
123
|
+
- scrolls/capybara.rb
|
124
|
+
- scrolls/carrierwave.rb
|
125
|
+
- scrolls/carrierwave_direct.rb
|
126
|
+
- scrolls/cartographer.rb
|
127
|
+
- scrolls/cucumber.rb
|
128
|
+
- scrolls/delayed_job.rb
|
129
|
+
- scrolls/devise.rb
|
130
|
+
- scrolls/devise_invitable.rb
|
131
|
+
- scrolls/env_yaml.rb
|
132
|
+
- scrolls/event_calendar.rb
|
133
|
+
- scrolls/eycloud.rb
|
134
|
+
- scrolls/eycloud_recipes_on_deploy.rb
|
135
|
+
- scrolls/factory_girl.rb
|
136
|
+
- scrolls/ffaker.rb
|
137
|
+
- scrolls/fixture_builder.rb
|
138
|
+
- scrolls/forgery.rb
|
139
|
+
- scrolls/git.rb
|
140
|
+
- scrolls/github.rb
|
141
|
+
- scrolls/haml.rb
|
142
|
+
- scrolls/heroku.rb
|
143
|
+
- scrolls/hoptoad.rb
|
144
|
+
- scrolls/inherited_resources.rb
|
145
|
+
- scrolls/intercom.rb
|
146
|
+
- scrolls/jammit.rb
|
147
|
+
- scrolls/jasmine.rb
|
148
|
+
- scrolls/jquery.rb
|
149
|
+
- scrolls/mini_magick.rb
|
150
|
+
- scrolls/mongo_mapper.rb
|
151
|
+
- scrolls/mongohq.rb
|
152
|
+
- scrolls/mongoid.rb
|
153
|
+
- scrolls/mootools.rb
|
154
|
+
- scrolls/mysql.rb
|
155
|
+
- scrolls/newrelic.rb
|
156
|
+
- scrolls/nifty_generators.rb
|
157
|
+
- scrolls/oa_oauth.rb
|
158
|
+
- scrolls/omniauth.rb
|
159
|
+
- scrolls/paper_trail.rb
|
160
|
+
- scrolls/pow.rb
|
161
|
+
- scrolls/prototype.rb
|
162
|
+
- scrolls/puma.rb
|
163
|
+
- scrolls/rails_admin.rb
|
164
|
+
- scrolls/rails_basics.rb
|
165
|
+
- scrolls/rails_dev_tweaks.rb
|
166
|
+
- scrolls/rails_erd.rb
|
167
|
+
- scrolls/rails_footnotes.rb
|
168
|
+
- scrolls/ransack.rb
|
169
|
+
- scrolls/redis.rb
|
170
|
+
- scrolls/resque.rb
|
171
|
+
- scrolls/rmagick.rb
|
172
|
+
- scrolls/rspec.rb
|
173
|
+
- scrolls/sass.rb
|
174
|
+
- scrolls/sequel.rb
|
175
|
+
- scrolls/settingslogic.rb
|
176
|
+
- scrolls/shoulda_matchers.rb
|
177
|
+
- scrolls/sidekiq.rb
|
178
|
+
- scrolls/simple_form.rb
|
179
|
+
- scrolls/slim.rb
|
180
|
+
- scrolls/sqlite3.rb
|
181
|
+
- scrolls/test_unit.rb
|
182
|
+
- scrolls/thin.rb
|
183
|
+
- scrolls/thinking_sphinx.rb
|
184
|
+
- scrolls/twitter_bootstrap_rails.rb
|
185
|
+
- scrolls/unicorn.rb
|
182
186
|
- spec/rails_wizard/config_spec.rb
|
183
187
|
- spec/rails_wizard/recipe_spec.rb
|
184
188
|
- spec/rails_wizard/recipes/sanity_spec.rb
|
@@ -189,7 +193,8 @@ files:
|
|
189
193
|
- spec/support/template_runner.rb
|
190
194
|
- templates/helpers.erb
|
191
195
|
- templates/layout.erb
|
192
|
-
- templates/
|
196
|
+
- templates/new_scroll.erb
|
197
|
+
- templates/scroll.erb
|
193
198
|
- version.rb
|
194
199
|
homepage: http://railswizard.engineyard.com/
|
195
200
|
licenses: []
|
@@ -205,7 +210,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
205
210
|
version: '0'
|
206
211
|
segments:
|
207
212
|
- 0
|
208
|
-
hash:
|
213
|
+
hash: 848829872170895105
|
209
214
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
210
215
|
none: false
|
211
216
|
requirements:
|
@@ -214,7 +219,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
214
219
|
version: '0'
|
215
220
|
segments:
|
216
221
|
- 0
|
217
|
-
hash:
|
222
|
+
hash: 848829872170895105
|
218
223
|
requirements: []
|
219
224
|
rubyforge_project:
|
220
225
|
rubygems_version: 1.8.17
|
data/recipes/delayed_job.rb
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
gem 'delayed_job'
|
2
|
-
|
3
|
-
after_bundler do
|
4
|
-
generate 'delayed_job'
|
5
|
-
end
|
6
|
-
|
7
|
-
__END__
|
8
|
-
|
9
|
-
name: Delayed Job
|
10
|
-
description: "Use Delayed Job to handle background jobs"
|
11
|
-
author: jonochang
|
12
|
-
|
13
|
-
exclusive: worker
|
14
|
-
category: worker
|
15
|
-
tags: [worker,background-tasks]
|
16
|
-
|
data/recipes/eycloud.rb
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
gem 'engineyard'
|
2
|
-
gem 'ey_config'
|
3
|
-
|
4
|
-
after_bundler do
|
5
|
-
create_file "EngineYardCloud.md", <<-README
|
6
|
-
# Using Engine Yard Cloud
|
7
|
-
|
8
|
-
## Initial Deployment
|
9
|
-
|
10
|
-
* Host this git repository (such as on [GitHub](https://github.com))
|
11
|
-
* From the [Dashboard](https://cloud.engineyard.com/), click "New an Application"
|
12
|
-
* Add the "Git Repository URI"
|
13
|
-
* Click "Create Application"
|
14
|
-
* Add an Environment Name
|
15
|
-
* Click "Create Environment"
|
16
|
-
* Click "Boot this Configuration"
|
17
|
-
|
18
|
-
README
|
19
|
-
|
20
|
-
end
|
21
|
-
|
22
|
-
__END__
|
23
|
-
|
24
|
-
name: Engine Yard Cloud
|
25
|
-
description: The Most Powerful Ruby Cloud
|
26
|
-
author: drnic
|
27
|
-
|
28
|
-
requires: [git]
|
29
|
-
category: deployment
|
30
|
-
exclusive: deployment
|
data/recipes/resque.rb
DELETED
@@ -1,37 +0,0 @@
|
|
1
|
-
gem 'resque'
|
2
|
-
gem 'eycloud-recipe-resque', :group => :eycloud
|
3
|
-
|
4
|
-
say_wizard 'Applying fix suggested in https://github.com/defunkt/resque/pull/403...'
|
5
|
-
append_file "Rakefile", "\ntask 'resque:setup' => :environment # for https://github.com/defunkt/resque/pull/403\n"
|
6
|
-
|
7
|
-
after_bundler do
|
8
|
-
say_wizard 'Adding resque.rake task to lib/tasks'
|
9
|
-
create_file "lib/tasks/resque.rake", <<-RAKE
|
10
|
-
require 'resque/tasks'
|
11
|
-
RAKE
|
12
|
-
|
13
|
-
say_wizard 'Installing deploy hooks to restart resque after deploys'
|
14
|
-
create_file "deploy/before_restart.rb", <<-RUBY
|
15
|
-
on_app_servers_and_utilities do
|
16
|
-
node[:applications].each do |app_name, data|
|
17
|
-
sudo 'echo "sleep 20 && monit -g \#{app_name}_resque restart all" | at now'
|
18
|
-
end
|
19
|
-
end
|
20
|
-
RUBY
|
21
|
-
|
22
|
-
append_file "deploy/cookbooks/main/recipes/default.rb", "\nrequire_recipe 'resque'\n"
|
23
|
-
end
|
24
|
-
|
25
|
-
__END__
|
26
|
-
|
27
|
-
name: Resque
|
28
|
-
description: Add Resque to your application.
|
29
|
-
author: drnic
|
30
|
-
website: https://github.com/defunkt/resque
|
31
|
-
|
32
|
-
requires: [redis, eycloud_recipes_on_deploy]
|
33
|
-
run_after: [redis, eycloud_recipes_on_deploy]
|
34
|
-
|
35
|
-
category: worker
|
36
|
-
tags: [background, worker]
|
37
|
-
exclusive: worker
|