pah 0.0.13 → 0.0.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/.travis.yml +8 -0
- data/CHANGELOG.md +30 -0
- data/CONTRIBUTING.md +22 -0
- data/README.md +46 -30
- data/Rakefile +4 -0
- data/features/assets.feature +13 -0
- data/features/bullet.feature +7 -0
- data/features/canonical_host.feature +9 -0
- data/features/capybara.feature +10 -0
- data/features/database.feature +16 -0
- data/features/env.feature +19 -0
- data/features/gemfile.feature +10 -0
- data/features/generators.feature +18 -0
- data/features/git.feature +12 -0
- data/features/heroku.feature +6 -0
- data/features/jumpup.feature +13 -0
- data/features/layout.feature +12 -0
- data/features/letter_opener.feature +10 -0
- data/features/locale.feature +29 -0
- data/features/newrelic.feature +13 -0
- data/features/public.feature +20 -0
- data/features/puma.feature +11 -0
- data/features/rack_deflater.feature +10 -0
- data/features/rack_timeout.feature +7 -0
- data/features/rails_works.feature +17 -0
- data/features/readme.feature +14 -0
- data/features/remove_unused_files.feature +7 -0
- data/features/rollbar.feature +13 -0
- data/features/rspec.feature +13 -0
- data/features/run_specs.feature +15 -0
- data/features/runner.feature +28 -0
- data/features/secret_token.feature +34 -0
- data/features/secure_headers.feature +14 -0
- data/features/sendgrid.feature +14 -0
- data/features/simple_form.feature +6 -0
- data/features/step_definitions/create_simple_app.rb +10 -0
- data/features/step_definitions/file.rb +9 -0
- data/features/step_definitions/file_content.rb +14 -0
- data/features/support/bin/heroku +36 -0
- data/features/support/env.rb +9 -0
- data/features/support/file_helpers.rb +12 -0
- data/lib/pah/files/Gemfile +19 -18
- data/lib/pah/files/Procfile +1 -1
- data/lib/pah/files/README.md +56 -35
- data/lib/pah/files/app/assets/stylesheets/_variables.scss +9 -12
- data/lib/pah/files/app/assets/stylesheets/application.scss +5 -4
- data/lib/pah/files/app/assets/stylesheets/form.scss +33 -44
- data/lib/pah/files/app/assets/stylesheets/general.scss +10 -18
- data/lib/pah/files/app/assets/stylesheets/reset.scss +26 -15
- data/lib/pah/files/app/assets/stylesheets/responsive.scss +14 -25
- data/lib/pah/files/app/views/application/{_error_messages.html.haml → _error_messages.html.slim} +2 -3
- data/lib/pah/files/app/views/application/{_flash_messages.html.haml → _flash_messages.html.slim} +1 -1
- data/lib/pah/files/app/views/layouts/application.html.slim +51 -0
- data/lib/pah/files/config/initializers/database_connection.rb +9 -6
- data/lib/pah/files/config/locales/pt-BR.yml +8 -10
- data/lib/pah/files/config/newrelic.yml +227 -0
- data/lib/pah/files/config/puma.rb +17 -0
- data/lib/pah/files/spec/spec_helper.rb +14 -10
- data/lib/pah/files/spec/support/capybara.rb +1 -1
- data/lib/pah/partials/_bin.rb +4 -0
- data/lib/pah/partials/_canonical_host.rb +3 -3
- data/lib/pah/partials/_database.rb +1 -3
- data/lib/pah/partials/_gems.rb +15 -7
- data/lib/pah/partials/_generators.rb +1 -3
- data/lib/pah/partials/_heroku.rb +3 -10
- data/lib/pah/partials/_layout.rb +4 -4
- data/lib/pah/partials/_letter_opener.rb +1 -3
- data/lib/pah/partials/_locale.rb +2 -6
- data/lib/pah/partials/_newrelic.rb +6 -0
- data/lib/pah/partials/_puma.rb +2 -0
- data/lib/pah/partials/_rack_deflater.rb +8 -0
- data/lib/pah/partials/_readme.rb +1 -0
- data/lib/pah/partials/_rollbar.rb +13 -3
- data/lib/pah/partials/_rspec.rb +0 -1
- data/lib/pah/partials/_ruby_env.rb +1 -1
- data/lib/pah/partials/_secret_token.rb +4 -7
- data/lib/pah/partials/_secure_headers.rb +3 -3
- data/lib/pah/partials/_sendgrid.rb +19 -0
- data/lib/pah/partials/_simple_form.rb +1 -3
- data/lib/pah/template.rb +10 -3
- data/lib/pah/version.rb +2 -2
- data/pah.gemspec +2 -0
- metadata +115 -9
- data/lib/pah/files/app/views/layouts/application.html.haml +0 -63
- 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> • ".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 © #{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
|