myflickr 0.0.2
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/History.txt +8 -0
- data/License.txt +20 -0
- data/Manifest.txt +24 -0
- data/README.txt +20 -0
- data/Rakefile +4 -0
- data/config/hoe.rb +71 -0
- data/config/requirements.rb +17 -0
- data/lib/myflickr/machine_tag.rb +7 -0
- data/lib/myflickr/photo.rb +47 -0
- data/lib/myflickr/query.rb +10 -0
- data/lib/myflickr/set.rb +33 -0
- data/lib/myflickr/size.rb +4 -0
- data/lib/myflickr/tag.rb +10 -0
- data/lib/myflickr/version.rb +9 -0
- data/lib/myflickr.rb +13 -0
- data/lib/vendor/parallel/parallel.rb +121 -0
- data/setup.rb +1585 -0
- data/spec/machine_tag_spec.rb +11 -0
- data/spec/photo_spec.rb +47 -0
- data/spec/query_spec.rb +7 -0
- data/spec/set_spec.rb +40 -0
- data/spec/size_spec.rb +7 -0
- data/spec/spec_helper.rb +5 -0
- data/spec/tag_spec.rb +13 -0
- metadata +88 -0
@@ -0,0 +1,11 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), 'spec_helper')
|
2
|
+
|
3
|
+
describe MachineTag, "class" do
|
4
|
+
it "should return self from a machine_tag string" do
|
5
|
+
tag = MachineTag.from_s("namespace:predicate=value")
|
6
|
+
tag.should be_an_instance_of(MachineTag)
|
7
|
+
tag.namespace.should eql "namespace"
|
8
|
+
tag.predicate.should eql "predicate"
|
9
|
+
tag.value.should eql "value"
|
10
|
+
end
|
11
|
+
end
|
data/spec/photo_spec.rb
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), 'spec_helper')
|
2
|
+
|
3
|
+
describe Photo, "class" do
|
4
|
+
it "should have id" do
|
5
|
+
Photo.public_instance_methods.should include "id"
|
6
|
+
end
|
7
|
+
|
8
|
+
it "should have a title" do
|
9
|
+
Photo.public_instance_methods.should include "title"
|
10
|
+
end
|
11
|
+
|
12
|
+
it "should have a description" do
|
13
|
+
Photo.public_instance_methods.should include "description"
|
14
|
+
end
|
15
|
+
|
16
|
+
it "should have sizes" do
|
17
|
+
Photo.public_instance_methods.should include "sizes"
|
18
|
+
end
|
19
|
+
|
20
|
+
it "should have tags" do
|
21
|
+
Photo.public_instance_methods.should include "tags"
|
22
|
+
end
|
23
|
+
|
24
|
+
it "should have machine_tags" do
|
25
|
+
Photo.public_instance_methods.should include "machine_tags"
|
26
|
+
end
|
27
|
+
|
28
|
+
it "should have an array of hashes that contain Size class instances" do
|
29
|
+
sizes = Photo.search("spec").first.sizes
|
30
|
+
sizes.should be_an_instance_of(Hash)
|
31
|
+
sizes[:thumbnail].should be_an_instance_of(Size)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
describe "Searching" do
|
36
|
+
it "should be empty when no search is met" do
|
37
|
+
search = Photo.search("null")
|
38
|
+
search.should be_an_instance_of(Array)
|
39
|
+
search.should be_empty
|
40
|
+
end
|
41
|
+
|
42
|
+
it "should return an array of its self" do
|
43
|
+
search = Photo.search("spec")
|
44
|
+
search.should be_an_instance_of(Array)
|
45
|
+
search.first.should be_an_instance_of(Photo)
|
46
|
+
end
|
47
|
+
end
|
data/spec/query_spec.rb
ADDED
data/spec/set_spec.rb
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), 'spec_helper')
|
2
|
+
describe Set, "class" do
|
3
|
+
it "should respond to id" do
|
4
|
+
Set.public_instance_methods.should include "id"
|
5
|
+
end
|
6
|
+
|
7
|
+
it "should respond to title" do
|
8
|
+
Set.public_instance_methods.should include "title"
|
9
|
+
end
|
10
|
+
|
11
|
+
it "should respond to description" do
|
12
|
+
Set.public_instance_methods.should include "description"
|
13
|
+
end
|
14
|
+
|
15
|
+
it "should keep record of the amount of photos in a set" do
|
16
|
+
Set.public_instance_methods.should include "photo_count"
|
17
|
+
end
|
18
|
+
|
19
|
+
it "should respond to photos" do
|
20
|
+
Set.public_instance_methods.should include 'photos'
|
21
|
+
end
|
22
|
+
|
23
|
+
it "should provide a list" do
|
24
|
+
mysets = Set.list
|
25
|
+
mysets.should be_an_instance_of(Array)
|
26
|
+
mysets.first.should be_an_instance_of(Set)
|
27
|
+
end
|
28
|
+
|
29
|
+
it "should be findable by id" do
|
30
|
+
myset = Set.find "72157603414539843"
|
31
|
+
myset.should be_an_instance_of(Set)
|
32
|
+
end
|
33
|
+
|
34
|
+
it "should have a list of photos" do
|
35
|
+
myset = Set.find "72157603414539843"
|
36
|
+
photos = myset.photos
|
37
|
+
photos.should be_an_instance_of(Array)
|
38
|
+
photos.first.should be_an_instance_of(Photo)
|
39
|
+
end
|
40
|
+
end
|
data/spec/size_spec.rb
ADDED
data/spec/spec_helper.rb
ADDED
data/spec/tag_spec.rb
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), 'spec_helper')
|
2
|
+
|
3
|
+
describe Tag, "class" do
|
4
|
+
it "should have a value" do
|
5
|
+
Tag.public_instance_methods.should include 'value'
|
6
|
+
end
|
7
|
+
|
8
|
+
it "should have a list" do
|
9
|
+
tags = Tag.list
|
10
|
+
tags.should be_an_instance_of(Array)
|
11
|
+
tags.first.should be_an_instance_of(Tag)
|
12
|
+
end
|
13
|
+
end
|
metadata
ADDED
@@ -0,0 +1,88 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: myflickr
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.2
|
5
|
+
platform: ""
|
6
|
+
authors:
|
7
|
+
- Ben Schwarz
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2007-12-19 00:00:00 +11:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: hpricot
|
17
|
+
version_requirement:
|
18
|
+
version_requirements: !ruby/object:Gem::Requirement
|
19
|
+
requirements:
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: "0"
|
23
|
+
version:
|
24
|
+
description: A wrapper around flickr for you, not the community aspects of flickr, only for you.
|
25
|
+
email: ben@germanforblack.com
|
26
|
+
executables: []
|
27
|
+
|
28
|
+
extensions: []
|
29
|
+
|
30
|
+
extra_rdoc_files:
|
31
|
+
- History.txt
|
32
|
+
- License.txt
|
33
|
+
- Manifest.txt
|
34
|
+
- README.txt
|
35
|
+
files:
|
36
|
+
- History.txt
|
37
|
+
- License.txt
|
38
|
+
- Manifest.txt
|
39
|
+
- README.txt
|
40
|
+
- Rakefile
|
41
|
+
- config/hoe.rb
|
42
|
+
- config/requirements.rb
|
43
|
+
- lib/myflickr.rb
|
44
|
+
- lib/myflickr/machine_tag.rb
|
45
|
+
- lib/myflickr/photo.rb
|
46
|
+
- lib/myflickr/query.rb
|
47
|
+
- lib/myflickr/set.rb
|
48
|
+
- lib/myflickr/size.rb
|
49
|
+
- lib/myflickr/tag.rb
|
50
|
+
- lib/myflickr/version.rb
|
51
|
+
- lib/vendor/parallel/parallel.rb
|
52
|
+
- setup.rb
|
53
|
+
- spec/machine_tag_spec.rb
|
54
|
+
- spec/photo_spec.rb
|
55
|
+
- spec/query_spec.rb
|
56
|
+
- spec/set_spec.rb
|
57
|
+
- spec/size_spec.rb
|
58
|
+
- spec/spec_helper.rb
|
59
|
+
- spec/tag_spec.rb
|
60
|
+
has_rdoc: true
|
61
|
+
homepage: http://schwarz.rubyforge.org
|
62
|
+
post_install_message:
|
63
|
+
rdoc_options:
|
64
|
+
- --main
|
65
|
+
- README.txt
|
66
|
+
require_paths:
|
67
|
+
- lib
|
68
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
69
|
+
requirements:
|
70
|
+
- - ">="
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: "0"
|
73
|
+
version:
|
74
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
75
|
+
requirements:
|
76
|
+
- - ">="
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: "0"
|
79
|
+
version:
|
80
|
+
requirements: []
|
81
|
+
|
82
|
+
rubyforge_project: schwarz
|
83
|
+
rubygems_version: 0.9.5
|
84
|
+
signing_key:
|
85
|
+
specification_version: 2
|
86
|
+
summary: A wrapper around flickr for you, not the community aspects of flickr, only for you.
|
87
|
+
test_files: []
|
88
|
+
|