econfig-keychain 1.0.2 → 2.0.0

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,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8510be80ac12c816ca31d78e99966ed7e7239f48
4
- data.tar.gz: 17623f293d5e9d461cf910c7d30f63dd955c3d52
3
+ metadata.gz: 470f3d19f1db3d9779d0bf035cfe902f84fa90c5
4
+ data.tar.gz: c42eac479ba18c06ab08d9d79a38a3cb3ecd8be4
5
5
  SHA512:
6
- metadata.gz: c99c777e3f184bb88509dc28d366e9fbaea0af8271625f7a281325d2da474d32c017f28e9204c3524f2d26545a7372adc8dfc39d03ad5d261f18492bf8639e7a
7
- data.tar.gz: f2a97f4e6e69865ba0320c62c7794d88d87ce95d5d5d8e4885b900664df553366edb04b1e5a9c921e67f9b8bf93c03508b164e056c3c5bccf83f66bfb7595bb7
6
+ metadata.gz: c55059239ed39bc3051103bdc747974bc41513411a9baadea0b7b7914aa139352bc8012c62d4823674b94e48afb8c7977214abb7efb6cc32cf9cc4d40c3403f2
7
+ data.tar.gz: 58d3947d41a0670dcb6c6f76b37bd1178fd23bd9b8b641e50cbf108d86fd31ccf8849cb3f1dde18e38f7912ccc73e9fda3905c69c2ff3f1de339753a5564617e
data/README.md CHANGED
@@ -17,13 +17,16 @@ Second, create a keychain you wish to store configuration in, name it something
17
17
  clever like `thanks-a-latte`. Within `config/application.rb` write the following:
18
18
 
19
19
  ``` ruby
20
- # … some rails setup previously
21
20
  module MyApp
22
21
  extend Econfig::Shortcut
23
- Econfig.use_keychain "thanks-a-latte" if Rails.env.development?
24
-
22
+
23
+ if Rails.env.development?
24
+ Econfig.backends.use :keychain, Econfig::Keychain.new("thanks-a-latte")
25
+ end
26
+
25
27
  class Application < Rails::Application
26
- # … rest of the configuration
28
+ # … rest of the configuration
29
+ end
27
30
  ```
28
31
 
29
32
  That's it!
@@ -31,7 +34,7 @@ That's it!
31
34
  Econfig::Keychain will automatically create an empty secure note using the name of the directory your project is located at, in the `thanks-a-latte` keychain. If you wish to specify the name yourself, you can do so:
32
35
 
33
36
  ``` ruby
34
- Econfig.use_keychain "thanks-a-latte", name: "project name"
37
+ Econfig.backends.use :keychain, Econfig::Keychain.new("thanks-a-latte", name: "project name")
35
38
  ```
36
39
 
37
40
  ## Changing configuration
@@ -39,7 +42,7 @@ Econfig.use_keychain "thanks-a-latte", name: "project name"
39
42
  Econfig::Keychain supports changing configuration by setting values, e.g. from the Rails console:
40
43
 
41
44
  ``` ruby
42
- MyApp.aws_access_key_id = "xyz"
45
+ MyApp.config[:keychain, :aws_access_key_id] = "xyz"
43
46
  ```
44
47
 
45
48
  You can also edit your configuration with your `$EDITOR` manually using the Mellon CLI:
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
19
19
 
20
20
  spec.required_ruby_version = "~> 2.0"
21
21
 
22
- spec.add_dependency "econfig"
22
+ spec.add_dependency "econfig", "~> 1.0"
23
23
  spec.add_dependency "mellon", "~> 1.0"
24
24
 
25
25
  spec.add_development_dependency "bundler", "~> 1.6"
@@ -1,5 +1,5 @@
1
1
  module Econfig
2
2
  class Keychain
3
- VERSION = "1.0.2"
3
+ VERSION = "2.0.0"
4
4
  end
5
5
  end
@@ -1,9 +1 @@
1
1
  require "econfig/keychain"
2
-
3
- module Econfig
4
- class << self
5
- def use_keychain(keychain, **kwargs)
6
- Econfig.instance.backends << Econfig::Keychain.new(keychain, **kwargs)
7
- end
8
- end
9
- end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: econfig-keychain
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kim Burgestrand
@@ -9,22 +9,22 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-04-30 00:00:00.000000000 Z
12
+ date: 2014-05-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: econfig
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ">="
18
+ - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: '0'
20
+ version: '1.0'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - ">="
25
+ - - "~>"
26
26
  - !ruby/object:Gem::Version
27
- version: '0'
27
+ version: '1.0'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: mellon
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -128,3 +128,4 @@ summary: An OSX keychain adapter for Econfig.
128
128
  test_files:
129
129
  - spec/econfig/keychain_spec.rb
130
130
  - spec/econfig/osx.keychain
131
+ has_rdoc: