rails_secret_token_env 0.2 → 0.3

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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YjAzMGM1OGQzMjM2ZDk5ZGQxMmEyNWM5YjU4ZTFhOWIyM2JlMWY0ZA==
4
+ YjJkYmY3YzRkM2FiNDBkNGU4NGZhNDczNTRkMDU3OWUxYTIwNjEyYw==
5
5
  data.tar.gz: !binary |-
6
- Mzg0NjEwMDIyZDJiYmVmMDhhOWRjOTdkZWI0OWNjZTcwYzk0MWEwMQ==
6
+ OTMwMjI3MTc3OTRjNjQ0MDExMjc3Y2QzMTFlOGIxYjk4OTFiMDczMg==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- YzI5MGM5YzA3ZGI3MTMxZWVkYzE2Y2NkYzcwOGVjYTBlMjQ2ZjgxZmQ4MTRm
10
- M2ExODc5YzQ1MzljYTkwZDQ2OGQ1NTg2YWFmMThiODRiN2RiYmJhMmRhNzVi
11
- N2Q1MDY0MmEzZWNiNzBiMWVjMTZhYzY3ZDRiMzUzM2VhODMxYmI=
9
+ NmUxMDE4ZDZiODJlOTFkMjQ4ZmM2ZjQ4ZGY3NzUyODQxNGI2ODdmNGJjODIy
10
+ YTg4MzM5NzBjZjczNTFkMmZjMDFhM2M5YzJiZmRlMGI0Y2Q3OTk4ODkxMTQ3
11
+ Y2EyNTcwZjVhMzRiYzExMWE2NWIxNDMzZjQwMjU1ODFkN2EzZjc=
12
12
  data.tar.gz: !binary |-
13
- ZGVlZjNlZWVkNzZlNWUzOWIxZDgwNDE5NjZkMmE1ZGYwNDVjODdiZThkYjE1
14
- ODMxNzBiZGI4ZDkwOTEyMmYyZjVmYmZmODNiN2ZlZDI2NzU3Y2ViYWI1NWZk
15
- NmNjY2VjODg3YmY3ZGRlYjU0ZjUyODhkMTg4MTM1MDRhNjUyMGQ=
13
+ MjY5Yzg1ODY0MDdiZjJkMWFmOGVjMDIxMDc0ZDk2MWU3YzJiOWJlMmMxMjg5
14
+ NzM2NmI1N2YxY2M2M2YzNzFiNmExMGIzYmY2OTA3NGY0MTk0NDk1MDRhMzcz
15
+ MWM0MzJjM2U1ZDFkY2RkMzBmYzY3NzU0ZWIzN2JmNmU2OTQ0NzA=
data/CHANGELOG CHANGED
@@ -1,2 +1,3 @@
1
+ v0.3. do not raise error, just log error on missing env var in prod
1
2
  v0.2. fixed version
2
3
  v0.1. first version
data/Manifest CHANGED
@@ -1,5 +1,5 @@
1
1
  CHANGELOG
2
- README
2
+ Manifest
3
+ README.md
3
4
  Rakefile
4
5
  lib/rails_secret_token_env.rb
5
- Manifest
@@ -5,9 +5,10 @@ Put this in your rails app's Gemfile:
5
5
  gem 'rails_secret_token_env'
6
6
 
7
7
  This will set your app's config.secret_token to the SECRET_TOKEN environment
8
- variable.
8
+ variable. You should delete the default config/initializer/secret_token.rb file.
9
9
 
10
- In production mode, it will raise an error if the variable is missing. (In
11
- development mode, it will default to 'xxxxxx' if not found)
10
+ In production mode, it will log an error if the variable is missing.
11
+
12
+ (In development mode, it will default to 'xxxxxx' if not found)
12
13
 
13
14
  See also: gem 'dotenv'
@@ -2,7 +2,7 @@ require 'rails'
2
2
 
3
3
  class RailsSecretTokenEnv < Rails::Railtie
4
4
  initializer "my_railtie.configure_rails_initialization" do |app|
5
- raise "Missing SECRET_TOKEN environment" if ENV['SECRET_TOKEN'].blank? && Rails.env.production?
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
7
  end
8
8
  end
@@ -2,17 +2,17 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "rails_secret_token_env"
5
- s.version = "0.2"
5
+ s.version = "0.3"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Andrew Snow"]
9
- s.date = "2013-06-23"
9
+ s.date = "2013-09-13"
10
10
  s.description = "Ruby gem to initialize Rails config.secret_token from an environment variable"
11
11
  s.email = "andrew@modulus.org"
12
- s.extra_rdoc_files = ["CHANGELOG", "README", "lib/rails_secret_token_env.rb"]
13
- s.files = ["CHANGELOG", "README", "Rakefile", "lib/rails_secret_token_env.rb", "Manifest", "rails_secret_token_env.gemspec"]
12
+ s.extra_rdoc_files = ["CHANGELOG", "README.md", "lib/rails_secret_token_env.rb"]
13
+ s.files = ["CHANGELOG", "Manifest", "README.md", "Rakefile", "lib/rails_secret_token_env.rb", "rails_secret_token_env.gemspec"]
14
14
  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"]
15
+ s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Rails_secret_token_env", "--main", "README.md"]
16
16
  s.require_paths = ["lib"]
17
17
  s.rubyforge_project = "rails_secret_token_env"
18
18
  s.rubygems_version = "2.0.3"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_secret_token_env
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.2'
4
+ version: '0.3'
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-06-23 00:00:00.000000000 Z
11
+ date: 2013-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  type: :runtime
@@ -31,14 +31,14 @@ executables: []
31
31
  extensions: []
32
32
  extra_rdoc_files:
33
33
  - CHANGELOG
34
- - README
34
+ - README.md
35
35
  - lib/rails_secret_token_env.rb
36
36
  files:
37
37
  - CHANGELOG
38
- - README
38
+ - Manifest
39
+ - README.md
39
40
  - Rakefile
40
41
  - lib/rails_secret_token_env.rb
41
- - Manifest
42
42
  - rails_secret_token_env.gemspec
43
43
  homepage: https://github.com/andys/rails_secret_token_env
44
44
  licenses: []
@@ -50,7 +50,7 @@ rdoc_options:
50
50
  - --title
51
51
  - Rails_secret_token_env
52
52
  - --main
53
- - README
53
+ - README.md
54
54
  require_paths:
55
55
  - lib
56
56
  required_ruby_version: !ruby/object:Gem::Requirement