ruby-secret_service 0.0.7 → 0.0.8
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 +8 -8
- data/Gemfile.lock +1 -1
- data/VERSION +1 -1
- data/lib/secret_service.rb +2 -2
- data/lib/secret_service/collection.rb +11 -1
- data/lib/secret_service/item.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OTZmYjAxZmIyMGM2M2M3YzlkOTAzZWVjNTgwODE1YjNhZDAzNjQyZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NDBlMTY2MzBkNDdkZjU5OWJkYjEyMzhiZDU3MDZmZGYxMTAxYjAwYQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MWQ1M2Q3ZGQ3Y2M0ZGMwZTE3ZjBmY2ZhMjJmYmQzZmQyMDNlMGUwYzlhZWZj
|
10
|
+
ZGMyMTFlMjAzMjU2YzYyMWZmOTQ1ODg4YjRhMTFiMGExNzQ0MGRhMTc0ZjZk
|
11
|
+
ODcwZDQ2NjUxMmI1ZGI4MjBjYzhiMTYzZWI4YmMxNjQ0NzcwY2Q=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZGJlOWNmNWQ5OTIwZDNkMWYzNTk1OWFlYWFiMjFlZjYwYTQyYWUyZDQ3ODY4
|
14
|
+
NzJlZjhmMDI0OTNiNjIzOGI0OTEyOGNlMDliNDM3NDA5N2I5OGRlNGVlOTE2
|
15
|
+
ZDM5NTgxODJkZGE0OWQyOWM3Yzc2MmNkYWEwMWEyNTRlMTU5ODA=
|
data/Gemfile.lock
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.8
|
data/lib/secret_service.rb
CHANGED
@@ -63,8 +63,8 @@ class SecretService
|
|
63
63
|
@proxy.Get(IFACE[:service], 'Collections')
|
64
64
|
end
|
65
65
|
|
66
|
-
def create_collection name, properties=
|
67
|
-
properties
|
66
|
+
def create_collection name, properties={}
|
67
|
+
properties["#{SS_PREFIX}Collection.Label"] = name
|
68
68
|
|
69
69
|
coll, prompt_path = @proxy.CreateCollection properties, ""
|
70
70
|
prompt!(prompt_path) if prompt_path != "/"
|
@@ -69,8 +69,18 @@ class Collection
|
|
69
69
|
Item.new(self, new_item_path)
|
70
70
|
end
|
71
71
|
|
72
|
+
def get_item name
|
73
|
+
(unlocked_items({"name" => name})[0])
|
74
|
+
end
|
75
|
+
|
72
76
|
def get_secret name
|
73
|
-
(
|
77
|
+
get_item(name).get_secret
|
78
|
+
end
|
79
|
+
|
80
|
+
def all_items
|
81
|
+
@proxy.Get(IFACE[:collection], Items).map { |item_path|
|
82
|
+
SecretService::Item.new(self, item_path)
|
83
|
+
}
|
74
84
|
end
|
75
85
|
|
76
86
|
def secret_encode secret_string
|
data/lib/secret_service/item.rb
CHANGED
@@ -63,6 +63,12 @@ class Item
|
|
63
63
|
secret_decode(@proxy.GetSecret(session[1]))
|
64
64
|
end
|
65
65
|
|
66
|
+
def delete
|
67
|
+
prompt = @proxy.Delete
|
68
|
+
return true if prompt_path == "/"
|
69
|
+
@collection.service.prompt!(prompt_path)
|
70
|
+
end
|
71
|
+
|
66
72
|
# http://standards.freedesktop.org/secret-service/ch14.html#type-Secret
|
67
73
|
def secret_decode secret_arr
|
68
74
|
secret_struct = secret_arr[0]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-secret_service
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom Maher
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-08-
|
11
|
+
date: 2013-08-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: woof_util
|