suspenders 0.3.4 → 0.3.5
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +33 -33
- data/README.md +1 -1
- data/lib/suspenders/app_builder.rb +5 -0
- data/lib/suspenders/generators/app_generator.rb +1 -0
- data/lib/suspenders/version.rb +1 -1
- data/suspenders.gemspec +1 -1
- data/templates/Gemfile_additions +13 -13
- data/templates/README.md.erb +316 -0
- data/templates/factory_girl_syntax_cucumber.rb +1 -0
- data/templates/factory_girl_syntax_rspec.rb +3 -0
- data/templates/suspenders_layout.html.erb.erb +2 -2
- metadata +8 -6
- data/templates/README.md +0 -81
data/Gemfile.lock
CHANGED
@@ -1,38 +1,38 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
suspenders (0.3.
|
4
|
+
suspenders (0.3.4)
|
5
5
|
bundler (>= 1.1)
|
6
|
-
rails (= 3.2.
|
6
|
+
rails (= 3.2.6)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: http://rubygems.org/
|
10
10
|
specs:
|
11
|
-
actionmailer (3.2.
|
12
|
-
actionpack (= 3.2.
|
11
|
+
actionmailer (3.2.6)
|
12
|
+
actionpack (= 3.2.6)
|
13
13
|
mail (~> 2.4.4)
|
14
|
-
actionpack (3.2.
|
15
|
-
activemodel (= 3.2.
|
16
|
-
activesupport (= 3.2.
|
14
|
+
actionpack (3.2.6)
|
15
|
+
activemodel (= 3.2.6)
|
16
|
+
activesupport (= 3.2.6)
|
17
17
|
builder (~> 3.0.0)
|
18
18
|
erubis (~> 2.7.0)
|
19
19
|
journey (~> 1.0.1)
|
20
20
|
rack (~> 1.4.0)
|
21
21
|
rack-cache (~> 1.2)
|
22
22
|
rack-test (~> 0.6.1)
|
23
|
-
sprockets (~> 2.1.
|
24
|
-
activemodel (3.2.
|
25
|
-
activesupport (= 3.2.
|
23
|
+
sprockets (~> 2.1.3)
|
24
|
+
activemodel (3.2.6)
|
25
|
+
activesupport (= 3.2.6)
|
26
26
|
builder (~> 3.0.0)
|
27
|
-
activerecord (3.2.
|
28
|
-
activemodel (= 3.2.
|
29
|
-
activesupport (= 3.2.
|
27
|
+
activerecord (3.2.6)
|
28
|
+
activemodel (= 3.2.6)
|
29
|
+
activesupport (= 3.2.6)
|
30
30
|
arel (~> 3.0.2)
|
31
31
|
tzinfo (~> 0.3.29)
|
32
|
-
activeresource (3.2.
|
33
|
-
activemodel (= 3.2.
|
34
|
-
activesupport (= 3.2.
|
35
|
-
activesupport (3.2.
|
32
|
+
activeresource (3.2.6)
|
33
|
+
activemodel (= 3.2.6)
|
34
|
+
activesupport (= 3.2.6)
|
35
|
+
activesupport (3.2.6)
|
36
36
|
i18n (~> 0.6)
|
37
37
|
multi_json (~> 1.0)
|
38
38
|
arel (3.0.2)
|
@@ -57,14 +57,14 @@ GEM
|
|
57
57
|
json (>= 1.4.6)
|
58
58
|
hike (1.2.1)
|
59
59
|
i18n (0.6.0)
|
60
|
-
journey (1.0.
|
60
|
+
journey (1.0.4)
|
61
61
|
json (1.6.6)
|
62
62
|
mail (2.4.4)
|
63
63
|
i18n (>= 0.4.0)
|
64
64
|
mime-types (~> 1.16)
|
65
65
|
treetop (~> 1.4.8)
|
66
66
|
mime-types (1.18)
|
67
|
-
multi_json (1.
|
67
|
+
multi_json (1.3.6)
|
68
68
|
polyglot (0.3.3)
|
69
69
|
rack (1.4.1)
|
70
70
|
rack-cache (1.2)
|
@@ -73,21 +73,21 @@ GEM
|
|
73
73
|
rack
|
74
74
|
rack-test (0.6.1)
|
75
75
|
rack (>= 1.0)
|
76
|
-
rails (3.2.
|
77
|
-
actionmailer (= 3.2.
|
78
|
-
actionpack (= 3.2.
|
79
|
-
activerecord (= 3.2.
|
80
|
-
activeresource (= 3.2.
|
81
|
-
activesupport (= 3.2.
|
76
|
+
rails (3.2.6)
|
77
|
+
actionmailer (= 3.2.6)
|
78
|
+
actionpack (= 3.2.6)
|
79
|
+
activerecord (= 3.2.6)
|
80
|
+
activeresource (= 3.2.6)
|
81
|
+
activesupport (= 3.2.6)
|
82
82
|
bundler (~> 1.0)
|
83
|
-
railties (= 3.2.
|
84
|
-
railties (3.2.
|
85
|
-
actionpack (= 3.2.
|
86
|
-
activesupport (= 3.2.
|
83
|
+
railties (= 3.2.6)
|
84
|
+
railties (3.2.6)
|
85
|
+
actionpack (= 3.2.6)
|
86
|
+
activesupport (= 3.2.6)
|
87
87
|
rack-ssl (~> 1.3.2)
|
88
88
|
rake (>= 0.8.7)
|
89
89
|
rdoc (~> 3.4)
|
90
|
-
thor (
|
90
|
+
thor (>= 0.14.6, < 2.0)
|
91
91
|
rake (0.9.2.2)
|
92
92
|
rdoc (3.12)
|
93
93
|
json (~> 1.4)
|
@@ -99,17 +99,17 @@ GEM
|
|
99
99
|
rspec-expectations (2.9.0)
|
100
100
|
diff-lcs (~> 1.1.3)
|
101
101
|
rspec-mocks (2.9.0)
|
102
|
-
sprockets (2.1.
|
102
|
+
sprockets (2.1.3)
|
103
103
|
hike (~> 1.2)
|
104
104
|
rack (~> 1.0)
|
105
105
|
tilt (~> 1.1, != 1.3.0)
|
106
106
|
term-ansicolor (1.0.7)
|
107
|
-
thor (0.
|
107
|
+
thor (0.15.2)
|
108
108
|
tilt (1.3.3)
|
109
109
|
treetop (1.4.10)
|
110
110
|
polyglot
|
111
111
|
polyglot (>= 0.3.1)
|
112
|
-
tzinfo (0.3.
|
112
|
+
tzinfo (0.3.33)
|
113
113
|
|
114
114
|
PLATFORMS
|
115
115
|
ruby
|
data/README.md
CHANGED
@@ -83,7 +83,7 @@ If you're running OS X, we recommend the [GCC OSX installer](https://github.com/
|
|
83
83
|
We use [Capybara Webkit](https://github.com/thoughtbot/capybara-webkit) for full-stack Javascript integration testing.
|
84
84
|
It requires you have QT installed on your machine before running Suspenders.
|
85
85
|
|
86
|
-
Instructions for installing QT on most systems are [available here](https://github.com/thoughtbot/capybara-webkit/wiki/Installing-
|
86
|
+
Instructions for installing QT on most systems are [available here](https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit).
|
87
87
|
|
88
88
|
PostgreSQL needs to be installed and running for the `db:create` rake task.
|
89
89
|
|
@@ -18,6 +18,11 @@ module Suspenders
|
|
18
18
|
replace_in_file "config/environments/development.rb", "raise_delivery_errors = false", "raise_delivery_errors = true"
|
19
19
|
end
|
20
20
|
|
21
|
+
def enable_factory_girl_syntax
|
22
|
+
copy_file "factory_girl_syntax_rspec.rb", "spec/support/factory_girl.rb"
|
23
|
+
copy_file "factory_girl_syntax_cucumber.rb", "features/support/factory_girl.rb"
|
24
|
+
end
|
25
|
+
|
21
26
|
def setup_staging_environment
|
22
27
|
run "cp config/environments/production.rb config/environments/staging.rb"
|
23
28
|
end
|
data/lib/suspenders/version.rb
CHANGED
data/suspenders.gemspec
CHANGED
@@ -27,7 +27,7 @@ rush to build something amazing; don't use it if you like missing deadlines.
|
|
27
27
|
s.rdoc_options = ["--charset=UTF-8"]
|
28
28
|
s.extra_rdoc_files = %w[README.md LICENSE]
|
29
29
|
|
30
|
-
s.add_dependency('rails', '3.2.
|
30
|
+
s.add_dependency('rails', '3.2.6')
|
31
31
|
s.add_dependency('bundler', '>= 1.1')
|
32
32
|
|
33
33
|
s.add_development_dependency('cucumber', '~> 1.1.9')
|
data/templates/Gemfile_additions
CHANGED
@@ -9,25 +9,25 @@ gem 'copycopter_client'
|
|
9
9
|
gem 'airbrake'
|
10
10
|
|
11
11
|
group :development do
|
12
|
-
gem
|
12
|
+
gem 'heroku'
|
13
13
|
end
|
14
14
|
|
15
15
|
group :development, :test do
|
16
|
-
gem
|
17
|
-
gem
|
18
|
-
gem
|
16
|
+
gem 'rspec-rails', '~> 2.9.0'
|
17
|
+
gem 'ruby-debug19'
|
18
|
+
gem 'sham_rack'
|
19
19
|
end
|
20
20
|
|
21
21
|
group :test do
|
22
|
-
gem
|
23
|
-
gem
|
24
|
-
gem
|
25
|
-
gem
|
26
|
-
gem
|
27
|
-
gem
|
28
|
-
gem
|
29
|
-
gem
|
30
|
-
gem
|
22
|
+
gem 'cucumber-rails', '1.3.0'
|
23
|
+
gem 'capybara-webkit', '~> 0.11.0'
|
24
|
+
gem 'factory_girl_rails'
|
25
|
+
gem 'bourne'
|
26
|
+
gem 'database_cleaner'
|
27
|
+
gem 'timecop'
|
28
|
+
gem 'shoulda-matchers'
|
29
|
+
gem 'launchy'
|
30
|
+
gem 'email_spec'
|
31
31
|
end
|
32
32
|
|
33
33
|
group :staging, :production do
|
@@ -0,0 +1,316 @@
|
|
1
|
+
Rails app
|
2
|
+
=========
|
3
|
+
|
4
|
+
Rails 3.1 app running on Ruby 1.9.2 and deployed to Heroku's Cedar
|
5
|
+
stack. It has an RSpec and Cucumber test suite which should be run
|
6
|
+
before committing to the master branch.
|
7
|
+
|
8
|
+
OS X preparation
|
9
|
+
----------------
|
10
|
+
|
11
|
+
Postgres:
|
12
|
+
|
13
|
+
brew install postgres --no-python
|
14
|
+
|
15
|
+
Install Qt:
|
16
|
+
|
17
|
+
brew install qt
|
18
|
+
|
19
|
+
Debian preparation
|
20
|
+
------------------
|
21
|
+
|
22
|
+
Install Qt:
|
23
|
+
|
24
|
+
sudo apt-get install libqt4-dev libqtwebkit-dev
|
25
|
+
|
26
|
+
Laptop setup
|
27
|
+
------------
|
28
|
+
|
29
|
+
Getting the code:
|
30
|
+
|
31
|
+
git clone git@github.com:<account>/<repo>.git
|
32
|
+
|
33
|
+
Setting up Ruby:
|
34
|
+
|
35
|
+
rvm install 1.9.2
|
36
|
+
rvm use 1.9.2 --default
|
37
|
+
gem install bundler git_remote_branch heroku taps
|
38
|
+
|
39
|
+
App:
|
40
|
+
|
41
|
+
cd app
|
42
|
+
bundle --binstubs
|
43
|
+
rake db:create
|
44
|
+
rake db:schema:load
|
45
|
+
|
46
|
+
Configuration
|
47
|
+
-------------
|
48
|
+
|
49
|
+
Install the Heroku config plugin:
|
50
|
+
|
51
|
+
heroku plugins:install git://github.com/ddollar/heroku-config.git
|
52
|
+
|
53
|
+
Pull the Heroku config from staging:
|
54
|
+
|
55
|
+
heroku config:pull --remote staging
|
56
|
+
|
57
|
+
You'll see credentials as config vars. Delete lines that don't apply.
|
58
|
+
|
59
|
+
Running tests
|
60
|
+
-------------
|
61
|
+
|
62
|
+
Run the whole test suite with:
|
63
|
+
|
64
|
+
rake
|
65
|
+
|
66
|
+
Run individual features:
|
67
|
+
|
68
|
+
cucumber features/visitor_signs_in.feature
|
69
|
+
|
70
|
+
Run individual specs:
|
71
|
+
|
72
|
+
rspec spec/models/user_spec.rb
|
73
|
+
|
74
|
+
Tab complete to make it even faster!
|
75
|
+
|
76
|
+
When a spec or feature file has many specs in them, you sometimes want to run just what you're working on. In that case, specify a line number:
|
77
|
+
|
78
|
+
rspec spec/models/user_spec.rb:8
|
79
|
+
cucumber features/visitor_signs_in.feature:105
|
80
|
+
|
81
|
+
Development process
|
82
|
+
-------------------
|
83
|
+
|
84
|
+
Choose a Github Issue.
|
85
|
+
|
86
|
+
Create a local feature branch off of master for development.
|
87
|
+
|
88
|
+
git checkout master
|
89
|
+
git pull
|
90
|
+
git checkout -b 123-feature-xyz
|
91
|
+
|
92
|
+
Do work in your feature branch and commit the changes.
|
93
|
+
|
94
|
+
git add -A
|
95
|
+
git status
|
96
|
+
git commit
|
97
|
+
|
98
|
+
Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
|
99
|
+
|
100
|
+
[#123] Summary of changes
|
101
|
+
|
102
|
+
* More information about commit
|
103
|
+
* More information about commit
|
104
|
+
|
105
|
+
A good commit message:
|
106
|
+
|
107
|
+
* Prefixes the subject line with a Github Issue number.
|
108
|
+
* Uses the present tense.
|
109
|
+
|
110
|
+
Share your feature branch
|
111
|
+
|
112
|
+
git push origin [branch]
|
113
|
+
|
114
|
+
Rebase frequently to incorporate upstream changes.
|
115
|
+
|
116
|
+
git checkout master
|
117
|
+
git pull
|
118
|
+
git checkout [branch]
|
119
|
+
git rebase master
|
120
|
+
<resolve conflicts>
|
121
|
+
|
122
|
+
Interactive rebase (squash) your commits (if necessary).
|
123
|
+
|
124
|
+
git rebase -i master
|
125
|
+
|
126
|
+
At this point the automated test suite must pass, and it must work and look good in your browser.
|
127
|
+
|
128
|
+
Merge your branch back to master and push your changes.
|
129
|
+
|
130
|
+
git checkout master
|
131
|
+
git diff --stat master [branch]
|
132
|
+
git merge [branch] --ff-only
|
133
|
+
git push origin master
|
134
|
+
|
135
|
+
Delete your remote feature branch.
|
136
|
+
|
137
|
+
git push origin :[branch]
|
138
|
+
|
139
|
+
Delete your local feature branch.
|
140
|
+
|
141
|
+
git branch -d [branch]
|
142
|
+
|
143
|
+
Close Github Issue.
|
144
|
+
|
145
|
+
Deploying
|
146
|
+
---------
|
147
|
+
|
148
|
+
Periodically use [pgbackups](http://devcenter.heroku.com/articles/pgbackups) to pull latest production data.
|
149
|
+
|
150
|
+
Merge master into staging
|
151
|
+
|
152
|
+
git checkout master
|
153
|
+
git reset --hard origin/master
|
154
|
+
git pull
|
155
|
+
git checkout staging
|
156
|
+
git reset --hard origin/staging
|
157
|
+
git log staging..master
|
158
|
+
git diff --stat staging master
|
159
|
+
git merge master
|
160
|
+
git push origin staging
|
161
|
+
|
162
|
+
Enable maintenance mode if required by database changes
|
163
|
+
|
164
|
+
heroku maintenance:on --app <%= app_name %>
|
165
|
+
|
166
|
+
Deploy staging to Heroku
|
167
|
+
|
168
|
+
git push <%= app_name %> staging:master
|
169
|
+
|
170
|
+
Run new migrations if necessary
|
171
|
+
|
172
|
+
heroku rake db:migrate --app <%= app_name %>
|
173
|
+
|
174
|
+
Restart the dynos if migrations were run
|
175
|
+
|
176
|
+
heroku restart --app <%= app_name %>
|
177
|
+
|
178
|
+
Disable maintenance mode if it's on
|
179
|
+
|
180
|
+
heroku maintenance:off --app <%= app_name %>
|
181
|
+
|
182
|
+
[Introspect](http://blog.heroku.com/archives/2011/6/24/the_new_heroku_3_visibility_introspection/) to make sure everything's OK
|
183
|
+
|
184
|
+
watch heroku ps --app <%= app_name %>
|
185
|
+
|
186
|
+
[Rollback](http://devcenter.heroku.com/articles/releases) code if there was a problem
|
187
|
+
|
188
|
+
Production is the same:
|
189
|
+
|
190
|
+
* Use pgbackups to capture a DB backup
|
191
|
+
* Merge staging into production
|
192
|
+
* Enable maintenance mode if required by database changes
|
193
|
+
* Deploy production to Heroku
|
194
|
+
* Run new migrations if necessary
|
195
|
+
* Restart dynos if migrations were run
|
196
|
+
* Rollback code and use pgbackups to restore if there was a problem (turn on maintenance mode first if not already enabled)
|
197
|
+
* Disable maintenance mode if it's on
|
198
|
+
* Introspect to make sure everything's OK.
|
199
|
+
|
200
|
+
Heroku
|
201
|
+
------
|
202
|
+
|
203
|
+
To access data on Heroku:
|
204
|
+
|
205
|
+
heroku console --app <%= app_name %>
|
206
|
+
|
207
|
+
That will give you a Rails console. Run ActiveRecord queries from there.
|
208
|
+
|
209
|
+
To run a rake task on Heroku:
|
210
|
+
|
211
|
+
heroku rake db:migrate --app <%= app_name %>
|
212
|
+
|
213
|
+
Any rake task can be run with `heroku rake ...`
|
214
|
+
|
215
|
+
To dump staging or production data into your development environment:
|
216
|
+
|
217
|
+
heroku db:pull --app <%= app_name %>
|
218
|
+
|
219
|
+
You will see progress bars for each DB index and table.
|
220
|
+
|
221
|
+
We can create a database backup at any time:
|
222
|
+
|
223
|
+
heroku pgbackups:capture --app <%= app_name %> --expire
|
224
|
+
|
225
|
+
View backups:
|
226
|
+
|
227
|
+
heroku pgbackups --app <%= app_name %>
|
228
|
+
|
229
|
+
To destroy a backup:
|
230
|
+
|
231
|
+
heroku pgbackups:destroy b003 --app <%= app_name %>
|
232
|
+
|
233
|
+
Transfer production data to staging:
|
234
|
+
|
235
|
+
heroku pgbackups:capture --app <%= app_name %> --expire
|
236
|
+
heroku pgbackups:restore DATABASE `heroku pgbackups:url --app <%= app_name %>` --app <%= app_name %>-staging
|
237
|
+
|
238
|
+
More information in the [Dev Center](http://devcenter.heroku.com/articles/pgbackups).
|
239
|
+
|
240
|
+
To check the status of running app servers, background jobs, cron jobs, etc:
|
241
|
+
|
242
|
+
heroku ps --app <%= app_name %>
|
243
|
+
|
244
|
+
Programming
|
245
|
+
-----------
|
246
|
+
|
247
|
+
We use [the thoughtbot style guide](http://build.thoughtbot.com/style-guide/) on this project. As of April 9, 2012:
|
248
|
+
|
249
|
+
Formatting
|
250
|
+
----------
|
251
|
+
|
252
|
+
* Use 2 spaces for indentation. Don't use tabs.
|
253
|
+
* In ERb files, indent both Ruby and HTML.
|
254
|
+
* Include parenthesis in method definitions that take arguments.
|
255
|
+
* Do not include parenthesis in method definitions that don't take arguments.
|
256
|
+
* Do not use an empty line at the beginning or end of methods, blocks or conditionals.
|
257
|
+
* Use an empty line between methods, blocks and conditionals.
|
258
|
+
* Don't line up assignments, arguments, or hash properties.
|
259
|
+
* In Javascript, keep curly braces on the same line as an opening function, if, or other block.
|
260
|
+
* Break up longer statements into multiple lines or methods. Most developers have editors at or below 120 columns.
|
261
|
+
* If a single statement is split over several lines, indent all but the first line of the statement.
|
262
|
+
|
263
|
+
Conditions
|
264
|
+
----------
|
265
|
+
|
266
|
+
* Ternaries are harder to read than an if/else. Use an if/else.
|
267
|
+
* Prefer `if` with positive conditions over `unless`.
|
268
|
+
* Prefer `unless` over `if not`.
|
269
|
+
|
270
|
+
Ruby Conventions
|
271
|
+
----------------
|
272
|
+
|
273
|
+
* Define class methods using `def self.method` rather than `class << self` blocks.
|
274
|
+
* Use curly braces for one-line blocks and `do`..`end` for multi-line blocks.
|
275
|
+
* Prefer `&&` and `||` over `and` and `or`.
|
276
|
+
* Use `each` instead of `for`.
|
277
|
+
* Constants are all uppercase: CONSTANTS
|
278
|
+
* Class and module names are camelcase: ClassNames
|
279
|
+
* Method and variable names are underscored: `method_and_local_variables`
|
280
|
+
* Methods that ask a question end in a question mark: asks_a_yes_no_question?
|
281
|
+
* Mutating versions of methods end in an exclaimation point: gsub! for gsub
|
282
|
+
* Exception-raising versions of methods end in an exclaimation point: save! for save
|
283
|
+
* Always include a blank line before access specifiers like protected, public, and private.
|
284
|
+
* Indent access specifiers equal to method definitions.
|
285
|
+
* Indent protected and private methods equal to public methods.
|
286
|
+
|
287
|
+
Javascript and Coffeescript Conventions
|
288
|
+
---------------------------------------
|
289
|
+
|
290
|
+
* Constants are all uppercase: CONSTANTS
|
291
|
+
* Prototype names are camel case: ClassNames
|
292
|
+
* Function and variable names are camel case after the first letter: `functionAndVariableNames`
|
293
|
+
* Internal functions and variable names start with an underscore: `_internalVariables`
|
294
|
+
* Define functions that operate on the window or DOM in the scope of the window.
|
295
|
+
* Initialize empty objects and hashes using `{}`.
|
296
|
+
* Initialize arrays using `[]`.
|
297
|
+
* Extending the base classes by adding functions onto their prototypes is acceptable.
|
298
|
+
|
299
|
+
Naming
|
300
|
+
------
|
301
|
+
|
302
|
+
* Reveal intent.
|
303
|
+
* Be consistent.
|
304
|
+
* Use verbs and nouns appropriately.
|
305
|
+
* Name the enumeration parameter the singular of the collection.
|
306
|
+
* Avoid one-letter variable names.
|
307
|
+
* Avoid hungarian notiation or type information in names (for example, `szName` or `user_array`).
|
308
|
+
|
309
|
+
General Best Practices
|
310
|
+
----------------------
|
311
|
+
|
312
|
+
* Prefer short methods. One line is best.
|
313
|
+
* Avoid [Feature Envy](http://c2.com/cgi/wiki?FeatureEnvySmell). Tell, don't ask.
|
314
|
+
* Exceptions should be exceptional.
|
315
|
+
* Don't swallow exceptions or "fail silently".
|
316
|
+
* Prefer readable code over comments.
|
@@ -0,0 +1 @@
|
|
1
|
+
World(FactoryGirl::Syntax::Methods)
|
@@ -8,13 +8,13 @@
|
|
8
8
|
<%%= csrf_meta_tags %>
|
9
9
|
</head>
|
10
10
|
<body class="<%%= body_class %>">
|
11
|
-
<
|
11
|
+
<header>
|
12
12
|
<%% if signed_in? -%>
|
13
13
|
<%%= link_to "Sign out", sign_out_path, :method => :delete %>
|
14
14
|
<%% else -%>
|
15
15
|
<%%= link_to "Sign in", sign_in_path %>
|
16
16
|
<%% end -%>
|
17
|
-
</
|
17
|
+
</header>
|
18
18
|
<%%= render 'shared/flashes' -%>
|
19
19
|
<%%= yield %>
|
20
20
|
<%%= render 'shared/javascript' %>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: suspenders
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-06-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - '='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 3.2.
|
21
|
+
version: 3.2.6
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - '='
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 3.2.
|
29
|
+
version: 3.2.6
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: bundler
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -115,12 +115,14 @@ files:
|
|
115
115
|
- templates/Gemfile_additions
|
116
116
|
- templates/HEROKU_README.md
|
117
117
|
- templates/Procfile
|
118
|
-
- templates/README.md
|
118
|
+
- templates/README.md.erb
|
119
119
|
- templates/_flashes.html.erb
|
120
120
|
- templates/_javascript.html.erb
|
121
121
|
- templates/email_validator.rb
|
122
122
|
- templates/errors.rb
|
123
123
|
- templates/factory_girl_steps.rb
|
124
|
+
- templates/factory_girl_syntax_cucumber.rb
|
125
|
+
- templates/factory_girl_syntax_rspec.rb
|
124
126
|
- templates/import_scss_styles
|
125
127
|
- templates/javascripts/prefilled_input.js
|
126
128
|
- templates/postgresql_database.yml.erb
|
@@ -148,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
148
150
|
version: '0'
|
149
151
|
requirements: []
|
150
152
|
rubyforge_project:
|
151
|
-
rubygems_version: 1.8.
|
153
|
+
rubygems_version: 1.8.24
|
152
154
|
signing_key:
|
153
155
|
specification_version: 3
|
154
156
|
summary: Generate a Rails app using thoughtbot's best practices.
|
data/templates/README.md
DELETED
@@ -1,81 +0,0 @@
|
|
1
|
-
Rails app
|
2
|
-
=========
|
3
|
-
|
4
|
-
This is a Rails 3.1 app running on Ruby 1.9.2 and deployed to Heroku's Cedar stack. It has an RSpec and Cucumber test suite which should be run before commiting to the master branch.
|
5
|
-
|
6
|
-
Laptop setup
|
7
|
-
------------
|
8
|
-
|
9
|
-
Use our laptop script to get Homebrew, Postgres, Redis, RVM, Ruby 1.9.2, and Bundler:
|
10
|
-
|
11
|
-
https://github.com/thoughtbot/laptop
|
12
|
-
|
13
|
-
Use our dotfiles to get commands like `git up` and `git down` for a clean git history:
|
14
|
-
|
15
|
-
https://github.com/thoughtbot/dotfiles
|
16
|
-
|
17
|
-
Get the code:
|
18
|
-
|
19
|
-
git clone git@github.com:your-account/your-app.git
|
20
|
-
|
21
|
-
Set up the app:
|
22
|
-
|
23
|
-
cd your-app
|
24
|
-
bundle
|
25
|
-
bake db:create
|
26
|
-
bake db:migrate
|
27
|
-
|
28
|
-
Running tests
|
29
|
-
-------------
|
30
|
-
|
31
|
-
Run the whole test suite with:
|
32
|
-
|
33
|
-
bake
|
34
|
-
|
35
|
-
Run individual specs like:
|
36
|
-
|
37
|
-
s spec/models/user_spec.rb
|
38
|
-
|
39
|
-
Run individual features like:
|
40
|
-
|
41
|
-
cuc features/visitor_signs_in.feature
|
42
|
-
|
43
|
-
Tab complete to make it even faster!
|
44
|
-
|
45
|
-
When a spec or feature file has many specs in them, you sometimes want to run just what you're working on. In that case, specify a line number:
|
46
|
-
|
47
|
-
s spec/models/user_spec.rb:8
|
48
|
-
cuc features/visitor_signs_in.feature:105
|
49
|
-
|
50
|
-
Development process
|
51
|
-
-------------------
|
52
|
-
|
53
|
-
To run the app in development mode, use Foreman, which was installed from the `laptop` script:
|
54
|
-
|
55
|
-
foreman start
|
56
|
-
|
57
|
-
It will pick up on the Procfile and use Thin as the app server instead of Webrick, which will also be used by Heroku's Cedar stack.
|
58
|
-
|
59
|
-
git pull --rebase
|
60
|
-
grb create feature-branch
|
61
|
-
bake
|
62
|
-
|
63
|
-
This creates a new branch for your feature. Name it something relevant. Run the tests to make sure everything's passing. Then, implement the feature.
|
64
|
-
|
65
|
-
bake
|
66
|
-
git add -A
|
67
|
-
git commit -m "my awesome feature"
|
68
|
-
git push origin feature-branch
|
69
|
-
|
70
|
-
Open up the Github repo, change into your feature-branch branch. Press the "Pull request" button. It should automatically choose the commits that are different between master and your feature-branch. Create a pull request and share the link in Campfire with the team. When someone else gives you the thumbs-up, you can merge into master:
|
71
|
-
|
72
|
-
git up
|
73
|
-
git down
|
74
|
-
git push origin master
|
75
|
-
|
76
|
-
For more details and screenshots of the feature branch code review process, read [this blog post](http://robots.thoughtbot.com/post/2831837714/feature-branch-code-reviews).
|
77
|
-
|
78
|
-
Most importantly
|
79
|
-
----------------
|
80
|
-
|
81
|
-
Have fun!
|