caboose 1.0.0.pre

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,2 @@
1
+ Gemfile.lock
2
+ pkg/
data/.rvmrc ADDED
@@ -0,0 +1 @@
1
+ rvm 1.9.3
data/.travis.yml ADDED
@@ -0,0 +1,7 @@
1
+ rvm:
2
+ - 1.9.3
3
+ - ruby-head
4
+ before_script: unset BUNDLE_GEMFILE
5
+ matrix:
6
+ allow_failures:
7
+ - rvm: ruby-head
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source :rubygems
2
+
3
+ gemspec
4
+
data/Rakefile ADDED
@@ -0,0 +1,15 @@
1
+ require 'bundler/gem_tasks'
2
+
3
+ task default: [:ci]
4
+
5
+ desc "Run all tests"
6
+ task :ci do
7
+ sh "rm -rf caboose-test"
8
+
9
+ result = sh "rails new caboose-test -m caboose.rb && cd caboose-test && rake --trace"
10
+
11
+ sh "rm -rf caboose-test"
12
+
13
+ result
14
+ end
15
+
data/Readme.md ADDED
@@ -0,0 +1,70 @@
1
+ # Caboose [![Build Status](https://secure.travis-ci.org/JustinCampbell/caboose.png)](https://secure.travis-ci.org/JustinCampbell/caboose)
2
+
3
+ Template for Rails. See a sample repo at [caboose-sample](http://github.com/JustinCampbell/caboose-sample), and the same app on Heroku at [caboose-sample.herokuapp.com](http://caboose-sample.herokuapp.com/).
4
+
5
+ ## Installation
6
+
7
+ ```sh
8
+ git clone git://github.com/JustinCampbell/caboose.git
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```sh
14
+ rvm 1.9.3
15
+ gem install rails
16
+ rails new MyApp -m caboose/caboose.rb
17
+ ```
18
+
19
+ ## Why?
20
+
21
+ Because every time I have a great idea, I spend too much time just getting
22
+ my environment setup. I've made enough apps to know what I typically want at the
23
+ start, and it's nice to be able to jump directly into a TDD cycle within a few
24
+ minutes.
25
+
26
+ ## Stuff it does
27
+
28
+ ### Environment
29
+
30
+ * RVM 1.9.3
31
+ * Bundle with binstubs, without production
32
+
33
+ ### Views
34
+
35
+ * Remove default Rails assets
36
+ * Slim
37
+ * Create a PagesController with root route pointing to 'pages#index'
38
+ * Page title helper
39
+
40
+ ### Style
41
+
42
+ * SASS base style
43
+ * Normalize.css
44
+ * Bourbon
45
+
46
+ ### Testing
47
+
48
+ * RSpec
49
+ * Turnip
50
+ * Fivemat
51
+ * Guard w/ Growl notifications
52
+ * Travis CI
53
+
54
+ ### Production
55
+
56
+ * Heroku and Postgres
57
+ * Thin
58
+ * Dalli
59
+ * Google Analytics JS
60
+ * New Relic
61
+
62
+ ### Coming soon, maybe
63
+
64
+ * Fabricator, or another factory
65
+ * Timecop
66
+ * Unicorn configured for Heroku
67
+ * VCR
68
+
69
+ For more detail you should probably check out the [source code](https://github.com/JustinCampbell/caboose/blob/master/caboose.rb).
70
+
data/bin/caboose ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ if RUBY_VERSION < "1.9.2"
4
+ puts "Caboose requires Ruby 1.9.2 or above"
5
+ exit 1
6
+ end
7
+
8
+ system "rails new #{ARGV[0]} -m caboose.rb"
data/caboose.gemspec ADDED
@@ -0,0 +1,17 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = "caboose"
3
+ s.version = '1.0.0.pre'
4
+ s.homepage = "http://justincampbell.github.com/caboose"
5
+ s.summary = "Template for Rails"
6
+
7
+ s.author = "Justin Campbell"
8
+ s.email = "jcampbell@justincampbell.me"
9
+
10
+ s.executables = 'caboose'
11
+ s.files = `git ls-files`.split("\n")
12
+ s.require_paths = ['templates']
13
+
14
+ s.add_dependency 'rails'
15
+
16
+ s.add_development_dependency 'rake'
17
+ end
data/caboose.rb ADDED
@@ -0,0 +1,138 @@
1
+ def git_commit(text)
2
+ text.gsub! /'/, "’"
3
+ text << "\n\n[caboose](https://github.com/JustinCampbell/caboose)"
4
+
5
+ git add: "-A ."
6
+ git commit: "-m '#{text}'"
7
+ end
8
+
9
+ def section(name)
10
+ yield
11
+
12
+ git_commit name
13
+ end
14
+
15
+ def template(from, to = nil)
16
+ if from.match(/^\./) && !to
17
+ to = from.dup
18
+ from.gsub! /^\./, ""
19
+ end
20
+
21
+ to ||= from
22
+ from = "templates/#{from}"
23
+
24
+ remove_file to if File.exist? to
25
+ file to, File.read(File.expand_path("../#{from}", __FILE__))
26
+ end
27
+
28
+ section "rails new #{app_name}" do
29
+ git :init
30
+ end
31
+
32
+ section "Remove default Rails assets, clean up .gitignore" do
33
+ remove_file "public/index.html"
34
+ remove_file "app/assets/images/rails.png"
35
+ remove_file "README.rdoc"
36
+
37
+ # Remove comments from routes.rb
38
+ gsub_file "config/routes.rb", /^\s*\#.*$/, ""
39
+ gsub_file "config/routes.rb", /\n^\s*\n/, "\n"
40
+
41
+ run "echo '# #{app_name}' > Readme.md"
42
+
43
+ template ".gitignore"
44
+ end
45
+
46
+ section "RVM 1.9.3" do
47
+ template ".rvmrc"
48
+ end
49
+
50
+ section "Setup Gemfile, initial bundle install" do
51
+ template "Gemfile"
52
+
53
+ run "bundle install --binstubs --without production"
54
+ end
55
+
56
+ section "SASS, Bourbon, and normalize.css" do
57
+ remove_file "app/assets/stylesheets/application.css"
58
+ template "app/assets/stylesheets/application.css.sass"
59
+ template "app/assets/stylesheets/normalize.css.sass"
60
+ end
61
+
62
+ section "Slim, page_title helper, Google Analytics partial" do
63
+ remove_file "app/views/layouts/application.html.erb"
64
+ template "app/views/layouts/application.html.slim"
65
+ template "app/helpers/application_helper.rb"
66
+ template "app/views/shared/_ga.html.erb"
67
+ end
68
+
69
+ section "Setup RSpec" do
70
+ git rm: "-rf test/"
71
+
72
+ generate "rspec:install"
73
+ template "spec/spec_helper.rb"
74
+
75
+ run "guard init rspec"
76
+ end
77
+
78
+ section "Setup Fivemat RSpec formatter" do
79
+ inject_into_file ".rspec", after: "--colour" do
80
+ " --format Fivemat"
81
+ end
82
+
83
+ inject_into_file "Guardfile", after: ":version => 2" do
84
+ ", :cli => \"--format Fivemat\""
85
+ end
86
+ end
87
+
88
+ section "Setup Turnip" do
89
+ inject_into_file ".rspec", after: "--colour" do
90
+ " -r turnip/rspec"
91
+ end
92
+
93
+ inject_into_file "Guardfile", after: ":version => 2" do
94
+ ", :turnip => true"
95
+ end
96
+
97
+ template "lib/tasks/rspec.rake"
98
+
99
+ template "spec/acceptance/user.feature"
100
+ gsub_file "spec/acceptance/user.feature",
101
+ "application_name",
102
+ app_name
103
+
104
+ template "spec/support/steps/web_steps.rb"
105
+ end
106
+
107
+ section "Prevent Rails generator from creating unneccesary files" do
108
+ inject_into_file "config/application.rb", after: "class Application < Rails::Application\n" do
109
+ <<-RUBY
110
+ config.generators do |generate|
111
+ generate.helper = false
112
+ generate.javascripts = false
113
+ generate.stylesheets = false
114
+ generate.view_specs = false
115
+ end\n
116
+ RUBY
117
+ end
118
+ end
119
+
120
+ section "Configure Dalli store for production" do
121
+ gsub_file "config/environments/production.rb",
122
+ "# config.cache_store = :mem_cache_store",
123
+ "config.cache_store = :dalli_store"
124
+ end
125
+
126
+ section "Configure Travis CI" do
127
+ template ".travis.yml"
128
+ end
129
+
130
+ section "Generate PagesController with index view and root route" do
131
+ generate "controller Pages index"
132
+
133
+ route "root to: 'pages#index'"
134
+ end
135
+
136
+ section "Create database" do
137
+ run "rake db:migrate"
138
+ end
data/templates/Gemfile ADDED
@@ -0,0 +1,49 @@
1
+ source :rubygems
2
+
3
+ gem 'rails'
4
+
5
+ gem 'heroku'
6
+ gem 'jquery-rails'
7
+ gem 'newrelic_rpm'
8
+ gem 'rake'
9
+ gem 'slim-rails'
10
+ gem 'thin'
11
+
12
+ group :assets do
13
+ gem 'bourbon'
14
+ gem 'coffee-rails'
15
+ gem 'sass-rails'
16
+ gem 'uglifier'
17
+ end
18
+
19
+ group :production do
20
+ gem 'dalli'
21
+ gem 'pg'
22
+ end
23
+
24
+ group :development, :test do
25
+ gem 'rspec-rails'
26
+ gem 'sqlite3'
27
+
28
+ group :guard do
29
+ gem 'guard-cucumber'
30
+ gem 'guard-rspec'
31
+
32
+ group :darwin do
33
+ gem 'rb-fsevent'
34
+ gem 'growl'
35
+ end
36
+ end
37
+ end
38
+
39
+ group :test do
40
+ gem 'capybara'
41
+ gem 'database_cleaner'
42
+ #gem 'fabricator'
43
+ gem 'fivemat'
44
+ gem 'simplecov'
45
+ #gem 'timecop'
46
+ gem 'turnip'
47
+ #gem 'vcr'
48
+ end
49
+
@@ -0,0 +1,3 @@
1
+ @import bourbon
2
+ @import normalize
3
+
@@ -0,0 +1,410 @@
1
+ /*! normalize.css 2012-03-11T12:53 UTC - http://github.com/necolas/normalize.css
2
+
3
+ /* =============================================================================
4
+ * HTML5 display definitions
5
+ * ==========================================================================
6
+
7
+ /*
8
+ * Corrects block display not defined in IE6/7/8/9 & FF3
9
+
10
+ article, aside, details, figcaption, figure, footer, header, hgroup, nav, section, summary
11
+ display: block
12
+
13
+ /*
14
+ * Corrects inline-block display not defined in IE6/7/8/9 & FF3
15
+
16
+ audio, canvas, video
17
+ display: inline-block
18
+ *display: inline
19
+ *zoom: 1
20
+
21
+ /*
22
+ * Prevents modern browsers from displaying 'audio' without controls
23
+ * Remove excess height in iOS5 devices
24
+
25
+ audio:not([controls])
26
+ display: none
27
+ height: 0
28
+
29
+ /*
30
+ * Addresses styling for 'hidden' attribute not present in IE7/8/9, FF3, S4
31
+ * Known issue: no IE6 support
32
+
33
+ [hidden]
34
+ display: none
35
+
36
+ /* =============================================================================
37
+ * Base
38
+ * ==========================================================================
39
+
40
+ /*
41
+ * 1. Corrects text resizing oddly in IE6/7 when body font-size is set using em units
42
+ * http://clagnut.com/blog/348/#c790
43
+ * 2. Prevents iOS text size adjust after orientation change, without disabling user zoom
44
+ * www.456bereastreet.com/archive/201012/controlling_text_size_in_safari_for_ios_without_disabling_user_zoom/
45
+
46
+ html
47
+ font-size: 100%
48
+ /* 1
49
+ -webkit-text-size-adjust: 100%
50
+ /* 2
51
+ -ms-text-size-adjust: 100%
52
+ /* 2
53
+ font-family: sans-serif
54
+
55
+ /*
56
+ * Addresses font-family inconsistency between 'textarea' and other form elements.
57
+
58
+ button, input, select, textarea
59
+ font-family: sans-serif
60
+
61
+ /*
62
+ * Addresses margins handled incorrectly in IE6/7
63
+
64
+ body
65
+ margin: 0
66
+
67
+ /* =============================================================================
68
+ * Links
69
+ * ==========================================================================
70
+
71
+ /*
72
+ * Addresses outline displayed oddly in Chrome
73
+
74
+ a
75
+ &:focus
76
+ outline: thin dotted
77
+ &:hover, &:active
78
+ outline: 0
79
+
80
+ /*
81
+ * Improves readability when focused and also mouse hovered in all browsers
82
+ * people.opera.com/patrickl/experiments/keyboard/test
83
+
84
+ /* =============================================================================
85
+ * Typography
86
+ * ==========================================================================
87
+
88
+ /*
89
+ * Addresses font sizes and margins set differently in IE6/7
90
+ * Addresses font sizes within 'section' and 'article' in FF4+, Chrome, S5
91
+
92
+ h1
93
+ font-size: 2em
94
+ margin: 0.67em 0
95
+
96
+ h2
97
+ font-size: 1.5em
98
+ margin: 0.83em 0
99
+
100
+ h3
101
+ font-size: 1.17em
102
+ margin: 1em 0
103
+
104
+ h4
105
+ font-size: 1em
106
+ margin: 1.33em 0
107
+
108
+ h5
109
+ font-size: 0.83em
110
+ margin: 1.67em 0
111
+
112
+ h6
113
+ font-size: 0.75em
114
+ margin: 2.33em 0
115
+
116
+ /*
117
+ * Addresses styling not present in IE7/8/9, S5, Chrome
118
+
119
+ abbr[title]
120
+ border-bottom: 1px dotted
121
+
122
+ /*
123
+ * Addresses style set to 'bolder' in FF3+, S4/5, Chrome
124
+
125
+ b, strong
126
+ font-weight: bold
127
+
128
+ blockquote
129
+ margin: 1em 40px
130
+
131
+ /*
132
+ * Addresses styling not present in S5, Chrome
133
+
134
+ dfn
135
+ font-style: italic
136
+
137
+ /*
138
+ * Addresses styling not present in IE6/7/8/9
139
+
140
+ mark
141
+ background: #ff0
142
+ color: #000
143
+
144
+ /*
145
+ * Addresses margins set differently in IE6/7
146
+
147
+ p
148
+ margin: 1em 0
149
+
150
+ pre
151
+ margin: 1em 0
152
+ font-family: monospace, serif
153
+ _font-family: 'courier new', monospace
154
+ font-size: 1em
155
+
156
+ /*
157
+ * Corrects font family set oddly in IE6, S4/5, Chrome
158
+ * en.wikipedia.org/wiki/User:Davidgothberg/Test59
159
+
160
+ code, kbd, samp
161
+ font-family: monospace, serif
162
+ _font-family: 'courier new', monospace
163
+ font-size: 1em
164
+
165
+ /*
166
+ * Improves readability of pre-formatted text in all browsers
167
+
168
+ pre
169
+ white-space: pre
170
+ white-space: pre-wrap
171
+ word-wrap: break-word
172
+
173
+ /*
174
+ * 1. Addresses CSS quotes not supported in IE6/7
175
+ * 2. Addresses quote property not supported in S4
176
+
177
+ /* 1
178
+
179
+ q
180
+ quotes: none
181
+ &:before, &:after
182
+ content: ''
183
+ content: none
184
+
185
+ /* 2
186
+
187
+ small
188
+ font-size: 75%
189
+
190
+ /*
191
+ * Prevents sub and sup affecting line-height in all browsers
192
+ * gist.github.com/413930
193
+
194
+ sub
195
+ font-size: 75%
196
+ line-height: 0
197
+ position: relative
198
+ vertical-align: baseline
199
+
200
+ sup
201
+ font-size: 75%
202
+ line-height: 0
203
+ position: relative
204
+ vertical-align: baseline
205
+ top: -0.5em
206
+
207
+ sub
208
+ bottom: -0.25em
209
+
210
+ /* =============================================================================
211
+ * Lists
212
+ * ==========================================================================
213
+
214
+ /*
215
+ * Addresses margins set differently in IE6/7
216
+
217
+ dl, menu, ol, ul
218
+ margin: 1em 0
219
+
220
+ dd
221
+ margin: 0 0 0 40px
222
+
223
+ /*
224
+ * Addresses paddings set differently in IE6/7
225
+
226
+ menu, ol, ul
227
+ padding: 0 0 0 40px
228
+
229
+ /*
230
+ * Corrects list images handled incorrectly in IE7
231
+
232
+ nav
233
+ ul, ol
234
+ list-style: none
235
+ list-style-image: none
236
+
237
+ /* =============================================================================
238
+ * Embedded content
239
+ * ==========================================================================
240
+
241
+ /*
242
+ * 1. Removes border when inside 'a' element in IE6/7/8/9, FF3
243
+ * 2. Improves image quality when scaled in IE7
244
+ * code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/
245
+
246
+ img
247
+ border: 0
248
+ /* 1
249
+ -ms-interpolation-mode: bicubic
250
+ /* 2
251
+
252
+ /*
253
+ * Corrects overflow displayed oddly in IE9
254
+
255
+ svg:not(:root)
256
+ overflow: hidden
257
+
258
+ /* =============================================================================
259
+ * Figures
260
+ * ==========================================================================
261
+
262
+ /*
263
+ * Addresses margin not present in IE6/7/8/9, S5, O11
264
+
265
+ figure, form
266
+ margin: 0
267
+
268
+ /* =============================================================================
269
+ * Forms
270
+ * ==========================================================================
271
+
272
+ /*
273
+ * Corrects margin displayed oddly in IE6/7
274
+
275
+ /*
276
+ * Define consistent border, margin, and padding
277
+
278
+ fieldset
279
+ border: 1px solid #c0c0c0
280
+ margin: 0 2px
281
+ padding: 0.35em 0.625em 0.75em
282
+
283
+ /*
284
+ * 1. Corrects color not being inherited in IE6/7/8/9
285
+ * 2. Corrects text not wrapping in FF3
286
+ * 3. Corrects alignment displayed oddly in IE6/7
287
+
288
+ legend
289
+ border: 0
290
+ /* 1
291
+ padding: 0
292
+ white-space: normal
293
+ /* 2
294
+ *margin-left: -7px
295
+ /* 3
296
+
297
+ /*
298
+ * 1. Corrects font size not being inherited in all browsers
299
+ * 2. Addresses margins set differently in IE6/7, FF3+, S5, Chrome
300
+ * 3. Improves appearance and consistency in all browsers
301
+
302
+ button, input, select, textarea
303
+ font-size: 100%
304
+ /* 1
305
+ margin: 0
306
+ /* 2
307
+ vertical-align: baseline
308
+ /* 3
309
+ *vertical-align: middle
310
+ /* 3
311
+
312
+ /*
313
+ * Addresses FF3/4 setting line-height on 'input' using !important in the UA stylesheet
314
+
315
+ button, input
316
+ line-height: normal
317
+ /* 1
318
+
319
+ /*
320
+ * 1. Improves usability and consistency of cursor style between image-type 'input' and others
321
+ * 2. Corrects inability to style clickable 'input' types in iOS
322
+ * 3. Removes inner spacing in IE7 without affecting normal text inputs
323
+ * Known issue: inner spacing remains in IE6
324
+
325
+ button
326
+ cursor: pointer
327
+ /* 1
328
+ -webkit-appearance: button
329
+ /* 2
330
+ *overflow: visible
331
+ /* 3
332
+
333
+ input
334
+ &[type="button"], &[type="reset"], &[type="submit"]
335
+ cursor: pointer
336
+ /* 1
337
+ -webkit-appearance: button
338
+ /* 2
339
+ *overflow: visible
340
+ /* 3
341
+
342
+ /*
343
+ * Re-set default cursor for disabled elements
344
+
345
+ button[disabled]
346
+ cursor: default
347
+
348
+ input
349
+ &[disabled]
350
+ cursor: default
351
+ &[type="checkbox"], &[type="radio"]
352
+ box-sizing: border-box
353
+ /* 1
354
+ padding: 0
355
+ /* 2
356
+ *height: 13px
357
+ /* 3
358
+ *width: 13px
359
+ /* 3
360
+ &[type="search"]
361
+ -webkit-appearance: textfield
362
+ /* 1
363
+ -moz-box-sizing: content-box
364
+ -webkit-box-sizing: content-box
365
+ /* 2
366
+ box-sizing: content-box
367
+ &::-webkit-search-decoration, &::-webkit-search-cancel-button
368
+ -webkit-appearance: none
369
+
370
+ /*
371
+ * 1. Addresses box sizing set to content-box in IE8/9
372
+ * 2. Removes excess padding in IE8/9
373
+ * 3. Removes excess padding in IE7
374
+ * Known issue: excess padding remains in IE6
375
+
376
+ /*
377
+ * 1. Addresses appearance set to searchfield in S5, Chrome
378
+ * 2. Addresses box-sizing set to border-box in S5, Chrome (include -moz to future-proof)
379
+
380
+ /*
381
+ * Removes inner padding and search cancel button in S5, Chrome on OS X
382
+
383
+ /*
384
+ * Removes inner padding and border in FF3+
385
+ * www.sitepen.com/blog/2008/05/14/the-devils-in-the-details-fixing-dojos-toolbar-buttons/
386
+
387
+ button::-moz-focus-inner, input::-moz-focus-inner
388
+ border: 0
389
+ padding: 0
390
+
391
+ /*
392
+ * 1. Removes default vertical scrollbar in IE6/7/8/9
393
+ * 2. Improves readability and alignment in all browsers
394
+
395
+ textarea
396
+ overflow: auto
397
+ /* 1
398
+ vertical-align: top
399
+ /* 2
400
+
401
+ /* =============================================================================
402
+ * Tables
403
+ * ==========================================================================
404
+
405
+ /*
406
+ * Remove most spacing between table cells
407
+
408
+ table
409
+ border-collapse: collapse
410
+ border-spacing: 0
@@ -0,0 +1,9 @@
1
+ module ApplicationHelper
2
+ def page_title(title = nil)
3
+ title ||= content_for :title if content_for(:title).present?
4
+
5
+ title || Rails.application.class.parent_name
6
+ # title || "MyApp.com"
7
+ # (title ? "#{title} - " : "") << "MyApp.com"
8
+ end
9
+ end
@@ -0,0 +1,12 @@
1
+ doctype html
2
+ html
3
+ head
4
+ title = page_title
5
+ = stylesheet_link_tag :application, media: :all
6
+ = tag :meta, name: :viewport, content: 'width=device-width'
7
+ = csrf_meta_tags
8
+ body
9
+ = yield
10
+ = javascript_include_tag :application
11
+ = render 'shared/ga'
12
+
@@ -0,0 +1,18 @@
1
+ <% if ENV['GOOGLE_ANALYTICS_ACCOUNT'] %>
2
+ <script type="text/javascript">
3
+
4
+ var _gaq = _gaq || [];
5
+ _gaq.push(['_setAccount', '<%= ENV['GOOGLE_ANALYTICS_ACCOUNT'] %>']);
6
+ <% if ENV['GOOGLE_ANALYTICS_DOMAIN'] %>
7
+ _gaq.push(['_setDomainName', '<%= ENV['GOOGLE_ANALYTICS_DOMAIN'] %>']);
8
+ <% end %>
9
+ _gaq.push(['_trackPageview']);
10
+
11
+ (function() {
12
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
13
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
14
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
15
+ })();
16
+
17
+ </script>
18
+ <% end %>
@@ -0,0 +1,6 @@
1
+ /.bundle
2
+ /bin
3
+ /db/*.sqlite3
4
+ /log/*.log
5
+ /tmp
6
+ /coverage
@@ -0,0 +1,7 @@
1
+ task(:spec).clear
2
+
3
+ desc "Run all specs/features in spec directory"
4
+ RSpec::Core::RakeTask.new spec: 'db:test:prepare' do |t|
5
+ t.pattern = './spec/**/*{_spec.rb,.feature}'
6
+ end
7
+
data/templates/rvmrc ADDED
@@ -0,0 +1 @@
1
+ rvm 1.9.3
@@ -0,0 +1,5 @@
1
+ Feature: User
2
+ Scenario: Visit the home page
3
+ When I visit "/"
4
+ Then I should see "app_name"
5
+
@@ -0,0 +1,32 @@
1
+ unless ENV['GUARD_NOTIFY'] # Only run simplecov with Rake
2
+ require 'simplecov'
3
+ SimpleCov.start :rails
4
+ end
5
+
6
+ ENV["RAILS_ENV"] ||= 'test'
7
+ require File.expand_path("../../config/environment", __FILE__)
8
+ require 'rspec/rails'
9
+ require 'rspec/autorun'
10
+ require 'capybara/rspec'
11
+ require 'turnip/capybara'
12
+
13
+ Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
14
+
15
+ RSpec.configure do |config|
16
+ config.infer_base_class_for_anonymous_controllers = true
17
+ config.treat_symbols_as_metadata_keys_with_true_values = true
18
+
19
+ config.before :suite do
20
+ DatabaseCleaner.strategy = :transaction
21
+ DatabaseCleaner.clean_with :truncation
22
+ end
23
+
24
+ config.before :each do
25
+ DatabaseCleaner.start
26
+ end
27
+
28
+ config.after :each do
29
+ DatabaseCleaner.clean
30
+ end
31
+ end
32
+
@@ -0,0 +1,12 @@
1
+ step "I visit :path" do |path|
2
+ visit path
3
+ end
4
+
5
+ step "I should see :text" do |text|
6
+ page.has_content? text
7
+ end
8
+
9
+ step "show me the page" do
10
+ save_and_open_page
11
+ end
12
+
@@ -0,0 +1,6 @@
1
+ rvm:
2
+ - 1.9.3
3
+ - ruby-head
4
+ matrix:
5
+ allow_failures:
6
+ - rvm: ruby-head
metadata ADDED
@@ -0,0 +1,100 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: caboose
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0.pre
5
+ prerelease: 6
6
+ platform: ruby
7
+ authors:
8
+ - Justin Campbell
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-07-09 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: '0'
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: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: rake
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ description:
47
+ email: jcampbell@justincampbell.me
48
+ executables:
49
+ - caboose
50
+ extensions: []
51
+ extra_rdoc_files: []
52
+ files:
53
+ - .gitignore
54
+ - .rvmrc
55
+ - .travis.yml
56
+ - Gemfile
57
+ - Rakefile
58
+ - Readme.md
59
+ - bin/caboose
60
+ - caboose.gemspec
61
+ - caboose.rb
62
+ - templates/Gemfile
63
+ - templates/app/assets/stylesheets/application.css.sass
64
+ - templates/app/assets/stylesheets/normalize.css.sass
65
+ - templates/app/helpers/application_helper.rb
66
+ - templates/app/views/layouts/application.html.slim
67
+ - templates/app/views/shared/_ga.html.erb
68
+ - templates/gitignore
69
+ - templates/lib/tasks/rspec.rake
70
+ - templates/rvmrc
71
+ - templates/spec/acceptance/user.feature
72
+ - templates/spec/spec_helper.rb
73
+ - templates/spec/support/steps/web_steps.rb
74
+ - templates/travis.yml
75
+ homepage: http://justincampbell.github.com/caboose
76
+ licenses: []
77
+ post_install_message:
78
+ rdoc_options: []
79
+ require_paths:
80
+ - templates
81
+ required_ruby_version: !ruby/object:Gem::Requirement
82
+ none: false
83
+ requirements:
84
+ - - ! '>='
85
+ - !ruby/object:Gem::Version
86
+ version: '0'
87
+ required_rubygems_version: !ruby/object:Gem::Requirement
88
+ none: false
89
+ requirements:
90
+ - - ! '>'
91
+ - !ruby/object:Gem::Version
92
+ version: 1.3.1
93
+ requirements: []
94
+ rubyforge_project:
95
+ rubygems_version: 1.8.23
96
+ signing_key:
97
+ specification_version: 3
98
+ summary: Template for Rails
99
+ test_files: []
100
+ has_rdoc: