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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 659c9f22b6f4b8e92d9988fb1df713091bc102c9
4
- data.tar.gz: 02a2221bbd469e0a6923df1d2fdd5790d899851a
3
+ metadata.gz: 2f5098132b991c99ba4c30d4d2afcfa21fd29f75
4
+ data.tar.gz: da9923c7d366d1f1307fc2aa05287dcdf55d3de5
5
5
  SHA512:
6
- metadata.gz: d1d92f7aec6e28f74b23728df0a0a302547adf22d9e3f4903a9fa625950e93e0897d9e4a763c040fbf4fe815b8d2b56991f621c62ef8f192904ce85c4c0a9eeb
7
- data.tar.gz: 26b53eed36f28b3c0fdfc9b1ccd0ff83ca7a7eb319f9cccb7c30935652d44721042b1c3283cae81f9f59009a374daf114075e635eaa6c15d82254c17df73a544
6
+ metadata.gz: deedba7b7dbce1188969af218a44ec07ea700e15f2500f6b5edb2abce35ce24e4b358116a8ea51d5d0966365688841d08d5155c246a8c18e189622acb0598439
7
+ data.tar.gz: 556085f2299ff8eb85c7ec2c498cd1d2e7be8bca19f6fca580278317897f7cc1433d224c0853817015a52497d05f7786e531d12fcebd854400ca4d2fee91c698
@@ -1 +1 @@
1
- 2.3.1
1
+ 2.4.2
@@ -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.0.0 app with Ruby 2.3.1. This script creates a new git repository in the folder `projectname`.
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
 
@@ -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.27
8
- Rails version: 5.0.0
9
- Ruby version: 2.3.1
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.27
16
- Rails version: 5.0.0
17
- Ruby version: 2.3.1
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`
@@ -6,7 +6,7 @@ Feature: Env files
6
6
  Scenario: Create env files
7
7
  Then I have the file .ruby-version and contents of this file should be:
8
8
  """
9
- 2.3.1
9
+ 2.4.2
10
10
 
11
11
  """
12
12
  Then I have the file .ruby-gemset and contents of this file should be:
@@ -6,6 +6,6 @@ Feature: Gemfile
6
6
  Scenario: Correct gems on gemfile
7
7
  Then I have the file Gemfile and contents of this file should include:
8
8
  """
9
- gem 'rails', '5.0.0'
9
+ gem 'rails', '5.1.2'
10
10
  """
11
11
 
@@ -11,5 +11,5 @@ Feature: README
11
11
  """
12
12
  Then I have the file README.md and contents of this file should include:
13
13
  """
14
- Ruby 2.3.1
14
+ Ruby 2.4.2
15
15
  """
@@ -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 repository,
32
- # instead read values from the environment.
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
  """
@@ -1,5 +1,5 @@
1
1
  @no-clobber
2
- Feature: Mandrill
2
+ Feature: Sendgrid
3
3
  Background:
4
4
  Given I have created the app "myapp" with pah
5
5
 
@@ -14,4 +14,5 @@ capybara-*.html
14
14
  /spec/tmp/*
15
15
  **.orig
16
16
  rerun.txt
17
- pickle-email-*.html
17
+ pickle-email-*.html
18
+ *.sublime-*
@@ -2,61 +2,60 @@ source 'https://rubygems.org'
2
2
  ruby 'RUBY_VERSION'
3
3
 
4
4
  gem 'rails', 'RAILS_VERSION'
5
- gem 'puma', '2.15.3'
6
- gem 'secure_headers', '2.4.4'
7
- gem 'jquery-rails', '4.1.1'
8
- gem 'turbolinks', '2.5.3'
9
- gem 'jbuilder', '2.5.0'
10
- gem 'slim-rails', '3.1.0'
11
- gem 'pg', '0.18.4'
12
- gem 'sass-rails', '5.0.5'
13
- gem 'coffee-rails', '4.2.1'
14
- gem 'uglifier', '2.7.2'
15
- gem 'simple_form', '3.2.1'
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.11.3'
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.2'
27
- gem 'newrelic_rpm', '~> 3.12'
28
- gem 'librato-rails', '1.0.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.78.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.1.1'
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.0.1', require: false
44
- gem 'simplecov', '0.11.1', require: false
45
- gem 'email_spec', '1.6.0'
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.5.1'
50
+ gem 'database_cleaner', '1.6.1'
51
51
  end
52
52
 
53
53
  group :development, :test do
54
- gem 'rspec-rails', '3.5.1'
55
- gem 'factory_girl_rails', '4.5.0'
56
- gem 'pry-rails', '0.3.4'
57
- gem 'dotenv-rails', '2.1.1'
58
- gem 'awesome_print', '1.6.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 'byebug', '8.2.1'
61
- gem 'spring', '1.5.0'
60
+ gem 'spring', '2.0.2'
62
61
  end
@@ -1,18 +1,16 @@
1
- development:
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
- test:
11
- adapter: postgresql
12
- encoding: utf8
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 = {:max_age => 20.years.to_i, :include_subdomains => true}
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 = {:value => 1, :mode => 'block'}
19
- config.csp = false
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
@@ -1,5 +1,5 @@
1
1
  module Pah
2
- VERSION = '0.0.27'.freeze
3
- RUBY_VERSION = '2.3.1'.freeze
4
- RAILS_VERSION = '5.0.0'.freeze
2
+ VERSION = '0.0.28'.freeze
3
+ RUBY_VERSION = '2.4.2'.freeze
4
+ RAILS_VERSION = '5.1.2'.freeze
5
5
  end
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.27
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: 2016-07-18 00:00:00.000000000 Z
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.0.0
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.0.0
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.3.1
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.5.1
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