ejson-rails 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/ejson/rails/railtie.rb +12 -10
- data/lib/ejson/rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d6ed554914ffee19b94116f0ce94f3796b680ba0
|
4
|
+
data.tar.gz: 1b4f1b1f4e81b8f6bcb1b1468ba5452e0ba5f5c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d42411a44030e8b7ca186f2e69c24df8deefcad1d49195108651e8358f4f0eceeee08a5311f7f497b6cd935eefdaca6765847a7588d9603301bf2ccf5059648c
|
7
|
+
data.tar.gz: 90759c997260d05d7443315ab12adcd84c033aed5588450db8de6833f393dc62b2f67296cb5cf25889d989ff030edbe07faf2689b81b3461b0babec05e5c7c0e
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ejson-rails (0.1.
|
4
|
+
ejson-rails (0.1.1)
|
5
5
|
ejson
|
6
6
|
railties (>= 4.1)
|
7
7
|
|
@@ -41,7 +41,7 @@ GEM
|
|
41
41
|
method_source (0.9.0)
|
42
42
|
mini_portile2 (2.3.0)
|
43
43
|
minitest (5.11.3)
|
44
|
-
nokogiri (1.8.
|
44
|
+
nokogiri (1.8.3)
|
45
45
|
mini_portile2 (~> 2.3.0)
|
46
46
|
parallel (1.12.1)
|
47
47
|
parser (2.5.1.0)
|
data/lib/ejson/rails/railtie.rb
CHANGED
@@ -6,7 +6,7 @@ module EJSON
|
|
6
6
|
private_constant :Rails
|
7
7
|
|
8
8
|
class Railtie < Rails::Railtie
|
9
|
-
|
9
|
+
config.before_configuration do
|
10
10
|
json_files.each do |file|
|
11
11
|
next unless valid?(file)
|
12
12
|
secrets = JSON.parse(file.read, symbolize_names: true)
|
@@ -14,17 +14,19 @@ module EJSON
|
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
17
|
-
|
17
|
+
class << self
|
18
|
+
private
|
18
19
|
|
19
|
-
|
20
|
-
|
21
|
-
|
20
|
+
def valid?(pathname)
|
21
|
+
pathname.exist?
|
22
|
+
end
|
22
23
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
24
|
+
def json_files
|
25
|
+
[
|
26
|
+
Rails.root.join("config", "secrets.json"),
|
27
|
+
Rails.root.join("config", "secrets.#{Rails.env}.json"),
|
28
|
+
]
|
29
|
+
end
|
28
30
|
end
|
29
31
|
end
|
30
32
|
end
|
data/lib/ejson/rails/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ejson-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gannon McGibbon
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-06-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ejson
|