pah 0.0.13 → 0.0.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -1
  3. data/.travis.yml +8 -0
  4. data/CHANGELOG.md +30 -0
  5. data/CONTRIBUTING.md +22 -0
  6. data/README.md +46 -30
  7. data/Rakefile +4 -0
  8. data/features/assets.feature +13 -0
  9. data/features/bullet.feature +7 -0
  10. data/features/canonical_host.feature +9 -0
  11. data/features/capybara.feature +10 -0
  12. data/features/database.feature +16 -0
  13. data/features/env.feature +19 -0
  14. data/features/gemfile.feature +10 -0
  15. data/features/generators.feature +18 -0
  16. data/features/git.feature +12 -0
  17. data/features/heroku.feature +6 -0
  18. data/features/jumpup.feature +13 -0
  19. data/features/layout.feature +12 -0
  20. data/features/letter_opener.feature +10 -0
  21. data/features/locale.feature +29 -0
  22. data/features/newrelic.feature +13 -0
  23. data/features/public.feature +20 -0
  24. data/features/puma.feature +11 -0
  25. data/features/rack_deflater.feature +10 -0
  26. data/features/rack_timeout.feature +7 -0
  27. data/features/rails_works.feature +17 -0
  28. data/features/readme.feature +14 -0
  29. data/features/remove_unused_files.feature +7 -0
  30. data/features/rollbar.feature +13 -0
  31. data/features/rspec.feature +13 -0
  32. data/features/run_specs.feature +15 -0
  33. data/features/runner.feature +28 -0
  34. data/features/secret_token.feature +34 -0
  35. data/features/secure_headers.feature +14 -0
  36. data/features/sendgrid.feature +14 -0
  37. data/features/simple_form.feature +6 -0
  38. data/features/step_definitions/create_simple_app.rb +10 -0
  39. data/features/step_definitions/file.rb +9 -0
  40. data/features/step_definitions/file_content.rb +14 -0
  41. data/features/support/bin/heroku +36 -0
  42. data/features/support/env.rb +9 -0
  43. data/features/support/file_helpers.rb +12 -0
  44. data/lib/pah/files/Gemfile +19 -18
  45. data/lib/pah/files/Procfile +1 -1
  46. data/lib/pah/files/README.md +56 -35
  47. data/lib/pah/files/app/assets/stylesheets/_variables.scss +9 -12
  48. data/lib/pah/files/app/assets/stylesheets/application.scss +5 -4
  49. data/lib/pah/files/app/assets/stylesheets/form.scss +33 -44
  50. data/lib/pah/files/app/assets/stylesheets/general.scss +10 -18
  51. data/lib/pah/files/app/assets/stylesheets/reset.scss +26 -15
  52. data/lib/pah/files/app/assets/stylesheets/responsive.scss +14 -25
  53. data/lib/pah/files/app/views/application/{_error_messages.html.haml → _error_messages.html.slim} +2 -3
  54. data/lib/pah/files/app/views/application/{_flash_messages.html.haml → _flash_messages.html.slim} +1 -1
  55. data/lib/pah/files/app/views/layouts/application.html.slim +51 -0
  56. data/lib/pah/files/config/initializers/database_connection.rb +9 -6
  57. data/lib/pah/files/config/locales/pt-BR.yml +8 -10
  58. data/lib/pah/files/config/newrelic.yml +227 -0
  59. data/lib/pah/files/config/puma.rb +17 -0
  60. data/lib/pah/files/spec/spec_helper.rb +14 -10
  61. data/lib/pah/files/spec/support/capybara.rb +1 -1
  62. data/lib/pah/partials/_bin.rb +4 -0
  63. data/lib/pah/partials/_canonical_host.rb +3 -3
  64. data/lib/pah/partials/_database.rb +1 -3
  65. data/lib/pah/partials/_gems.rb +15 -7
  66. data/lib/pah/partials/_generators.rb +1 -3
  67. data/lib/pah/partials/_heroku.rb +3 -10
  68. data/lib/pah/partials/_layout.rb +4 -4
  69. data/lib/pah/partials/_letter_opener.rb +1 -3
  70. data/lib/pah/partials/_locale.rb +2 -6
  71. data/lib/pah/partials/_newrelic.rb +6 -0
  72. data/lib/pah/partials/_puma.rb +2 -0
  73. data/lib/pah/partials/_rack_deflater.rb +8 -0
  74. data/lib/pah/partials/_readme.rb +1 -0
  75. data/lib/pah/partials/_rollbar.rb +13 -3
  76. data/lib/pah/partials/_rspec.rb +0 -1
  77. data/lib/pah/partials/_ruby_env.rb +1 -1
  78. data/lib/pah/partials/_secret_token.rb +4 -7
  79. data/lib/pah/partials/_secure_headers.rb +3 -3
  80. data/lib/pah/partials/_sendgrid.rb +19 -0
  81. data/lib/pah/partials/_simple_form.rb +1 -3
  82. data/lib/pah/template.rb +10 -3
  83. data/lib/pah/version.rb +2 -2
  84. data/pah.gemspec +2 -0
  85. metadata +115 -9
  86. data/lib/pah/files/app/views/layouts/application.html.haml +0 -63
  87. data/lib/pah/files/spec/support/deferred_garbage_collection.rb +0 -30
@@ -1,63 +0,0 @@
1
- !!! 5
2
- %html{:lang => "pt"}
3
- %head
4
- %meta{:charset => "utf-8"}
5
- %meta{:name => "keywords", :content => ""}
6
- %meta{:name => "description", :content => ""}
7
-
8
- %title= page_title(app_name: 'example') # use content_for(:page_title, 'My title of my page') on views files like index.html.haml
9
-
10
- %link{:href => "/favicon.ico", :rel => "shortcut icon"}
11
- = yield(:header_tags)
12
-
13
- = stylesheet_link_tag "application", :type => nil, :media => "all"
14
- = javascript_include_tag "application", :type => nil, "data-turbolinks-track" => true
15
- = csrf_meta_tags
16
-
17
- /[if lt IE 9]
18
- %script{:src => "http://html5shim.googlecode.com/svn/trunk/html5.js"}
19
-
20
- :plain
21
- <script type="text/javascript">
22
-
23
- var _gaq = _gaq || [];
24
- _gaq.push(['_setAccount', 'XXXXX-XXXX']);
25
- _gaq.push(['_trackPageview']);
26
-
27
- (function() {
28
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
29
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
30
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
31
- })();
32
-
33
- </script>
34
-
35
- %body{:class => body_class}
36
- #wrapper
37
- %header
38
- .holder
39
- / #masthead
40
- /- if current_user
41
- / %p
42
- / = "Bem-vindo <strong>#{current_user.name}</strong> &bull; ".html_safe
43
- / = link_to "Sair", logout_path
44
- /- else
45
- / %p
46
- / = link_to "Acesse com Facebook", "/auth/facebook", :id => "facebook-connect"
47
-
48
- #logo<
49
- = link_to "Logo", "/"
50
- = render 'flash_messages'
51
-
52
- #main-content
53
- .holder
54
- %section{:role => "main"}
55
- = yield
56
-
57
- - if content_for?(:sidebar)
58
- %aside
59
- = yield(:sidebar)
60
-
61
- %footer
62
- .holder
63
- = "Copyright &copy; #{Time.zone.now.year} App".html_safe
@@ -1,30 +0,0 @@
1
- # Joe Van Dyk discovered that running the Ruby garbage collector only every X seconds can speed up your tests.
2
- # I found that deferring garbage collection would speed up my RSpec examples by about 15%,
3
- # but it probably depends on the nature of your tests.
4
- # https://makandracards.com/makandra/950-speed-up-rspec-by-deferring-garbage-collection
5
-
6
- class DeferredGarbageCollection
7
- DEFERRED_GC_THRESHOLD = (ENV['DEFER_GC'] || 10.0).to_f
8
- @@last_gc_run = Time.now
9
- def self.start
10
- GC.disable if DEFERRED_GC_THRESHOLD > 0
11
- end
12
- def self.reconsider
13
- if DEFERRED_GC_THRESHOLD > 0 && Time.now - @@last_gc_run >= DEFERRED_GC_THRESHOLD
14
- GC.enable
15
- GC.start
16
- GC.disable
17
- @@last_gc_run = Time.now
18
- end
19
- end
20
- end
21
-
22
- RSpec.configure do |config|
23
- config.before(:all) do
24
- DeferredGarbageCollection.start
25
- end
26
-
27
- config.after(:all) do
28
- DeferredGarbageCollection.reconsider
29
- end
30
- end