orange-flickr 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -11,6 +11,7 @@ begin
11
11
  gem.homepage = "http://orangerb.com"
12
12
  gem.authors = ["David Haslem"]
13
13
  gem.add_dependency "flickraw-cached", ">= 0"
14
+ gem.add_dependency "orange-core", ">= 0"
14
15
  gem.add_development_dependency "rspec", ">= 1.2.9"
15
16
  gem.add_development_dependency "yard", ">= 0"
16
17
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.1.1
@@ -1,8 +1,11 @@
1
1
  require 'flickraw-cached'
2
+ require 'orange-core'
2
3
 
3
4
  class Orange::FlickrResource < Orange::Resource
4
5
  call_me :flickr
5
- viewable :gallery, :photoset
6
+ viewable :gallery, :photoset, :galleries, :show
7
+
8
+ def exposed(packet); [:galleries, :show]; end
6
9
 
7
10
  def stack_init
8
11
  FlickRaw.api_key = orange.options["flickr_api_key"] || "d25ed6ad71472b633b11544a21da4f36"
@@ -13,9 +16,7 @@ class Orange::FlickrResource < Orange::Resource
13
16
  if FlickRaw.api_key && options["flickr_nsid"]
14
17
  ret = {}
15
18
  sets = flickr.photosets.getList(:user_id => options["flickr_nsid"])
16
- sets_url = FlickRaw::URL_PHOTOSTREAM + options["flickr_nsid"] + "/sets/"
17
- sets.each{|set| ret[set.title] = sets_url + set.id}
18
- ret
19
+ sets
19
20
  else
20
21
  false
21
22
  end
@@ -0,0 +1,5 @@
1
+ %h1 Browse Photo Galleries
2
+ - for set in resource.photosets
3
+ %h2
4
+ %a{:href => route_to(:flickr, set.id)}= set.title
5
+ %p= set.description.blank? ? "No description" : set.description
@@ -1,5 +1,4 @@
1
- %script{:src => "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"}
2
- %script{:src => "/assets/_flickr_/js/yoxview/yoxview-init.js"}
1
+ - packet.add_js("yoxview/yoxview-init.js", :module => "_flickr_")
3
2
  %script
4
- $(document).ready(function(){ $("#flickr_gallery").yoxview({ dataUrl: "#{attrs["photoset"]}"})});
3
+ $(document).ready(function(){ $("#flickr_gallery").yoxview({ dataUrl: "#{attrs["photoset"] || photoset}"})});
5
4
  #flickr_gallery= '&nbsp;'
@@ -0,0 +1,6 @@
1
+ - packet.add_js("yoxview/yoxview-init.js", :module => "_flickr_")
2
+ - gallery = resource.photosets.select{|set| set.id == packet["route.resource_id"]}.first
3
+ %h2 Showing #{gallery.title}
4
+ %script
5
+ $(document).ready(function(){ $("#flickr_gallery").yoxview({ dataUrl: "#{resource.gallery + gallery.id}"})});
6
+ #flickr_gallery= '&nbsp;'
@@ -0,0 +1,121 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{orange-flickr}
8
+ s.version = "0.1.1"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["David Haslem"]
12
+ s.date = %q{2010-08-18}
13
+ s.description = %q{Adds flickr functionality to Orange}
14
+ s.email = %q{therabidbanana@gmail.com}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE",
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ ".gitignore",
22
+ "LICENSE",
23
+ "README.rdoc",
24
+ "Rakefile",
25
+ "VERSION",
26
+ "lib/orange-flickr.rb",
27
+ "lib/orange-flickr/assets/js/yoxview/data/flickr.js",
28
+ "lib/orange-flickr/assets/js/yoxview/data/flickr.min.js",
29
+ "lib/orange-flickr/assets/js/yoxview/images/empty.gif",
30
+ "lib/orange-flickr/assets/js/yoxview/images/help_panel.png",
31
+ "lib/orange-flickr/assets/js/yoxview/images/left.png",
32
+ "lib/orange-flickr/assets/js/yoxview/images/left_eng.png",
33
+ "lib/orange-flickr/assets/js/yoxview/images/left_prev.png",
34
+ "lib/orange-flickr/assets/js/yoxview/images/popup_ajax_loader.gif",
35
+ "lib/orange-flickr/assets/js/yoxview/images/right.png",
36
+ "lib/orange-flickr/assets/js/yoxview/images/right_eng.png",
37
+ "lib/orange-flickr/assets/js/yoxview/images/sprites.png",
38
+ "lib/orange-flickr/assets/js/yoxview/install.htm",
39
+ "lib/orange-flickr/assets/js/yoxview/jquery.jsonp-1.0.4.min.js",
40
+ "lib/orange-flickr/assets/js/yoxview/jquery.timers-1.2.min.js",
41
+ "lib/orange-flickr/assets/js/yoxview/jquery.yoxthumbs.js",
42
+ "lib/orange-flickr/assets/js/yoxview/jquery.yoxthumbs.min.js",
43
+ "lib/orange-flickr/assets/js/yoxview/jquery.yoxview-1.98.js",
44
+ "lib/orange-flickr/assets/js/yoxview/jquery.yoxview-1.98.min.js",
45
+ "lib/orange-flickr/assets/js/yoxview/lang/ar.js",
46
+ "lib/orange-flickr/assets/js/yoxview/lang/bg.js",
47
+ "lib/orange-flickr/assets/js/yoxview/lang/ca.js",
48
+ "lib/orange-flickr/assets/js/yoxview/lang/cs.js",
49
+ "lib/orange-flickr/assets/js/yoxview/lang/de.js",
50
+ "lib/orange-flickr/assets/js/yoxview/lang/en.js",
51
+ "lib/orange-flickr/assets/js/yoxview/lang/es.js",
52
+ "lib/orange-flickr/assets/js/yoxview/lang/fr.js",
53
+ "lib/orange-flickr/assets/js/yoxview/lang/gr.js",
54
+ "lib/orange-flickr/assets/js/yoxview/lang/he.js",
55
+ "lib/orange-flickr/assets/js/yoxview/lang/ie.js",
56
+ "lib/orange-flickr/assets/js/yoxview/lang/ir.js",
57
+ "lib/orange-flickr/assets/js/yoxview/lang/it.js",
58
+ "lib/orange-flickr/assets/js/yoxview/lang/ja.js",
59
+ "lib/orange-flickr/assets/js/yoxview/lang/mk.js",
60
+ "lib/orange-flickr/assets/js/yoxview/lang/nl.js",
61
+ "lib/orange-flickr/assets/js/yoxview/lang/pl.js",
62
+ "lib/orange-flickr/assets/js/yoxview/lang/pt-br.js",
63
+ "lib/orange-flickr/assets/js/yoxview/lang/pt.js",
64
+ "lib/orange-flickr/assets/js/yoxview/lang/ro.js",
65
+ "lib/orange-flickr/assets/js/yoxview/lang/ru.js",
66
+ "lib/orange-flickr/assets/js/yoxview/lang/sk.js",
67
+ "lib/orange-flickr/assets/js/yoxview/lang/sl.js",
68
+ "lib/orange-flickr/assets/js/yoxview/lang/sv.js",
69
+ "lib/orange-flickr/assets/js/yoxview/lang/tr.js",
70
+ "lib/orange-flickr/assets/js/yoxview/lang/ua.js",
71
+ "lib/orange-flickr/assets/js/yoxview/lang/zh-cn.js",
72
+ "lib/orange-flickr/assets/js/yoxview/lang/zh-tw.js",
73
+ "lib/orange-flickr/assets/js/yoxview/yox.js",
74
+ "lib/orange-flickr/assets/js/yoxview/yox.min.js",
75
+ "lib/orange-flickr/assets/js/yoxview/yoxview-init.js",
76
+ "lib/orange-flickr/assets/js/yoxview/yoxview-nojquery.js",
77
+ "lib/orange-flickr/assets/js/yoxview/yoxview.css",
78
+ "lib/orange-flickr/plugin.rb",
79
+ "lib/orange-flickr/resources/flickr_resource.rb",
80
+ "lib/orange-flickr/views/flickr/galleries.haml",
81
+ "lib/orange-flickr/views/flickr/gallery.haml",
82
+ "lib/orange-flickr/views/flickr/photoset.haml",
83
+ "lib/orange-flickr/views/flickr/show.haml",
84
+ "orange-flickr.gemspec",
85
+ "spec/orange-flickr_spec.rb",
86
+ "spec/spec.opts",
87
+ "spec/spec_helper.rb"
88
+ ]
89
+ s.homepage = %q{http://orangerb.com}
90
+ s.rdoc_options = ["--charset=UTF-8"]
91
+ s.require_paths = ["lib"]
92
+ s.rubygems_version = %q{1.3.7}
93
+ s.summary = %q{A gem that uses FlickRaw to integrate with orange}
94
+ s.test_files = [
95
+ "spec/orange-flickr_spec.rb",
96
+ "spec/spec_helper.rb"
97
+ ]
98
+
99
+ if s.respond_to? :specification_version then
100
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
101
+ s.specification_version = 3
102
+
103
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
104
+ s.add_runtime_dependency(%q<flickraw-cached>, [">= 0"])
105
+ s.add_runtime_dependency(%q<orange-core>, [">= 0"])
106
+ s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
107
+ s.add_development_dependency(%q<yard>, [">= 0"])
108
+ else
109
+ s.add_dependency(%q<flickraw-cached>, [">= 0"])
110
+ s.add_dependency(%q<orange-core>, [">= 0"])
111
+ s.add_dependency(%q<rspec>, [">= 1.2.9"])
112
+ s.add_dependency(%q<yard>, [">= 0"])
113
+ end
114
+ else
115
+ s.add_dependency(%q<flickraw-cached>, [">= 0"])
116
+ s.add_dependency(%q<orange-core>, [">= 0"])
117
+ s.add_dependency(%q<rspec>, [">= 1.2.9"])
118
+ s.add_dependency(%q<yard>, [">= 0"])
119
+ end
120
+ end
121
+
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: orange-flickr
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 25
4
5
  prerelease: false
5
6
  segments:
6
7
  - 0
7
8
  - 1
8
- - 0
9
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
10
11
  platform: ruby
11
12
  authors:
12
13
  - David Haslem
@@ -21,40 +22,60 @@ dependencies:
21
22
  name: flickraw-cached
22
23
  prerelease: false
23
24
  requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
24
26
  requirements:
25
27
  - - ">="
26
28
  - !ruby/object:Gem::Version
29
+ hash: 3
27
30
  segments:
28
31
  - 0
29
32
  version: "0"
30
33
  type: :runtime
31
34
  version_requirements: *id001
32
35
  - !ruby/object:Gem::Dependency
33
- name: rspec
36
+ name: orange-core
34
37
  prerelease: false
35
38
  requirement: &id002 !ruby/object:Gem::Requirement
39
+ none: false
36
40
  requirements:
37
41
  - - ">="
38
42
  - !ruby/object:Gem::Version
43
+ hash: 3
44
+ segments:
45
+ - 0
46
+ version: "0"
47
+ type: :runtime
48
+ version_requirements: *id002
49
+ - !ruby/object:Gem::Dependency
50
+ name: rspec
51
+ prerelease: false
52
+ requirement: &id003 !ruby/object:Gem::Requirement
53
+ none: false
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ hash: 13
39
58
  segments:
40
59
  - 1
41
60
  - 2
42
61
  - 9
43
62
  version: 1.2.9
44
63
  type: :development
45
- version_requirements: *id002
64
+ version_requirements: *id003
46
65
  - !ruby/object:Gem::Dependency
47
66
  name: yard
48
67
  prerelease: false
49
- requirement: &id003 !ruby/object:Gem::Requirement
68
+ requirement: &id004 !ruby/object:Gem::Requirement
69
+ none: false
50
70
  requirements:
51
71
  - - ">="
52
72
  - !ruby/object:Gem::Version
73
+ hash: 3
53
74
  segments:
54
75
  - 0
55
76
  version: "0"
56
77
  type: :development
57
- version_requirements: *id003
78
+ version_requirements: *id004
58
79
  description: Adds flickr functionality to Orange
59
80
  email: therabidbanana@gmail.com
60
81
  executables: []
@@ -70,6 +91,7 @@ files:
70
91
  - LICENSE
71
92
  - README.rdoc
72
93
  - Rakefile
94
+ - VERSION
73
95
  - lib/orange-flickr.rb
74
96
  - lib/orange-flickr/assets/js/yoxview/data/flickr.js
75
97
  - lib/orange-flickr/assets/js/yoxview/data/flickr.min.js
@@ -124,8 +146,11 @@ files:
124
146
  - lib/orange-flickr/assets/js/yoxview/yoxview.css
125
147
  - lib/orange-flickr/plugin.rb
126
148
  - lib/orange-flickr/resources/flickr_resource.rb
149
+ - lib/orange-flickr/views/flickr/galleries.haml
127
150
  - lib/orange-flickr/views/flickr/gallery.haml
128
151
  - lib/orange-flickr/views/flickr/photoset.haml
152
+ - lib/orange-flickr/views/flickr/show.haml
153
+ - orange-flickr.gemspec
129
154
  - spec/orange-flickr_spec.rb
130
155
  - spec/spec.opts
131
156
  - spec/spec_helper.rb
@@ -139,23 +164,27 @@ rdoc_options:
139
164
  require_paths:
140
165
  - lib
141
166
  required_ruby_version: !ruby/object:Gem::Requirement
167
+ none: false
142
168
  requirements:
143
169
  - - ">="
144
170
  - !ruby/object:Gem::Version
171
+ hash: 3
145
172
  segments:
146
173
  - 0
147
174
  version: "0"
148
175
  required_rubygems_version: !ruby/object:Gem::Requirement
176
+ none: false
149
177
  requirements:
150
178
  - - ">="
151
179
  - !ruby/object:Gem::Version
180
+ hash: 3
152
181
  segments:
153
182
  - 0
154
183
  version: "0"
155
184
  requirements: []
156
185
 
157
186
  rubyforge_project:
158
- rubygems_version: 1.3.6
187
+ rubygems_version: 1.3.7
159
188
  signing_key:
160
189
  specification_version: 3
161
190
  summary: A gem that uses FlickRaw to integrate with orange