rails-secrets 1.0.1 → 1.0.2
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/.travis.yml +3 -0
- data/Appraisals +7 -0
- data/README.md +6 -0
- data/Rakefile +1 -0
- data/gemfiles/rails_3_2.gemfile +7 -0
- data/gemfiles/rails_4_0.gemfile +7 -0
- data/lib/rails/secrets/railtie.rb +1 -1
- data/lib/rails/secrets/version.rb +1 -1
- data/rails-secrets.gemspec +4 -3
- data/test/dummy/config/environments/development.rb +3 -0
- data/test/dummy/config/environments/production.rb +3 -0
- data/test/dummy/config/environments/test.rb +3 -0
- data/test/rails_secrets_test.rb +4 -0
- metadata +25 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c81cd87748dd386af0710b471f63c59780df0ac
|
4
|
+
data.tar.gz: 7509ee34f741eb1c4301cda1e5eaa35ebec9fbd3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 118f409bb9015ce55cbba001685143dc696d79cc8e0b2306b9fc362583b03fb51918065fec19b24563eb30a7ed54feb71a495140e01838fa0866b83c245ac429
|
7
|
+
data.tar.gz: 4271b37947a2776626bfcf59accb0efa9713ee7a1763549496dbd5028618678e4aa918fb0d3ca939271bca8909f6c0c2bca63a3bebdb04bb87e382510a6bb8cb
|
data/.travis.yml
CHANGED
data/Appraisals
ADDED
data/README.md
CHANGED
@@ -22,6 +22,12 @@ Add this gem to your Gemfile, remove `config/initializers/secret_token.rb` and c
|
|
22
22
|
|
23
23
|
## Changelog
|
24
24
|
|
25
|
+
### 1.0.2
|
26
|
+
|
27
|
+
* Add support for Rails 3.2.x
|
28
|
+
|
29
|
+
* Include instance methods before configuration begins so that it's available in environment configuration
|
30
|
+
|
25
31
|
### 1.0.1
|
26
32
|
|
27
33
|
* Include instance methods before initialization begins so that it's available in all initializers
|
data/Rakefile
CHANGED
data/rails-secrets.gemspec
CHANGED
@@ -10,8 +10,8 @@ Gem::Specification.new do |gem|
|
|
10
10
|
gem.email = ["andyw@pixeltrix.co.uk"]
|
11
11
|
gem.homepage = "https://github.com/pixeltrix/rails-secrets"
|
12
12
|
|
13
|
-
gem.summary = %q{Rails 4.1 secrets.yml for Rails 4.0}
|
14
|
-
gem.description = %q{Rails::Secrets is a backport of Rails 4.1 secrets.yml to Rails 4.0}
|
13
|
+
gem.summary = %q{Rails 4.1 secrets.yml for Rails 4.0 and 3.2}
|
14
|
+
gem.description = %q{Rails::Secrets is a backport of Rails 4.1 secrets.yml to Rails 4.0 and 3.2}
|
15
15
|
|
16
16
|
gem.files = `git ls-files`.split("\n")
|
17
17
|
gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
@@ -21,5 +21,6 @@ Gem::Specification.new do |gem|
|
|
21
21
|
gem.required_ruby_version = '>= 1.9.3'
|
22
22
|
gem.required_rubygems_version = '>= 1.8.11'
|
23
23
|
|
24
|
-
gem.add_runtime_dependency 'rails', ['>=
|
24
|
+
gem.add_runtime_dependency 'rails', ['>= 3.2.0', '<= 4.1.0']
|
25
|
+
gem.add_development_dependency 'appraisal', '~> 1.0'
|
25
26
|
end
|
@@ -26,4 +26,7 @@ Dummy::Application.configure do
|
|
26
26
|
# This option may cause significant delays in view rendering with a large
|
27
27
|
# number of complex assets.
|
28
28
|
config.assets.debug = true
|
29
|
+
|
30
|
+
# Test whether secrets can be read in a configuration context
|
31
|
+
config.secret_environment_config = Rails.application.secrets.secret_key_base
|
29
32
|
end
|
@@ -77,4 +77,7 @@ Dummy::Application.configure do
|
|
77
77
|
|
78
78
|
# Use default logging formatter so that PID and timestamp are not suppressed.
|
79
79
|
config.log_formatter = ::Logger::Formatter.new
|
80
|
+
|
81
|
+
# Test whether secrets can be read in a configuration context
|
82
|
+
config.secret_environment_config = Rails.application.secrets.secret_key_base
|
80
83
|
end
|
@@ -33,4 +33,7 @@ Dummy::Application.configure do
|
|
33
33
|
|
34
34
|
# Print deprecation notices to the stderr.
|
35
35
|
config.active_support.deprecation = :stderr
|
36
|
+
|
37
|
+
# Test whether secrets can be read in a configuration context
|
38
|
+
config.secret_environment_config = Rails.application.secrets.secret_key_base
|
36
39
|
end
|
data/test/rails_secrets_test.rb
CHANGED
@@ -8,6 +8,10 @@ class RailsSecretsTest < ActiveSupport::TestCase
|
|
8
8
|
assert_equal "9f4a992", app.secrets.api_token
|
9
9
|
end
|
10
10
|
|
11
|
+
test "a config value set in the configuration stage is set to the correct value" do
|
12
|
+
assert_equal app.secrets.secret_key_base, app.config.secret_environment_config
|
13
|
+
end
|
14
|
+
|
11
15
|
test "config.secret_key_base is copied from secrets.secret_key_base" do
|
12
16
|
assert_equal app.secrets.secret_key_base, app.config.secret_key_base
|
13
17
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-secrets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew White
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-05-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 3.2.0
|
20
20
|
- - <=
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 4.1.0
|
@@ -26,11 +26,26 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - '>='
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
29
|
+
version: 3.2.0
|
30
30
|
- - <=
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 4.1.0
|
33
|
-
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: appraisal
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - ~>
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '1.0'
|
40
|
+
type: :development
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - ~>
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '1.0'
|
47
|
+
description: Rails::Secrets is a backport of Rails 4.1 secrets.yml to Rails 4.0 and
|
48
|
+
3.2
|
34
49
|
email:
|
35
50
|
- andyw@pixeltrix.co.uk
|
36
51
|
executables: []
|
@@ -39,10 +54,13 @@ extra_rdoc_files: []
|
|
39
54
|
files:
|
40
55
|
- .gitignore
|
41
56
|
- .travis.yml
|
57
|
+
- Appraisals
|
42
58
|
- Gemfile
|
43
59
|
- LICENSE
|
44
60
|
- README.md
|
45
61
|
- Rakefile
|
62
|
+
- gemfiles/rails_3_2.gemfile
|
63
|
+
- gemfiles/rails_4_0.gemfile
|
46
64
|
- lib/rails-secrets.rb
|
47
65
|
- lib/rails/secrets.rb
|
48
66
|
- lib/rails/secrets/railtie.rb
|
@@ -76,10 +94,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
76
94
|
version: 1.8.11
|
77
95
|
requirements: []
|
78
96
|
rubyforge_project:
|
79
|
-
rubygems_version: 2.2.
|
97
|
+
rubygems_version: 2.2.2
|
80
98
|
signing_key:
|
81
99
|
specification_version: 4
|
82
|
-
summary: Rails 4.1 secrets.yml for Rails 4.0
|
100
|
+
summary: Rails 4.1 secrets.yml for Rails 4.0 and 3.2
|
83
101
|
test_files:
|
84
102
|
- test/dummy/config.ru
|
85
103
|
- test/dummy/config/application.rb
|