imagine 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{imagine-basic_list_view}
5
- s.version = %q{0.1.3}
5
+ s.version = %q{0.1.4}
6
6
  s.summary = %q{Basic list view for Imagine}
7
7
  s.description = %q{The default album view for Imagine. Just lists images one after another}
8
8
  s.date = %q{2011-08-28}
@@ -14,8 +14,8 @@ Gem::Specification.new do |s|
14
14
  s.require_paths = %w(lib)
15
15
  s.executables = %w()
16
16
 
17
- s.files = [
17
+ s.files = Dir["app/**/*"] + [
18
18
  'imagine-basic_list_view.gemspec',
19
19
  'lib/imagine-basic_list_view.rb'
20
- ]
20
+ ]
21
21
  end
@@ -1,7 +1,7 @@
1
1
  module Imagine
2
2
  class << self
3
3
  def version
4
- %q{0.1.5}
4
+ %q{0.1.6}
5
5
  end
6
6
  end
7
7
  end
data/lib/imagine.rb CHANGED
@@ -12,6 +12,6 @@ module Imagine
12
12
  end
13
13
 
14
14
  # Require the built in engines
15
- %w(basic_list_view).each do |engine|
15
+ %w(basic_list_view orbit_view).each do |engine|
16
16
  require "imagine-#{engine}"
17
17
  end
@@ -0,0 +1,17 @@
1
+ /*
2
+ * jQuery Orbit Plugin 1.2.3
3
+ * www.ZURB.com/playground
4
+ * Copyright 2010, ZURB
5
+ * Free to use under the MIT license.
6
+ * http://www.opensource.org/licenses/mit-license.php
7
+ */
8
+
9
+ (function(d){d.fn.orbit=function(a){a=d.extend({animation:"horizontal-push",animationSpeed:600,timer:!0,advanceSpeed:4E3,pauseOnHover:!1,startClockOnMouseOut:!1,startClockOnMouseOutAfter:1E3,directionalNav:!0,captions:!0,captionAnimation:"fade",captionAnimationSpeed:600,bullets:!1,bulletThumbs:!1,bulletThumbLocation:"",afterSlideChange:function(){}},a);return this.each(function(){function q(){if(!a.timer||a.timer=="false")return!1;else r.is(":hidden")?s=setInterval(function(){l("next")},a.advanceSpeed):
10
+ (o=!0,x.removeClass("active"),s=setInterval(function(){var a="rotate("+m+"deg)";m+=2;t.css({"-webkit-transform":a,"-moz-transform":a,"-o-transform":a});m>180&&(t.addClass("move"),y.addClass("move"));m>360&&(t.removeClass("move"),y.removeClass("move"),m=0,l("next"))},a.advanceSpeed/180))}function n(){if(!a.timer||a.timer=="false")return!1;else o=!1,clearInterval(s),x.addClass("active")}function z(){if(!a.captions||a.captions=="false")return!1;else{var c=e.eq(b).data("caption");(_captionHTML=d(c).html())?
11
+ (j.attr("id",c).html(_captionHTML),a.captionAnimation=="none"&&j.show(),a.captionAnimation=="fade"&&j.fadeIn(a.captionAnimationSpeed),a.captionAnimation=="slideOpen"&&j.slideDown(a.captionAnimationSpeed)):(a.captionAnimation=="none"&&j.hide(),a.captionAnimation=="fade"&&j.fadeOut(a.captionAnimationSpeed),a.captionAnimation=="slideOpen"&&j.slideUp(a.captionAnimationSpeed))}}function A(){if(a.bullets)C.children("li").removeClass("active").eq(b).addClass("active");else return!1}function l(c){function d(){e.eq(f).css({"z-index":1});
12
+ u=!1;a.afterSlideChange.call(this)}var f=b,g=c;if(f==g)return!1;if(e.length=="1")return!1;u||(u=!0,c=="next"?(b++,b==p&&(b=0)):c=="prev"?(b--,b<0&&(b=p-1)):(b=c,f<b?g="next":f>b&&(g="prev")),A(),e.eq(f).css({"z-index":2}),a.animation=="fade"&&e.eq(b).css({opacity:0,"z-index":3}).animate({opacity:1},a.animationSpeed,d),a.animation=="horizontal-slide"&&(g=="next"&&e.eq(b).css({left:h,"z-index":3}).animate({left:0},a.animationSpeed,d),g=="prev"&&e.eq(b).css({left:-h,"z-index":3}).animate({left:0},a.animationSpeed,
13
+ d)),a.animation=="vertical-slide"&&(g=="prev"&&e.eq(b).css({top:v,"z-index":3}).animate({top:0},a.animationSpeed,d),g=="next"&&e.eq(b).css({top:-v,"z-index":3}).animate({top:0},a.animationSpeed,d)),a.animation=="horizontal-push"&&(g=="next"&&(e.eq(b).css({left:h,"z-index":3}).animate({left:0},a.animationSpeed,d),e.eq(f).animate({left:-h},a.animationSpeed)),g=="prev"&&(e.eq(b).css({left:-h,"z-index":3}).animate({left:0},a.animationSpeed,d),e.eq(f).animate({left:h},a.animationSpeed))),z())}var b=0,
14
+ p=0,h,v,u,f=d(this).addClass("orbit"),c=f.wrap('<div class="orbit-wrapper" />').parent();f.add(h).width("1px").height("1px");var e=f.children("img, a, div");e.each(function(){var a=d(this),b=a.width(),a=a.height();b>f.width()&&(f.add(c).width(b),h=f.width());a>f.height()&&(f.add(c).height(a),v=f.height());p++});if(e.length==1)a.directionalNav=!1,a.timer=!1,a.bullets=!1;e.eq(b).css({"z-index":3}).fadeIn(function(){e.css({display:"block"})});if(a.timer){c.append('<div class="timer"><span class="mask"><span class="rotator"></span></span><span class="pause"></span></div>');
15
+ var r=c.children("div.timer"),o;if(r.length!=0){var t=d("div.timer span.rotator"),y=d("div.timer span.mask"),x=d("div.timer span.pause"),m=0,s;q();r.click(function(){o?n():q()});if(a.startClockOnMouseOut){var B;c.mouseleave(function(){B=setTimeout(function(){o||q()},a.startClockOnMouseOutAfter)});c.mouseenter(function(){clearTimeout(B)})}}}a.pauseOnHover&&c.mouseenter(function(){n()});if(a.captions){c.append('<div class="orbit-caption"></div>');var j=c.children(".orbit-caption");z()}if(a.directionalNav){if(a.directionalNav==
16
+ "false")return!1;c.append('<div class="slider-nav"><span class="right">Right</span><span class="left">Left</span></div>');var k=c.children("div.slider-nav").children("span.left"),w=c.children("div.slider-nav").children("span.right");k.click(function(){n();l("prev")});w.click(function(){n();l("next")})}if(a.bullets){c.append('<ul class="orbit-bullets"></ul>');var C=c.children("ul.orbit-bullets");for(i=0;i<p;i++){k=d("<li>"+(i+1)+"</li>");if(a.bulletThumbs&&(w=e.eq(i).data("thumb")))k=d('<li class="has-thumb">'+
17
+ i+"</li>"),k.css({background:"url("+a.bulletThumbLocation+w+") no-repeat"});c.children("ul.orbit-bullets").append(k);k.data("index",i);k.click(function(){n();l(d(this).data("index"))})}A()}})}})(jQuery);
@@ -0,0 +1,201 @@
1
+ /* CSS for jQuery Orbit Plugin 1.2.3
2
+ * www.ZURB.com/playground
3
+ * Copyright 2010, ZURB
4
+ * Free to use under the MIT license.
5
+ * http://www.opensource.org/licenses/mit-license.php
6
+
7
+
8
+
9
+ /* PUT IN YOUR SLIDER ID AND SIZE TO MAKE LOAD BEAUTIFULLY
10
+ ================================================== */
11
+ #featured {
12
+ width: 940px;
13
+ height: 450px;
14
+ background: #000 url('orbit/loading.gif') no-repeat center center;
15
+ overflow: hidden; }
16
+ #featured>img,
17
+ #featured>div,
18
+ #featured>a { display: none; }
19
+
20
+
21
+
22
+
23
+ /* CONTAINER
24
+ ================================================== */
25
+
26
+ div.orbit-wrapper {
27
+ width: 1px;
28
+ height: 1px;
29
+ position: relative; }
30
+
31
+ div.orbit {
32
+ width: 1px;
33
+ height: 1px;
34
+ position: relative;
35
+ overflow: hidden }
36
+
37
+ div.orbit>img {
38
+ position: absolute;
39
+ top: 0;
40
+ left: 0;
41
+ display: none; }
42
+
43
+ div.orbit>a {
44
+ border: none;
45
+ position: absolute;
46
+ top: 0;
47
+ left: 0;
48
+ line-height: 0;
49
+ display: none; }
50
+
51
+ .orbit>div {
52
+ position: absolute;
53
+ top: 0;
54
+ left: 0;
55
+ width: 100%;
56
+ height: 100%; }
57
+
58
+ /* Note: If your slider only uses content or anchors, you're going to want to put the width and height declarations on the ".orbit>div" and "div.orbit>a" tags in addition to just the .orbit-wrapper */
59
+
60
+
61
+ /* TIMER
62
+ ================================================== */
63
+
64
+ div.timer {
65
+ width: 40px;
66
+ height: 40px;
67
+ overflow: hidden;
68
+ position: absolute;
69
+ top: 10px;
70
+ right: 10px;
71
+ opacity: .6;
72
+ cursor: pointer;
73
+ z-index: 1001; }
74
+
75
+ span.rotator {
76
+ display: block;
77
+ width: 40px;
78
+ height: 40px;
79
+ position: absolute;
80
+ top: 0;
81
+ left: -20px;
82
+ background: url(orbit/rotator-black.png) no-repeat;
83
+ z-index: 3; }
84
+
85
+ span.mask {
86
+ display: block;
87
+ width: 20px;
88
+ height: 40px;
89
+ position: absolute;
90
+ top: 0;
91
+ right: 0;
92
+ z-index: 2;
93
+ overflow: hidden; }
94
+
95
+ span.rotator.move {
96
+ left: 0 }
97
+
98
+ span.mask.move {
99
+ width: 40px;
100
+ left: 0;
101
+ background: url(orbit/timer-black.png) repeat 0 0; }
102
+
103
+ span.pause {
104
+ display: block;
105
+ width: 40px;
106
+ height: 40px;
107
+ position: absolute;
108
+ top: 0;
109
+ left: 0;
110
+ background: url(orbit/pause-black.png) no-repeat;
111
+ z-index: 4;
112
+ opacity: 0; }
113
+
114
+ span.pause.active {
115
+ background: url(orbit/pause-black.png) no-repeat 0 -40px }
116
+
117
+ div.timer:hover span.pause,
118
+ span.pause.active {
119
+ opacity: 1 }
120
+
121
+
122
+ /* CAPTIONS
123
+ ================================================== */
124
+
125
+ .orbit-caption {
126
+ display: none;
127
+ font-family: "HelveticaNeue", "Helvetica-Neue", Helvetica, Arial, sans-serif; }
128
+
129
+ .orbit-wrapper .orbit-caption {
130
+ background: #000;
131
+ background: rgba(0,0,0,.6);
132
+ z-index: 1000;
133
+ color: #fff;
134
+ text-align: center;
135
+ padding: 7px 0;
136
+ font-size: 13px;
137
+ position: absolute;
138
+ right: 0;
139
+ bottom: 0;
140
+ width: 100%; }
141
+
142
+
143
+ /* DIRECTIONAL NAV
144
+ ================================================== */
145
+
146
+ div.slider-nav {
147
+ display: block }
148
+
149
+ div.slider-nav span {
150
+ width: 78px;
151
+ height: 100px;
152
+ text-indent: -9999px;
153
+ position: absolute;
154
+ z-index: 1000;
155
+ top: 50%;
156
+ margin-top: -50px;
157
+ cursor: pointer; }
158
+
159
+ div.slider-nav span.right {
160
+ background: url(orbit/right-arrow.png);
161
+ right: 0; }
162
+
163
+ div.slider-nav span.left {
164
+ background: url(orbit/left-arrow.png);
165
+ left: 0; }
166
+
167
+ /* BULLET NAV
168
+ ================================================== */
169
+
170
+ .orbit-bullets {
171
+ position: absolute;
172
+ z-index: 1000;
173
+ list-style: none;
174
+ bottom: -40px;
175
+ left: 50%;
176
+ margin-left: -50px;
177
+ padding: 0; }
178
+
179
+ .orbit-bullets li {
180
+ float: left;
181
+ margin-left: 5px;
182
+ cursor: pointer;
183
+ color: #999;
184
+ text-indent: -9999px;
185
+ background: url(orbit/bullets.jpg) no-repeat 4px 0;
186
+ width: 13px;
187
+ height: 12px;
188
+ overflow: hidden; }
189
+
190
+ .orbit-bullets li.active {
191
+ color: #222;
192
+ background-position: -8px 0; }
193
+
194
+ .orbit-bullets li.has-thumb {
195
+ background: none;
196
+ width: 100px;
197
+ height: 75px; }
198
+
199
+ .orbit-bullets li.active.has-thumb {
200
+ background-position: 0 0;
201
+ border-top: 2px solid #000; }
@@ -0,0 +1,15 @@
1
+ %h2= @album.name
2
+ %h3 Orbit View
3
+
4
+ .images#featured
5
+ - @album.images.each do |image|
6
+ = render :partial => 'imagine/images/orbit_view/image', :object => image
7
+
8
+ = link_to "New Image", new_album_image_path(@album)
9
+
10
+ = javascript_include_tag 'jquery.orbit-1.2.3.min.js'
11
+ = stylesheet_link_tag 'orbit-1.2.3.css'
12
+ :javascript
13
+ $(window).load(function() {
14
+ $('#featured').orbit();
15
+ });
@@ -0,0 +1 @@
1
+ = image_tag image.file.url
@@ -0,0 +1,21 @@
1
+ # Encoding: UTF-8
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = %q{imagine-orbit_view}
5
+ s.version = %q{0.1.4}
6
+ s.summary = %q{Orbit slider view for Imagine}
7
+ s.description = %q{A jquery slider album view for Imagine. Uses orbit.}
8
+ s.date = %q{2011-09-19}
9
+ s.email = %q{josh@isotope11.com}
10
+ s.homepage = %q{http://github.com/knewter/imagine}
11
+ s.rubyforge_project = %q{imagine}
12
+ s.authors = ['Josh Adams']
13
+ s.license = %q{MIT}
14
+ s.require_paths = %w(lib)
15
+ s.executables = %w()
16
+
17
+ s.files = Dir["app/**/*"] + [
18
+ 'imagine-orbit_view.gemspec',
19
+ 'lib/imagine-orbit_view.rb'
20
+ ]
21
+ end
@@ -0,0 +1,20 @@
1
+ module Imagine
2
+ module OrbitView
3
+ class Engine < ::Rails::Engine
4
+ isolate_namespace ::Imagine
5
+ engine_name 'imagine_orbit_view'
6
+
7
+ config.after_initialize do |app|
8
+ ::Imagine::Plugin.register do |plugin|
9
+ plugin.pathname = root
10
+ plugin.name = 'imagine_orbit_view'
11
+ plugin.directory = 'orbit_view'
12
+ plugin.version = %q{0.1.5}
13
+ end
14
+ end
15
+
16
+ end
17
+ end
18
+ end
19
+
20
+ ::Imagine.engines << 'orbit_view'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: imagine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2011-08-28 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: imagine-basic_list_view
16
- requirement: &19481340 !ruby/object:Gem::Requirement
16
+ requirement: &19418480 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,21 @@ dependencies:
21
21
  version: 0.1.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *19481340
24
+ version_requirements: *19418480
25
+ - !ruby/object:Gem::Dependency
26
+ name: imagine-orbit_view
27
+ requirement: &19417860 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ~>
31
+ - !ruby/object:Gem::Version
32
+ version: 0.1.0
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: *19417860
25
36
  - !ruby/object:Gem::Dependency
26
37
  name: haml-rails
27
- requirement: &19480920 !ruby/object:Gem::Requirement
38
+ requirement: &19417480 !ruby/object:Gem::Requirement
28
39
  none: false
29
40
  requirements:
30
41
  - - ! '>='
@@ -32,10 +43,10 @@ dependencies:
32
43
  version: '0'
33
44
  type: :runtime
34
45
  prerelease: false
35
- version_requirements: *19480920
46
+ version_requirements: *19417480
36
47
  - !ruby/object:Gem::Dependency
37
48
  name: dragonfly
38
- requirement: &19480380 !ruby/object:Gem::Requirement
49
+ requirement: &19416820 !ruby/object:Gem::Requirement
39
50
  none: false
40
51
  requirements:
41
52
  - - ~>
@@ -43,10 +54,10 @@ dependencies:
43
54
  version: 0.9.0
44
55
  type: :runtime
45
56
  prerelease: false
46
- version_requirements: *19480380
57
+ version_requirements: *19416820
47
58
  - !ruby/object:Gem::Dependency
48
59
  name: rack-cache
49
- requirement: &19479880 !ruby/object:Gem::Requirement
60
+ requirement: &19416200 !ruby/object:Gem::Requirement
50
61
  none: false
51
62
  requirements:
52
63
  - - ! '>='
@@ -54,10 +65,10 @@ dependencies:
54
65
  version: 0.5.3
55
66
  type: :runtime
56
67
  prerelease: false
57
- version_requirements: *19479880
68
+ version_requirements: *19416200
58
69
  - !ruby/object:Gem::Dependency
59
70
  name: rspec-rails
60
- requirement: &19479420 !ruby/object:Gem::Requirement
71
+ requirement: &19415380 !ruby/object:Gem::Requirement
61
72
  none: false
62
73
  requirements:
63
74
  - - ~>
@@ -65,10 +76,10 @@ dependencies:
65
76
  version: '2.5'
66
77
  type: :development
67
78
  prerelease: false
68
- version_requirements: *19479420
79
+ version_requirements: *19415380
69
80
  - !ruby/object:Gem::Dependency
70
81
  name: capybara
71
- requirement: &19479000 !ruby/object:Gem::Requirement
82
+ requirement: &19415000 !ruby/object:Gem::Requirement
72
83
  none: false
73
84
  requirements:
74
85
  - - ! '>='
@@ -76,10 +87,10 @@ dependencies:
76
87
  version: '0'
77
88
  type: :development
78
89
  prerelease: false
79
- version_requirements: *19479000
90
+ version_requirements: *19415000
80
91
  - !ruby/object:Gem::Dependency
81
92
  name: factory_girl
82
- requirement: &19478520 !ruby/object:Gem::Requirement
93
+ requirement: &19394600 !ruby/object:Gem::Requirement
83
94
  none: false
84
95
  requirements:
85
96
  - - ! '>='
@@ -87,10 +98,10 @@ dependencies:
87
98
  version: '0'
88
99
  type: :development
89
100
  prerelease: false
90
- version_requirements: *19478520
101
+ version_requirements: *19394600
91
102
  - !ruby/object:Gem::Dependency
92
103
  name: spork
93
- requirement: &19478100 !ruby/object:Gem::Requirement
104
+ requirement: &19394160 !ruby/object:Gem::Requirement
94
105
  none: false
95
106
  requirements:
96
107
  - - ! '>='
@@ -98,7 +109,7 @@ dependencies:
98
109
  version: '0'
99
110
  type: :development
100
111
  prerelease: false
101
- version_requirements: *19478100
112
+ version_requirements: *19394160
102
113
  description: Imagine can be dropped into an app to provide albums and images in your
103
114
  app. It supports extensions to specify new view styles.
104
115
  email: josh@isotope11.com
@@ -107,34 +118,49 @@ extensions: []
107
118
  extra_rdoc_files: []
108
119
  files:
109
120
  - lib/tasks/imagine_tasks.rake
110
- - lib/imagine.rb
121
+ - lib/imagine/plugins.rb
111
122
  - lib/imagine/engine.rb
112
123
  - lib/imagine/version.rb
113
124
  - lib/imagine/plugin.rb
114
- - lib/imagine/plugins.rb
115
- - app/warehouses/imagine/image.rb
116
- - app/warehouses/imagine/album.rb
117
- - app/controllers/imagine/images_controller.rb
118
- - app/controllers/imagine/application_controller.rb
119
- - app/controllers/imagine/albums_controller.rb
125
+ - lib/imagine.rb
120
126
  - app/assets/javascripts/imagine2/application.js
121
127
  - app/assets/stylesheets/imagine2/application.css
128
+ - app/models/imagine/album.rb
129
+ - app/models/imagine/image.rb
130
+ - app/controllers/imagine/application_controller.rb
131
+ - app/controllers/imagine/albums_controller.rb
132
+ - app/controllers/imagine/images_controller.rb
122
133
  - app/views/imagine/images/new.html.haml
123
134
  - app/views/imagine/images/show.html.haml
124
- - app/views/imagine/albums/index.html.haml
125
135
  - app/views/imagine/albums/new.html.haml
136
+ - app/views/imagine/albums/index.html.haml
126
137
  - app/views/imagine/albums/show.html.haml
127
- - app/models/imagine/image.rb
128
- - app/models/imagine/album.rb
138
+ - app/warehouses/imagine/album.rb
139
+ - app/warehouses/imagine/image.rb
129
140
  - app/helpers/imagine/application_helper.rb
130
- - config/routes.rb
131
141
  - config/initializers/dragonfly.rb
132
- - db/migrate/20110826162909_create_albums.rb
142
+ - config/routes.rb
133
143
  - db/migrate/20110826222354_create_images.rb
134
- - basic_list_view/lib/imagine-basic_list_view.rb
144
+ - db/migrate/20110826162909_create_albums.rb
135
145
  - basic_list_view/imagine-basic_list_view.gemspec
136
146
  - basic_list_view/app/views/imagine/images/basic_list_view/_image.html.haml
137
147
  - basic_list_view/app/views/imagine/albums/basic_list_view/show.html.haml
148
+ - basic_list_view/lib/imagine-basic_list_view.rb
149
+ - orbit_view/imagine-orbit_view-0.1.4.gem
150
+ - orbit_view/app/assets/javascripts/jquery.orbit-1.2.3.min.js
151
+ - orbit_view/app/assets/images/orbit/loading.gif
152
+ - orbit_view/app/assets/images/orbit/pause-black.png
153
+ - orbit_view/app/assets/images/orbit/rotator-black.png
154
+ - orbit_view/app/assets/images/orbit/timer-black.png
155
+ - orbit_view/app/assets/images/orbit/left-arrow.png
156
+ - orbit_view/app/assets/images/orbit/mask-black.png
157
+ - orbit_view/app/assets/images/orbit/bullets.jpg
158
+ - orbit_view/app/assets/images/orbit/right-arrow.png
159
+ - orbit_view/app/assets/stylesheets/orbit-1.2.3.css
160
+ - orbit_view/app/views/imagine/images/orbit_view/_image.html.haml
161
+ - orbit_view/app/views/imagine/albums/orbit_view/show.html.haml
162
+ - orbit_view/lib/imagine-orbit_view.rb
163
+ - orbit_view/imagine-orbit_view.gemspec
138
164
  - MIT-LICENSE
139
165
  - Rakefile
140
166
  - README.md