ploy 0.0.29 → 0.0.30
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/ploy/metaoracle.rb +1 -1
- data/lib/ploy/s3storage.rb +6 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YjE5OTIyODQ0YTUzYzk2ZTUyNjJhMDEwNmU2ZTVmNGQzNWRiODc1OA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
Y2E4Mzg0YWI1MzA3NmU2MDMzMDEyMDA4OWE2M2Y1NWM0NGRkODY4Mg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
M2ZiYmMzMTRlMjZhZTBkZDlmMDVhYjRkNDM1ODAyZDcyOGRkYjJlMzUxM2Zk
|
10
|
+
ZmEyOTg1Zjk4NjJjM2U3YzIyOTVkYzg0NjI3MzU2OTliZWU3YTQ5OTlhOGRm
|
11
|
+
ZmRkYTNhYzljMWY0NzNlNmIyZGFiY2Y5Yjk2NmI1MGIzODE1MWY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
M2M3Mjk3ODNhOWNjYzVhMzU1YzQxYTU1NmRiNGI2YmQ4Yzk3ZDhkYjE5NjI1
|
14
|
+
ZWU2ZTVkMmI1ZGYxMjY4YzU0ZTQwMzU5MTQ4Nzc1NWFhZjAyNWNlMTNmM2Vl
|
15
|
+
ODY0MmE2NTk1OTJmMWQzOTJkMjU0YjM0MjQ4NjFjNmRhMTdmNTk=
|
data/lib/ploy/metaoracle.rb
CHANGED
@@ -10,7 +10,7 @@ module Ploy
|
|
10
10
|
def query
|
11
11
|
r = {}
|
12
12
|
puts "query"
|
13
|
-
Aws::EC2
|
13
|
+
Aws::EC2::Resource.new.instances.tagged_values(@stack).each do |i|
|
14
14
|
puts "asking #{i.private_ip_address}"
|
15
15
|
r[i.private_ip_address] = meta(i)
|
16
16
|
end
|
data/lib/ploy/s3storage.rb
CHANGED
@@ -7,29 +7,29 @@ module Ploy
|
|
7
7
|
end
|
8
8
|
|
9
9
|
def put(path, name, meta = {})
|
10
|
-
Aws::S3
|
10
|
+
Aws::S3::Resource.new.buckets[@bucketname].objects[name].write(
|
11
11
|
Pathname.new(path),
|
12
12
|
{ :metadata => meta }
|
13
13
|
)
|
14
14
|
end
|
15
15
|
|
16
16
|
def copy(from, to)
|
17
|
-
Aws::S3
|
17
|
+
Aws::S3::Resource.new.buckets[@bucketname].objects[from].copy_to(to)
|
18
18
|
end
|
19
19
|
|
20
20
|
def read(from)
|
21
|
-
Aws::S3
|
21
|
+
Aws::S3::Resource.new.buckets[@bucketname].objects[from].read
|
22
22
|
end
|
23
23
|
|
24
24
|
def get(from, fileio)
|
25
|
-
Aws::S3
|
25
|
+
Aws::S3::Resource.new.buckets[@bucketname].objects[from].read do |chunk|
|
26
26
|
fileio.write(chunk)
|
27
27
|
end
|
28
28
|
fileio.flush
|
29
29
|
end
|
30
30
|
|
31
31
|
def metadata(loc)
|
32
|
-
o = Aws::S3
|
32
|
+
o = Aws::S3::Resource.new.buckets[@bucketname].objects[loc]
|
33
33
|
if (o.exists?) then
|
34
34
|
return o.metadata
|
35
35
|
else
|
@@ -38,7 +38,7 @@ module Ploy
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def list
|
41
|
-
tree = Aws::S3
|
41
|
+
tree = Aws::S3::Resource.new.buckets[@bucketname].as_tree
|
42
42
|
dirs = tree.children.select(&:branch?).collect(&:prefix)
|
43
43
|
package_names = []
|
44
44
|
dirs.each do |dir|
|