pah 0.0.27 → 0.0.28
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 +9 -0
- data/README.md +1 -1
- data/features/commands.feature +6 -6
- data/features/env.feature +1 -1
- data/features/gemfile.feature +1 -1
- data/features/readme.feature +1 -1
- data/features/secret_token.feature +19 -9
- data/features/secure_headers.feature +0 -4
- data/features/sendgrid.feature +1 -1
- data/lib/pah/files/.gitignore +2 -1
- data/lib/pah/files/Gemfile +27 -28
- data/lib/pah/files/config/database.yml +7 -9
- data/lib/pah/templates/secure_headers.rb +12 -11
- data/lib/pah/version.rb +3 -3
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f5098132b991c99ba4c30d4d2afcfa21fd29f75
|
4
|
+
data.tar.gz: da9923c7d366d1f1307fc2aa05287dcdf55d3de5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: deedba7b7dbce1188969af218a44ec07ea700e15f2500f6b5edb2abce35ce24e4b358116a8ea51d5d0966365688841d08d5155c246a8c18e189622acb0598439
|
7
|
+
data.tar.gz: 556085f2299ff8eb85c7ec2c498cd1d2e7be8bca19f6fca580278317897f7cc1433d224c0853817015a52497d05f7786e531d12fcebd854400ca4d2fee91c698
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.4.2
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.0.28 (September, 20, 2017)
|
4
|
+
- Updated ruby version to 2.4.2
|
5
|
+
- Updated Rails version to 5.1.2
|
6
|
+
- Updated some gems
|
7
|
+
- Removed gems `pry-rails` and `byebug` and added gem `pry-byebug`
|
8
|
+
- Added sublime text files to .gitignore
|
9
|
+
- Updated the secure_headers initializer
|
10
|
+
- Created default pattern for database configuration
|
11
|
+
|
3
12
|
## 0.0.27 (July 18, 2016)
|
4
13
|
- Updated ruby version to 2.3.1
|
5
14
|
- Updated Rails version to 5.0.0
|
data/README.md
CHANGED
@@ -37,7 +37,7 @@ Run:
|
|
37
37
|
$ pah projectname
|
38
38
|
```
|
39
39
|
|
40
|
-
This will create a Rails 5.
|
40
|
+
This will create a Rails 5.1.2 app with Ruby 2.4.2. This script creates a new git repository in the folder `projectname`.
|
41
41
|
|
42
42
|
:warning: PAH is not meant to be used against an existing repo.
|
43
43
|
|
data/features/commands.feature
CHANGED
@@ -4,17 +4,17 @@ Feature: Commands
|
|
4
4
|
When I run `pah --version`
|
5
5
|
Then the output should contain:
|
6
6
|
"""
|
7
|
-
Pah version: 0.0.
|
8
|
-
Rails version: 5.
|
9
|
-
Ruby version: 2.
|
7
|
+
Pah version: 0.0.28
|
8
|
+
Rails version: 5.1.2
|
9
|
+
Ruby version: 2.4.2
|
10
10
|
"""
|
11
11
|
Scenario: -v prompts the versions
|
12
12
|
When I run `pah -v`
|
13
13
|
Then the output should contain:
|
14
14
|
"""
|
15
|
-
Pah version: 0.0.
|
16
|
-
Rails version: 5.
|
17
|
-
Ruby version: 2.
|
15
|
+
Pah version: 0.0.28
|
16
|
+
Rails version: 5.1.2
|
17
|
+
Ruby version: 2.4.2
|
18
18
|
"""
|
19
19
|
Scenario: without args prompt help
|
20
20
|
When I run `pah`
|
data/features/env.feature
CHANGED
data/features/gemfile.feature
CHANGED
data/features/readme.feature
CHANGED
@@ -11,25 +11,35 @@ Feature: Secret Token
|
|
11
11
|
Then I have the file config/secrets.yml and contents of this file should include:
|
12
12
|
"""
|
13
13
|
# Be sure to restart your server when you modify this file.
|
14
|
-
|
14
|
+
|
15
15
|
# Your secret key is used for verifying the integrity of signed cookies.
|
16
16
|
# If you change this key, all old signed cookies will become invalid!
|
17
|
-
|
17
|
+
|
18
18
|
# Make sure the secret is at least 30 characters and all random,
|
19
19
|
# no regular words or you'll be exposed to dictionary attacks.
|
20
20
|
# You can use `rails secret` to generate a secure secret key.
|
21
|
-
|
21
|
+
|
22
22
|
# Make sure the secrets in this file are kept private
|
23
23
|
# if you're sharing your code publicly.
|
24
|
-
|
24
|
+
|
25
|
+
# Shared secrets are available across all environments.
|
26
|
+
|
27
|
+
# shared:
|
28
|
+
# api_key: a1B2c3D4e5F6
|
29
|
+
|
30
|
+
# Environmental secrets are only available for that specific environment.
|
31
|
+
|
25
32
|
development:
|
26
33
|
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
|
27
|
-
|
34
|
+
|
28
35
|
test:
|
29
36
|
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
|
30
|
-
|
31
|
-
# Do not keep production secrets in the
|
32
|
-
#
|
37
|
+
|
38
|
+
# Do not keep production secrets in the unencrypted secrets file.
|
39
|
+
# Instead, either read values from the environment.
|
40
|
+
# Or, use `bin/rails secrets:setup` to configure encrypted secrets
|
41
|
+
# and move the `production:` environment over there.
|
42
|
+
|
33
43
|
production:
|
34
44
|
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
|
35
|
-
"""
|
45
|
+
"""
|
@@ -4,10 +4,6 @@ Feature: Secure Headers
|
|
4
4
|
Given I have created the app "myapp" with pah
|
5
5
|
|
6
6
|
Scenario: Have correct files
|
7
|
-
Then I have the file app/controllers/application_controller.rb and contents of this file should include:
|
8
|
-
"""
|
9
|
-
ensure_security_headers
|
10
|
-
"""
|
11
7
|
Then I have a config/initializers/secure_headers.rb
|
12
8
|
Then I have the file config/initializers/secure_headers.rb and contents of this file should include:
|
13
9
|
"""
|
data/features/sendgrid.feature
CHANGED
data/lib/pah/files/.gitignore
CHANGED
data/lib/pah/files/Gemfile
CHANGED
@@ -2,61 +2,60 @@ source 'https://rubygems.org'
|
|
2
2
|
ruby 'RUBY_VERSION'
|
3
3
|
|
4
4
|
gem 'rails', 'RAILS_VERSION'
|
5
|
-
gem 'puma', '
|
6
|
-
gem 'secure_headers', '
|
7
|
-
gem 'jquery-rails', '4.
|
8
|
-
gem 'turbolinks', '
|
9
|
-
gem 'jbuilder', '2.
|
10
|
-
gem 'slim-rails', '3.1.
|
11
|
-
gem 'pg', '0.
|
12
|
-
gem 'sass-rails', '5.0.
|
13
|
-
gem 'coffee-rails', '4.2.
|
14
|
-
gem 'uglifier', '2.
|
15
|
-
gem 'simple_form', '3.
|
5
|
+
gem 'puma', '3.10.0'
|
6
|
+
gem 'secure_headers', '3.7.1'
|
7
|
+
gem 'jquery-rails', '4.3.1'
|
8
|
+
gem 'turbolinks', '5.0.1'
|
9
|
+
gem 'jbuilder', '2.7.0'
|
10
|
+
gem 'slim-rails', '3.1.2'
|
11
|
+
gem 'pg', '0.21.0'
|
12
|
+
gem 'sass-rails', '5.0.6'
|
13
|
+
gem 'coffee-rails', '4.2.2'
|
14
|
+
gem 'uglifier', '3.2.0'
|
15
|
+
gem 'simple_form', '3.5.0'
|
16
16
|
gem 'flutie', '2.0.0'
|
17
17
|
gem 'bourbon', '4.2.6'
|
18
18
|
gem 'neat', '1.7.2'
|
19
19
|
gem 'bitters', '1.1.0'
|
20
20
|
gem 'refills', '0.1.0'
|
21
21
|
gem 'normalize-rails', '3.0.3'
|
22
|
-
gem 'rollbar', '2.
|
22
|
+
gem 'rollbar', '2.15.2'
|
23
23
|
|
24
24
|
group :production, :staging do
|
25
25
|
gem 'rails_12factor', '0.0.3'
|
26
|
-
gem 'rack-canonical-host', '0.2.
|
27
|
-
gem 'newrelic_rpm', '
|
28
|
-
gem 'librato-rails', '1.0
|
26
|
+
gem 'rack-canonical-host', '0.2.3'
|
27
|
+
gem 'newrelic_rpm', '4.4.0.336'
|
28
|
+
gem 'librato-rails', '2.1.0'
|
29
29
|
end
|
30
30
|
|
31
31
|
group :development do
|
32
|
-
gem 'foreman', '0.
|
32
|
+
gem 'foreman', '0.84.0'
|
33
33
|
gem 'jumpup', '0.0.8'
|
34
34
|
gem 'jumpup-heroku', '0.0.6'
|
35
35
|
gem 'better_errors', '2.1.1'
|
36
36
|
gem 'binding_of_caller', '0.7.2'
|
37
37
|
gem 'letter_opener', '1.4.1'
|
38
|
-
gem 'bullet', '5.
|
38
|
+
gem 'bullet', '5.5.1'
|
39
39
|
gem 'listen', '3.1.5'
|
40
40
|
end
|
41
41
|
|
42
42
|
group :test do
|
43
|
-
gem 'shoulda-matchers', '3.
|
44
|
-
gem 'simplecov', '0.
|
45
|
-
gem 'email_spec', '1.
|
43
|
+
gem 'shoulda-matchers', '3.1.2', require: false
|
44
|
+
gem 'simplecov', '0.14.1', require: false
|
45
|
+
gem 'email_spec', '2.1.0'
|
46
46
|
gem 'capybara', '2.5.0'
|
47
47
|
gem 'poltergeist', '1.8.0'
|
48
48
|
gem 'vcr', '3.0.0'
|
49
49
|
gem 'webmock', '1.22.3'
|
50
|
-
gem 'database_cleaner', '1.
|
50
|
+
gem 'database_cleaner', '1.6.1'
|
51
51
|
end
|
52
52
|
|
53
53
|
group :development, :test do
|
54
|
-
gem 'rspec-rails', '3.
|
55
|
-
gem 'factory_girl_rails', '4.
|
56
|
-
gem 'pry-
|
57
|
-
gem 'dotenv-rails', '2.
|
58
|
-
gem 'awesome_print', '1.
|
54
|
+
gem 'rspec-rails', '3.6.1'
|
55
|
+
gem 'factory_girl_rails', '4.8.0'
|
56
|
+
gem 'pry-byebug', '3.4.2'
|
57
|
+
gem 'dotenv-rails', '2.2.1'
|
58
|
+
gem 'awesome_print', '1.7.0'
|
59
59
|
gem 'spring-commands-rspec', '1.0.4'
|
60
|
-
gem '
|
61
|
-
gem 'spring', '1.5.0'
|
60
|
+
gem 'spring', '2.0.2'
|
62
61
|
end
|
@@ -1,18 +1,16 @@
|
|
1
|
-
|
1
|
+
default: &default
|
2
2
|
adapter: postgresql
|
3
3
|
encoding: utf8
|
4
|
-
database: PROJECT_development
|
5
4
|
pool: 5
|
6
5
|
username: postgres
|
7
6
|
host: localhost
|
8
7
|
template: template0
|
9
8
|
|
10
|
-
|
11
|
-
|
12
|
-
|
9
|
+
development:
|
10
|
+
<<: *default
|
11
|
+
database: PROJECT_development
|
12
|
+
|
13
|
+
test: &test
|
14
|
+
<<: *default
|
13
15
|
database: PROJECT_test
|
14
|
-
pool: 5
|
15
|
-
username: postgres
|
16
16
|
min_messages: WARNING
|
17
|
-
host: localhost
|
18
|
-
template: template0
|
@@ -2,25 +2,26 @@ module Pah
|
|
2
2
|
module Templates
|
3
3
|
class SecureHeader < Pah::Template
|
4
4
|
def call
|
5
|
-
content = <<EOF
|
6
|
-
|
7
|
-
ensure_security_headers # See more: https://github.com/twitter/secureheaders
|
8
|
-
EOF
|
9
|
-
|
10
|
-
inject_into_file 'app/controllers/application_controller.rb', content, after: 'with: :exception', verbose: false
|
11
|
-
|
12
5
|
create_file 'config/initializers/secure_headers.rb' do
|
13
6
|
<<-EOF
|
14
7
|
::SecureHeaders::Configuration.configure do |config|
|
15
|
-
config.hsts = {
|
8
|
+
config.hsts = "max-age=#{20.years.to_i}; includeSubdomains; preload"
|
16
9
|
config.x_frame_options = 'DENY'
|
17
10
|
config.x_content_type_options = "nosniff"
|
18
|
-
config.x_xss_protection =
|
19
|
-
config.csp =
|
11
|
+
config.x_xss_protection = "1; mode=block"
|
12
|
+
config.csp = {
|
13
|
+
report_only: Rails.env.production?, # for the Content-Security-Policy-Report-Only header
|
14
|
+
preserve_schemes: false, # default: false.
|
15
|
+
|
16
|
+
default_src: %w(*), # all allowed in the beginning
|
17
|
+
script_src: %w('self' 'unsafe-inline'), # scripts only allowed in external files from the same origin
|
18
|
+
connect_src: %w('self'), # Ajax may connect only to the same origin
|
19
|
+
style_src: %w('self' 'unsafe-inline'), # styles only allowed in external files from the same origin and in style attributes (for now)
|
20
|
+
# report_uri: ["/csp_report?report_only=#{Rails.env.production?}"] # violation reports will be sent here
|
21
|
+
}
|
20
22
|
end
|
21
23
|
EOF
|
22
24
|
end
|
23
|
-
git add: 'app/controllers/application_controller.rb'
|
24
25
|
git add: 'config/initializers/secure_headers.rb'
|
25
26
|
git_commit 'Add secure headers.'
|
26
27
|
end
|
data/lib/pah/version.rb
CHANGED
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.28
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- HE:labs
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-09-20 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: 5.
|
19
|
+
version: 5.1.2
|
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: 5.
|
26
|
+
version: 5.1.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: colored
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -252,7 +252,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
252
252
|
requirements:
|
253
253
|
- - ">="
|
254
254
|
- !ruby/object:Gem::Version
|
255
|
-
version: 2.
|
255
|
+
version: 2.4.2
|
256
256
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
257
257
|
requirements:
|
258
258
|
- - ">="
|
@@ -260,7 +260,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
260
260
|
version: '0'
|
261
261
|
requirements: []
|
262
262
|
rubyforge_project:
|
263
|
-
rubygems_version: 2.
|
263
|
+
rubygems_version: 2.6.13
|
264
264
|
signing_key:
|
265
265
|
specification_version: 4
|
266
266
|
summary: A rails application template which born from Startup DEV and now is used
|