pah 0.0.14 → 0.0.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +23 -0
  3. data/CONTRIBUTING.md +2 -3
  4. data/LICENSE.txt +1 -1
  5. data/README.md +0 -1
  6. data/features/bourbon.feature +23 -0
  7. data/features/bullet.feature +2 -1
  8. data/features/canonical_host.feature +2 -1
  9. data/features/capybara.feature +2 -1
  10. data/features/database.feature +2 -1
  11. data/features/env.feature +2 -1
  12. data/features/gemfile.feature +3 -2
  13. data/features/generators.feature +2 -1
  14. data/features/git.feature +2 -1
  15. data/features/heroku.feature +2 -1
  16. data/features/jumpup.feature +2 -1
  17. data/features/layout.feature +2 -2
  18. data/features/letter_opener.feature +2 -1
  19. data/features/locale.feature +4 -3
  20. data/features/newrelic.feature +2 -1
  21. data/features/public.feature +2 -1
  22. data/features/puma.feature +2 -1
  23. data/features/rack_deflater.feature +2 -1
  24. data/features/rack_timeout.feature +2 -1
  25. data/features/rails_works.feature +4 -2
  26. data/features/readme.feature +2 -1
  27. data/features/remove_unused_files.feature +2 -1
  28. data/features/rollbar.feature +3 -2
  29. data/features/rspec.feature +3 -1
  30. data/features/run_specs.feature +2 -1
  31. data/features/runner.feature +42 -4
  32. data/features/secret_token.feature +2 -1
  33. data/features/secure_headers.feature +2 -1
  34. data/features/sendgrid.feature +2 -1
  35. data/features/simple_form.feature +2 -1
  36. data/features/step_definitions/create_simple_app.rb +19 -9
  37. data/features/step_definitions/file_content.rb +5 -0
  38. data/features/support/env.rb +3 -0
  39. data/lib/pah/files/Gemfile +24 -25
  40. data/lib/pah/files/app/views/application/_flash_messages.html.slim +3 -4
  41. data/lib/pah/files/app/views/layouts/application.html.slim +4 -33
  42. data/lib/pah/files/config/initializers/rack_timeout.rb +3 -1
  43. data/lib/pah/files/spec/acceptance/dummy_spec.rb +2 -2
  44. data/lib/pah/files/spec/rails_helper.rb +19 -0
  45. data/lib/pah/files/spec/spec_helper.rb +10 -43
  46. data/lib/pah/pah.rb +64 -0
  47. data/lib/pah/partials/_bourbon.rb +25 -0
  48. data/lib/pah/partials/_heroku.rb +16 -9
  49. data/lib/pah/partials/_layout.rb +1 -2
  50. data/lib/pah/partials/_locale.rb +2 -2
  51. data/lib/pah/partials/_rack_deflater.rb +1 -1
  52. data/lib/pah/partials/_rollbar.rb +1 -1
  53. data/lib/pah/partials/_rspec.rb +1 -0
  54. data/lib/pah/template.rb +2 -58
  55. data/lib/pah/version.rb +2 -2
  56. metadata +9 -15
  57. data/features/assets.feature +0 -13
  58. data/lib/pah/files/app/assets/javascripts/application.js +0 -33
  59. data/lib/pah/files/app/assets/stylesheets/_variables.scss +0 -39
  60. data/lib/pah/files/app/assets/stylesheets/application.scss +0 -5
  61. data/lib/pah/files/app/assets/stylesheets/form.scss +0 -248
  62. data/lib/pah/files/app/assets/stylesheets/general.scss +0 -47
  63. data/lib/pah/files/app/assets/stylesheets/reset.scss +0 -75
  64. data/lib/pah/files/app/assets/stylesheets/responsive.scss +0 -97
  65. data/lib/pah/files/app/views/application/_error_messages.html.slim +0 -5
  66. data/lib/pah/partials/_assets.rb +0 -12
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 68719a71087c3d679e4a5cf0a6e0030ba9febe6e
4
- data.tar.gz: db41369b629689e32fcef5d329523783d1ff0806
3
+ metadata.gz: aefde0840d5b8588677fc13ae97cff010276c0c5
4
+ data.tar.gz: 6b830904ceb2a0c7c85443095b4fa3ed9b4f9102
5
5
  SHA512:
6
- metadata.gz: 3703e095bff01b40166ae757e81df9cea0a7071a101297732bb45d0f13c301322c11e4de83a552d8e673b17226146de42a579d5ca1db89796aff09b64df269e0
7
- data.tar.gz: 931a01534fe713bcd913623bb59580afda2f5dae73067875a2a8ea5a0168ab56b217fefd842b5515fca7696957efdfad19856c7d2fc4284f7eb691063bb31449
6
+ metadata.gz: 368b681a9691477b6d308afcbe236a61e3f821bc197d719ecf10134e0c06f928ed95368a226e959c7403d395aff03e240dc206a1e1cd11cdadd163430b51870c
7
+ data.tar.gz: 91627b7e415e0217507fdf77db0cb8ecc9061e7a48b3f551c87864d5f164eb845646e75e45aecc88596d3991ee9a49c99efcecd3b1df3536ea7fe33048581fae
@@ -1,5 +1,28 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.0.15 (unreleased)
4
+
5
+ ### features
6
+
7
+ - Config bourbon, neat and bitters
8
+
9
+ ### improvements
10
+
11
+ - Update email_spec to `1.6.0`
12
+ - Update rspec-rails to 3.0.1
13
+ - Update rollbar to 0.13.1
14
+ - Update VCR to 2.9.2
15
+ - Remove extra CSS and HTML markup
16
+ - Future proof rollbar config for staging environments
17
+ - Update gem versions
18
+ - Move production/staging only gems to the correct group on Gemfile
19
+
20
+
21
+ ### bug fixed
22
+
23
+ - Fix the I18n problem (ref.: https://github.com/rails/rails/issues/13164#issuecomment-39744133)
24
+ - Error out when `heroku` commands fail to run during app's creation
25
+
3
26
  ## 0.0.14 (May 30, 2014)
4
27
 
5
28
  ### improvements
@@ -23,9 +23,8 @@ a test!
23
23
 
24
24
  1. Create new Pull Request
25
25
 
26
- At this point you're waiting on us. We like to at least comment on, if not
27
- accept, pull requests within three business days (and, typically, one business
28
- day). We may suggest some changes or improvements or alternatives.
26
+ At this point you're waiting on us. We like to at least give you feedback, if not just
27
+ accept it, within a few days, depending on our internal priorities.
29
28
 
30
29
  Some things that will increase the chance that your pull request is accepted is to follow the practices described on [Ruby style guide](https://github.com/bbatsov/ruby-style-guide), [Rails style guide](https://github.com/bbatsov/rails-style-guide) and [Better Specs](http://betterspecs.org/).
31
30
 
@@ -1,4 +1,4 @@
1
- Copyright (c) 2013 Mauro George
1
+ Copyright (c) 2013-2014 HE:labs
2
2
 
3
3
  MIT License
4
4
 
data/README.md CHANGED
@@ -67,7 +67,6 @@ Please see [CONTRIBUTING.md](https://github.com/Helabs/pah/blob/master/CONTRIBUT
67
67
  - Refactor the templates/partials logic
68
68
  - Extract "utils" to somewhere else outside the template.rb
69
69
  - Make sure all the generated files are not beign overriden with older versions (like spec_helper, applications config & etc), don't copy files.. build them
70
- - Remove all the default CSS/views/controllers that are not necessary for a new project
71
70
  - Remove the old and unused spec/support files
72
71
  - Release version 1.0
73
72
 
@@ -0,0 +1,23 @@
1
+ @no-clobber
2
+ Feature: Bourbon
3
+ Background:
4
+ Given I have created the app "myapp" with pah
5
+
6
+ Scenario: Correct bourbon install
7
+ Then I have the file app/assets/stylesheets/application.css.scss and contents of this file should include:
8
+ """
9
+ @import 'bourbon';
10
+ @import 'base/base';
11
+ @import 'neat';
12
+ """
13
+ Then I have the file app/assets/stylesheets/application.css.scss and contents of this file should not include:
14
+ """
15
+ *= require_tree .
16
+ """
17
+ Then I have the file app/assets/stylesheets/base/_base.scss and contents of this file should match:
18
+ """
19
+ ^@import 'grid-settings';
20
+ """
21
+ Then I dont have a app/assets/stylesheets/application.css
22
+
23
+
@@ -1,6 +1,7 @@
1
+ @no-clobber
1
2
  Feature: Bullet
2
3
  Background:
3
- Given I have created a app with pah
4
+ Given I have created the app "myapp" with pah
4
5
 
5
6
  Scenario: Have correct files
6
7
  Then I have a config/initializers/bullet.rb
@@ -1,6 +1,7 @@
1
+ @no-clobber
1
2
  Feature: Canonical Host
2
3
  Background:
3
- Given I have created a app with pah
4
+ Given I have created the app "myapp" with pah
4
5
 
5
6
  Scenario: Have correct files
6
7
  Then I have the file config.ru and contents of this file should include:
@@ -1,6 +1,7 @@
1
+ @no-clobber
1
2
  Feature: Capybara
2
3
  Background:
3
- Given I have created a app with pah
4
+ Given I have created the app "myapp" with pah
4
5
 
5
6
  Scenario: Have correct files
6
7
  Then I have a spec/support/acceptance_helpers.rb
@@ -1,6 +1,7 @@
1
+ @no-clobber
1
2
  Feature: Database
2
3
  Background:
3
- Given I have created a app with pah
4
+ Given I have created the app "myapp" with pah
4
5
 
5
6
  Scenario: Have correct files
6
7
  Then I have the file config/database.yml and contents of this file should include:
@@ -1,6 +1,7 @@
1
+ @no-clobber
1
2
  Feature: Env files
2
3
  Background:
3
- Given I have created a app with pah
4
+ Given I have created the app "myapp" with pah
4
5
 
5
6
  Scenario: Create env files
6
7
  Then I have the file .ruby-version and contents of this file should be:
@@ -1,10 +1,11 @@
1
+ @no-clobber
1
2
  Feature: Gemfile
2
3
  Background:
3
- Given I have created a app with pah
4
+ Given I have created the app "myapp" with pah
4
5
 
5
6
  Scenario: Correct gems on gemfile
6
7
  Then I have the file Gemfile and contents of this file should include:
7
8
  """
8
- gem 'rails', '4.1.1'
9
+ gem 'rails', '4.1.4'
9
10
  """
10
11
 
@@ -1,6 +1,7 @@
1
+ @no-clobber
1
2
  Feature: Generators
2
3
  Background:
3
- Given I have created a app with pah
4
+ Given I have created the app "myapp" with pah
4
5
 
5
6
  Scenario: Have correct files
6
7
  Then I have the file config/application.rb and contents of this file should include:
@@ -1,6 +1,7 @@
1
+ @no-clobber
1
2
  Feature: Git repository
2
3
  Background:
3
- Given I have created a app with pah
4
+ Given I have created the app "myapp" with pah
4
5
 
5
6
  Scenario: Create a git repo
6
7
  Then I have a .git
@@ -1,6 +1,7 @@
1
+ @no-clobber
1
2
  Feature: Heroku
2
3
  Background:
3
- Given I have created a app with pah
4
+ Given I have created the app "myapp" with pah
4
5
 
5
6
  Scenario: Have correct files
6
7
  Then I have a Procfile
@@ -1,6 +1,7 @@
1
+ @no-clobber
1
2
  Feature: Jumpup
2
3
  Background:
3
- Given I have created a app with pah
4
+ Given I have created the app "myapp" with pah
4
5
 
5
6
  Scenario: Have correct files
6
7
  Then I have a lib/tasks/jumpup.rake
@@ -1,10 +1,10 @@
1
+ @no-clobber
1
2
  Feature: Layout
2
3
  Background:
3
- Given I have created a app with pah
4
+ Given I have created the app "myapp" with pah
4
5
 
5
6
  Scenario: Have correct files
6
7
  Then I have a app/views/layouts/application.html.slim
7
- Then I have a app/views/application/_error_messages.html.slim
8
8
  Then I have a app/views/application/_flash_messages.html.slim
9
9
  Then I have the file app/views/layouts/application.html.slim and contents of this file should include:
10
10
  """
@@ -1,6 +1,7 @@
1
+ @no-clobber
1
2
  Feature: Letter Opener
2
3
  Background:
3
- Given I have created a app with pah
4
+ Given I have created the app "myapp" with pah
4
5
 
5
6
  Scenario: Have correct files
6
7
  Then I have the file config/environments/development.rb and contents of this file should include:
@@ -1,6 +1,7 @@
1
+ @no-clobber
1
2
  Feature: Locale
2
3
  Background:
3
- Given I have created a app with pah
4
+ Given I have created the app "myapp" with pah
4
5
 
5
6
  Scenario: Have correct files
6
7
  Then I have a config/locales/pt-BR.yml
@@ -15,11 +16,11 @@ Feature: Locale
15
16
  """
16
17
  Then I have the file config/application.rb and contents of this file should include:
17
18
  """
18
- config.i18n.default_locale = :"pt-BR"
19
+ config.i18n.default_locale = :'pt-BR'
19
20
  """
20
21
  Then I have the file config/application.rb and contents of this file should include:
21
22
  """
22
- config.i18n.locale = :"pt-BR"
23
+ config.i18n.locale = :'pt-BR'
23
24
  """
24
25
 
25
26
 
@@ -1,6 +1,7 @@
1
+ @no-clobber
1
2
  Feature: Newrelic
2
3
  Background:
3
- Given I have created a app with pah
4
+ Given I have created the app "myapp" with pah
4
5
 
5
6
  Scenario: Have correct files
6
7
  Then I have the file Gemfile and contents of this file should include:
@@ -1,6 +1,7 @@
1
+ @no-clobber
1
2
  Feature: Public
2
3
  Background:
3
- Given I have created a app with pah
4
+ Given I have created the app "myapp" with pah
4
5
 
5
6
  Scenario: Have correct files
6
7
  Then I have a public/robots.txt
@@ -1,6 +1,7 @@
1
+ @no-clobber
1
2
  Feature: Puma
2
3
  Background:
3
- Given I have created a app with pah
4
+ Given I have created the app "myapp" with pah
4
5
 
5
6
  Scenario: Have correct files
6
7
  Then I have a config/puma.rb
@@ -1,6 +1,7 @@
1
+ @no-clobber
1
2
  Feature: Rack::Deflater
2
3
  Background:
3
- Given I have created a app with pah
4
+ Given I have created the app "myapp" with pah
4
5
 
5
6
  Scenario: Have correct config
6
7
  Then I have the file config/application.rb and contents of this file should include:
@@ -1,6 +1,7 @@
1
+ @no-clobber
1
2
  Feature: Rack Timeout
2
3
  Background:
3
- Given I have created a app with pah
4
+ Given I have created the app "myapp" with pah
4
5
 
5
6
  Scenario: Have correct files
6
7
  Then I have a config/initializers/rack_timeout.rb
@@ -1,9 +1,11 @@
1
+ @no-clobber
1
2
  Feature: Rails works
2
3
  Background:
3
- Given I have created a app with pah
4
+ Given I have created the app "myapp" with pah
4
5
 
5
6
  Scenario: The rails works
6
- When I cd to "myapp"
7
+ When I run `cp -r myapp myapp_with_controller`
8
+ And I cd to "myapp_with_controller"
7
9
  And I run `ruby -e "Bundler.with_clean_env { system 'bundle exec rails g controller welcome index' }"`
8
10
  And I run `ruby -e "Bundler.with_clean_env { system 'bundle exec rails s' }"` interactively
9
11
  And I run `ruby -e "Bundler.with_clean_env { system 'sleep 15' }"`
@@ -1,6 +1,7 @@
1
+ @no-clobber
1
2
  Feature: README
2
3
  Background:
3
- Given I have created a app with pah
4
+ Given I have created the app "myapp" with pah
4
5
 
5
6
  Scenario: Have correct files
6
7
  Then I have a README.md
@@ -1,6 +1,7 @@
1
+ @no-clobber
1
2
  Feature: Remove unused files
2
3
  Background:
3
- Given I have created a app with pah
4
+ Given I have created the app "myapp" with pah
4
5
 
5
6
  Scenario: Remove files
6
7
  Then I dont have a README.rdoc
@@ -1,6 +1,7 @@
1
+ @no-clobber
1
2
  Feature: Rollbar
2
3
  Background:
3
- Given I have created a app with pah
4
+ Given I have created the app "myapp" with pah
4
5
 
5
6
  Scenario: Have correct files
6
7
  Then I have the file Gemfile and contents of this file should include:
@@ -9,5 +10,5 @@ Feature: Rollbar
9
10
  """
10
11
  Then I have the file config/initializers/rollbar.rb and contents of this file should include:
11
12
  """
12
- config.enabled = Rails.env.production? # || Rails.env.staging?
13
+ config.enabled = Rails.env.production? || Rails.env.staging?
13
14
  """
@@ -1,9 +1,11 @@
1
+ @no-clobber
1
2
  Feature: RSpec
2
3
  Background:
3
- Given I have created a app with pah
4
+ Given I have created the app "myapp" with pah
4
5
 
5
6
  Scenario: Have correct files
6
7
  Then I have a spec/spec_helper.rb
8
+ Then I have a spec/rails_helper.rb
7
9
  Then I have a spec/support/database_cleaner.rb
8
10
  Then I have a spec/support/factory_girl.rb
9
11
  Then I have a spec/support/http_basic_auth.rb
@@ -1,6 +1,7 @@
1
+ @no-clobber
1
2
  Feature: Run specs
2
3
  Background:
3
- Given I have created a app with pah
4
+ Given I have created the app "myapp" with pah
4
5
 
5
6
  Scenario: All specs passes
6
7
  When I cd to "myapp"
@@ -1,18 +1,56 @@
1
+ @no-clobber
1
2
  Feature: Run without errors
2
3
 
3
4
  In order to use pah, I need this to run
4
5
  without any error
5
6
 
6
7
  Scenario: Running pah with heroku
7
- When I run `pah myapp` interactively
8
+ When I run `pah myapp_on_heroku` interactively
8
9
  And I type "y"
9
10
  And I type "n"
10
- And I type ""
11
11
  And I type "myapp.com"
12
12
  And I type ""
13
+ And I type "jondoe@example.com, janedoe@example.com"
14
+ Then the output should match:
15
+ """
16
+ running heroku config:set SECRET_KEY_BASE=\w{120} --app myapponheroku
17
+ """
18
+ Then the stdout should contain:
19
+ """
20
+ running heroku domains:add myapp.com --app myapponheroku
21
+ """
22
+ Then the stdout should contain:
23
+ """
24
+ running heroku sharing:add jondoe@example.com --app myapponheroku
25
+ running heroku sharing:add janedoe@example.com --app myapponheroku
26
+ """
27
+ Then the stdout should contain:
28
+ """
29
+ running heroku config:set TZ=America/Sao_Paulo --app myapponheroku
30
+ """
31
+ Then the stdout should contain:
32
+ """
33
+ running heroku addons:add heroku-postgresql:dev --app myapponheroku
34
+ """
35
+ Then the stdout should contain:
36
+ """
37
+ running heroku addons:add pgbackups:auto-month --app myapponheroku
38
+ """
39
+ Then the stdout should contain:
40
+ """
41
+ running heroku addons:add loggly:mole --app myapponheroku
42
+ """
43
+ Then the stdout should contain:
44
+ """
45
+ running heroku addons:add sendgrid:starter --app myapponheroku
46
+ """
47
+ Then the stdout should contain:
48
+ """
49
+ running heroku addons:add rollbar --app myapponheroku
50
+ """
13
51
  Then the stdout should contain:
14
52
  """
15
- running heroku addons:add newrelic:stark --app myapp.com
53
+ running heroku addons:add newrelic:stark --app myapponheroku
16
54
  """
17
55
  Then the output should contain:
18
56
  """
@@ -20,7 +58,7 @@ Feature: Run without errors
20
58
  """
21
59
 
22
60
  Scenario: Running pah without heroku
23
- When I run `pah myapp` interactively
61
+ When I run `pah myapp_without_heroku` interactively
24
62
  And I type "n"
25
63
  Then the stdout should contain:
26
64
  """
@@ -1,6 +1,7 @@
1
+ @no-clobber
1
2
  Feature: Secret Token
2
3
  Background:
3
- Given I have created a app with pah
4
+ Given I have created the app "myapp" with pah
4
5
 
5
6
  Scenario: Have correct files
6
7
  Then I have the file .env and contents of this file should match: