picasa 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/.travis.yml +2 -0
- data/Gemfile +6 -2
- data/README.md +1 -0
- data/lib/picasa/presenter/photo.rb +1 -1
- data/lib/picasa/version.rb +1 -1
- data/picasa.gemspec +1 -1
- data/test/api/album_test.rb +86 -0
- data/test/helper.rb +2 -2
- metadata +4 -4
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
@@ -2,10 +2,14 @@ source "https://rubygems.org"
|
|
2
2
|
|
3
3
|
gemspec
|
4
4
|
|
5
|
-
gem "
|
5
|
+
gem "vcr", github: "myronmarston/vcr"
|
6
6
|
gem "rake"
|
7
7
|
gem "minitest", "3.5.0", :platform => :ruby_18
|
8
|
-
|
8
|
+
|
9
|
+
group :extra do
|
10
|
+
gem "thor"
|
11
|
+
gem "debugger", :platform => :ruby_19 if RUBY_VERSION < "2.0"
|
12
|
+
end
|
9
13
|
|
10
14
|
# JSON parsers
|
11
15
|
gem "oj"
|
data/README.md
CHANGED
@@ -94,6 +94,7 @@ Picasa uses gzipped requests to speedup fetching results. Benchmarks are availab
|
|
94
94
|
* [Eiichi Takebuchi](https://github.com/GRGSIBERIA)
|
95
95
|
* [TADA Tadashi](https://github.com/tdtds)
|
96
96
|
* [Vinicius Teles](https://github.com/viniciusteles)
|
97
|
+
* [Ionut-Cristian Florescu](https://github.com/icflorescu)
|
97
98
|
|
98
99
|
## Copyright
|
99
100
|
|
data/lib/picasa/version.rb
CHANGED
data/picasa.gemspec
CHANGED
data/test/api/album_test.rb
CHANGED
@@ -154,6 +154,92 @@ describe Picasa::API::Album do
|
|
154
154
|
it "has allow_downloads" do
|
155
155
|
assert_equal true, @album.allow_downloads
|
156
156
|
end
|
157
|
+
|
158
|
+
describe "photo" do
|
159
|
+
before do
|
160
|
+
@photo = @album.entries.first
|
161
|
+
end
|
162
|
+
|
163
|
+
it "has id" do
|
164
|
+
assert_equal "5239556203823850002", @photo.id
|
165
|
+
end
|
166
|
+
|
167
|
+
it "has links" do
|
168
|
+
assert_equal 5, @photo.links.size
|
169
|
+
end
|
170
|
+
|
171
|
+
it "has media" do
|
172
|
+
assert_equal 3, @photo.media.thumbnails.size
|
173
|
+
end
|
174
|
+
|
175
|
+
it "has content type" do
|
176
|
+
assert_equal "image/jpeg", @photo.content.type
|
177
|
+
end
|
178
|
+
|
179
|
+
it "has etag" do
|
180
|
+
assert_equal "\"YD4qeyI.\"", @photo.etag
|
181
|
+
end
|
182
|
+
|
183
|
+
it "has published" do
|
184
|
+
assert_equal "2008-08-28T13:14:03+00:00", @photo.published.to_s
|
185
|
+
end
|
186
|
+
|
187
|
+
it "has updated" do
|
188
|
+
assert_equal "2009-06-24T05:19:50+00:00", @photo.updated.to_s
|
189
|
+
end
|
190
|
+
|
191
|
+
it "has title" do
|
192
|
+
assert_equal "lena2.jpg", @photo.title
|
193
|
+
end
|
194
|
+
|
195
|
+
it "has summary" do
|
196
|
+
assert_equal "", @photo.summary
|
197
|
+
end
|
198
|
+
|
199
|
+
it "has album id" do
|
200
|
+
assert_equal "5239555770355467953", @photo.album_id
|
201
|
+
end
|
202
|
+
|
203
|
+
it "has access" do
|
204
|
+
assert_equal "public", @photo.access
|
205
|
+
end
|
206
|
+
|
207
|
+
it "has width" do
|
208
|
+
assert_equal 1084, @photo.width
|
209
|
+
end
|
210
|
+
|
211
|
+
it "has height" do
|
212
|
+
assert_equal 2318, @photo.height
|
213
|
+
end
|
214
|
+
|
215
|
+
it "has size" do
|
216
|
+
assert_equal 570958, @photo.size
|
217
|
+
end
|
218
|
+
|
219
|
+
it "has checksum" do
|
220
|
+
assert_equal "", @photo.checksum
|
221
|
+
end
|
222
|
+
|
223
|
+
it "has timestamp" do
|
224
|
+
assert_equal "1219929243000", @photo.timestamp
|
225
|
+
end
|
226
|
+
|
227
|
+
it "has image version" do
|
228
|
+
assert_equal 67, @photo.image_version
|
229
|
+
end
|
230
|
+
|
231
|
+
it "has commenting enabled" do
|
232
|
+
assert_equal true, @photo.commenting_enabled
|
233
|
+
end
|
234
|
+
|
235
|
+
it "has comment count" do
|
236
|
+
assert_equal 0, @photo.comment_count
|
237
|
+
end
|
238
|
+
|
239
|
+
it "has license" do
|
240
|
+
assert_equal "All Rights Reserved", @photo.license
|
241
|
+
end
|
242
|
+
end
|
157
243
|
end
|
158
244
|
|
159
245
|
describe "exceptions" do
|
data/test/helper.rb
CHANGED
@@ -4,7 +4,7 @@ require "zlib"
|
|
4
4
|
require "minitest/autorun"
|
5
5
|
require "webmock/minitest"
|
6
6
|
require "vcr"
|
7
|
-
require "mocha"
|
7
|
+
require "mocha/setup"
|
8
8
|
|
9
9
|
require "picasa"
|
10
10
|
|
@@ -16,7 +16,7 @@ MultiJson.adapter = ENV["JSON_PARSER"] || "oj"
|
|
16
16
|
VCR.configure do |c|
|
17
17
|
c.cassette_library_dir = "test/cassettes"
|
18
18
|
c.hook_into :webmock
|
19
|
-
c.default_cassette_options = {:
|
19
|
+
c.default_cassette_options = {:preserve_exact_body_bytes => true} # Avoid stroing headers as binary
|
20
20
|
c.filter_sensitive_data("<FILTERED>") { AuthHeader }
|
21
21
|
c.filter_sensitive_data("<FILTERED>") { Password }
|
22
22
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: picasa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-11-
|
12
|
+
date: 2012-11-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|
@@ -50,7 +50,7 @@ dependencies:
|
|
50
50
|
requirements:
|
51
51
|
- - ! '>='
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version:
|
53
|
+
version: 0.13.0
|
54
54
|
type: :development
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -58,7 +58,7 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - ! '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 0.13.0
|
62
62
|
- !ruby/object:Gem::Dependency
|
63
63
|
name: vcr
|
64
64
|
requirement: !ruby/object:Gem::Requirement
|