cryptkeeper 0.2.3 → 0.2.4

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.
@@ -8,32 +8,32 @@ Rails gem for connecting to the Google Storage API
8
8
 
9
9
  == Usage
10
10
 
11
- So far:
11
+ So far:
12
12
 
13
13
  keeper = CryptKeeper::Connection.new({:access_key => 'your_access_key', :secret_key => 'your_secret_key'})
14
14
 
15
- # See all of my buckets
16
- puts keeper.buckets.each do |bucket|
17
- puts bucket.name
18
- puts bucket.created_at
19
- end
20
-
21
- # Search for all files that start with "Picture"
22
- # The following returns meta info on each of the found objects within the specified bucket
23
- metas = keeper.bucket_meta_objects('adam_first_bucket', {:prefix => 'Picture'})
24
-
25
- # Now it's time to grab the actual object (data)
26
- # I am writing it to Files here on my local machine
27
- metas.each do |meta|
28
- puts meta.key # In my case, prints Picture 1.png
29
- f = File.new("/Users/user/Desktop/#{meta.key}",'w')
30
- # object method will go and fetch it unless it's been fetched before
31
- # if you want to force another trip to the Crypt, do meta.object!
32
- f.write(meta.object)
33
- f.close()
34
- end
15
+ See all of my buckets
16
+ puts keeper.buckets.each do |bucket|
17
+ puts bucket.name
18
+ puts bucket.created_at
19
+ end
20
+
21
+ Search for all files that start with "Picture"
22
+ The following returns meta info on each of the found objects within the specified bucket
23
+ metas = keeper.bucket_meta_objects('adam_first_bucket', {:prefix => 'Picture'})
24
+
25
+ Now it's time to grab the actual object (data)
26
+ I am writing it to Files here on my local machine
27
+ metas.each do |meta|
28
+ puts meta.key # In my case, prints Picture 1.png
29
+ f = File.new("/Users/user/Desktop/#{meta.key}",'w')
30
+ # object method will go and fetch it unless it's been fetched before
31
+ # if you want to force another trip to the Crypt, do meta.object!
32
+ f.write(meta.object)
33
+ f.close()
34
+ end
35
35
 
36
36
  Creates 3 new picture files on my Desktop:
37
- Picture 1.png
38
- Picture 2.png
37
+ Picture 1.png,
38
+ Picture 2.png,
39
39
  Picture 3.png
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{cryptkeeper}
8
- s.version = "0.2.3"
8
+ s.version = "0.2.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Adam Medeiros"]
@@ -4,7 +4,7 @@ require ck_path + '/crypt_keeper_http.rb'
4
4
  require 'uri'
5
5
 
6
6
  module CryptKeeper
7
- VERSION = "0.2.3"
7
+ VERSION = "0.2.4"
8
8
  class Connection
9
9
  @@http_instance = nil
10
10
  def self.http_instance
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 3
9
- version: 0.2.3
8
+ - 4
9
+ version: 0.2.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Adam Medeiros