storage 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +5 -0
- data/.rspec +1 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +121 -0
- data/Rakefile +5 -0
- data/lib/storage/config.rb +1 -1
- data/lib/storage/version.rb +1 -1
- data/lib/storage.rb +27 -29
- data/spec/spec_helper.rb +5 -10
- data/spec/storage/strategies/file_system_spec.rb +18 -18
- data/spec/storage/strategies/s3_spec.rb +32 -32
- data/spec/storage_spec.rb +9 -9
- data/storage.gemspec +28 -0
- metadata +89 -24
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color --format documentation
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,121 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
storage (0.1.1)
|
5
|
+
aws-s3 (~> 0.6.2)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: http://gems.simplesideias.com.br/
|
9
|
+
specs:
|
10
|
+
abstract (1.0.0)
|
11
|
+
actionmailer (3.0.7)
|
12
|
+
actionpack (= 3.0.7)
|
13
|
+
mail (~> 2.2.15)
|
14
|
+
actionpack (3.0.7)
|
15
|
+
activemodel (= 3.0.7)
|
16
|
+
activesupport (= 3.0.7)
|
17
|
+
builder (~> 2.1.2)
|
18
|
+
erubis (~> 2.6.6)
|
19
|
+
i18n (~> 0.5.0)
|
20
|
+
rack (~> 1.2.1)
|
21
|
+
rack-mount (~> 0.6.14)
|
22
|
+
rack-test (~> 0.5.7)
|
23
|
+
tzinfo (~> 0.3.23)
|
24
|
+
activemodel (3.0.7)
|
25
|
+
activesupport (= 3.0.7)
|
26
|
+
builder (~> 2.1.2)
|
27
|
+
i18n (~> 0.5.0)
|
28
|
+
activerecord (3.0.7)
|
29
|
+
activemodel (= 3.0.7)
|
30
|
+
activesupport (= 3.0.7)
|
31
|
+
arel (~> 2.0.2)
|
32
|
+
tzinfo (~> 0.3.23)
|
33
|
+
activeresource (3.0.7)
|
34
|
+
activemodel (= 3.0.7)
|
35
|
+
activesupport (= 3.0.7)
|
36
|
+
activesupport (3.0.7)
|
37
|
+
archive-tar-minitar (0.5.2)
|
38
|
+
arel (2.0.10)
|
39
|
+
aws-s3 (0.6.2)
|
40
|
+
builder
|
41
|
+
mime-types
|
42
|
+
xml-simple
|
43
|
+
builder (2.1.2)
|
44
|
+
columnize (0.3.2)
|
45
|
+
diff-lcs (1.1.2)
|
46
|
+
erubis (2.6.6)
|
47
|
+
abstract (>= 1.0.0)
|
48
|
+
fakeweb (1.3.0)
|
49
|
+
i18n (0.5.0)
|
50
|
+
linecache19 (0.5.12)
|
51
|
+
ruby_core_source (>= 0.1.4)
|
52
|
+
mail (2.2.19)
|
53
|
+
activesupport (>= 2.3.6)
|
54
|
+
i18n (>= 0.4.0)
|
55
|
+
mime-types (~> 1.16)
|
56
|
+
treetop (~> 1.4.8)
|
57
|
+
mime-types (1.16)
|
58
|
+
nokogiri (1.4.4)
|
59
|
+
polyglot (0.3.1)
|
60
|
+
rack (1.2.3)
|
61
|
+
rack-mount (0.6.14)
|
62
|
+
rack (>= 1.0.0)
|
63
|
+
rack-test (0.5.7)
|
64
|
+
rack (>= 1.0)
|
65
|
+
rails (3.0.7)
|
66
|
+
actionmailer (= 3.0.7)
|
67
|
+
actionpack (= 3.0.7)
|
68
|
+
activerecord (= 3.0.7)
|
69
|
+
activeresource (= 3.0.7)
|
70
|
+
activesupport (= 3.0.7)
|
71
|
+
bundler (~> 1.0)
|
72
|
+
railties (= 3.0.7)
|
73
|
+
railties (3.0.7)
|
74
|
+
actionpack (= 3.0.7)
|
75
|
+
activesupport (= 3.0.7)
|
76
|
+
rake (>= 0.8.7)
|
77
|
+
thor (~> 0.14.4)
|
78
|
+
rake (0.8.7)
|
79
|
+
rspec (2.5.0)
|
80
|
+
rspec-core (~> 2.5.0)
|
81
|
+
rspec-expectations (~> 2.5.0)
|
82
|
+
rspec-mocks (~> 2.5.0)
|
83
|
+
rspec-core (2.5.2)
|
84
|
+
rspec-expectations (2.5.0)
|
85
|
+
diff-lcs (~> 1.1.2)
|
86
|
+
rspec-mocks (2.5.0)
|
87
|
+
rspec-rails (2.5.0)
|
88
|
+
actionpack (~> 3.0)
|
89
|
+
activesupport (~> 3.0)
|
90
|
+
railties (~> 3.0)
|
91
|
+
rspec (~> 2.5.0)
|
92
|
+
ruby-debug-base19 (0.11.25)
|
93
|
+
columnize (>= 0.3.1)
|
94
|
+
linecache19 (>= 0.5.11)
|
95
|
+
ruby_core_source (>= 0.1.4)
|
96
|
+
ruby-debug19 (0.11.6)
|
97
|
+
columnize (>= 0.3.1)
|
98
|
+
linecache19 (>= 0.5.11)
|
99
|
+
ruby-debug-base19 (>= 0.11.19)
|
100
|
+
ruby_core_source (0.1.5)
|
101
|
+
archive-tar-minitar (>= 0.5.2)
|
102
|
+
sqlite3 (1.3.3)
|
103
|
+
sqlite3-ruby (1.3.3)
|
104
|
+
sqlite3 (>= 1.3.3)
|
105
|
+
thor (0.14.6)
|
106
|
+
treetop (1.4.9)
|
107
|
+
polyglot (>= 0.3.1)
|
108
|
+
tzinfo (0.3.27)
|
109
|
+
xml-simple (1.0.16)
|
110
|
+
|
111
|
+
PLATFORMS
|
112
|
+
ruby
|
113
|
+
|
114
|
+
DEPENDENCIES
|
115
|
+
fakeweb (~> 1.3.0)
|
116
|
+
nokogiri (~> 1.4.4)
|
117
|
+
rails (~> 3.0)
|
118
|
+
rspec-rails (~> 2.5.0)
|
119
|
+
ruby-debug19
|
120
|
+
sqlite3-ruby (~> 1.3.3)
|
121
|
+
storage!
|
data/Rakefile
ADDED
data/lib/storage/config.rb
CHANGED
@@ -29,7 +29,7 @@ module Storage
|
|
29
29
|
# Override setter so we can automatically define the strategy class
|
30
30
|
# based on its registered name.
|
31
31
|
def self.strategy=(strategy)
|
32
|
-
|
32
|
+
@strategy_class = eval(Storage::Strategies::STRATEGIES[strategy])
|
33
33
|
@strategy = strategy
|
34
34
|
end
|
35
35
|
end
|
data/lib/storage/version.rb
CHANGED
data/lib/storage.rb
CHANGED
@@ -8,39 +8,37 @@ module Storage
|
|
8
8
|
autoload :Strategies, "storage/strategies"
|
9
9
|
autoload :Version, "storage/version"
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
end
|
11
|
+
# Set up the storage options.
|
12
|
+
#
|
13
|
+
# Storage.setup do |config|
|
14
|
+
# config.strategy = :s3
|
15
|
+
# end
|
16
|
+
#
|
17
|
+
# Check Storage::Config for available options.
|
18
|
+
#
|
19
|
+
def self.setup(&block)
|
20
|
+
yield Config
|
21
|
+
strategy.prepare!
|
22
|
+
end
|
24
23
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
24
|
+
# A shortcut to the current strategy.
|
25
|
+
def self.strategy
|
26
|
+
Config.strategy_class
|
27
|
+
end
|
29
28
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
29
|
+
# Save a file.
|
30
|
+
def self.store(*args)
|
31
|
+
strategy.store(*args)
|
32
|
+
end
|
34
33
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
34
|
+
# Destroy a file.
|
35
|
+
def self.remove(*args)
|
36
|
+
strategy.remove(*args)
|
37
|
+
end
|
39
38
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
end
|
39
|
+
# Retrieve a file.
|
40
|
+
def self.get(*args)
|
41
|
+
strategy.get(*args)
|
44
42
|
end
|
45
43
|
end
|
46
44
|
|
data/spec/spec_helper.rb
CHANGED
@@ -1,21 +1,16 @@
|
|
1
|
-
require "
|
1
|
+
require "bundler"
|
2
|
+
Bundler.setup
|
3
|
+
Bundler.require(:default, :development)
|
4
|
+
|
2
5
|
require "storage"
|
3
|
-
require "fileutils"
|
4
6
|
require "pathname"
|
5
7
|
|
6
8
|
TMP = Pathname.new(File.expand_path(File.dirname(__FILE__) + "/tmp"))
|
7
9
|
RESOURCES = Pathname.new(File.expand_path(File.dirname(__FILE__) + "/resources"))
|
8
10
|
|
9
11
|
RSpec.configure do |config|
|
10
|
-
config.
|
11
|
-
config.color_enabled = true
|
12
|
-
|
13
|
-
config.before :each do
|
12
|
+
config.around :each do
|
14
13
|
FileUtils.rm_rf(TMP) rescue nil
|
15
14
|
FileUtils.mkdir_p(TMP) rescue nil
|
16
15
|
end
|
17
|
-
|
18
|
-
config.after :each do
|
19
|
-
FileUtils.rm_rf(TMP) rescue nil
|
20
|
-
end
|
21
16
|
end
|
@@ -4,56 +4,56 @@ describe Storage::Strategies::FileSystem do
|
|
4
4
|
before do
|
5
5
|
@source = RESOURCES.join("file.txt")
|
6
6
|
@destiny = TMP.join("lorem.txt")
|
7
|
-
|
8
|
-
Storage.setup do |c|
|
7
|
+
|
8
|
+
Storage.setup do |c|
|
9
9
|
c.strategy = :file
|
10
10
|
c.path = TMP
|
11
11
|
end
|
12
12
|
end
|
13
|
-
|
13
|
+
|
14
14
|
it "should save a file using file handler" do
|
15
15
|
handler = File.open(@source)
|
16
16
|
Storage.store(handler, :name => "lorem.txt")
|
17
|
-
|
17
|
+
|
18
18
|
File.should be_file(@destiny)
|
19
19
|
File.read(@destiny).should == File.read(@source)
|
20
20
|
end
|
21
|
-
|
21
|
+
|
22
22
|
it "should save a file using a path" do
|
23
23
|
Storage.store(@source, :name => "lorem.txt")
|
24
|
-
|
24
|
+
|
25
25
|
File.should be_file(@destiny)
|
26
26
|
File.read(@destiny).should == File.read(@source)
|
27
27
|
end
|
28
|
-
|
28
|
+
|
29
29
|
it "should remove an existing file" do
|
30
30
|
Storage.store(@source, :name => "lorem.txt")
|
31
31
|
Storage.remove("lorem.txt").should be_true
|
32
32
|
File.should_not be_file(@destiny)
|
33
33
|
end
|
34
|
-
|
34
|
+
|
35
35
|
it "should raise when trying to removing an unexesting file" do
|
36
|
-
|
36
|
+
expect {
|
37
37
|
Storage.remove("invalid")
|
38
|
-
}.
|
38
|
+
}.to raise_error(Storage::MissingFileError)
|
39
39
|
end
|
40
|
-
|
40
|
+
|
41
41
|
it "should retrieve an existing file" do
|
42
42
|
Storage.store(@source, :name => "lorem.txt")
|
43
43
|
Storage.get("lorem.txt").should == File.expand_path(TMP.join("lorem.txt"))
|
44
44
|
end
|
45
|
-
|
45
|
+
|
46
46
|
it "should raise when trying to retrieve an unexesting file" do
|
47
|
-
|
47
|
+
expect {
|
48
48
|
Storage.get("invalid")
|
49
|
-
}.
|
49
|
+
}.to raise_error(Storage::MissingFileError)
|
50
50
|
end
|
51
|
-
|
51
|
+
|
52
52
|
it "should raise when saving a file that already exists" do
|
53
53
|
Storage.store(@source, :name => "lorem.txt")
|
54
|
-
|
55
|
-
|
54
|
+
|
55
|
+
expect {
|
56
56
|
Storage.store(@source, :name => "lorem.txt")
|
57
|
-
}.
|
57
|
+
}.to raise_error(Storage::FileAlreadyExistsError)
|
58
58
|
end
|
59
59
|
end
|
@@ -5,88 +5,88 @@ describe Storage::Strategies::S3 do
|
|
5
5
|
@source = RESOURCES.join("file.txt")
|
6
6
|
@destiny = TMP.join("lorem.txt")
|
7
7
|
@bucket = mock("bucket", :name => "files")
|
8
|
-
|
9
|
-
AWS::S3::Base.stub
|
10
|
-
AWS::S3::Bucket.stub
|
11
|
-
AWS::S3::S3Object.stub
|
12
|
-
|
13
|
-
Storage.setup do |c|
|
8
|
+
|
9
|
+
AWS::S3::Base.stub :establish_connection!
|
10
|
+
AWS::S3::Bucket.stub :find => @bucket
|
11
|
+
AWS::S3::S3Object.stub :store
|
12
|
+
|
13
|
+
Storage.setup do |c|
|
14
14
|
c.strategy = :s3
|
15
15
|
c.access_key = "abc"
|
16
16
|
c.secret_key = "123"
|
17
17
|
end
|
18
18
|
end
|
19
|
-
|
19
|
+
|
20
20
|
it "should establish connection" do
|
21
21
|
options = {:access_key_id => "abc", :secret_access_key => "123"}
|
22
22
|
AWS::S3::Base.should_receive(:establish_connection!).with(options)
|
23
|
-
|
23
|
+
|
24
24
|
Storage::Strategies::S3.prepare!
|
25
25
|
end
|
26
|
-
|
26
|
+
|
27
27
|
it "should not reconnect when a connection is already established" do
|
28
28
|
AWS::S3::Base.should_receive(:connected?).and_return(true)
|
29
29
|
AWS::S3::Base.should_not_receive(:establish_connection!)
|
30
|
-
|
30
|
+
|
31
31
|
Storage::Strategies::S3.prepare!
|
32
32
|
end
|
33
|
-
|
33
|
+
|
34
34
|
it "should save a file using file handler" do
|
35
|
-
handler = File.open(@source)
|
35
|
+
handler = File.open(@source)
|
36
36
|
AWS::S3::S3Object.should_receive(:store).with("lorem.txt", handler, "files", :access => :public_read)
|
37
37
|
Storage.store(handler, :name => "lorem.txt", :bucket => "files")
|
38
38
|
end
|
39
|
-
|
39
|
+
|
40
40
|
it "should save a file using a path" do
|
41
41
|
AWS::S3::S3Object.should_receive(:store).with("lorem.txt", kind_of(File), "files", :access => :public_read)
|
42
42
|
Storage.store(@source, :name => "lorem.txt", :bucket => "files")
|
43
43
|
end
|
44
|
-
|
44
|
+
|
45
45
|
it "should remove an existing file" do
|
46
46
|
object = mock("object")
|
47
47
|
object.should_receive(:delete).and_return(true)
|
48
48
|
Storage::Strategies::S3.should_receive(:find_object).with("lorem.txt", :bucket => "files").and_return(object)
|
49
|
-
|
49
|
+
|
50
50
|
Storage.remove("lorem.txt", :bucket => "files").should be_true
|
51
51
|
end
|
52
|
-
|
52
|
+
|
53
53
|
it "should raise when trying to removing an unexesting file" do
|
54
54
|
pending "spec is failing but real code works"
|
55
|
-
|
55
|
+
|
56
56
|
Storage::Strategies::S3.should_receive(:find_object).and_raise(AWS::S3::NoSuchKey)
|
57
|
-
|
58
|
-
|
57
|
+
|
58
|
+
expect {
|
59
59
|
Storage.remove("lorem.txt", :bucket => "files")
|
60
|
-
}.
|
60
|
+
}.to raise_error(Storage::MissingFileError)
|
61
61
|
end
|
62
|
-
|
62
|
+
|
63
63
|
it "should retrieve an existing file" do
|
64
64
|
object = mock("object")
|
65
|
-
|
65
|
+
|
66
66
|
AWS::S3::S3Object.should_receive(:find).with("lorem.txt", "files").and_return(object)
|
67
67
|
AWS::S3::S3Object.should_receive(:url_for).with("lorem.txt", "files", :authenticated => false)
|
68
|
-
|
68
|
+
|
69
69
|
Storage.get("lorem.txt", :bucket => "files")
|
70
70
|
end
|
71
|
-
|
71
|
+
|
72
72
|
it "should raise when trying to retrieve an unexesting file" do
|
73
73
|
pending "spec is failing but real code works"
|
74
|
-
|
74
|
+
|
75
75
|
AWS::S3::S3Object.should_receive(:find).with("lorem.txt", "files").and_raise(AWS::S3::NoSuchKey)
|
76
76
|
AWS::S3::S3Object.should_not_receive(:url_for)
|
77
|
-
|
78
|
-
|
77
|
+
|
78
|
+
expect {
|
79
79
|
Storage.get("lorem.txt", :bucket => "files")
|
80
|
-
}.
|
80
|
+
}.to raise_error(Storage::MissingFileError)
|
81
81
|
end
|
82
|
-
|
82
|
+
|
83
83
|
it "should raise when saving a file that already exists" do
|
84
84
|
object = mock("object")
|
85
85
|
options = {:name => "lorem.txt", :bucket => "files"}
|
86
86
|
Storage::Strategies::S3.should_receive(:find_object).with(@source, options).and_return(object)
|
87
|
-
|
88
|
-
|
87
|
+
|
88
|
+
expect {
|
89
89
|
Storage.store(@source, :name => "lorem.txt", :bucket => "files")
|
90
|
-
}.
|
90
|
+
}.to raise_error(Storage::FileAlreadyExistsError)
|
91
91
|
end
|
92
92
|
end
|
data/spec/storage_spec.rb
CHANGED
@@ -4,40 +4,40 @@ describe Storage do
|
|
4
4
|
it "should return the strategy" do
|
5
5
|
@strategy = mock("strategy")
|
6
6
|
Storage::Config.strategy_class = @strategy
|
7
|
-
|
7
|
+
|
8
8
|
Storage.strategy.should be(@strategy)
|
9
9
|
end
|
10
|
-
|
10
|
+
|
11
11
|
it "should return the config" do
|
12
|
-
Storage::Strategies::S3.stub
|
13
|
-
|
12
|
+
Storage::Strategies::S3.stub :prepare!
|
13
|
+
|
14
14
|
Storage.setup do |config|
|
15
15
|
config.strategy = :s3
|
16
16
|
config.should be(Storage::Config)
|
17
17
|
end
|
18
18
|
end
|
19
|
-
|
19
|
+
|
20
20
|
it "prepare strategy after setting its configuration" do
|
21
21
|
Storage::Strategies::S3.should_receive(:prepare!).once
|
22
22
|
Storage.setup {|config| config.strategy = :s3}
|
23
23
|
end
|
24
|
-
|
24
|
+
|
25
25
|
context "delegation" do
|
26
26
|
before do
|
27
27
|
@strategy = mock("strategy")
|
28
28
|
Storage.should_receive(:strategy).and_return(@strategy)
|
29
29
|
end
|
30
|
-
|
30
|
+
|
31
31
|
it "should delegate save method" do
|
32
32
|
@strategy.should_receive(:store).with("some/file")
|
33
33
|
Storage.store "some/file"
|
34
34
|
end
|
35
|
-
|
35
|
+
|
36
36
|
it "should delegate destroy method" do
|
37
37
|
@strategy.should_receive(:remove).with("some/file")
|
38
38
|
Storage.remove "some/file"
|
39
39
|
end
|
40
|
-
|
40
|
+
|
41
41
|
it "should delegate get method" do
|
42
42
|
@strategy.should_receive(:get).with("some/file")
|
43
43
|
Storage.get "some/file"
|
data/storage.gemspec
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "storage/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "storage"
|
7
|
+
s.version = Storage::Version::STRING
|
8
|
+
s.platform = Gem::Platform::RUBY
|
9
|
+
s.authors = ["Nando Vieira"]
|
10
|
+
s.email = ["fnando.vieira@gmail.com"]
|
11
|
+
s.homepage = "http://github.com/fnando/storage"
|
12
|
+
s.summary = "This gem provides a simple API for multiple storage backends. Supported storages: Amazon S3 and FileSystem."
|
13
|
+
s.description = s.summary
|
14
|
+
|
15
|
+
s.files = `git ls-files`.split("\n")
|
16
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
17
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
18
|
+
s.require_paths = ["lib"]
|
19
|
+
|
20
|
+
s.add_dependency "aws-s3", "~> 0.6.2"
|
21
|
+
|
22
|
+
s.add_development_dependency "rails" , "~> 3.0"
|
23
|
+
s.add_development_dependency "fakeweb" , "~> 1.3.0"
|
24
|
+
s.add_development_dependency "rspec-rails" , "~> 2.5.0"
|
25
|
+
s.add_development_dependency "nokogiri" , "~> 1.4.4"
|
26
|
+
s.add_development_dependency "sqlite3-ruby" , "~> 1.3.3"
|
27
|
+
s.add_development_dependency "ruby-debug19" if RUBY_VERSION >= "1.9"
|
28
|
+
end
|
metadata
CHANGED
@@ -1,12 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: storage
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
5
|
-
|
6
|
-
- 0
|
7
|
-
- 1
|
8
|
-
- 0
|
9
|
-
version: 0.1.0
|
4
|
+
prerelease:
|
5
|
+
version: 0.1.1
|
10
6
|
platform: ruby
|
11
7
|
authors:
|
12
8
|
- Nando Vieira
|
@@ -14,31 +10,101 @@ autorequire:
|
|
14
10
|
bindir: bin
|
15
11
|
cert_chain: []
|
16
12
|
|
17
|
-
date:
|
18
|
-
default_executable:
|
13
|
+
date: 2011-05-31 00:00:00 Z
|
19
14
|
dependencies:
|
20
15
|
- !ruby/object:Gem::Dependency
|
21
16
|
name: aws-s3
|
22
17
|
prerelease: false
|
23
18
|
requirement: &id001 !ruby/object:Gem::Requirement
|
19
|
+
none: false
|
24
20
|
requirements:
|
25
|
-
- -
|
21
|
+
- - ~>
|
26
22
|
- !ruby/object:Gem::Version
|
27
|
-
|
28
|
-
- 0
|
29
|
-
version: "0"
|
23
|
+
version: 0.6.2
|
30
24
|
type: :runtime
|
31
25
|
version_requirements: *id001
|
32
|
-
|
33
|
-
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: rails
|
28
|
+
prerelease: false
|
29
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
30
|
+
none: false
|
31
|
+
requirements:
|
32
|
+
- - ~>
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: "3.0"
|
35
|
+
type: :development
|
36
|
+
version_requirements: *id002
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: fakeweb
|
39
|
+
prerelease: false
|
40
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 1.3.0
|
46
|
+
type: :development
|
47
|
+
version_requirements: *id003
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: rspec-rails
|
50
|
+
prerelease: false
|
51
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
52
|
+
none: false
|
53
|
+
requirements:
|
54
|
+
- - ~>
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: 2.5.0
|
57
|
+
type: :development
|
58
|
+
version_requirements: *id004
|
59
|
+
- !ruby/object:Gem::Dependency
|
60
|
+
name: nokogiri
|
61
|
+
prerelease: false
|
62
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
63
|
+
none: false
|
64
|
+
requirements:
|
65
|
+
- - ~>
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: 1.4.4
|
68
|
+
type: :development
|
69
|
+
version_requirements: *id005
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: sqlite3-ruby
|
72
|
+
prerelease: false
|
73
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
74
|
+
none: false
|
75
|
+
requirements:
|
76
|
+
- - ~>
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: 1.3.3
|
79
|
+
type: :development
|
80
|
+
version_requirements: *id006
|
81
|
+
- !ruby/object:Gem::Dependency
|
82
|
+
name: ruby-debug19
|
83
|
+
prerelease: false
|
84
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
85
|
+
none: false
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: "0"
|
90
|
+
type: :development
|
91
|
+
version_requirements: *id007
|
92
|
+
description: "This gem provides a simple API for multiple storage backends. Supported storages: Amazon S3 and FileSystem."
|
93
|
+
email:
|
94
|
+
- fnando.vieira@gmail.com
|
34
95
|
executables: []
|
35
96
|
|
36
97
|
extensions: []
|
37
98
|
|
38
|
-
extra_rdoc_files:
|
39
|
-
|
99
|
+
extra_rdoc_files: []
|
100
|
+
|
40
101
|
files:
|
102
|
+
- .gitignore
|
103
|
+
- .rspec
|
104
|
+
- Gemfile
|
105
|
+
- Gemfile.lock
|
41
106
|
- README.rdoc
|
107
|
+
- Rakefile
|
42
108
|
- lib/storage.rb
|
43
109
|
- lib/storage/config.rb
|
44
110
|
- lib/storage/errors.rb
|
@@ -52,37 +118,36 @@ files:
|
|
52
118
|
- spec/storage/strategies/file_system_spec.rb
|
53
119
|
- spec/storage/strategies/s3_spec.rb
|
54
120
|
- spec/storage_spec.rb
|
55
|
-
|
121
|
+
- storage.gemspec
|
56
122
|
homepage: http://github.com/fnando/storage
|
57
123
|
licenses: []
|
58
124
|
|
59
125
|
post_install_message:
|
60
|
-
rdoc_options:
|
61
|
-
|
126
|
+
rdoc_options: []
|
127
|
+
|
62
128
|
require_paths:
|
63
129
|
- lib
|
64
130
|
required_ruby_version: !ruby/object:Gem::Requirement
|
131
|
+
none: false
|
65
132
|
requirements:
|
66
133
|
- - ">="
|
67
134
|
- !ruby/object:Gem::Version
|
68
|
-
segments:
|
69
|
-
- 0
|
70
135
|
version: "0"
|
71
136
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
72
138
|
requirements:
|
73
139
|
- - ">="
|
74
140
|
- !ruby/object:Gem::Version
|
75
|
-
segments:
|
76
|
-
- 0
|
77
141
|
version: "0"
|
78
142
|
requirements: []
|
79
143
|
|
80
144
|
rubyforge_project:
|
81
|
-
rubygems_version: 1.3
|
145
|
+
rubygems_version: 1.8.3
|
82
146
|
signing_key:
|
83
147
|
specification_version: 3
|
84
148
|
summary: "This gem provides a simple API for multiple storage backends. Supported storages: Amazon S3 and FileSystem."
|
85
149
|
test_files:
|
150
|
+
- spec/resources/file.txt
|
86
151
|
- spec/spec_helper.rb
|
87
152
|
- spec/storage/config_spec.rb
|
88
153
|
- spec/storage/strategies/file_system_spec.rb
|