picasa 0.6.3 → 0.6.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.
- data/README.md +1 -1
- data/extra/Thorfile +14 -9
- data/lib/picasa/exceptions.rb +2 -0
- data/lib/picasa/file.rb +21 -1
- data/lib/picasa/presenter/photo.rb +5 -0
- data/lib/picasa/version.rb +1 -1
- data/test/api/photo_test.rb +12 -1
- data/test/cassettes/video-create.yml +1442 -0
- data/test/file_test.rb +16 -4
- data/test/fixtures/sample.3gp +0 -0
- data/test/fixtures/sample.txt +1 -0
- data/test/helper.rb +1 -1
- metadata +6 -3
data/test/file_test.rb
CHANGED
@@ -8,22 +8,34 @@ describe Picasa::File do
|
|
8
8
|
end
|
9
9
|
|
10
10
|
it "it returns file name" do
|
11
|
-
file = Picasa::File.new(
|
11
|
+
file = Picasa::File.new(fixture_path("lena.jpg"))
|
12
12
|
assert_equal "lena", file.name
|
13
13
|
end
|
14
14
|
|
15
15
|
it "it returns file extension" do
|
16
|
-
file = Picasa::File.new(
|
16
|
+
file = Picasa::File.new(fixture_path("lena.jpg"))
|
17
17
|
assert_equal "jpg", file.extension
|
18
18
|
end
|
19
19
|
|
20
20
|
it "it guesses content type" do
|
21
|
-
file = Picasa::File.new(
|
21
|
+
file = Picasa::File.new(fixture_path("lena.jpg"))
|
22
22
|
assert_equal "image/jpeg", file.content_type
|
23
23
|
end
|
24
24
|
|
25
|
+
it "it returns content type of video file" do
|
26
|
+
file = Picasa::File.new(fixture_path("sample.3gp"))
|
27
|
+
assert_equal "video/3gpp", file.content_type
|
28
|
+
end
|
29
|
+
|
25
30
|
it "returns binary read file" do
|
26
|
-
file = Picasa::File.new(
|
31
|
+
file = Picasa::File.new(fixture_path("lena.jpg"))
|
27
32
|
assert_equal String, file.binary.class
|
28
33
|
end
|
34
|
+
|
35
|
+
it "raises error when content type not known" do
|
36
|
+
file = Picasa::File.new(fixture_path("sample.txt"))
|
37
|
+
assert_raises(Picasa::UnknownContentType) do
|
38
|
+
file.content_type
|
39
|
+
end
|
40
|
+
end
|
29
41
|
end
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
test
|
data/test/helper.rb
CHANGED
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.4
|
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: 2013-
|
12
|
+
date: 2013-02-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|
@@ -149,10 +149,13 @@ files:
|
|
149
149
|
- test/cassettes/tag-create.yml
|
150
150
|
- test/cassettes/tag-destroy.yml
|
151
151
|
- test/cassettes/tag-list.yml
|
152
|
+
- test/cassettes/video-create.yml
|
152
153
|
- test/client_test.rb
|
153
154
|
- test/connection_test.rb
|
154
155
|
- test/file_test.rb
|
155
156
|
- test/fixtures/lena.jpg
|
157
|
+
- test/fixtures/sample.3gp
|
158
|
+
- test/fixtures/sample.txt
|
156
159
|
- test/helper.rb
|
157
160
|
- test/template_test.rb
|
158
161
|
- test/utils_test.rb
|
@@ -177,7 +180,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
177
180
|
version: '0'
|
178
181
|
requirements: []
|
179
182
|
rubyforge_project:
|
180
|
-
rubygems_version: 1.8.
|
183
|
+
rubygems_version: 1.8.25
|
181
184
|
signing_key:
|
182
185
|
specification_version: 3
|
183
186
|
summary: Simple Google Picasa managment
|