rails_secret_token_env 0.3 → 0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- YjJkYmY3YzRkM2FiNDBkNGU4NGZhNDczNTRkMDU3OWUxYTIwNjEyYw==
5
- data.tar.gz: !binary |-
6
- OTMwMjI3MTc3OTRjNjQ0MDExMjc3Y2QzMTFlOGIxYjk4OTFiMDczMg==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- NmUxMDE4ZDZiODJlOTFkMjQ4ZmM2ZjQ4ZGY3NzUyODQxNGI2ODdmNGJjODIy
10
- YTg4MzM5NzBjZjczNTFkMmZjMDFhM2M5YzJiZmRlMGI0Y2Q3OTk4ODkxMTQ3
11
- Y2EyNTcwZjVhMzRiYzExMWE2NWIxNDMzZjQwMjU1ODFkN2EzZjc=
12
- data.tar.gz: !binary |-
13
- MjY5Yzg1ODY0MDdiZjJkMWFmOGVjMDIxMDc0ZDk2MWU3YzJiOWJlMmMxMjg5
14
- NzM2NmI1N2YxY2M2M2YzNzFiNmExMGIzYmY2OTA3NGY0MTk0NDk1MDRhMzcz
15
- MWM0MzJjM2U1ZDFkY2RkMzBmYzY3NzU0ZWIzN2JmNmU2OTQ0NzA=
2
+ SHA1:
3
+ metadata.gz: 9e6ca6c523c9322ffcae8899d356007ef949b132
4
+ data.tar.gz: decfb11372a2825fff562281c4eb7838d3a32e15
5
+ SHA512:
6
+ metadata.gz: 0d228b431ff1597a32e7c32961fde024154ca609178cbd04539e8385eba4910946b7796bbc3e435419beb093c4d51c4772e763c7841d3f2aaeb7ef560fcd4168
7
+ data.tar.gz: 5192d51b7f65ee293a89424ff285e428a74cfb5a653ab45bad82824590d02d4dad03510a05ce85d73af0598b480f189e4fada87bb3b824654660cbc423cca832
data/CHANGELOG CHANGED
@@ -1,3 +1,4 @@
1
+ v0.4. Set app.config.secret_key_base for rails 4
1
2
  v0.3. do not raise error, just log error on missing env var in prod
2
3
  v0.2. fixed version
3
4
  v0.1. first version
data/README.md CHANGED
@@ -7,8 +7,10 @@ Put this in your rails app's Gemfile:
7
7
  This will set your app's config.secret_token to the SECRET_TOKEN environment
8
8
  variable. You should delete the default config/initializer/secret_token.rb file.
9
9
 
10
+ For rails 4, it also sets app.config.secret_key_base
11
+
10
12
  In production mode, it will log an error if the variable is missing.
11
13
 
12
14
  (In development mode, it will default to 'xxxxxx' if not found)
13
15
 
14
- See also: gem 'dotenv'
16
+ See also: gem 'dotenv' and 'dotenv-rails'
@@ -4,5 +4,6 @@ class RailsSecretTokenEnv < Rails::Railtie
4
4
  initializer "my_railtie.configure_rails_initialization" do |app|
5
5
  Rails.logger.error "RailsSecretTokenEnv SECURITY WARNING: Missing SECRET_TOKEN environment variable in prod!" if ENV['SECRET_TOKEN'].blank? && Rails.env.production?
6
6
  app.config.secret_token = ENV['SECRET_TOKEN'] || ('x' * 30)
7
+ app.config.secret_key_base = app.config.secret_token
7
8
  end
8
9
  end
@@ -1,21 +1,22 @@
1
1
  # -*- encoding: utf-8 -*-
2
+ # stub: rails_secret_token_env 0.4 ruby lib
2
3
 
3
4
  Gem::Specification.new do |s|
4
5
  s.name = "rails_secret_token_env"
5
- s.version = "0.3"
6
+ s.version = "0.4"
6
7
 
7
8
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
9
  s.authors = ["Andrew Snow"]
9
- s.date = "2013-09-13"
10
+ s.date = "2014-02-05"
10
11
  s.description = "Ruby gem to initialize Rails config.secret_token from an environment variable"
11
12
  s.email = "andrew@modulus.org"
12
13
  s.extra_rdoc_files = ["CHANGELOG", "README.md", "lib/rails_secret_token_env.rb"]
13
14
  s.files = ["CHANGELOG", "Manifest", "README.md", "Rakefile", "lib/rails_secret_token_env.rb", "rails_secret_token_env.gemspec"]
14
15
  s.homepage = "https://github.com/andys/rails_secret_token_env"
15
- s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Rails_secret_token_env", "--main", "README.md"]
16
+ s.rdoc_options = ["--line-numbers", "--title", "Rails_secret_token_env", "--main", "README.md"]
16
17
  s.require_paths = ["lib"]
17
18
  s.rubyforge_project = "rails_secret_token_env"
18
- s.rubygems_version = "2.0.3"
19
+ s.rubygems_version = "2.1.11"
19
20
  s.summary = "Ruby gem to initialize Rails config.secret_token from an environment variable"
20
21
 
21
22
  if s.respond_to? :specification_version then
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_secret_token_env
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.3'
4
+ version: '0.4'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Snow
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-13 00:00:00.000000000 Z
11
+ date: 2014-02-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- type: :runtime
15
- version_requirements: !ruby/object:Gem::Requirement
14
+ name: railties
15
+ requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ! '>='
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
+ type: :runtime
20
21
  prerelease: false
21
- name: railties
22
- requirement: !ruby/object:Gem::Requirement
22
+ version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ! '>='
24
+ - - '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  description: Ruby gem to initialize Rails config.secret_token from an environment
@@ -46,7 +46,6 @@ metadata: {}
46
46
  post_install_message:
47
47
  rdoc_options:
48
48
  - --line-numbers
49
- - --inline-source
50
49
  - --title
51
50
  - Rails_secret_token_env
52
51
  - --main
@@ -55,17 +54,17 @@ require_paths:
55
54
  - lib
56
55
  required_ruby_version: !ruby/object:Gem::Requirement
57
56
  requirements:
58
- - - ! '>='
57
+ - - '>='
59
58
  - !ruby/object:Gem::Version
60
59
  version: '0'
61
60
  required_rubygems_version: !ruby/object:Gem::Requirement
62
61
  requirements:
63
- - - ! '>='
62
+ - - '>='
64
63
  - !ruby/object:Gem::Version
65
64
  version: '1.2'
66
65
  requirements: []
67
66
  rubyforge_project: rails_secret_token_env
68
- rubygems_version: 2.0.3
67
+ rubygems_version: 2.1.11
69
68
  signing_key:
70
69
  specification_version: 4
71
70
  summary: Ruby gem to initialize Rails config.secret_token from an environment variable