key_store 0.0.3 → 0.0.4

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: d9f84301f0857cc3b7b0090b554914a680ada02b
4
- data.tar.gz: 49de7e8df07c0730d79fbbca051742e282956abe
3
+ metadata.gz: 5f6b5ce6241b3a2e31d877266c322b800cbf1427
4
+ data.tar.gz: 38c618ea10492077a13f94011c0597a3b48e2be3
5
5
  SHA512:
6
- metadata.gz: 79b5ad463d132b39486f9fa7e82150f764861d74823b1e3595b8c7ae2c43001939c3394038edb8728407b91208c3c238415db5691c0a820aabc7cd82f86e5fb5
7
- data.tar.gz: 76f666c6ca5375da6e83df7b01f162182bb354142a3ef9626f418a97c639082993ae93f2c840bdd472be1e1ef7cbb38c4c46b55dd8cc492ac71edcf4ba1046da
6
+ metadata.gz: 4ef7958c782c70ba73ebfd36dfd62c1fd301c3070fab5e2148ccc11ece273ded8fb797459f013406c4637ab23c30ddbdbe256bf692171758faebde63d868c7f4
7
+ data.tar.gz: 7e720bd809a9631d669f7b5b55bc4def972b67449f7f45d57ff9da639ef634e4811030e05f250222cf8e51f81f30c95cd6277b9cabbb92bf0cb827a0b29053d1
data/lib/key_store/key.rb CHANGED
@@ -26,25 +26,25 @@ module KeyStore
26
26
  end
27
27
 
28
28
  def save!
29
- file.transaction do
30
- file[name] ||= {}
31
- file[name][:roles] = roles.map(&:to_s)
32
- file[name][:notes] = notes.to_s
33
- file[name][:http_header] = http_header
29
+ file.transaction do |f|
30
+ f[name] ||= {}
31
+ f[name][:roles] = roles.map(&:to_s)
32
+ f[name][:notes] = notes.to_s
33
+ f[name][:http_header] = http_header
34
34
  end
35
35
  end
36
36
 
37
37
  private
38
38
 
39
39
  def set_roles_from_file
40
- file.transaction do
41
- @roles = file[name][:roles]
40
+ file.transaction do |f|
41
+ @roles = f[name][:roles]
42
42
  end
43
43
  end
44
44
 
45
45
  def set_notes_from_file
46
- file.transaction do
47
- @notes = file[name][:notes]
46
+ file.transaction do |f|
47
+ @notes = f[name][:notes]
48
48
  end
49
49
  end
50
50
 
@@ -1,3 +1,3 @@
1
1
  module KeyStore
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
data/lib/key_store.rb CHANGED
@@ -29,7 +29,7 @@ module KeyStore
29
29
  end
30
30
 
31
31
  def exists?(name)
32
- !!(file.transaction { file[name.to_s] })
32
+ !!(file.transaction { |f| f[name.to_s] })
33
33
  end
34
34
 
35
35
  def find(name)
@@ -37,7 +37,7 @@ module KeyStore
37
37
  end
38
38
 
39
39
  def delete!(name)
40
- file.transaction { file.delete(name.to_s) }
40
+ file.transaction { |f| f.delete(name.to_s) }
41
41
  end
42
42
 
43
43
  private
metadata CHANGED
@@ -1,55 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: key_store
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Hopkins
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-12 00:00:00.000000000 Z
11
+ date: 2014-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.3'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: micro_test
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: 0.4.0
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: 0.4.0
55
55
  description: A simple api-key storage engine
@@ -59,9 +59,9 @@ executables: []
59
59
  extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
+ - lib/key_store.rb
62
63
  - lib/key_store/key.rb
63
64
  - lib/key_store/version.rb
64
- - lib/key_store.rb
65
65
  - test/key_store_test.rb
66
66
  - test/key_test.rb
67
67
  - test/test_helper.rb
@@ -75,17 +75,17 @@ require_paths:
75
75
  - lib
76
76
  required_ruby_version: !ruby/object:Gem::Requirement
77
77
  requirements:
78
- - - '>='
78
+ - - ">="
79
79
  - !ruby/object:Gem::Version
80
80
  version: 2.0.0
81
81
  required_rubygems_version: !ruby/object:Gem::Requirement
82
82
  requirements:
83
- - - '>='
83
+ - - ">="
84
84
  - !ruby/object:Gem::Version
85
85
  version: '0'
86
86
  requirements: []
87
87
  rubyforge_project:
88
- rubygems_version: 2.0.3
88
+ rubygems_version: 2.2.0
89
89
  signing_key:
90
90
  specification_version: 4
91
91
  summary: A simple api-key storage engine
@@ -93,4 +93,3 @@ test_files:
93
93
  - test/key_store_test.rb
94
94
  - test/key_test.rb
95
95
  - test/test_helper.rb
96
- has_rdoc: