orange-flickr 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +21 -0
- data/LICENSE +20 -0
- data/README.rdoc +27 -0
- data/Rakefile +46 -0
- data/lib/orange-flickr.rb +4 -0
- data/lib/orange-flickr/assets/js/yoxview/data/flickr.js +270 -0
- data/lib/orange-flickr/assets/js/yoxview/data/flickr.min.js +19 -0
- data/lib/orange-flickr/assets/js/yoxview/images/empty.gif +0 -0
- data/lib/orange-flickr/assets/js/yoxview/images/help_panel.png +0 -0
- data/lib/orange-flickr/assets/js/yoxview/images/left.png +0 -0
- data/lib/orange-flickr/assets/js/yoxview/images/left_eng.png +0 -0
- data/lib/orange-flickr/assets/js/yoxview/images/left_prev.png +0 -0
- data/lib/orange-flickr/assets/js/yoxview/images/popup_ajax_loader.gif +0 -0
- data/lib/orange-flickr/assets/js/yoxview/images/right.png +0 -0
- data/lib/orange-flickr/assets/js/yoxview/images/right_eng.png +0 -0
- data/lib/orange-flickr/assets/js/yoxview/images/sprites.png +0 -0
- data/lib/orange-flickr/assets/js/yoxview/install.htm +116 -0
- data/lib/orange-flickr/assets/js/yoxview/jquery.jsonp-1.0.4.min.js +12 -0
- data/lib/orange-flickr/assets/js/yoxview/jquery.timers-1.2.min.js +11 -0
- data/lib/orange-flickr/assets/js/yoxview/jquery.yoxthumbs.js +207 -0
- data/lib/orange-flickr/assets/js/yoxview/jquery.yoxthumbs.min.js +11 -0
- data/lib/orange-flickr/assets/js/yoxview/jquery.yoxview-1.98.js +1673 -0
- data/lib/orange-flickr/assets/js/yoxview/jquery.yoxview-1.98.min.js +38 -0
- data/lib/orange-flickr/assets/js/yoxview/lang/ar.js +21 -0
- data/lib/orange-flickr/assets/js/yoxview/lang/bg.js +21 -0
- data/lib/orange-flickr/assets/js/yoxview/lang/ca.js +21 -0
- data/lib/orange-flickr/assets/js/yoxview/lang/cs.js +21 -0
- data/lib/orange-flickr/assets/js/yoxview/lang/de.js +21 -0
- data/lib/orange-flickr/assets/js/yoxview/lang/en.js +21 -0
- data/lib/orange-flickr/assets/js/yoxview/lang/es.js +21 -0
- data/lib/orange-flickr/assets/js/yoxview/lang/fr.js +21 -0
- data/lib/orange-flickr/assets/js/yoxview/lang/gr.js +21 -0
- data/lib/orange-flickr/assets/js/yoxview/lang/he.js +21 -0
- data/lib/orange-flickr/assets/js/yoxview/lang/ie.js +21 -0
- data/lib/orange-flickr/assets/js/yoxview/lang/ir.js +21 -0
- data/lib/orange-flickr/assets/js/yoxview/lang/it.js +21 -0
- data/lib/orange-flickr/assets/js/yoxview/lang/ja.js +21 -0
- data/lib/orange-flickr/assets/js/yoxview/lang/mk.js +20 -0
- data/lib/orange-flickr/assets/js/yoxview/lang/nl.js +3 -0
- data/lib/orange-flickr/assets/js/yoxview/lang/pl.js +21 -0
- data/lib/orange-flickr/assets/js/yoxview/lang/pt-br.js +21 -0
- data/lib/orange-flickr/assets/js/yoxview/lang/pt.js +21 -0
- data/lib/orange-flickr/assets/js/yoxview/lang/ro.js +21 -0
- data/lib/orange-flickr/assets/js/yoxview/lang/ru.js +21 -0
- data/lib/orange-flickr/assets/js/yoxview/lang/sk.js +21 -0
- data/lib/orange-flickr/assets/js/yoxview/lang/sl.js +21 -0
- data/lib/orange-flickr/assets/js/yoxview/lang/sv.js +21 -0
- data/lib/orange-flickr/assets/js/yoxview/lang/tr.js +22 -0
- data/lib/orange-flickr/assets/js/yoxview/lang/ua.js +21 -0
- data/lib/orange-flickr/assets/js/yoxview/lang/zh-cn.js +21 -0
- data/lib/orange-flickr/assets/js/yoxview/lang/zh-tw.js +21 -0
- data/lib/orange-flickr/assets/js/yoxview/yox.js +179 -0
- data/lib/orange-flickr/assets/js/yoxview/yox.min.js +1 -0
- data/lib/orange-flickr/assets/js/yoxview/yoxview-init.js +47 -0
- data/lib/orange-flickr/assets/js/yoxview/yoxview-nojquery.js +5 -0
- data/lib/orange-flickr/assets/js/yoxview/yoxview.css +218 -0
- data/lib/orange-flickr/plugin.rb +14 -0
- data/lib/orange-flickr/resources/flickr_resource.rb +31 -0
- data/lib/orange-flickr/views/flickr/gallery.haml +4 -0
- data/lib/orange-flickr/views/flickr/photoset.haml +5 -0
- data/spec/orange-flickr_spec.rb +7 -0
- data/spec/spec.opts +1 -0
- data/spec/spec_helper.rb +9 -0
- metadata +164 -0
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'orange-core'
|
2
|
+
require 'orange-flickr/resources/flickr_resource'
|
3
|
+
|
4
|
+
module Orange::Plugins
|
5
|
+
class Flickr < Base
|
6
|
+
assets_dir File.join(File.dirname(__FILE__), 'assets')
|
7
|
+
views_dir File.join(File.dirname(__FILE__), 'views')
|
8
|
+
# templates_dir File.join(File.dirname(__FILE__), 'templates')
|
9
|
+
|
10
|
+
resource Orange::FlickrResource.new
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
Orange.plugin(Orange::Plugins::Flickr.new)
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require 'flickraw-cached'
|
2
|
+
|
3
|
+
class Orange::FlickrResource < Orange::Resource
|
4
|
+
call_me :flickr
|
5
|
+
viewable :gallery, :photoset
|
6
|
+
|
7
|
+
def stack_init
|
8
|
+
FlickRaw.api_key = orange.options["flickr_api_key"] || "d25ed6ad71472b633b11544a21da4f36"
|
9
|
+
options["flickr_nsid"] = orange.options["flickr_nsid"] || false
|
10
|
+
end
|
11
|
+
|
12
|
+
def photosets
|
13
|
+
if FlickRaw.api_key && options["flickr_nsid"]
|
14
|
+
ret = {}
|
15
|
+
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
|
+
else
|
20
|
+
false
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
def gallery
|
25
|
+
if options["flickr_nsid"]
|
26
|
+
sets_url = FlickRaw::URL_PHOTOSTREAM + options["flickr_nsid"] + "/sets"
|
27
|
+
else
|
28
|
+
false
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,5 @@
|
|
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"}
|
3
|
+
%script
|
4
|
+
$(document).ready(function(){ $("#flickr_gallery").yoxview({ dataUrl: "#{attrs["photoset"]}"})});
|
5
|
+
#flickr_gallery= ' '
|
data/spec/spec.opts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
data/spec/spec_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,164 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: orange-flickr
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 1
|
8
|
+
- 0
|
9
|
+
version: 0.1.0
|
10
|
+
platform: ruby
|
11
|
+
authors:
|
12
|
+
- David Haslem
|
13
|
+
autorequire:
|
14
|
+
bindir: bin
|
15
|
+
cert_chain: []
|
16
|
+
|
17
|
+
date: 2010-08-18 00:00:00 -04:00
|
18
|
+
default_executable:
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
name: flickraw-cached
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
segments:
|
28
|
+
- 0
|
29
|
+
version: "0"
|
30
|
+
type: :runtime
|
31
|
+
version_requirements: *id001
|
32
|
+
- !ruby/object:Gem::Dependency
|
33
|
+
name: rspec
|
34
|
+
prerelease: false
|
35
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - ">="
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
segments:
|
40
|
+
- 1
|
41
|
+
- 2
|
42
|
+
- 9
|
43
|
+
version: 1.2.9
|
44
|
+
type: :development
|
45
|
+
version_requirements: *id002
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: yard
|
48
|
+
prerelease: false
|
49
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
segments:
|
54
|
+
- 0
|
55
|
+
version: "0"
|
56
|
+
type: :development
|
57
|
+
version_requirements: *id003
|
58
|
+
description: Adds flickr functionality to Orange
|
59
|
+
email: therabidbanana@gmail.com
|
60
|
+
executables: []
|
61
|
+
|
62
|
+
extensions: []
|
63
|
+
|
64
|
+
extra_rdoc_files:
|
65
|
+
- LICENSE
|
66
|
+
- README.rdoc
|
67
|
+
files:
|
68
|
+
- .document
|
69
|
+
- .gitignore
|
70
|
+
- LICENSE
|
71
|
+
- README.rdoc
|
72
|
+
- Rakefile
|
73
|
+
- lib/orange-flickr.rb
|
74
|
+
- lib/orange-flickr/assets/js/yoxview/data/flickr.js
|
75
|
+
- lib/orange-flickr/assets/js/yoxview/data/flickr.min.js
|
76
|
+
- lib/orange-flickr/assets/js/yoxview/images/empty.gif
|
77
|
+
- lib/orange-flickr/assets/js/yoxview/images/help_panel.png
|
78
|
+
- lib/orange-flickr/assets/js/yoxview/images/left.png
|
79
|
+
- lib/orange-flickr/assets/js/yoxview/images/left_eng.png
|
80
|
+
- lib/orange-flickr/assets/js/yoxview/images/left_prev.png
|
81
|
+
- lib/orange-flickr/assets/js/yoxview/images/popup_ajax_loader.gif
|
82
|
+
- lib/orange-flickr/assets/js/yoxview/images/right.png
|
83
|
+
- lib/orange-flickr/assets/js/yoxview/images/right_eng.png
|
84
|
+
- lib/orange-flickr/assets/js/yoxview/images/sprites.png
|
85
|
+
- lib/orange-flickr/assets/js/yoxview/install.htm
|
86
|
+
- lib/orange-flickr/assets/js/yoxview/jquery.jsonp-1.0.4.min.js
|
87
|
+
- lib/orange-flickr/assets/js/yoxview/jquery.timers-1.2.min.js
|
88
|
+
- lib/orange-flickr/assets/js/yoxview/jquery.yoxthumbs.js
|
89
|
+
- lib/orange-flickr/assets/js/yoxview/jquery.yoxthumbs.min.js
|
90
|
+
- lib/orange-flickr/assets/js/yoxview/jquery.yoxview-1.98.js
|
91
|
+
- lib/orange-flickr/assets/js/yoxview/jquery.yoxview-1.98.min.js
|
92
|
+
- lib/orange-flickr/assets/js/yoxview/lang/ar.js
|
93
|
+
- lib/orange-flickr/assets/js/yoxview/lang/bg.js
|
94
|
+
- lib/orange-flickr/assets/js/yoxview/lang/ca.js
|
95
|
+
- lib/orange-flickr/assets/js/yoxview/lang/cs.js
|
96
|
+
- lib/orange-flickr/assets/js/yoxview/lang/de.js
|
97
|
+
- lib/orange-flickr/assets/js/yoxview/lang/en.js
|
98
|
+
- lib/orange-flickr/assets/js/yoxview/lang/es.js
|
99
|
+
- lib/orange-flickr/assets/js/yoxview/lang/fr.js
|
100
|
+
- lib/orange-flickr/assets/js/yoxview/lang/gr.js
|
101
|
+
- lib/orange-flickr/assets/js/yoxview/lang/he.js
|
102
|
+
- lib/orange-flickr/assets/js/yoxview/lang/ie.js
|
103
|
+
- lib/orange-flickr/assets/js/yoxview/lang/ir.js
|
104
|
+
- lib/orange-flickr/assets/js/yoxview/lang/it.js
|
105
|
+
- lib/orange-flickr/assets/js/yoxview/lang/ja.js
|
106
|
+
- lib/orange-flickr/assets/js/yoxview/lang/mk.js
|
107
|
+
- lib/orange-flickr/assets/js/yoxview/lang/nl.js
|
108
|
+
- lib/orange-flickr/assets/js/yoxview/lang/pl.js
|
109
|
+
- lib/orange-flickr/assets/js/yoxview/lang/pt-br.js
|
110
|
+
- lib/orange-flickr/assets/js/yoxview/lang/pt.js
|
111
|
+
- lib/orange-flickr/assets/js/yoxview/lang/ro.js
|
112
|
+
- lib/orange-flickr/assets/js/yoxview/lang/ru.js
|
113
|
+
- lib/orange-flickr/assets/js/yoxview/lang/sk.js
|
114
|
+
- lib/orange-flickr/assets/js/yoxview/lang/sl.js
|
115
|
+
- lib/orange-flickr/assets/js/yoxview/lang/sv.js
|
116
|
+
- lib/orange-flickr/assets/js/yoxview/lang/tr.js
|
117
|
+
- lib/orange-flickr/assets/js/yoxview/lang/ua.js
|
118
|
+
- lib/orange-flickr/assets/js/yoxview/lang/zh-cn.js
|
119
|
+
- lib/orange-flickr/assets/js/yoxview/lang/zh-tw.js
|
120
|
+
- lib/orange-flickr/assets/js/yoxview/yox.js
|
121
|
+
- lib/orange-flickr/assets/js/yoxview/yox.min.js
|
122
|
+
- lib/orange-flickr/assets/js/yoxview/yoxview-init.js
|
123
|
+
- lib/orange-flickr/assets/js/yoxview/yoxview-nojquery.js
|
124
|
+
- lib/orange-flickr/assets/js/yoxview/yoxview.css
|
125
|
+
- lib/orange-flickr/plugin.rb
|
126
|
+
- lib/orange-flickr/resources/flickr_resource.rb
|
127
|
+
- lib/orange-flickr/views/flickr/gallery.haml
|
128
|
+
- lib/orange-flickr/views/flickr/photoset.haml
|
129
|
+
- spec/orange-flickr_spec.rb
|
130
|
+
- spec/spec.opts
|
131
|
+
- spec/spec_helper.rb
|
132
|
+
has_rdoc: true
|
133
|
+
homepage: http://orangerb.com
|
134
|
+
licenses: []
|
135
|
+
|
136
|
+
post_install_message:
|
137
|
+
rdoc_options:
|
138
|
+
- --charset=UTF-8
|
139
|
+
require_paths:
|
140
|
+
- lib
|
141
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
segments:
|
146
|
+
- 0
|
147
|
+
version: "0"
|
148
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
segments:
|
153
|
+
- 0
|
154
|
+
version: "0"
|
155
|
+
requirements: []
|
156
|
+
|
157
|
+
rubyforge_project:
|
158
|
+
rubygems_version: 1.3.6
|
159
|
+
signing_key:
|
160
|
+
specification_version: 3
|
161
|
+
summary: A gem that uses FlickRaw to integrate with orange
|
162
|
+
test_files:
|
163
|
+
- spec/orange-flickr_spec.rb
|
164
|
+
- spec/spec_helper.rb
|