imagine 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -22,16 +22,19 @@ And run the migrations with:
22
22
  Finally, visit /imagine/albums in your browser to get started.
23
23
 
24
24
  ## TODO
25
- * Build the plugin system
26
- * Build a plugin that ships with core that handles a basic display style
27
25
  * Allow a user to choose the default display style at album level
28
- * Allow a visitor to look at any album with any display style via a param
26
+ * API to define a default view for albums, images (so define a default plugin)
27
+ * Provide a standard means of wrapping with authentication
28
+ * Provide a happy-path for attaching albums polymorphically to other objects
29
+ * Make it look a little prettier. Provide a stylesheet that you can include if you so desire.
29
30
 
30
31
  ## Plugins
31
32
  New album display types are specified in plugins.
32
33
 
33
34
  Plugins are just gems. There is a plugin shipped with the core project called
34
35
  `imagine_basic_list`. It should serve as a good template for building your own.
36
+ There is another plugin called `orbit_view` that displays the album using jquery
37
+ orbit.
35
38
 
36
39
  They're just rails engines, that have a bit of configuration logic to let
37
40
  Imagine know that they should be incuded in the template style lists.
@@ -34,6 +34,8 @@ module Imagine
34
34
  def render_show_view
35
35
  if params[:plugin]
36
36
  render :action => "/#{params[:plugin]}/show"
37
+ elsif ::Imagine.default_plugin
38
+ render :action => "/#{::Imagine.default_plugin}/show"
37
39
  else
38
40
  render :action => 'show'
39
41
  end
@@ -3,5 +3,5 @@
3
3
  = f.file_field :file
4
4
  or
5
5
  = f.label :file_url
6
- = f.file_field :file_url
6
+ = f.text_field :file_url
7
7
  = f.submit "Attach Image"
data/lib/imagine.rb CHANGED
@@ -8,6 +8,14 @@ module Imagine
8
8
  def engines
9
9
  @engines ||= []
10
10
  end
11
+
12
+ def default_plugin=(plugin)
13
+ @default_plugin = plugin
14
+ end
15
+
16
+ def default_plugin
17
+ @default_plugin
18
+ end
11
19
  end
12
20
  end
13
21
 
@@ -1,7 +1,7 @@
1
1
  module Imagine
2
2
  class << self
3
3
  def version
4
- %q{0.2.0}
4
+ %q{0.2.1}
5
5
  end
6
6
  end
7
7
  end
@@ -1 +1 @@
1
- = image_tag image.file.url
1
+ = image_tag image.file.thumb('800x500#').url
@@ -2,10 +2,10 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{imagine-orbit_view}
5
- s.version = %q{0.1.4}
5
+ s.version = %q{0.1.8}
6
6
  s.summary = %q{Orbit slider view for Imagine}
7
7
  s.description = %q{A jquery slider album view for Imagine. Uses orbit.}
8
- s.date = %q{2011-09-19}
8
+ s.date = %q{2011-09-29}
9
9
  s.email = %q{josh@isotope11.com}
10
10
  s.homepage = %q{http://github.com/knewter/imagine}
11
11
  s.rubyforge_project = %q{imagine}
@@ -9,7 +9,7 @@ module Imagine
9
9
  plugin.pathname = root
10
10
  plugin.name = 'imagine_orbit_view'
11
11
  plugin.directory = 'orbit_view'
12
- plugin.version = %q{0.1.5}
12
+ plugin.version = %q{0.1.8}
13
13
  end
14
14
  end
15
15
 
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.2.0
4
+ version: 0.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-08-28 00:00:00.000000000Z
12
+ date: 2011-09-29 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: imagine-basic_list_view
16
- requirement: &21754940 !ruby/object:Gem::Requirement
16
+ requirement: &12684640 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.1.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *21754940
24
+ version_requirements: *12684640
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: imagine-orbit_view
27
- requirement: &21754440 !ruby/object:Gem::Requirement
27
+ requirement: &12684140 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 0.1.0
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *21754440
35
+ version_requirements: *12684140
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: haml-rails
38
- requirement: &21753920 !ruby/object:Gem::Requirement
38
+ requirement: &12683660 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *21753920
46
+ version_requirements: *12683660
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: dragonfly
49
- requirement: &21753380 !ruby/object:Gem::Requirement
49
+ requirement: &12683080 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 0.9.0
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *21753380
57
+ version_requirements: *12683080
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: rack-cache
60
- requirement: &21752840 !ruby/object:Gem::Requirement
60
+ requirement: &12682560 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: 0.5.3
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *21752840
68
+ version_requirements: *12682560
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec-rails
71
- requirement: &21752380 !ruby/object:Gem::Requirement
71
+ requirement: &12682080 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ~>
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '2.5'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *21752380
79
+ version_requirements: *12682080
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: capybara
82
- requirement: &21752000 !ruby/object:Gem::Requirement
82
+ requirement: &12681700 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: '0'
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *21752000
90
+ version_requirements: *12681700
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: factory_girl
93
- requirement: &21751520 !ruby/object:Gem::Requirement
93
+ requirement: &12681220 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ! '>='
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: '0'
99
99
  type: :development
100
100
  prerelease: false
101
- version_requirements: *21751520
101
+ version_requirements: *12681220
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: spork
104
- requirement: &21751060 !ruby/object:Gem::Requirement
104
+ requirement: &12680760 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ! '>='
@@ -109,7 +109,7 @@ dependencies:
109
109
  version: '0'
110
110
  type: :development
111
111
  prerelease: false
112
- version_requirements: *21751060
112
+ version_requirements: *12680760
113
113
  description: Imagine can be dropped into an app to provide albums and images in your
114
114
  app. It supports extensions to specify new view styles.
115
115
  email: josh@isotope11.com
@@ -146,7 +146,6 @@ files:
146
146
  - basic_list_view/app/views/imagine/images/basic_list_view/_image.html.haml
147
147
  - basic_list_view/app/views/imagine/albums/basic_list_view/show.html.haml
148
148
  - basic_list_view/lib/imagine-basic_list_view.rb
149
- - orbit_view/imagine-orbit_view-0.1.4.gem
150
149
  - orbit_view/app/assets/javascripts/jquery.orbit-1.2.3.min.js
151
150
  - orbit_view/app/assets/images/orbit/loading.gif
152
151
  - orbit_view/app/assets/images/orbit/pause-black.png
@@ -160,6 +159,7 @@ files:
160
159
  - orbit_view/app/views/imagine/images/orbit_view/_image.html.haml
161
160
  - orbit_view/app/views/imagine/albums/orbit_view/show.html.haml
162
161
  - orbit_view/lib/imagine-orbit_view.rb
162
+ - orbit_view/imagine-orbit_view-0.1.8.gem
163
163
  - orbit_view/imagine-orbit_view.gemspec
164
164
  - MIT-LICENSE
165
165
  - Rakefile