storage 0.1.3 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +93 -81
- data/lib/storage/strategies/s3.rb +2 -1
- data/lib/storage/version.rb +1 -1
- data/spec/storage/strategies/s3_spec.rb +3 -3
- data/storage.gemspec +3 -3
- metadata +22 -22
data/Gemfile.lock
CHANGED
@@ -1,112 +1,124 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
storage (0.1.
|
4
|
+
storage (0.1.5)
|
5
5
|
aws-s3 (~> 0.6.2)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: http://gems.simplesideias.com.br/
|
9
9
|
specs:
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
rack (~> 1.
|
21
|
-
rack-mount (~> 0.
|
22
|
-
rack-test (~> 0.
|
23
|
-
|
24
|
-
activemodel (3.
|
25
|
-
activesupport (= 3.
|
26
|
-
builder (~>
|
27
|
-
i18n (~> 0.
|
28
|
-
activerecord (3.
|
29
|
-
activemodel (= 3.
|
30
|
-
activesupport (= 3.
|
31
|
-
arel (~> 2.
|
32
|
-
tzinfo (~> 0.3.
|
33
|
-
activeresource (3.
|
34
|
-
activemodel (= 3.
|
35
|
-
activesupport (= 3.
|
36
|
-
activesupport (3.
|
37
|
-
|
38
|
-
arel (2.
|
10
|
+
actionmailer (3.1.1)
|
11
|
+
actionpack (= 3.1.1)
|
12
|
+
mail (~> 2.3.0)
|
13
|
+
actionpack (3.1.1)
|
14
|
+
activemodel (= 3.1.1)
|
15
|
+
activesupport (= 3.1.1)
|
16
|
+
builder (~> 3.0.0)
|
17
|
+
erubis (~> 2.7.0)
|
18
|
+
i18n (~> 0.6)
|
19
|
+
rack (~> 1.3.2)
|
20
|
+
rack-cache (~> 1.1)
|
21
|
+
rack-mount (~> 0.8.2)
|
22
|
+
rack-test (~> 0.6.1)
|
23
|
+
sprockets (~> 2.0.2)
|
24
|
+
activemodel (3.1.1)
|
25
|
+
activesupport (= 3.1.1)
|
26
|
+
builder (~> 3.0.0)
|
27
|
+
i18n (~> 0.6)
|
28
|
+
activerecord (3.1.1)
|
29
|
+
activemodel (= 3.1.1)
|
30
|
+
activesupport (= 3.1.1)
|
31
|
+
arel (~> 2.2.1)
|
32
|
+
tzinfo (~> 0.3.29)
|
33
|
+
activeresource (3.1.1)
|
34
|
+
activemodel (= 3.1.1)
|
35
|
+
activesupport (= 3.1.1)
|
36
|
+
activesupport (3.1.1)
|
37
|
+
multi_json (~> 1.0)
|
38
|
+
arel (2.2.1)
|
39
39
|
aws-s3 (0.6.2)
|
40
40
|
builder
|
41
41
|
mime-types
|
42
42
|
xml-simple
|
43
|
-
builder (
|
44
|
-
|
45
|
-
diff-lcs (1.1.
|
46
|
-
erubis (2.
|
47
|
-
abstract (>= 1.0.0)
|
43
|
+
builder (3.0.0)
|
44
|
+
coderay (0.9.8)
|
45
|
+
diff-lcs (1.1.3)
|
46
|
+
erubis (2.7.0)
|
48
47
|
fakeweb (1.3.0)
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
mail (2.
|
53
|
-
activesupport (>= 2.3.6)
|
48
|
+
hike (1.2.1)
|
49
|
+
i18n (0.6.0)
|
50
|
+
json (1.6.1)
|
51
|
+
mail (2.3.0)
|
54
52
|
i18n (>= 0.4.0)
|
55
53
|
mime-types (~> 1.16)
|
56
54
|
treetop (~> 1.4.8)
|
55
|
+
method_source (0.6.6)
|
56
|
+
ruby_parser (~> 2.0.5)
|
57
57
|
mime-types (1.16)
|
58
|
+
multi_json (1.0.3)
|
58
59
|
nokogiri (1.4.7)
|
59
|
-
polyglot (0.3.
|
60
|
-
|
61
|
-
|
60
|
+
polyglot (0.3.2)
|
61
|
+
pry (0.9.6.2)
|
62
|
+
coderay (~> 0.9.8)
|
63
|
+
method_source (~> 0.6.5)
|
64
|
+
ruby_parser (~> 2.0.5)
|
65
|
+
slop (~> 2.1.0)
|
66
|
+
rack (1.3.4)
|
67
|
+
rack-cache (1.1)
|
68
|
+
rack (>= 0.4)
|
69
|
+
rack-mount (0.8.3)
|
62
70
|
rack (>= 1.0.0)
|
63
|
-
rack-
|
71
|
+
rack-ssl (1.3.2)
|
72
|
+
rack
|
73
|
+
rack-test (0.6.1)
|
64
74
|
rack (>= 1.0)
|
65
|
-
rails (3.
|
66
|
-
actionmailer (= 3.
|
67
|
-
actionpack (= 3.
|
68
|
-
activerecord (= 3.
|
69
|
-
activeresource (= 3.
|
70
|
-
activesupport (= 3.
|
75
|
+
rails (3.1.1)
|
76
|
+
actionmailer (= 3.1.1)
|
77
|
+
actionpack (= 3.1.1)
|
78
|
+
activerecord (= 3.1.1)
|
79
|
+
activeresource (= 3.1.1)
|
80
|
+
activesupport (= 3.1.1)
|
71
81
|
bundler (~> 1.0)
|
72
|
-
railties (= 3.
|
73
|
-
railties (3.
|
74
|
-
actionpack (= 3.
|
75
|
-
activesupport (= 3.
|
82
|
+
railties (= 3.1.1)
|
83
|
+
railties (3.1.1)
|
84
|
+
actionpack (= 3.1.1)
|
85
|
+
activesupport (= 3.1.1)
|
86
|
+
rack-ssl (~> 1.3.2)
|
76
87
|
rake (>= 0.8.7)
|
77
88
|
rdoc (~> 3.4)
|
78
|
-
thor (~> 0.14.
|
89
|
+
thor (~> 0.14.6)
|
79
90
|
rake (0.9.2)
|
80
|
-
rdoc (3.
|
81
|
-
|
82
|
-
|
83
|
-
rspec-
|
84
|
-
rspec-
|
85
|
-
|
86
|
-
rspec-
|
91
|
+
rdoc (3.10)
|
92
|
+
json (~> 1.4)
|
93
|
+
rspec (2.7.0)
|
94
|
+
rspec-core (~> 2.7.0)
|
95
|
+
rspec-expectations (~> 2.7.0)
|
96
|
+
rspec-mocks (~> 2.7.0)
|
97
|
+
rspec-core (2.7.0)
|
98
|
+
rspec-expectations (2.7.0)
|
87
99
|
diff-lcs (~> 1.1.2)
|
88
|
-
rspec-mocks (2.
|
89
|
-
rspec-rails (2.
|
100
|
+
rspec-mocks (2.7.0)
|
101
|
+
rspec-rails (2.7.0)
|
90
102
|
actionpack (~> 3.0)
|
91
103
|
activesupport (~> 3.0)
|
92
104
|
railties (~> 3.0)
|
93
|
-
rspec (~> 2.
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
ruby_core_source (0.1.5)
|
103
|
-
archive-tar-minitar (>= 0.5.2)
|
105
|
+
rspec (~> 2.7.0)
|
106
|
+
ruby_parser (2.0.6)
|
107
|
+
sexp_processor (~> 3.0)
|
108
|
+
sexp_processor (3.0.7)
|
109
|
+
slop (2.1.0)
|
110
|
+
sprockets (2.0.2)
|
111
|
+
hike (~> 1.2)
|
112
|
+
rack (~> 1.0)
|
113
|
+
tilt (~> 1.1, != 1.3.0)
|
104
114
|
sqlite3 (1.3.4)
|
105
115
|
thor (0.14.6)
|
106
|
-
|
116
|
+
tilt (1.3.3)
|
117
|
+
treetop (1.4.10)
|
118
|
+
polyglot
|
107
119
|
polyglot (>= 0.3.1)
|
108
|
-
tzinfo (0.3.
|
109
|
-
xml-simple (1.1.
|
120
|
+
tzinfo (0.3.30)
|
121
|
+
xml-simple (1.1.1)
|
110
122
|
|
111
123
|
PLATFORMS
|
112
124
|
ruby
|
@@ -114,8 +126,8 @@ PLATFORMS
|
|
114
126
|
DEPENDENCIES
|
115
127
|
fakeweb (~> 1.3.0)
|
116
128
|
nokogiri (~> 1.4.4)
|
117
|
-
|
118
|
-
|
119
|
-
|
129
|
+
pry
|
130
|
+
rails (~> 3.1)
|
131
|
+
rspec-rails (~> 2.7.0)
|
120
132
|
sqlite3 (~> 1.3.3)
|
121
133
|
storage!
|
data/lib/storage/version.rb
CHANGED
@@ -57,7 +57,7 @@ describe Storage::Strategies::S3 do
|
|
57
57
|
it "should remove an existing file" do
|
58
58
|
object = mock("object")
|
59
59
|
object.should_receive(:delete).and_return(true)
|
60
|
-
Storage::Strategies::S3.should_receive(:find_object).with("lorem.txt", :bucket => "files").and_return(object)
|
60
|
+
Storage::Strategies::S3.should_receive(:find_object).with(:name => "lorem.txt", :bucket => "files").and_return(object)
|
61
61
|
|
62
62
|
Storage.remove("lorem.txt", :bucket => "files").should be_true
|
63
63
|
end
|
@@ -91,10 +91,10 @@ describe Storage::Strategies::S3 do
|
|
91
91
|
it "should raise when saving a file that already exists" do
|
92
92
|
object = mock("object")
|
93
93
|
options = {:name => "lorem.txt", :bucket => "files"}
|
94
|
-
Storage::Strategies::S3.should_receive(:find_object).with(
|
94
|
+
Storage::Strategies::S3.should_receive(:find_object).with(options).and_return(object)
|
95
95
|
|
96
96
|
expect {
|
97
|
-
Storage.store(@source,
|
97
|
+
Storage.store(@source, options)
|
98
98
|
}.to raise_error(Storage::FileAlreadyExistsError)
|
99
99
|
end
|
100
100
|
end
|
data/storage.gemspec
CHANGED
@@ -19,10 +19,10 @@ Gem::Specification.new do |s|
|
|
19
19
|
|
20
20
|
s.add_dependency "aws-s3", "~> 0.6.2"
|
21
21
|
|
22
|
-
s.add_development_dependency "rails" , "~> 3.
|
22
|
+
s.add_development_dependency "rails" , "~> 3.1"
|
23
23
|
s.add_development_dependency "fakeweb" , "~> 1.3.0"
|
24
|
-
s.add_development_dependency "rspec-rails" , "~> 2.
|
24
|
+
s.add_development_dependency "rspec-rails" , "~> 2.7.0"
|
25
25
|
s.add_development_dependency "nokogiri" , "~> 1.4.4"
|
26
26
|
s.add_development_dependency "sqlite3" , "~> 1.3.3"
|
27
|
-
s.add_development_dependency "
|
27
|
+
s.add_development_dependency "pry"
|
28
28
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: storage
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-
|
12
|
+
date: 2011-10-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: aws-s3
|
16
|
-
requirement: &
|
16
|
+
requirement: &70300994093180 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,21 +21,21 @@ dependencies:
|
|
21
21
|
version: 0.6.2
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70300994093180
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rails
|
27
|
-
requirement: &
|
27
|
+
requirement: &70300994120940 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '3.
|
32
|
+
version: '3.1'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70300994120940
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: fakeweb
|
38
|
-
requirement: &
|
38
|
+
requirement: &70300994120320 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,21 +43,21 @@ dependencies:
|
|
43
43
|
version: 1.3.0
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70300994120320
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: rspec-rails
|
49
|
-
requirement: &
|
49
|
+
requirement: &70300994119240 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 2.
|
54
|
+
version: 2.7.0
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70300994119240
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: nokogiri
|
60
|
-
requirement: &
|
60
|
+
requirement: &70300994117700 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ~>
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: 1.4.4
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70300994117700
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: sqlite3
|
71
|
-
requirement: &
|
71
|
+
requirement: &70300994150300 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ~>
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: 1.3.3
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *70300994150300
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
|
-
name:
|
82
|
-
requirement: &
|
81
|
+
name: pry
|
82
|
+
requirement: &70300994147180 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ! '>='
|
@@ -87,7 +87,7 @@ dependencies:
|
|
87
87
|
version: '0'
|
88
88
|
type: :development
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *70300994147180
|
91
91
|
description: ! 'This gem provides a simple API for multiple storage backends. Supported
|
92
92
|
storages: Amazon S3 and FileSystem.'
|
93
93
|
email:
|
@@ -130,7 +130,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
130
130
|
version: '0'
|
131
131
|
segments:
|
132
132
|
- 0
|
133
|
-
hash:
|
133
|
+
hash: -2661529604855007369
|
134
134
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
135
135
|
none: false
|
136
136
|
requirements:
|
@@ -139,10 +139,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
139
139
|
version: '0'
|
140
140
|
segments:
|
141
141
|
- 0
|
142
|
-
hash:
|
142
|
+
hash: -2661529604855007369
|
143
143
|
requirements: []
|
144
144
|
rubyforge_project:
|
145
|
-
rubygems_version: 1.8.
|
145
|
+
rubygems_version: 1.8.10
|
146
146
|
signing_key:
|
147
147
|
specification_version: 3
|
148
148
|
summary: ! 'This gem provides a simple API for multiple storage backends. Supported
|