one_secret 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/one_secret/railtie.rb +15 -3
- data/lib/one_secret/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: 3e6ecced2b2fd28691b954df6e31da6a1725ecab
|
4
|
+
data.tar.gz: e9d53b25fe331ce481a88274d376e18ee5ca27b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00fcfd0525e727279170cac1263b213869bb0897cc2fc0e53518463b1b88e9dce7b67720b64014bc889be38d6301243e87e77c27225dacf21f70164d6c0c429a
|
7
|
+
data.tar.gz: d7596da0e82404965fb5f003886efc2e3c147577b0396f3382d791ff8143eb6e80f682d296ba9f1aa129eaba9d6866f06b12b22cb9c610a4aca993d7f578293e
|
data/lib/one_secret/railtie.rb
CHANGED
@@ -1,15 +1,27 @@
|
|
1
1
|
module OneSecret
|
2
2
|
class Railtie < Rails::Railtie
|
3
3
|
config.before_initialize do
|
4
|
-
|
4
|
+
if should_run?
|
5
|
+
Secret.key = KeyResolution.try(:env, :rails, :stdin)
|
5
6
|
|
6
|
-
|
7
|
-
|
7
|
+
Rails.application.secrets.each_pair do |key, value|
|
8
|
+
Rails.application.secrets[key] = ENV[key.to_s] = Secret.load(value)
|
9
|
+
end
|
8
10
|
end
|
9
11
|
end
|
10
12
|
|
11
13
|
rake_tasks do
|
12
14
|
load "one_secret/tasks.rake"
|
13
15
|
end
|
16
|
+
|
17
|
+
private
|
18
|
+
|
19
|
+
def self.should_run?
|
20
|
+
if defined?(Rake)
|
21
|
+
!Rake.application.top_level_tasks.include?("assets:precompile")
|
22
|
+
else
|
23
|
+
true
|
24
|
+
end
|
25
|
+
end
|
14
26
|
end
|
15
27
|
end if defined?(Rails)
|
data/lib/one_secret/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: one_secret
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Omer Lachish-Rauchwerger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|