pah 0.0.12 → 0.0.13
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.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/CHANGELOG.md +47 -0
- data/CONTRIBUTING.md +6 -31
- data/README.md +17 -2
- data/bin/pah +2 -1
- data/lib/pah/files/.env +1 -0
- data/lib/pah/files/Gemfile +35 -28
- data/lib/pah/files/Procfile +1 -1
- data/lib/pah/files/README.md +15 -9
- data/lib/pah/files/app/assets/javascripts/application.js +6 -6
- data/lib/pah/files/app/assets/stylesheets/application.scss +4 -6
- data/lib/pah/files/app/assets/stylesheets/general.scss +38 -5
- data/lib/pah/files/app/views/layouts/application.html.haml +16 -14
- data/lib/pah/files/config/initializers/bullet.rb +14 -0
- data/lib/pah/files/config/initializers/database_connection.rb +12 -0
- data/lib/pah/files/config/initializers/rack_timeout.rb +1 -0
- data/lib/pah/files/config/locales/app.pt-BR.yml +13 -0
- data/lib/pah/files/config/locales/pt-BR.yml +21 -6
- data/lib/pah/files/config/locales/simple_form.pt-BR.yml +25 -0
- data/lib/pah/files/lib/tasks/jumpup.rake +3 -6
- data/lib/pah/files/public/404.html +69 -0
- data/lib/pah/files/public/500.html +59 -0
- data/lib/pah/files/spec/acceptance/dummy_spec.rb +1 -1
- data/lib/pah/files/spec/support/acceptance_helpers.rb +2 -2
- data/lib/pah/files/spec/support/acceptance_macros.rb +4 -4
- data/lib/pah/files/spec/support/capybara.rb +1 -1
- data/lib/pah/files/spec/support/database_cleaner.rb +18 -0
- data/lib/pah/files/spec/support/factory_girl.rb +10 -0
- data/lib/pah/files/spec/support/vcr.rb +6 -7
- data/lib/pah/partials/_assets.rb +4 -5
- data/lib/pah/partials/_bullet.rb +6 -0
- data/lib/pah/partials/_canonical_host.rb +2 -5
- data/lib/pah/partials/_capybara.rb +2 -5
- data/lib/pah/partials/_cleanup.rb +3 -11
- data/lib/pah/partials/_database.rb +5 -7
- data/lib/pah/partials/_gems.rb +4 -6
- data/lib/pah/partials/_generators.rb +2 -5
- data/lib/pah/partials/_git.rb +2 -6
- data/lib/pah/partials/_heroku.rb +11 -8
- data/lib/pah/partials/_jumpup.rb +3 -7
- data/lib/pah/partials/_layout.rb +4 -5
- data/lib/pah/partials/_letter_opener.rb +2 -5
- data/lib/pah/partials/_locale.rb +6 -7
- data/lib/pah/partials/_public.rb +9 -4
- data/lib/pah/partials/_puma.rb +4 -0
- data/lib/pah/partials/_rack_timeout.rb +4 -0
- data/lib/pah/partials/_readme.rb +2 -6
- data/lib/pah/partials/_rollbar.rb +5 -0
- data/lib/pah/partials/_rspec.rb +12 -8
- data/lib/pah/partials/_ruby_env.rb +6 -10
- data/lib/pah/partials/_secret_token.rb +3 -7
- data/lib/pah/partials/_secure_headers.rb +3 -5
- data/lib/pah/partials/_simple_form.rb +11 -0
- data/lib/pah/template.rb +35 -26
- data/lib/pah/version.rb +2 -1
- data/pah.gemspec +2 -2
- metadata +20 -10
- data/lib/pah/files/config/unicorn.rb +0 -43
- data/lib/pah/files/spec/support/omniauth.rb +0 -27
- data/lib/pah/files/spec/support/paperclip.rb +0 -4
- data/lib/pah/partials/_unicorn.rb +0 -33
data/lib/pah/version.rb
CHANGED
data/pah.gemspec
CHANGED
@@ -18,9 +18,9 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.required_ruby_version = '>= 2.1.
|
21
|
+
spec.required_ruby_version = '>= 2.1.1'
|
22
22
|
|
23
|
-
spec.add_dependency 'rails',
|
23
|
+
spec.add_dependency 'rails', Pah::RAILS_VERSION
|
24
24
|
spec.add_dependency 'colored', '1.2'
|
25
25
|
|
26
26
|
spec.add_development_dependency "bundler", "~> 1.3"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pah
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- HE:labs
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-03-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 4.0.
|
19
|
+
version: 4.0.4
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 4.0.
|
26
|
+
version: 4.0.4
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: colored
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -103,10 +103,16 @@ files:
|
|
103
103
|
- lib/pah/files/app/views/application/_flash_messages.html.haml
|
104
104
|
- lib/pah/files/app/views/layouts/application.html.haml
|
105
105
|
- lib/pah/files/config/database.yml
|
106
|
+
- lib/pah/files/config/initializers/bullet.rb
|
107
|
+
- lib/pah/files/config/initializers/database_connection.rb
|
106
108
|
- lib/pah/files/config/initializers/jumpup_heroku.rb
|
109
|
+
- lib/pah/files/config/initializers/rack_timeout.rb
|
110
|
+
- lib/pah/files/config/locales/app.pt-BR.yml
|
107
111
|
- lib/pah/files/config/locales/pt-BR.yml
|
108
|
-
- lib/pah/files/config/
|
112
|
+
- lib/pah/files/config/locales/simple_form.pt-BR.yml
|
109
113
|
- lib/pah/files/lib/tasks/jumpup.rake
|
114
|
+
- lib/pah/files/public/404.html
|
115
|
+
- lib/pah/files/public/500.html
|
110
116
|
- lib/pah/files/public/robots.txt
|
111
117
|
- lib/pah/files/spec/acceptance/dummy_spec.rb
|
112
118
|
- lib/pah/files/spec/spec_helper.rb
|
@@ -114,16 +120,17 @@ files:
|
|
114
120
|
- lib/pah/files/spec/support/acceptance_helpers.rb
|
115
121
|
- lib/pah/files/spec/support/acceptance_macros.rb
|
116
122
|
- lib/pah/files/spec/support/capybara.rb
|
123
|
+
- lib/pah/files/spec/support/database_cleaner.rb
|
117
124
|
- lib/pah/files/spec/support/deferred_garbage_collection.rb
|
125
|
+
- lib/pah/files/spec/support/factory_girl.rb
|
118
126
|
- lib/pah/files/spec/support/http_basic_auth.rb
|
119
127
|
- lib/pah/files/spec/support/matchers.rb
|
120
|
-
- lib/pah/files/spec/support/omniauth.rb
|
121
|
-
- lib/pah/files/spec/support/paperclip.rb
|
122
128
|
- lib/pah/files/spec/support/shared_connection.rb
|
123
129
|
- lib/pah/files/spec/support/suppress_log.rb
|
124
130
|
- lib/pah/files/spec/support/uploaded_file.rb
|
125
131
|
- lib/pah/files/spec/support/vcr.rb
|
126
132
|
- lib/pah/partials/_assets.rb
|
133
|
+
- lib/pah/partials/_bullet.rb
|
127
134
|
- lib/pah/partials/_canonical_host.rb
|
128
135
|
- lib/pah/partials/_capybara.rb
|
129
136
|
- lib/pah/partials/_cleanup.rb
|
@@ -138,12 +145,15 @@ files:
|
|
138
145
|
- lib/pah/partials/_letter_opener.rb
|
139
146
|
- lib/pah/partials/_locale.rb
|
140
147
|
- lib/pah/partials/_public.rb
|
148
|
+
- lib/pah/partials/_puma.rb
|
149
|
+
- lib/pah/partials/_rack_timeout.rb
|
141
150
|
- lib/pah/partials/_readme.rb
|
151
|
+
- lib/pah/partials/_rollbar.rb
|
142
152
|
- lib/pah/partials/_rspec.rb
|
143
153
|
- lib/pah/partials/_ruby_env.rb
|
144
154
|
- lib/pah/partials/_secret_token.rb
|
145
155
|
- lib/pah/partials/_secure_headers.rb
|
146
|
-
- lib/pah/partials/
|
156
|
+
- lib/pah/partials/_simple_form.rb
|
147
157
|
- lib/pah/template.rb
|
148
158
|
- lib/pah/version.rb
|
149
159
|
- pah.gemspec
|
@@ -159,7 +169,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
159
169
|
requirements:
|
160
170
|
- - ">="
|
161
171
|
- !ruby/object:Gem::Version
|
162
|
-
version: 2.1.
|
172
|
+
version: 2.1.1
|
163
173
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
164
174
|
requirements:
|
165
175
|
- - ">="
|
@@ -167,7 +177,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
167
177
|
version: '0'
|
168
178
|
requirements: []
|
169
179
|
rubyforge_project:
|
170
|
-
rubygems_version: 2.2.
|
180
|
+
rubygems_version: 2.2.2
|
171
181
|
signing_key:
|
172
182
|
specification_version: 4
|
173
183
|
summary: A rails application template which born from Startup DEV and now is used
|
@@ -1,43 +0,0 @@
|
|
1
|
-
# config/unicorn.rb
|
2
|
-
|
3
|
-
worker_processes Integer(ENV['WEB_CONCURRENCY'] || 3)
|
4
|
-
timeout Integer(ENV['WEB_TIMEOUT'] || 15)
|
5
|
-
|
6
|
-
# combine Ruby 2.0.0dev or REE with "preload_app true" for memory savings
|
7
|
-
# http://rubyenterpriseedition.com/faq.html#adapt_apps_for_cow
|
8
|
-
preload_app true
|
9
|
-
GC.respond_to?(:copy_on_write_friendly=) and
|
10
|
-
GC.copy_on_write_friendly = true
|
11
|
-
|
12
|
-
# Enable this flag to have unicorn test client connections by writing the
|
13
|
-
# beginning of the HTTP headers before calling the application. This
|
14
|
-
# prevents calling the application for connections that have disconnected
|
15
|
-
# while queued. This is only guaranteed to detect clients on the same
|
16
|
-
# host unicorn runs on, and unlikely to detect disconnects even on a
|
17
|
-
# fast LAN.
|
18
|
-
check_client_connection false
|
19
|
-
|
20
|
-
# Listen only on Heroku TCP port.
|
21
|
-
# We use a shorter backlog for quicker failover when busy.
|
22
|
-
listen ENV['PORT'], :backlog => Integer(ENV['UNICORN_BACKLOG'] || 200), :tcp_nopush => true
|
23
|
-
|
24
|
-
before_fork do |server, worker|
|
25
|
-
Signal.trap 'TERM' do
|
26
|
-
puts 'Unicorn master intercepting TERM and sending myself QUIT instead'
|
27
|
-
Process.kill 'QUIT', Process.pid
|
28
|
-
end
|
29
|
-
|
30
|
-
defined?(ActiveRecord::Base) and
|
31
|
-
ActiveRecord::Base.connection.disconnect!
|
32
|
-
end
|
33
|
-
|
34
|
-
after_fork do |server, worker|
|
35
|
-
GC.disable
|
36
|
-
|
37
|
-
Signal.trap 'TERM' do
|
38
|
-
puts 'Unicorn worker intercepting TERM and doing nothing. Wait for master to sent QUIT'
|
39
|
-
end
|
40
|
-
|
41
|
-
defined?(ActiveRecord::Base) and
|
42
|
-
ActiveRecord::Base.establish_connection
|
43
|
-
end
|
@@ -1,27 +0,0 @@
|
|
1
|
-
# -*- encoding : utf-8 -*-
|
2
|
-
module OmniauthLoginTestHelper
|
3
|
-
def current_user
|
4
|
-
@current_user ||= Factory.create(:user)
|
5
|
-
end
|
6
|
-
|
7
|
-
def login!
|
8
|
-
session[:user_id] = current_user.id
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
RSpec.configure do |config|
|
13
|
-
config.include OmniauthLoginTestHelper, :type => :controller
|
14
|
-
config.include OmniauthLoginTestHelper, :type => :helper
|
15
|
-
end
|
16
|
-
|
17
|
-
shared_examples_for "authentication_required_action" do
|
18
|
-
context "not logged in" do
|
19
|
-
before do
|
20
|
-
http_basic_login!
|
21
|
-
request.env["HTTP_REFERER"] = '/back'
|
22
|
-
do_action
|
23
|
-
end
|
24
|
-
it { should redirect_to("/back") }
|
25
|
-
it { flash[:notice].should == "Você precisa estar logado..." }
|
26
|
-
end
|
27
|
-
end
|
@@ -1,33 +0,0 @@
|
|
1
|
-
puts "Configuring Unicorn... ".magenta
|
2
|
-
|
3
|
-
copy_static_file 'config/unicorn.rb'
|
4
|
-
|
5
|
-
unicorn_configuration = <<UNICORN_CONFIGURATION
|
6
|
-
# Run GC each 10 requests
|
7
|
-
require "unicorn/oob_gc"
|
8
|
-
use Unicorn::OobGC, 10
|
9
|
-
|
10
|
-
# Unicorn Worker Killer Configuration:
|
11
|
-
#
|
12
|
-
require "unicorn/worker_killer"
|
13
|
-
|
14
|
-
# Max requests per worker
|
15
|
-
max_request_min = ENV['MAX_REQUEST_MIN'].to_i || 3072
|
16
|
-
max_request_max = ENV['MAX_REQUEST_MAX'].to_i || 4096
|
17
|
-
use Unicorn::WorkerKiller::MaxRequests, max_request_min, max_request_max
|
18
|
-
|
19
|
-
# Max memory size (RSS) per worker
|
20
|
-
oom_min = ((ENV['OOM_MIN'].to_i || 192) * (1024**2))
|
21
|
-
oom_max = ((ENV['OOM_MAX'].to_i || 216) * (1024**2))
|
22
|
-
use Unicorn::WorkerKiller::Oom, oom_min, oom_max
|
23
|
-
UNICORN_CONFIGURATION
|
24
|
-
|
25
|
-
in_root do
|
26
|
-
inject_into_file 'config.ru', unicorn_configuration, {before: "require ::File.expand_path('../config/environment', __FILE__)", verbose: false}
|
27
|
-
end
|
28
|
-
|
29
|
-
git :add => 'config.ru'
|
30
|
-
git :add => 'config/unicorn.rb'
|
31
|
-
git :commit => "-qm 'Configuring Unicorn.'"
|
32
|
-
|
33
|
-
puts "\n"
|