pah 0.0.4 → 0.0.5
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 +7 -0
- data/CHANGELOG.md +24 -1
- data/lib/pah/files/Gemfile +2 -2
- data/lib/pah/files/app/views/application/_error_messages.html.haml +6 -0
- data/lib/pah/files/app/views/application/_flash_messages.html.haml +4 -0
- data/lib/pah/files/app/views/layouts/application.html.haml +2 -9
- data/lib/pah/files/lib/tasks/integration.rake +5 -4
- data/lib/pah/files/lib/tasks/tasks.rake +1 -1
- data/lib/pah/files/spec/spec_helper.rb +0 -1
- data/lib/pah/partials/_default.rb +2 -0
- data/lib/pah/partials/_locale.rb +24 -0
- data/lib/pah/partials/_rvm.rb +7 -6
- data/lib/pah/partials/_secure_headers.rb +11 -0
- data/lib/pah/template.rb +1 -0
- data/lib/pah/version.rb +1 -1
- data/pah.gemspec +4 -2
- metadata +15 -24
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 967928682986b125c96b63110508e9a8ae301182
|
4
|
+
data.tar.gz: 4d0547f57f47f7e4d58f16d8b88d947b6d02b9e3
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 9182783fefbf7bef684aa5aec715ecf02b88801ac64c3ac8b2c96bb8db7f06cce0665ee21c1edd1fb2d6cb11c96439a321a03d296327cce29521592501fb9c2a
|
7
|
+
data.tar.gz: fcd6d869ce6b77fe19caabdea04a1255490111848951f176e1b441ab7727778cfec16db5cdec18251d1d833fae06dfe44103a9fa4ed999277ecab196927c9638
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,28 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.0.5 (August 16, 2013)
|
4
|
+
|
5
|
+
### features
|
6
|
+
|
7
|
+
### improvements
|
8
|
+
|
9
|
+
- added rails_12factor gem
|
10
|
+
- added missing turbolinks on layout
|
11
|
+
- removed valid_attribute gem
|
12
|
+
- created partials from error messages and flash messages
|
13
|
+
- added jumpup over integration from github
|
14
|
+
- use `heroku config:set` and `heroku config:unset`
|
15
|
+
- added SecureHeaders initializers
|
16
|
+
- added locale configs as Brazil
|
17
|
+
- no more ask for ruby version or gemset name
|
18
|
+
- add required ruby 2.0.0 or greater
|
19
|
+
|
20
|
+
### bug fixes
|
21
|
+
|
22
|
+
- added --app param to heroku lock and unlock tasks
|
23
|
+
- resolved bug with rvm current when the bin is not properly set
|
24
|
+
- fix already initialized constant APP on `tasks.rake` and `integration.rake`
|
25
|
+
|
3
26
|
## 0.0.4 (July 19, 2013)
|
4
27
|
|
5
28
|
### features
|
@@ -16,7 +39,7 @@
|
|
16
39
|
- Cleaning old stuffs
|
17
40
|
- Show suggestion of heroku app
|
18
41
|
- Export APP on .rvmrc
|
19
|
-
- Updated to Rails 4.0 and Ruby 2.0
|
42
|
+
- Updated to Rails 4.0 and Ruby 2.0
|
20
43
|
|
21
44
|
### bug fixes
|
22
45
|
|
data/lib/pah/files/Gemfile
CHANGED
@@ -15,6 +15,7 @@ gem 'coffee-rails', '~> 4.0.0'
|
|
15
15
|
gem 'uglifier', '>= 1.3.0'
|
16
16
|
gem 'rack-canonical-host', '0.0.8'
|
17
17
|
gem 'bourbon', '3.1.8'
|
18
|
+
gem "rails_12factor", "0.0.2", group: :production
|
18
19
|
# gem 'paperclip', '3.4.2'
|
19
20
|
# gem 'aws-sdk', '1.11.2'
|
20
21
|
# gem 'paranoia', '1.2.0'
|
@@ -26,7 +27,7 @@ gem 'bourbon', '3.1.8'
|
|
26
27
|
group :development do
|
27
28
|
gem "letter_opener", '1.1.1'
|
28
29
|
gem 'foreman', '0.63.0'
|
29
|
-
gem '
|
30
|
+
gem 'jumpup', '0.0.1'
|
30
31
|
gem 'better_errors', '0.9.0'
|
31
32
|
gem 'binding_of_caller', '0.7.2'
|
32
33
|
gem "letter_opener", '1.1.1'
|
@@ -38,7 +39,6 @@ group :test do
|
|
38
39
|
# See https://github.com/thoughtbot/shoulda-matchers/issues/270
|
39
40
|
gem "shoulda-matchers", github: "thoughtbot/shoulda-matchers" , branch: 'dp-rails-four'
|
40
41
|
gem 'simplecov', '0.7.1', require: false
|
41
|
-
gem 'valid_attribute', '1.3.1'
|
42
42
|
gem 'email_spec', '1.4.0'
|
43
43
|
gem 'capybara', '2.1.0'
|
44
44
|
gem 'poltergeist', '1.3.0'
|
@@ -11,7 +11,7 @@
|
|
11
11
|
= yield(:header_tags)
|
12
12
|
|
13
13
|
= stylesheet_link_tag "application", :type => nil, :media => "all"
|
14
|
-
= javascript_include_tag "application", :type => nil
|
14
|
+
= javascript_include_tag "application", :type => nil, "data-turbolinks-track" => true
|
15
15
|
= csrf_meta_tags
|
16
16
|
|
17
17
|
/[if lt IE 9]
|
@@ -46,14 +46,7 @@
|
|
46
46
|
|
47
47
|
#logo<
|
48
48
|
= link_to "Logo", root_url
|
49
|
-
|
50
|
-
- if notice
|
51
|
-
%p.notice
|
52
|
-
= notice
|
53
|
-
- if alert
|
54
|
-
%p.alert
|
55
|
-
= alert
|
56
|
-
|
49
|
+
= render 'flash_messages'
|
57
50
|
%hr
|
58
51
|
#container
|
59
52
|
%section{:role => "main"}
|
@@ -1,6 +1,7 @@
|
|
1
|
-
#
|
1
|
+
# encoding: utf-8
|
2
|
+
|
2
3
|
namespace :integration do
|
3
|
-
APP = ENV['APP']
|
4
|
+
APP = ENV['APP'] unless defined?(APP)
|
4
5
|
|
5
6
|
namespace :heroku do
|
6
7
|
task :add_remote do
|
@@ -19,10 +20,10 @@ namespace :integration do
|
|
19
20
|
end
|
20
21
|
task :lock do
|
21
22
|
user = `whoami`
|
22
|
-
Bundler.with_clean_env { sh "heroku config:
|
23
|
+
Bundler.with_clean_env { sh "heroku config:set INTEGRATING_BY=#{user} --app #{APP}" }
|
23
24
|
end
|
24
25
|
task :unlock do
|
25
|
-
Bundler.with_clean_env { sh "heroku config:
|
26
|
+
Bundler.with_clean_env { sh "heroku config:unset INTEGRATING_BY --app #{APP}" }
|
26
27
|
end
|
27
28
|
end
|
28
29
|
end
|
@@ -9,7 +9,6 @@ ENV["RAILS_ENV"] ||= 'test'
|
|
9
9
|
require File.expand_path("../../config/environment", __FILE__)
|
10
10
|
require 'rspec/rails'
|
11
11
|
require 'rspec/autorun'
|
12
|
-
require 'valid_attribute'
|
13
12
|
require "email_spec"
|
14
13
|
|
15
14
|
# Requires supporting ruby files with custom matchers and macros, etc,
|
@@ -2,6 +2,8 @@ puts "Adding default files ...".magenta
|
|
2
2
|
|
3
3
|
copy_static_file 'app/assets/stylesheets/reset.css'
|
4
4
|
copy_static_file 'app/views/layouts/application.html.haml'
|
5
|
+
copy_static_file 'app/views/application/_error_messages.html.haml'
|
6
|
+
copy_static_file 'app/views/application/_flash_messages.html.haml'
|
5
7
|
copy_static_file 'config/unicorn.rb'
|
6
8
|
copy_static_file 'Procfile'
|
7
9
|
copy_static_file "lib/tasks/integration.rake"
|
@@ -0,0 +1,24 @@
|
|
1
|
+
puts "Adding locale... ".magenta
|
2
|
+
|
3
|
+
time_zone_config = <<TIME_ZONE
|
4
|
+
|
5
|
+
config.time_zone = 'Brasilia'
|
6
|
+
TIME_ZONE
|
7
|
+
|
8
|
+
in_root do
|
9
|
+
inject_into_file 'config/application.rb', time_zone_config, { after: "# config.time_zone = 'Central Time (US & Canada)'", verbose: false }
|
10
|
+
end
|
11
|
+
|
12
|
+
locale_config = <<LOCALE
|
13
|
+
|
14
|
+
config.i18n.default_locale = :"pt-BR"
|
15
|
+
config.i18n.locale = :"pt-BR"
|
16
|
+
LOCALE
|
17
|
+
|
18
|
+
in_root do
|
19
|
+
inject_into_file 'config/application.rb', locale_config, { after: "# config.i18n.default_locale = :de", verbose: false }
|
20
|
+
end
|
21
|
+
|
22
|
+
git :add => 'config/application.rb'
|
23
|
+
git :commit => "-qm 'Adding locale config.'"
|
24
|
+
|
data/lib/pah/partials/_rvm.rb
CHANGED
@@ -6,21 +6,22 @@ puts "Setting up RVM gemset and installing bundled gems (may take a while) ... "
|
|
6
6
|
rvm_list = `rvm list`.gsub(Regexp.new("\e\\[.?.?.?m"), '')
|
7
7
|
|
8
8
|
current_ruby = rvm_list.match(/=.? ([^ ]+)/)[1]
|
9
|
-
desired_ruby =
|
10
|
-
desired_ruby = current_ruby if desired_ruby.blank?
|
9
|
+
desired_ruby = current_ruby.gsub(/\-p\d+/, "")
|
11
10
|
|
12
11
|
@env = RVM::Environment.new(desired_ruby)
|
13
12
|
|
14
|
-
gemset_name =
|
15
|
-
gemset_name = @app_name if gemset_name.blank?
|
13
|
+
gemset_name = @app_name
|
16
14
|
|
17
15
|
puts "Creating gemset #{gemset_name} in #{desired_ruby}"
|
18
16
|
@env.gemset_create(gemset_name)
|
19
17
|
puts "Now using gemset #{gemset_name}"
|
20
18
|
@env.gemset_use!(gemset_name)
|
21
19
|
|
22
|
-
|
23
|
-
|
20
|
+
rvm_current = `rvm current`.match(/[\w\d.-]+@[\w\d\.-]+/)[0].strip.split('@').last
|
21
|
+
|
22
|
+
if rvm_current != gemset_name
|
23
|
+
puts "Error using gemset #{gemset_name}:".red
|
24
|
+
puts "#{rvm_current} does not match the gemset #{gemset_name}".yellow
|
24
25
|
exit
|
25
26
|
end
|
26
27
|
|
@@ -6,6 +6,17 @@ EOF
|
|
6
6
|
in_root do
|
7
7
|
inject_into_file 'app/controllers/application_controller.rb', content, {after: "with: :exception", verbose: false}
|
8
8
|
end
|
9
|
+
create_file "config/initializers/secure_headers.rb" do
|
10
|
+
<<-EOF
|
11
|
+
::SecureHeaders::Configuration.configure do |config|
|
12
|
+
config.hsts = {:max_age => 20.years.to_i, :include_subdomains => true}
|
13
|
+
config.x_frame_options = 'DENY'
|
14
|
+
config.x_content_type_options = "nosniff"
|
15
|
+
config.x_xss_protection = {:value => 1, :mode => 'block'}
|
16
|
+
config.csp = false
|
17
|
+
end
|
18
|
+
EOF
|
19
|
+
end
|
9
20
|
git :add => 'app/controllers/application_controller.rb'
|
10
21
|
git :commit => "-qm 'Adding secure headers.'"
|
11
22
|
|
data/lib/pah/template.rb
CHANGED
data/lib/pah/version.rb
CHANGED
data/pah.gemspec
CHANGED
@@ -6,8 +6,8 @@ require 'pah/version'
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "pah"
|
8
8
|
spec.version = Pah::VERSION
|
9
|
-
spec.authors = ["
|
10
|
-
spec.email = ["
|
9
|
+
spec.authors = ["HE:labs"]
|
10
|
+
spec.email = ["contato@helabs.com.br"]
|
11
11
|
spec.description = %q{A rails application template which born from Startup DEV and now is used to start most projects at HE:labs.}
|
12
12
|
spec.summary = %q{A rails application template which born from Startup DEV and now is used to start most projects at HE:labs.}
|
13
13
|
spec.homepage = "https://github.com/Helabs/pah"
|
@@ -18,6 +18,8 @@ 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.0.0'
|
22
|
+
|
21
23
|
spec.add_dependency 'rails', '4.0.0'
|
22
24
|
spec.add_dependency 'colored', '1.2'
|
23
25
|
spec.add_dependency 'rvm', '1.11.3.8'
|
metadata
CHANGED
@@ -1,20 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pah
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.5
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
|
-
-
|
7
|
+
- HE:labs
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-
|
11
|
+
date: 2013-08-16 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: rails
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - '='
|
20
18
|
- !ruby/object:Gem::Version
|
@@ -22,7 +20,6 @@ dependencies:
|
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - '='
|
28
25
|
- !ruby/object:Gem::Version
|
@@ -30,7 +27,6 @@ dependencies:
|
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: colored
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
31
|
- - '='
|
36
32
|
- !ruby/object:Gem::Version
|
@@ -38,7 +34,6 @@ dependencies:
|
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
38
|
- - '='
|
44
39
|
- !ruby/object:Gem::Version
|
@@ -46,7 +41,6 @@ dependencies:
|
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: rvm
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
45
|
- - '='
|
52
46
|
- !ruby/object:Gem::Version
|
@@ -54,7 +48,6 @@ dependencies:
|
|
54
48
|
type: :runtime
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
52
|
- - '='
|
60
53
|
- !ruby/object:Gem::Version
|
@@ -62,7 +55,6 @@ dependencies:
|
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: bundler
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
59
|
- - ~>
|
68
60
|
- !ruby/object:Gem::Version
|
@@ -70,7 +62,6 @@ dependencies:
|
|
70
62
|
type: :development
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
66
|
- - ~>
|
76
67
|
- !ruby/object:Gem::Version
|
@@ -78,23 +69,21 @@ dependencies:
|
|
78
69
|
- !ruby/object:Gem::Dependency
|
79
70
|
name: rake
|
80
71
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
72
|
requirements:
|
83
|
-
- -
|
73
|
+
- - '>='
|
84
74
|
- !ruby/object:Gem::Version
|
85
75
|
version: '0'
|
86
76
|
type: :development
|
87
77
|
prerelease: false
|
88
78
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
79
|
requirements:
|
91
|
-
- -
|
80
|
+
- - '>='
|
92
81
|
- !ruby/object:Gem::Version
|
93
82
|
version: '0'
|
94
83
|
description: A rails application template which born from Startup DEV and now is used
|
95
84
|
to start most projects at HE:labs.
|
96
85
|
email:
|
97
|
-
-
|
86
|
+
- contato@helabs.com.br
|
98
87
|
executables:
|
99
88
|
- pah
|
100
89
|
extensions: []
|
@@ -115,6 +104,8 @@ files:
|
|
115
104
|
- lib/pah/files/Procfile
|
116
105
|
- lib/pah/files/app/assets/stylesheets/application.css.scss
|
117
106
|
- lib/pah/files/app/assets/stylesheets/reset.css
|
107
|
+
- lib/pah/files/app/views/application/_error_messages.html.haml
|
108
|
+
- lib/pah/files/app/views/application/_flash_messages.html.haml
|
118
109
|
- lib/pah/files/app/views/layouts/application.html.haml
|
119
110
|
- lib/pah/files/config/database.yml
|
120
111
|
- lib/pah/files/config/initializers/omniauth.rb
|
@@ -149,6 +140,7 @@ files:
|
|
149
140
|
- lib/pah/partials/_heroku.rb
|
150
141
|
- lib/pah/partials/_integration.rb
|
151
142
|
- lib/pah/partials/_letter_opener.rb
|
143
|
+
- lib/pah/partials/_locale.rb
|
152
144
|
- lib/pah/partials/_omniauth.rb
|
153
145
|
- lib/pah/partials/_rspec.rb
|
154
146
|
- lib/pah/partials/_rvm.rb
|
@@ -161,27 +153,26 @@ files:
|
|
161
153
|
homepage: https://github.com/Helabs/pah
|
162
154
|
licenses:
|
163
155
|
- MIT
|
156
|
+
metadata: {}
|
164
157
|
post_install_message:
|
165
158
|
rdoc_options: []
|
166
159
|
require_paths:
|
167
160
|
- lib
|
168
161
|
required_ruby_version: !ruby/object:Gem::Requirement
|
169
|
-
none: false
|
170
162
|
requirements:
|
171
|
-
- -
|
163
|
+
- - '>='
|
172
164
|
- !ruby/object:Gem::Version
|
173
|
-
version:
|
165
|
+
version: 2.0.0
|
174
166
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
175
|
-
none: false
|
176
167
|
requirements:
|
177
|
-
- -
|
168
|
+
- - '>='
|
178
169
|
- !ruby/object:Gem::Version
|
179
170
|
version: '0'
|
180
171
|
requirements: []
|
181
172
|
rubyforge_project:
|
182
|
-
rubygems_version:
|
173
|
+
rubygems_version: 2.0.3
|
183
174
|
signing_key:
|
184
|
-
specification_version:
|
175
|
+
specification_version: 4
|
185
176
|
summary: A rails application template which born from Startup DEV and now is used
|
186
177
|
to start most projects at HE:labs.
|
187
178
|
test_files: []
|