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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0c8a5942cb4fc9c9d963c5c864bd010f99654383
4
- data.tar.gz: b6de107225f64c0352e8021c36b95a994ee72f86
3
+ metadata.gz: 3e6ecced2b2fd28691b954df6e31da6a1725ecab
4
+ data.tar.gz: e9d53b25fe331ce481a88274d376e18ee5ca27b5
5
5
  SHA512:
6
- metadata.gz: 1e47321d197d53553fc6a6341275acc0501d2aab999e5364a773852e157c7219ea7dcb4abb68f16a9535631177ed7131b45aa1c5a501555b44779d9821d6b584
7
- data.tar.gz: 73d9e80006eedbebc63cda314ec99e870d5d4239e4d4e17d433d12888b249692c7f339679b657621e58ed7b10d6540e2a206aa6178a0547af66f49b3f5acb905
6
+ metadata.gz: 00fcfd0525e727279170cac1263b213869bb0897cc2fc0e53518463b1b88e9dce7b67720b64014bc889be38d6301243e87e77c27225dacf21f70164d6c0c429a
7
+ data.tar.gz: d7596da0e82404965fb5f003886efc2e3c147577b0396f3382d791ff8143eb6e80f682d296ba9f1aa129eaba9d6866f06b12b22cb9c610a4aca993d7f578293e
@@ -1,15 +1,27 @@
1
1
  module OneSecret
2
2
  class Railtie < Rails::Railtie
3
3
  config.before_initialize do
4
- Secret.key = KeyResolution.try(:env, :rails, :stdin)
4
+ if should_run?
5
+ Secret.key = KeyResolution.try(:env, :rails, :stdin)
5
6
 
6
- Rails.application.secrets.each_pair do |key, value|
7
- Rails.application.secrets[key] = ENV[key.to_s] = Secret.load(value)
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)
@@ -1,3 +1,3 @@
1
1
  module OneSecret
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
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.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-14 00:00:00.000000000 Z
11
+ date: 2014-07-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler