shoelaces 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +4 -0
  3. data/.ruby-version +1 -0
  4. data/.travis.yml +11 -0
  5. data/CONTRIBUTING.md +37 -0
  6. data/Gemfile +3 -0
  7. data/Gemfile.lock +131 -0
  8. data/LICENSE +21 -0
  9. data/README.md +211 -0
  10. data/Rakefile +8 -0
  11. data/bin/rake +16 -0
  12. data/bin/rspec +16 -0
  13. data/bin/setup +13 -0
  14. data/bin/shoelaces +13 -0
  15. data/lib/shoelaces.rb +4 -0
  16. data/lib/shoelaces/actions.rb +29 -0
  17. data/lib/shoelaces/app_builder.rb +437 -0
  18. data/lib/shoelaces/generators/app_generator.rb +233 -0
  19. data/lib/shoelaces/version.rb +5 -0
  20. data/shoelaces.gemspec +53 -0
  21. data/spec/fakes/bin/heroku +5 -0
  22. data/spec/fakes/bin/hub +5 -0
  23. data/spec/features/github_spec.rb +10 -0
  24. data/spec/features/heroku_spec.rb +19 -0
  25. data/spec/features/new_project_spec.rb +77 -0
  26. data/spec/spec_helper.rb +24 -0
  27. data/spec/support/fake_github.rb +21 -0
  28. data/spec/support/fake_heroku.rb +38 -0
  29. data/spec/support/shoelaces.rb +49 -0
  30. data/templates/Gemfile.erb +63 -0
  31. data/templates/Guardfile +33 -0
  32. data/templates/Procfile +2 -0
  33. data/templates/README.md.erb +34 -0
  34. data/templates/_analytics.html.erb +7 -0
  35. data/templates/_flashes.html.erb +7 -0
  36. data/templates/_javascript.html.erb +12 -0
  37. data/templates/_variables.scss +2 -0
  38. data/templates/about.html.erb.erb +67 -0
  39. data/templates/action_mailer.rb +5 -0
  40. data/templates/application.css.scss +18 -0
  41. data/templates/background_jobs_rspec.rb +19 -0
  42. data/templates/bin_setup.erb +34 -0
  43. data/templates/config_locales_en.yml +16 -0
  44. data/templates/contact.html.erb.erb +67 -0
  45. data/templates/database_cleaner_rspec.rb +21 -0
  46. data/templates/development_seeds.rb +12 -0
  47. data/templates/disable_xml_params.rb +3 -0
  48. data/templates/errors.rb +34 -0
  49. data/templates/factory_girl_rspec.rb +3 -0
  50. data/templates/high_voltage.rb +3 -0
  51. data/templates/home.html.erb.erb +16 -0
  52. data/templates/i18n.rb +3 -0
  53. data/templates/newrelic.yml.erb +34 -0
  54. data/templates/noise.png +0 -0
  55. data/templates/postgresql_database.yml.erb +12 -0
  56. data/templates/rack_timeout.rb +1 -0
  57. data/templates/sample.env +3 -0
  58. data/templates/secrets.yml +14 -0
  59. data/templates/shoelaces_gitignore +13 -0
  60. data/templates/shoelaces_layout.html.erb.erb +25 -0
  61. data/templates/shoelaces_layout_footer.html.erb.erb +11 -0
  62. data/templates/shoelaces_layout_header.html.erb.erb +33 -0
  63. data/templates/smtp.rb +9 -0
  64. data/templates/spec_helper.rb +30 -0
  65. data/templates/staging.rb +5 -0
  66. data/templates/travis.yml.erb +24 -0
  67. data/templates/unicorn.rb +30 -0
  68. metadata +232 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 2e054a3db82fad03b43a2116295a3344b29db01a
4
+ data.tar.gz: d75b5f1e2ff40356cb5e8e2c09be99a42cd53867
5
+ SHA512:
6
+ metadata.gz: d7399bf4f1d59c5607119f978ed2b074bd791ab169cdff27673c1c26006e438c55492b77023493cffb3d9c377f631753641a8903d1822f4dd631df26f99e9854
7
+ data.tar.gz: b5c3a3a2d91b44202ff6ce81ccc8a8915708c6641a4a826814ea2869a717538ab1b5b7e6ebb26ae68b1c9bd50cb04761d82b9ec0e768a6233d5e3cfa9ce22670
@@ -0,0 +1,4 @@
1
+ *.gem
2
+ *.swp
3
+ /.bundle
4
+ /tmp/dummy
@@ -0,0 +1 @@
1
+ 2.1.2
@@ -0,0 +1,11 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.1.2
4
+ before_install:
5
+ - "echo '--colour' > ~/.rspec"
6
+ - git config --global user.name 'Travis CI'
7
+ - git config --global user.email 'travis-ci@example.com'
8
+ install:
9
+ - bundle install
10
+ notifications:
11
+ email: false
@@ -0,0 +1,37 @@
1
+ # Contributing
2
+
3
+ Feel free to contribute to this project, however, it may be better to
4
+ contribute to the original [Suspenders][suspenders-contrib] project instead.
5
+
6
+ If you do want to contribute please follow the same thoughtbot guidelines:
7
+
8
+ Fork the repo:
9
+
10
+ git clone git@github.com:jonr22/shoelaces.git
11
+
12
+ Set up your machine:
13
+
14
+ ./bin/setup
15
+
16
+ Make sure the tests pass:
17
+
18
+ rake
19
+
20
+ Make your change. Add tests for your change. Make the tests pass:
21
+
22
+ rake
23
+
24
+ Push to your fork and [submit a pull request][pr].
25
+
26
+ [pr]: https://github.com/jonr22/shoelaces/compare/
27
+
28
+
29
+ Some things that will increase the chance that your pull request is accepted:
30
+
31
+ * Write tests.
32
+ * Follow our [style guide][style].
33
+ * Write a [good commit message][commit].
34
+
35
+ [style]: https://github.com/thoughtbot/guides/tree/master/style
36
+ [commit]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
37
+ [suspenders-contrib]: https://github.com/thoughtbot/suspenders/blob/master/CONTRIBUTING.md
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
@@ -0,0 +1,131 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ shoelaces (0.1.0)
5
+ bundler (~> 1.3)
6
+ rails (= 4.1.4)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ actionmailer (4.1.4)
12
+ actionpack (= 4.1.4)
13
+ actionview (= 4.1.4)
14
+ mail (~> 2.5.4)
15
+ actionpack (4.1.4)
16
+ actionview (= 4.1.4)
17
+ activesupport (= 4.1.4)
18
+ rack (~> 1.5.2)
19
+ rack-test (~> 0.6.2)
20
+ actionview (4.1.4)
21
+ activesupport (= 4.1.4)
22
+ builder (~> 3.1)
23
+ erubis (~> 2.7.0)
24
+ activemodel (4.1.4)
25
+ activesupport (= 4.1.4)
26
+ builder (~> 3.1)
27
+ activerecord (4.1.4)
28
+ activemodel (= 4.1.4)
29
+ activesupport (= 4.1.4)
30
+ arel (~> 5.0.0)
31
+ activesupport (4.1.4)
32
+ i18n (~> 0.6, >= 0.6.9)
33
+ json (~> 1.7, >= 1.7.7)
34
+ minitest (~> 5.1)
35
+ thread_safe (~> 0.1)
36
+ tzinfo (~> 1.1)
37
+ arel (5.0.1.20140414130214)
38
+ aruba (0.5.4)
39
+ childprocess (>= 0.3.6)
40
+ cucumber (>= 1.1.1)
41
+ rspec-expectations (>= 2.7.0)
42
+ builder (3.2.2)
43
+ capybara (2.3.0)
44
+ mime-types (>= 1.16)
45
+ nokogiri (>= 1.3.3)
46
+ rack (>= 1.0.0)
47
+ rack-test (>= 0.5.4)
48
+ xpath (~> 2.0)
49
+ childprocess (0.5.3)
50
+ ffi (~> 1.0, >= 1.0.11)
51
+ cucumber (1.3.15)
52
+ builder (>= 2.1.2)
53
+ diff-lcs (>= 1.1.3)
54
+ gherkin (~> 2.12)
55
+ multi_json (>= 1.7.5, < 2.0)
56
+ multi_test (>= 0.1.1)
57
+ diff-lcs (1.2.5)
58
+ erubis (2.7.0)
59
+ ffi (1.9.3)
60
+ gherkin (2.12.2)
61
+ multi_json (~> 1.3)
62
+ hike (1.2.3)
63
+ i18n (0.6.11)
64
+ json (1.8.1)
65
+ mail (2.5.4)
66
+ mime-types (~> 1.16)
67
+ treetop (~> 1.4.8)
68
+ mime-types (1.25.1)
69
+ mini_portile (0.6.0)
70
+ minitest (5.4.0)
71
+ multi_json (1.10.1)
72
+ multi_test (0.1.1)
73
+ nokogiri (1.6.2.1)
74
+ mini_portile (= 0.6.0)
75
+ polyglot (0.3.5)
76
+ rack (1.5.2)
77
+ rack-test (0.6.2)
78
+ rack (>= 1.0)
79
+ rails (4.1.4)
80
+ actionmailer (= 4.1.4)
81
+ actionpack (= 4.1.4)
82
+ actionview (= 4.1.4)
83
+ activemodel (= 4.1.4)
84
+ activerecord (= 4.1.4)
85
+ activesupport (= 4.1.4)
86
+ bundler (>= 1.3.0, < 2.0)
87
+ railties (= 4.1.4)
88
+ sprockets-rails (~> 2.0)
89
+ railties (4.1.4)
90
+ actionpack (= 4.1.4)
91
+ activesupport (= 4.1.4)
92
+ rake (>= 0.8.7)
93
+ thor (>= 0.18.1, < 2.0)
94
+ rake (10.3.2)
95
+ rspec (2.99.0)
96
+ rspec-core (~> 2.99.0)
97
+ rspec-expectations (~> 2.99.0)
98
+ rspec-mocks (~> 2.99.0)
99
+ rspec-core (2.99.0)
100
+ rspec-expectations (2.99.0)
101
+ diff-lcs (>= 1.1.3, < 2.0)
102
+ rspec-mocks (2.99.0)
103
+ sprockets (2.12.1)
104
+ hike (~> 1.2)
105
+ multi_json (~> 1.0)
106
+ rack (~> 1.0)
107
+ tilt (~> 1.1, != 1.3.0)
108
+ sprockets-rails (2.1.3)
109
+ actionpack (>= 3.0)
110
+ activesupport (>= 3.0)
111
+ sprockets (~> 2.8)
112
+ thor (0.19.1)
113
+ thread_safe (0.3.4)
114
+ tilt (1.4.1)
115
+ treetop (1.4.15)
116
+ polyglot
117
+ polyglot (>= 0.3.1)
118
+ tzinfo (1.2.1)
119
+ thread_safe (~> 0.1)
120
+ xpath (2.0.0)
121
+ nokogiri (~> 1.3)
122
+
123
+ PLATFORMS
124
+ ruby
125
+
126
+ DEPENDENCIES
127
+ aruba (~> 0.5)
128
+ capybara (~> 2.2, >= 2.2.0)
129
+ cucumber (~> 1.2)
130
+ rspec (~> 2.0)
131
+ shoelaces!
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License
2
+
3
+ Copyright (c) 2010-2012 Mike Burns and thoughtbot, inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,211 @@
1
+ # Shoelaces
2
+
3
+ Shoelaces is a base Rails application forked from
4
+ [Suspenders](https://github.com/thoughtbot/suspenders) by
5
+ [thoughtbot](http://thoughtbot.com).
6
+
7
+ It's almost exactly the same as Suspenders, however the main difference
8
+ is the use of [Bootstrap](http://getbootstrap.com/) instead of
9
+ [Bourbon](http://bourbon.io/).
10
+
11
+ The code is largely all from [thoughtbot](http://thoughtbot.com), so
12
+ this project owes a big thanks to their fantastic open source contributions.
13
+
14
+ Installation
15
+ ------------
16
+
17
+ First install the shoelaces gem:
18
+
19
+ gem install shoelaces
20
+
21
+ Then run:
22
+
23
+ shoelaces projectname
24
+
25
+ This will create a Rails app in `projectname` using the latest version of Rails.
26
+
27
+ Gemfile
28
+ -------
29
+
30
+ To see the latest and greatest gems, look at Shoelaces'
31
+ [Gemfile](templates/Gemfile.erb), which will be appended to the default
32
+ generated projectname/Gemfile.
33
+
34
+ It includes application gems like:
35
+
36
+ * [Airbrake](https://github.com/airbrake/airbrake) for exception notification
37
+ * [Boostrap](https://github.com/twbs/bootstrap-sass) for bootstrap
38
+ * [Delayed Job](https://github.com/collectiveidea/delayed_job) for background
39
+ processing
40
+ * [Email Validator](https://github.com/balexand/email_validator) for email
41
+ validation
42
+ * [High Voltage](https://github.com/thoughtbot/high_voltage) for static pages
43
+ * [jQuery Rails](https://github.com/rails/jquery-rails) for jQuery
44
+ * [Postgres](https://github.com/ged/ruby-pg) for access to the Postgres database
45
+ * [Rack Timeout](https://github.com/kch/rack-timeout) to abort requests that are
46
+ taking too long
47
+ * [Recipient Interceptor](https://github.com/croaky/recipient_interceptor) to
48
+ avoid accidentally sending emails to real people from staging
49
+ * [Simple Form](https://github.com/plataformatec/simple_form) for form markup
50
+ and style
51
+ * [Title](https://github.com/calebthompson/title) for storing titles in
52
+ translations
53
+ * [Unicorn](https://github.com/defunkt/unicorn) to serve HTTP requests
54
+
55
+ And gems only for staging and production like:
56
+
57
+ * [New Relic RPM](https://github.com/newrelic/rpm) for monitoring performance
58
+ * [Rails 12 Factor](https://github.com/heroku/rails_12factor) to make running
59
+ Rails 4 apps easier on Heroku
60
+
61
+ And development gems like:
62
+
63
+ * [Dotenv](https://github.com/bkeepers/dotenv) for loading environment variables
64
+ * [Pry Rails](https://github.com/rweng/pry-rails) for interactively exploring
65
+ objects
66
+ * [ByeBug](https://github.com/deivid-rodriguez/byebug) for interactively
67
+ debugging behavior
68
+ * [Spring](https://github.com/rails/spring) for fast Rails actions via
69
+ pre-loading
70
+
71
+ And testing gems like:
72
+
73
+ * [Capybara](https://github.com/jnicklas/capybara) and
74
+ [Capybara Webkit](https://github.com/thoughtbot/capybara-webkit) for
75
+ integration testing
76
+ * [Factory Girl](https://github.com/thoughtbot/factory_girl) for test data
77
+ * [Formulaic](https://github.com/thoughtbot/formulaic) for integration testing
78
+ HTML forms
79
+ * [RSpec](https://github.com/rspec/rspec) for unit testing
80
+ * [RSpec Mocks](https://github.com/rspec/rspec-mocks) for stubbing and spying
81
+ * [Shoulda Matchers](https://github.com/thoughtbot/shoulda-matchers) for common
82
+ RSpec matchers
83
+ * [Timecop](https://github.com/jtrupiano/timecop-console) for testing time
84
+
85
+ Other goodies
86
+ -------------
87
+
88
+ Shoelaces also comes with:
89
+
90
+ * The [`./bin/setup`][bin] convention for new developer setup
91
+ * Rails' flashes set up and in application layout
92
+ * A few nice time formats set up for localization
93
+ * `Rack::Deflater` to [compress responses with Gzip][compress]
94
+ * [Fast-failing factories][fast]
95
+ * A [low database connection pool limit][pool]
96
+ * [Safe binstubs][binstub]
97
+ * [t() and l() in specs without prefixing with I18n][i18n]
98
+ * An automatically-created `SECRET_KEY_BASE` environment variable in all
99
+ environments.
100
+ * Configuration for [Travis Pro][travis] continuous integration.
101
+ * The analytics adapter [Segment.io][segment] (and therefore config for Google
102
+ Analytics, Intercom, Facebook Ads, Twitter Ads, etc.).
103
+ * A few static pages included home, about, and contact with some basic styling
104
+
105
+ [bin]: http://robots.thoughtbot.com/bin-setup
106
+ [compress]: http://robots.thoughtbot.com/content-compression-with-rack-deflater/
107
+ [fast]: http://robots.thoughtbot.com/testing-your-factories-first
108
+ [pool]: https://devcenter.heroku.com/articles/concurrency-and-database-connections
109
+ [binstub]: https://github.com/thoughtbot/suspenders/pull/282
110
+ [i18n]: https://github.com/thoughtbot/suspenders/pull/304
111
+ [travis]: http://docs.travis-ci.com/user/travis-pro/
112
+ [segment]: https://segment.io
113
+
114
+ Heroku
115
+ ------
116
+
117
+ You can optionally create Heroku staging and production apps:
118
+
119
+ shoelaces app --heroku true
120
+
121
+ This:
122
+
123
+ * Creates a staging and production Heroku app
124
+ * Sets them as `staging` and `production` Git remotes
125
+ * Configures staging with `RACK_ENV` and `RAILS_ENV` environment variables set
126
+ to `staging`
127
+
128
+ Git
129
+ ---
130
+
131
+ This will initialize a new git repository for your Rails app. You can
132
+ bypass this with the `--skip-git` option:
133
+
134
+ shoelaces app --skip-git true
135
+
136
+ GitHub
137
+ ------
138
+
139
+ You can optionally create a GitHub repository for the suspended Rails app. It
140
+ requires that you have [Hub](https://github.com/github/hub) on your system:
141
+
142
+ curl http://hub.github.com/standalone -sLo ~/bin/hub && chmod +x ~/bin/hub
143
+ shoelaces app --github organization/project
144
+
145
+ This has the same effect as running:
146
+
147
+ hub create organization/project
148
+
149
+ Port
150
+ ----
151
+
152
+ You can manually set the port for the application to use instead of using the
153
+ random selection:
154
+
155
+ shoelaces app --port 4040
156
+
157
+ Dependencies
158
+ ------------
159
+
160
+ Shoelaces requires the latest version of Ruby.
161
+
162
+ Some gems included in Shoelaces have native extensions. You should have GCC
163
+ installed on your machine before generating an app with Shoelaces.
164
+
165
+ Use [OS X GCC Installer](https://github.com/kennethreitz/osx-gcc-installer/) for
166
+ Snow Leopard (OS X 10.6).
167
+
168
+ Use [Command Line Tools for XCode](https://developer.apple.com/downloads/index.action)
169
+ for Lion (OS X 10.7) or Mountain Lion (OS X 10.8).
170
+
171
+ We use [Capybara Webkit](https://github.com/thoughtbot/capybara-webkit) for
172
+ full-stack JavaScript integration testing. It requires QT. Instructions for
173
+ installing QT are
174
+ [here](https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit).
175
+
176
+ PostgreSQL needs to be installed and running for the `db:create` rake task.
177
+
178
+ Issues
179
+ ------
180
+
181
+ If you have problems, please create a
182
+ [GitHub Issue](https://github.com/jonr22/shoelaces/issues).
183
+
184
+ Contributing
185
+ ------------
186
+
187
+ To update Shoelaces' Ruby version, change `.ruby-version` and `.travis.yml`.
188
+
189
+ Please see [CONTRIBUTING.md](CONTRIBUTING.md) for further details.
190
+
191
+ Credits
192
+ -------
193
+
194
+ All credit should go to the guys at thoughtbot for creating and
195
+ maintaining Suspenders:
196
+
197
+ ![thoughtbot](http://thoughtbot.com/images/tm/logo.png)
198
+
199
+ Suspenders is maintained and funded by
200
+ [thoughtbot, inc](http://thoughtbot.com/community).
201
+
202
+ The names and logos for thoughtbot are trademarks of thoughtbot, inc.
203
+
204
+ License
205
+ -------
206
+
207
+ I don't know much about licensing, but I've included the Suspenders license in
208
+ case:
209
+
210
+ Suspenders is Copyright © 2008-2014 thoughtbot. It is free software, and may be
211
+ redistributed under the terms specified in the LICENSE file.
@@ -0,0 +1,8 @@
1
+ require 'bundler/setup'
2
+ require 'bundler/gem_tasks'
3
+ require 'rspec/core/rake_task'
4
+
5
+ RSpec::Core::RakeTask.new(:rspec)
6
+
7
+ desc 'Run the test suite'
8
+ task :default => :rspec