imagine 0.2.3 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. data/README.md +74 -33
  2. data/Rakefile +20 -25
  3. data/app/models/imagine/album.rb +16 -3
  4. data/app/models/imagine/image.rb +17 -4
  5. data/lib/imagine.rb +11 -11
  6. data/lib/imagine/config.rb +46 -0
  7. data/lib/imagine/engine.rb +2 -2
  8. data/lib/imagine/model_extensions/album.rb +20 -0
  9. data/lib/imagine/model_extensions/image.rb +21 -0
  10. data/lib/imagine/version.rb +1 -1
  11. data/lib/rails/generators/imagine/files/imagine.rb +16 -0
  12. data/lib/rails/generators/imagine/initializer_generator.rb +17 -0
  13. data/lib/rails/generators/imagine/migration_generator.rb +28 -0
  14. data/lib/rails/generators/imagine/templates/migration.rb +13 -0
  15. data/{basic_list_view → plugins/basic_list_view}/app/views/imagine/albums/basic_list_view/show.html.haml +0 -0
  16. data/{basic_list_view → plugins/basic_list_view}/app/views/imagine/images/basic_list_view/_image.html.haml +0 -0
  17. data/{basic_list_view → plugins/basic_list_view}/imagine-basic_list_view.gemspec +0 -0
  18. data/{basic_list_view → plugins/basic_list_view}/lib/imagine-basic_list_view.rb +0 -0
  19. data/{galleria_view → plugins/galleria_view}/app/assets/images/classic-loader.gif +0 -0
  20. data/{galleria_view → plugins/galleria_view}/app/assets/images/classic-map.png +0 -0
  21. data/{galleria_view → plugins/galleria_view}/app/assets/javascripts/galleria-1.2.5.js +0 -0
  22. data/{galleria_view → plugins/galleria_view}/app/assets/javascripts/galleria-1.2.5.min.js +0 -0
  23. data/{galleria_view → plugins/galleria_view}/app/assets/javascripts/galleria/themes/classic/galleria.classic.js +0 -0
  24. data/{galleria_view → plugins/galleria_view}/app/assets/javascripts/galleria/themes/classic/galleria.classic.min.js +0 -0
  25. data/{galleria_view → plugins/galleria_view}/app/assets/stylesheets/galleria/themes/classic/galleria.classic.css +0 -0
  26. data/{galleria_view → plugins/galleria_view}/app/views/imagine/albums/galleria_view/show.html.haml +0 -0
  27. data/{galleria_view → plugins/galleria_view}/app/views/imagine/images/orbit_view/_image.html.haml +0 -0
  28. data/{galleria_view → plugins/galleria_view}/imagine-galleria_view.gemspec +0 -0
  29. data/{galleria_view → plugins/galleria_view}/lib/imagine-galleria_view.rb +0 -0
  30. data/{orbit_view → plugins/orbit_view}/app/assets/images/orbit/bullets.jpg +0 -0
  31. data/{orbit_view → plugins/orbit_view}/app/assets/images/orbit/left-arrow.png +0 -0
  32. data/{orbit_view → plugins/orbit_view}/app/assets/images/orbit/loading.gif +0 -0
  33. data/{orbit_view → plugins/orbit_view}/app/assets/images/orbit/mask-black.png +0 -0
  34. data/{orbit_view → plugins/orbit_view}/app/assets/images/orbit/pause-black.png +0 -0
  35. data/{orbit_view → plugins/orbit_view}/app/assets/images/orbit/right-arrow.png +0 -0
  36. data/{orbit_view → plugins/orbit_view}/app/assets/images/orbit/rotator-black.png +0 -0
  37. data/{orbit_view → plugins/orbit_view}/app/assets/images/orbit/timer-black.png +0 -0
  38. data/{orbit_view → plugins/orbit_view}/app/assets/javascripts/jquery.orbit-1.2.3.min.js +0 -0
  39. data/{orbit_view → plugins/orbit_view}/app/assets/stylesheets/orbit-1.2.3.css +0 -0
  40. data/{orbit_view → plugins/orbit_view}/app/views/imagine/albums/orbit_view/show.html.haml +0 -0
  41. data/{orbit_view → plugins/orbit_view}/app/views/imagine/images/orbit_view/_image.html.haml +0 -0
  42. data/{orbit_view → plugins/orbit_view}/imagine-orbit_view.gemspec +0 -0
  43. data/{orbit_view → plugins/orbit_view}/lib/imagine-orbit_view.rb +0 -0
  44. metadata +87 -91
  45. data/config/initializers/dragonfly.rb +0 -1
  46. data/db/migrate/20110826162909_create_albums.rb +0 -7
  47. data/db/migrate/20110826222354_create_images.rb +0 -9
  48. data/orbit_view/imagine-orbit_view-0.1.9.gem +0 -0
data/README.md CHANGED
@@ -1,48 +1,65 @@
1
- # Imagine
1
+ Imagine
2
+ -------
2
3
  [![Travis CI Build Status](http://travis-ci.org/knewter/imagine.png)](http://travis-ci.org/knewter/imagine)
3
4
 
4
- A rails image gallery, that's mountable. Works on rails 3.1 at least :)
5
+ Imagine is a [Rails](http://rubyonrails.org) engine that provides drop-in image gallery support. It is extensible, and aims to be the de facto standard for Rails image galleries. Its a Rails image gallery, that's mountable. Works on rails 3.1 at least :) Should work on 3.x
6
+
5
7
  It's still in active development.
6
8
 
7
9
  * [Github project](http://www.github.com/knewter/imagine)
8
10
 
9
- ## USAGE
10
- To use Imagine in your app, simply add it to your Gemfile. Then, mount it by:
11
+ See the links on the right for more info.
11
12
 
12
- mount Imagine::Engine, :at => "/imagine"
13
+ Installation
14
+ ------------
15
+ Add this to the Gemfile of your Rails 3.1 project:
13
16
 
14
- Install the migrations with:
17
+ gem 'imagine'
15
18
 
16
- bundle exec rake imagine:install:migrations
19
+ Bundle that puppy up:
17
20
 
18
- And run the migrations with:
21
+ bundle install
19
22
 
20
- bundle exec rake db:migrate
23
+ Generate an initializer file with:
21
24
 
22
- Finally, visit /imagine/albums in your browser to get started.
25
+ rails generate imagine:initializer
23
26
 
24
- ## EXTERNAL DEPENDENCIES
25
- Imagine uses Dragonfly, which assumes you have ImageMagick installed on your server.
27
+ Edit it with a sensible editor to taste:
26
28
 
27
- ## TODO
28
- * Allow a user to choose the default display style at album level
29
- * Provide a standard means of wrapping with authentication
30
- * Provide a happy-path for attaching albums polymorphically to other objects
31
- * Make it look a little prettier. Provide a stylesheet that you can include if you so desire.
29
+ vi config/initializers/imagine.rb
30
+
31
+ Install the migrations if you use ActiveRecord with:
32
+
33
+ rails generate imagine:migration
34
+
35
+ And run the migrations with:
32
36
 
33
- ## Plugins
34
- New album display types are specified in plugins.
37
+ rake db:migrate
35
38
 
36
- Plugins are just gems. There is a plugin shipped with the core project called
37
- `imagine_basic_list`. It should serve as a good template for building your own.
38
- There is another plugin called `orbit_view` that displays the album using jquery
39
- orbit.
39
+ Imagine mounting Imagine, then do it!:
40
40
 
41
- They're just rails engines, that have a bit of configuration logic to let
42
- Imagine know that they should be incuded in the template style lists.
41
+ mount Imagine::Engine, :at => "/imagine"
42
+
43
+ Finally, visit /imagine/albums in your browser to get started.
43
44
 
45
+ Features
46
+ --------
47
+ * Mountable rails engine. Drops in to provide photo album support.
48
+ * Plugin system allows new album view types to be built as minimal rails engines of their own.
49
+ * Set default album style in your app.
50
+ * View any album in any style by passing the plugin in params.
51
+ * Supports ActiveRecord or Mongoid
44
52
 
45
- ## Testing
53
+ External Dependencies
54
+ ---------------------
55
+ Imagine uses Dragonfly, which assumes you have ImageMagick installed on your server.
56
+
57
+ Plugins
58
+ -------
59
+ See the documentation.
60
+
61
+ Testing
62
+ -------
46
63
  I've got this set up to use spork, so just do the following:
47
64
 
48
65
  In one terminal, do:
@@ -51,13 +68,37 @@ In one terminal, do:
51
68
 
52
69
  In another terminal, once that's done, you can:
53
70
 
54
- bundle exec rspec spec
71
+ bundle exec rake spec
72
+ RAILS_ENV=test_mongoid bundle exec rake spec
55
73
 
56
- ## License
57
- This project uses MIT-LICENSE.
58
-
59
- ## Contributors
60
- Josh Adams (josh@isotope11.com)
74
+ Todo
75
+ ----
76
+ * Allow a user to choose the default display style at album level
77
+ * Provide a standard means of wrapping with authentication
78
+ * Provide a happy-path for attaching albums polymorphically to other objects
79
+ * Make it look a little prettier. Provide a stylesheet that you can include if you so desire.
61
80
 
62
- Some code (plugin system, .travis.yml) lifted ungraciously from http://github.com/resolve/refinerycms. Those guys are awesome.
81
+ Contributing
82
+ ------------
83
+ If you want to contribute, you can do so a few different ways. You could fork us on [github](http://github.com/knewter/imagine), you could build a new album view plugin, or you could just [give us some feedback or suggestions](http://www.github.com/knewter/imagine/issues).
84
+
85
+ Issues/Suggestions/Questions
86
+ ------
87
+ Please use the [github issue tracker](http://github.com/knewter/imagine/issues).
88
+
89
+ Credits
90
+ -------
91
+ - [Isotope11](http://github.com/isotope11) (sponsors)
92
+ - [Josh Adams](http://github.com/knewter) (author)
93
+ - [Bram Swenson](http://github.com/bramswenson) (contributor and documentation author)
94
+ - [Mark Evans](http://github.com/markevans) (author of Dragonfly and these yard templates)
95
+ - [Resolve](http://github.com/resolve) Some code (plugin system, .travis.yml) lifted ungraciously from http://github.com/resolve/refinerycms. Those guys are awesome.
96
+ - Loads of helpful comments, issues, questions, suggestions and insults from others - you know who you are!
97
+
98
+ License
99
+ -------
100
+ This project uses MIT-LICENSE.
63
101
 
102
+ Copyright
103
+ ---------
104
+ Copyright (c) 2011 Josh Adams. See LICENSE for details.
data/Rakefile CHANGED
@@ -1,42 +1,37 @@
1
1
  #!/usr/bin/env rake
2
2
  begin
3
3
  require 'bundler/setup'
4
+ require 'bundler/gem_tasks'
4
5
  rescue LoadError
5
6
  puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
6
7
  end
7
- begin
8
- require 'rdoc/task'
9
- rescue LoadError
10
- require 'rdoc/rdoc'
11
- require 'rake/rdoctask'
12
- RDoc::Task = Rake::RDocTask
13
- end
14
-
15
- RDoc::Task.new(:rdoc) do |rdoc|
16
- rdoc.rdoc_dir = 'rdoc'
17
- rdoc.title = 'Imagine'
18
- rdoc.options << '--line-numbers' << '--inline-source'
19
- rdoc.rdoc_files.include('README.rdoc')
20
- rdoc.rdoc_files.include('lib/**/*.rb')
21
- end
22
8
 
23
9
  APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
24
10
  load 'rails/tasks/engine.rake'
25
-
26
- require 'rake/testtask'
27
-
28
11
  require 'rspec/core/rake_task'
29
-
30
- Rake::TestTask.new(:test) do |t|
31
- t.libs << 'lib'
32
- t.libs << 'test'
33
- t.pattern = 'test/**/*_test.rb'
34
- t.verbose = false
35
- end
12
+ require 'yard'
36
13
 
37
14
  desc 'run specs'
38
15
  RSpec::Core::RakeTask.new do |t|
39
16
  t.pattern = "./spec/**/*_spec.rb"
40
17
  end
41
18
 
19
+ desc 'run specs for travis'
20
+ task :travis do
21
+ unless ENV['RAILS_ENV'] == 'test_mongoid'
22
+ Rake::Task["app:db:create"].invoke
23
+ Rake::Task["app:db:schema:load"].invoke
24
+ end
25
+ Rake::Task["spec"].invoke
26
+ end
27
+
28
+ YARD::Rake::YardocTask.new do |t|
29
+ t.files = [ 'lib/**/*.rb', 'app/**/*.rb', 'plugins/**/*.rb' ]
30
+ t.options = []
31
+ end
32
+ YARD::Rake::YardocTask.new 'yard:changed' do |t|
33
+ t.files = `git status | grep '.rb' | grep modified | grep -v yard | cut -d' ' -f4`.split
34
+ t.options = []
35
+ end
36
+
42
37
  task :default => :spec
@@ -1,6 +1,19 @@
1
1
  module Imagine
2
- class Album < ActiveRecord::Base
3
- validates :name, :presence => true
4
- has_many :images
2
+ case Imagine.orm.to_sym
3
+ when :active_record
4
+ class Album < ActiveRecord::Base
5
+ include Imagine::ModelExtensions::Album
6
+ set_table_name :imagine_albums
7
+ end
8
+ when :mongoid
9
+ class Album
10
+ include Mongoid::Document
11
+ include Mongoid::Timestamps
12
+ include Imagine::ModelExtensions::Album
13
+ store_in :imagine_albums
14
+ field :name, :type => String
15
+ end
16
+ else
17
+ raise Imagine::OrmNotSupportedError.new("#{Imagine.orm}, though we do accept nice pull requests :)")
5
18
  end
6
19
  end
@@ -1,7 +1,20 @@
1
1
  module Imagine
2
- class Image < ActiveRecord::Base
3
- image_accessor :file
4
- belongs_to :album
5
- validates_presence_of :file
2
+ case Imagine.orm.to_sym
3
+ when :active_record
4
+ class Image < ActiveRecord::Base
5
+ include Imagine::ModelExtensions::Image
6
+ set_table_name :imagine_images
7
+ end
8
+ when :mongoid
9
+ class Image
10
+ include Mongoid::Document
11
+ include Mongoid::Timestamps
12
+ include Imagine::ModelExtensions::Image
13
+ store_in :imagine_images
14
+ field :file_name, :type => String
15
+ field :file_uid, :type => String
16
+ end
17
+ else
18
+ raise Imagine::OrmNotSupportedError.new("#{Imagine.orm}, though we do accept nice pull requests :)")
6
19
  end
7
20
  end
@@ -1,25 +1,25 @@
1
- # Prepare plugin system
2
- %w(engine plugins plugin).each do |lib|
1
+ %w( config engine plugins plugin model_extensions/album model_extensions/image ).each do |lib|
3
2
  require "imagine/#{lib}"
4
3
  end
5
4
 
6
5
  module Imagine
7
6
  class << self
8
- def engines
9
- @engines ||= []
7
+ def configure(options={}, &block)
8
+ @config ||= Imagine::Config.new(options, &block)
10
9
  end
11
10
 
12
- def default_plugin=(plugin)
13
- @default_plugin = plugin
11
+ def config
12
+ @config ||= Imagine::Config.new
14
13
  end
15
14
 
16
- def default_plugin
17
- @default_plugin
15
+ def method_missing(meth, *args)
16
+ super unless config.respond_to?(meth)
17
+ config.send(meth, *args)
18
18
  end
19
19
  end
20
+ class OrmNotSupportedError < StandardError; end
20
21
  end
21
22
 
22
- # Require the built in engines
23
- %w(basic_list_view orbit_view galleria_view).each do |engine|
24
- require "imagine-#{engine}"
23
+ Imagine.plugins.each do |plugin|
24
+ require "imagine-#{plugin}"
25
25
  end
@@ -0,0 +1,46 @@
1
+ module Imagine
2
+ class Config
3
+ attr_accessor :orm, :plugins, :default_plugin, :engines
4
+
5
+ def initialize(options={}, &block)
6
+ self.orm = options.delete(:orm)
7
+ self.plugins = options.delete(:plugins)
8
+ self.default_plugin = options.delete(:default_plugin)
9
+ self.engines = []
10
+ instance_eval &block if block_given?
11
+ end
12
+
13
+ def orm(orm=nil)
14
+ @orm = orm if orm
15
+ @orm ||= (defined?(Mongoid) && ! defined?(ActiveRecord::Base)) ? :mongoid : :active_record
16
+ end
17
+
18
+ def plugins(plugins=nil)
19
+ @plugins = plugins if plugins
20
+ @plugins ||= load_all_plugins
21
+ end
22
+
23
+ def default_plugin(default_plugin=nil)
24
+ @default_plugin = default_plugin if default_plugin
25
+ @default_plugin ||= load_default_plugin
26
+ end
27
+
28
+ private
29
+
30
+ def load_all_plugins
31
+ plugin_path = File.expand_path('../../../plugins/', __FILE__)
32
+ Dir.entries(plugin_path).sort.each.inject([]) do |plugins, dir|
33
+ unless [ nil, '.', '..' ].include?(dir.to_s)
34
+ plugins << dir.to_sym if File.directory? File.join(plugin_path, dir)
35
+ end
36
+ plugins
37
+ end
38
+ end
39
+
40
+ def load_default_plugin
41
+ index = self.plugins.index(:basic_list_view) || 0
42
+ self.plugins[index]
43
+ end
44
+
45
+ end
46
+ end
@@ -5,7 +5,7 @@ module Imagine
5
5
 
6
6
  module Warehouses
7
7
  warehouses = File.expand_path('../../../app/warehouses/imagine/', __FILE__)
8
- autoload :Album, warehouses + '/album'
9
- autoload :Image, warehouses + '/image'
8
+ autoload :Album, File.join(warehouses, 'album')
9
+ autoload :Image, File.join(warehouses, 'image')
10
10
  end
11
11
  end
@@ -0,0 +1,20 @@
1
+ module Imagine
2
+ module ModelExtensions
3
+ module Album
4
+ def self.included(model)
5
+ model.validates :name, :presence => true
6
+ model.has_many :images, :class_name => "Imagine::Image"
7
+ model.send :extend, ClassMethods
8
+ model.send :include, InstanceMethods
9
+ model.attr_accessible :name, :images
10
+ end
11
+
12
+ module ClassMethods
13
+ end
14
+
15
+ module InstanceMethods
16
+ end
17
+ end
18
+
19
+ end
20
+ end
@@ -0,0 +1,21 @@
1
+ module Imagine
2
+ module ModelExtensions
3
+ module Image
4
+ def self.included(model)
5
+ model.image_accessor :file
6
+ model.belongs_to :album, :class_name => "Imagine::Album"
7
+ model.validates :file, :presence => true
8
+ model.send :extend, ClassMethods
9
+ model.attr_accessible :album_id, :file, :file_url
10
+ model.send :include, InstanceMethods
11
+ end
12
+
13
+ module ClassMethods
14
+ end
15
+
16
+ module InstanceMethods
17
+ end
18
+ end
19
+
20
+ end
21
+ end
@@ -1,7 +1,7 @@
1
1
  module Imagine
2
2
  class << self
3
3
  def version
4
- %q{0.2.3}
4
+ %q{0.3.0}
5
5
  end
6
6
  end
7
7
  end
@@ -0,0 +1,16 @@
1
+ Imagine::Config.new do |config|
2
+ # Configure your choice of orm
3
+ # supports: :active_record or :mongoid
4
+ # defaults: :active_record
5
+ # config.orm = :mongoid
6
+
7
+ # Configure which of the built in plugins to load with an array
8
+ # supports: :basic_list_view, :orbit_view, :galleria_view
9
+ # defaults: [ :basic_list_view, :orbit_view, :galleria_view ]
10
+ # config.plugins = [ :basic_list_view, :orbit_view, :galleria_view ]
11
+
12
+ # Configure which plugin should be the default plugin
13
+ # supports: Any loaded pluing name
14
+ # defaults: :basic_list_view
15
+ # config.default_plugin = :basic_list_view
16
+ end
@@ -0,0 +1,17 @@
1
+ require 'rails/generators'
2
+
3
+ module Imagine
4
+
5
+ class InitializerGenerator < Rails::Generators::Base
6
+
7
+ def filename
8
+ File.join(File.dirname(__FILE__), 'files', 'imagine.rb')
9
+ end
10
+
11
+ def create_initializer_file
12
+ create_file 'config/initializers/imagine.rb', File.read(filename)
13
+ end
14
+
15
+ end
16
+
17
+ end
@@ -0,0 +1,28 @@
1
+ require 'rails/generators'
2
+ require 'rails/generators/migration'
3
+
4
+ module Imagine
5
+
6
+ class MigrationGenerator < Rails::Generators::Base
7
+ include Rails::Generators::Migration
8
+
9
+ def self.source_root
10
+ File.join(File.dirname(__FILE__), 'templates')
11
+ end
12
+
13
+ def self.next_migration_number(dirname) #:nodoc:
14
+ if ActiveRecord::Base.timestamped_migrations
15
+ Time.now.utc.strftime("%Y%m%d%H%M%S")
16
+ else
17
+ "%.3d" % (current_migration_number(dirname) + 1)
18
+ end
19
+ end
20
+
21
+ def create_migration_file
22
+ f = File.join(File.dirname(__FILE__), 'templates', 'migration.rb')
23
+ migration_template f, 'db/migrate/create_imagine_tables.rb'
24
+ end
25
+
26
+ end
27
+
28
+ end
@@ -0,0 +1,13 @@
1
+ class CreateImagineTables < ActiveRecord::Migration
2
+ def change
3
+ create_table :imagine_albums do |t|
4
+ t.string :name
5
+ end
6
+ create_table :imagine_images do |t|
7
+ t.string :file_name
8
+ t.string :file_uid
9
+ t.integer :album_id
10
+ end
11
+ end
12
+ end
13
+
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.3
4
+ version: 0.3.0
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-09-29 00:00:00.000000000Z
12
+ date: 2011-09-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: imagine-basic_list_view
16
- requirement: &18170840 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,15 @@ dependencies:
21
21
  version: 0.1.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *18170840
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 0.1.0
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: imagine-orbit_view
27
- requirement: &18170340 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
35
  - - ~>
@@ -32,95 +37,76 @@ dependencies:
32
37
  version: 0.1.0
33
38
  type: :runtime
34
39
  prerelease: false
35
- version_requirements: *18170340
36
- - !ruby/object:Gem::Dependency
37
- name: imagine-galleria_view
38
- requirement: &18169840 !ruby/object:Gem::Requirement
40
+ version_requirements: !ruby/object:Gem::Requirement
39
41
  none: false
40
42
  requirements:
41
43
  - - ~>
42
44
  - !ruby/object:Gem::Version
43
45
  version: 0.1.0
44
- type: :runtime
45
- prerelease: false
46
- version_requirements: *18169840
47
46
  - !ruby/object:Gem::Dependency
48
- name: haml-rails
49
- requirement: &18169460 !ruby/object:Gem::Requirement
47
+ name: imagine-galleria_view
48
+ requirement: !ruby/object:Gem::Requirement
50
49
  none: false
51
50
  requirements:
52
- - - ! '>='
51
+ - - ~>
53
52
  - !ruby/object:Gem::Version
54
- version: '0'
53
+ version: 0.1.0
55
54
  type: :runtime
56
55
  prerelease: false
57
- version_requirements: *18169460
58
- - !ruby/object:Gem::Dependency
59
- name: dragonfly
60
- requirement: &18168920 !ruby/object:Gem::Requirement
56
+ version_requirements: !ruby/object:Gem::Requirement
61
57
  none: false
62
58
  requirements:
63
59
  - - ~>
64
60
  - !ruby/object:Gem::Version
65
- version: 0.9.0
66
- type: :runtime
67
- prerelease: false
68
- version_requirements: *18168920
61
+ version: 0.1.0
69
62
  - !ruby/object:Gem::Dependency
70
- name: rack-cache
71
- requirement: &18168400 !ruby/object:Gem::Requirement
63
+ name: haml-rails
64
+ requirement: !ruby/object:Gem::Requirement
72
65
  none: false
73
66
  requirements:
74
67
  - - ! '>='
75
68
  - !ruby/object:Gem::Version
76
- version: 0.5.3
69
+ version: '0'
77
70
  type: :runtime
78
71
  prerelease: false
79
- version_requirements: *18168400
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
80
78
  - !ruby/object:Gem::Dependency
81
- name: rspec-rails
82
- requirement: &18167900 !ruby/object:Gem::Requirement
79
+ name: dragonfly
80
+ requirement: !ruby/object:Gem::Requirement
83
81
  none: false
84
82
  requirements:
85
83
  - - ~>
86
84
  - !ruby/object:Gem::Version
87
- version: '2.5'
88
- type: :development
85
+ version: 0.9.0
86
+ type: :runtime
89
87
  prerelease: false
90
- version_requirements: *18167900
91
- - !ruby/object:Gem::Dependency
92
- name: capybara
93
- requirement: &18167480 !ruby/object:Gem::Requirement
88
+ version_requirements: !ruby/object:Gem::Requirement
94
89
  none: false
95
90
  requirements:
96
- - - ! '>='
91
+ - - ~>
97
92
  - !ruby/object:Gem::Version
98
- version: '0'
99
- type: :development
100
- prerelease: false
101
- version_requirements: *18167480
93
+ version: 0.9.0
102
94
  - !ruby/object:Gem::Dependency
103
- name: factory_girl
104
- requirement: &18167020 !ruby/object:Gem::Requirement
95
+ name: rack-cache
96
+ requirement: !ruby/object:Gem::Requirement
105
97
  none: false
106
98
  requirements:
107
99
  - - ! '>='
108
100
  - !ruby/object:Gem::Version
109
- version: '0'
110
- type: :development
101
+ version: 0.5.3
102
+ type: :runtime
111
103
  prerelease: false
112
- version_requirements: *18167020
113
- - !ruby/object:Gem::Dependency
114
- name: spork
115
- requirement: &18165100 !ruby/object:Gem::Requirement
104
+ version_requirements: !ruby/object:Gem::Requirement
116
105
  none: false
117
106
  requirements:
118
107
  - - ! '>='
119
108
  - !ruby/object:Gem::Version
120
- version: '0'
121
- type: :development
122
- prerelease: false
123
- version_requirements: *18165100
109
+ version: 0.5.3
124
110
  description: Imagine can be dropped into an app to provide albums and images in your
125
111
  app. It supports extensions to specify new view styles.
126
112
  email: josh@isotope11.com
@@ -128,61 +114,64 @@ executables: []
128
114
  extensions: []
129
115
  extra_rdoc_files: []
130
116
  files:
117
+ - lib/imagine.rb
118
+ - lib/rails/generators/imagine/migration_generator.rb
119
+ - lib/rails/generators/imagine/templates/migration.rb
120
+ - lib/rails/generators/imagine/files/imagine.rb
121
+ - lib/rails/generators/imagine/initializer_generator.rb
131
122
  - lib/tasks/imagine_tasks.rake
132
- - lib/imagine/plugins.rb
133
123
  - lib/imagine/engine.rb
124
+ - lib/imagine/plugins.rb
134
125
  - lib/imagine/version.rb
126
+ - lib/imagine/model_extensions/album.rb
127
+ - lib/imagine/model_extensions/image.rb
128
+ - lib/imagine/config.rb
135
129
  - lib/imagine/plugin.rb
136
- - lib/imagine.rb
137
130
  - app/assets/javascripts/imagine2/application.js
138
131
  - app/assets/stylesheets/imagine2/application.css
139
132
  - app/models/imagine/album.rb
140
133
  - app/models/imagine/image.rb
134
+ - app/helpers/imagine/application_helper.rb
141
135
  - app/controllers/imagine/application_controller.rb
142
136
  - app/controllers/imagine/albums_controller.rb
143
137
  - app/controllers/imagine/images_controller.rb
144
138
  - app/views/imagine/images/new.html.haml
145
139
  - app/views/imagine/images/show.html.haml
146
140
  - app/views/imagine/albums/new.html.haml
147
- - app/views/imagine/albums/index.html.haml
148
141
  - app/views/imagine/albums/show.html.haml
142
+ - app/views/imagine/albums/index.html.haml
149
143
  - app/warehouses/imagine/album.rb
150
144
  - app/warehouses/imagine/image.rb
151
- - app/helpers/imagine/application_helper.rb
152
- - config/initializers/dragonfly.rb
153
145
  - config/routes.rb
154
- - db/migrate/20110826222354_create_images.rb
155
- - db/migrate/20110826162909_create_albums.rb
156
- - basic_list_view/imagine-basic_list_view.gemspec
157
- - basic_list_view/app/views/imagine/images/basic_list_view/_image.html.haml
158
- - basic_list_view/app/views/imagine/albums/basic_list_view/show.html.haml
159
- - basic_list_view/lib/imagine-basic_list_view.rb
160
- - orbit_view/imagine-orbit_view-0.1.9.gem
161
- - orbit_view/app/assets/javascripts/jquery.orbit-1.2.3.min.js
162
- - orbit_view/app/assets/images/orbit/loading.gif
163
- - orbit_view/app/assets/images/orbit/pause-black.png
164
- - orbit_view/app/assets/images/orbit/rotator-black.png
165
- - orbit_view/app/assets/images/orbit/timer-black.png
166
- - orbit_view/app/assets/images/orbit/left-arrow.png
167
- - orbit_view/app/assets/images/orbit/mask-black.png
168
- - orbit_view/app/assets/images/orbit/bullets.jpg
169
- - orbit_view/app/assets/images/orbit/right-arrow.png
170
- - orbit_view/app/assets/stylesheets/orbit-1.2.3.css
171
- - orbit_view/app/views/imagine/images/orbit_view/_image.html.haml
172
- - orbit_view/app/views/imagine/albums/orbit_view/show.html.haml
173
- - orbit_view/lib/imagine-orbit_view.rb
174
- - orbit_view/imagine-orbit_view.gemspec
175
- - galleria_view/imagine-galleria_view.gemspec
176
- - galleria_view/app/assets/javascripts/galleria-1.2.5.min.js
177
- - galleria_view/app/assets/javascripts/galleria/themes/classic/galleria.classic.js
178
- - galleria_view/app/assets/javascripts/galleria/themes/classic/galleria.classic.min.js
179
- - galleria_view/app/assets/javascripts/galleria-1.2.5.js
180
- - galleria_view/app/assets/images/classic-map.png
181
- - galleria_view/app/assets/images/classic-loader.gif
182
- - galleria_view/app/assets/stylesheets/galleria/themes/classic/galleria.classic.css
183
- - galleria_view/app/views/imagine/images/orbit_view/_image.html.haml
184
- - galleria_view/app/views/imagine/albums/galleria_view/show.html.haml
185
- - galleria_view/lib/imagine-galleria_view.rb
146
+ - plugins/basic_list_view/imagine-basic_list_view.gemspec
147
+ - plugins/basic_list_view/app/views/imagine/images/basic_list_view/_image.html.haml
148
+ - plugins/basic_list_view/app/views/imagine/albums/basic_list_view/show.html.haml
149
+ - plugins/basic_list_view/lib/imagine-basic_list_view.rb
150
+ - plugins/orbit_view/imagine-orbit_view.gemspec
151
+ - plugins/orbit_view/app/assets/images/orbit/timer-black.png
152
+ - plugins/orbit_view/app/assets/images/orbit/bullets.jpg
153
+ - plugins/orbit_view/app/assets/images/orbit/left-arrow.png
154
+ - plugins/orbit_view/app/assets/images/orbit/loading.gif
155
+ - plugins/orbit_view/app/assets/images/orbit/right-arrow.png
156
+ - plugins/orbit_view/app/assets/images/orbit/rotator-black.png
157
+ - plugins/orbit_view/app/assets/images/orbit/mask-black.png
158
+ - plugins/orbit_view/app/assets/images/orbit/pause-black.png
159
+ - plugins/orbit_view/app/assets/javascripts/jquery.orbit-1.2.3.min.js
160
+ - plugins/orbit_view/app/assets/stylesheets/orbit-1.2.3.css
161
+ - plugins/orbit_view/app/views/imagine/images/orbit_view/_image.html.haml
162
+ - plugins/orbit_view/app/views/imagine/albums/orbit_view/show.html.haml
163
+ - plugins/orbit_view/lib/imagine-orbit_view.rb
164
+ - plugins/galleria_view/imagine-galleria_view.gemspec
165
+ - plugins/galleria_view/app/assets/images/classic-map.png
166
+ - plugins/galleria_view/app/assets/images/classic-loader.gif
167
+ - plugins/galleria_view/app/assets/javascripts/galleria/themes/classic/galleria.classic.min.js
168
+ - plugins/galleria_view/app/assets/javascripts/galleria/themes/classic/galleria.classic.js
169
+ - plugins/galleria_view/app/assets/javascripts/galleria-1.2.5.js
170
+ - plugins/galleria_view/app/assets/javascripts/galleria-1.2.5.min.js
171
+ - plugins/galleria_view/app/assets/stylesheets/galleria/themes/classic/galleria.classic.css
172
+ - plugins/galleria_view/app/views/imagine/images/orbit_view/_image.html.haml
173
+ - plugins/galleria_view/app/views/imagine/albums/galleria_view/show.html.haml
174
+ - plugins/galleria_view/lib/imagine-galleria_view.rb
186
175
  - MIT-LICENSE
187
176
  - Rakefile
188
177
  - README.md
@@ -199,16 +188,23 @@ required_ruby_version: !ruby/object:Gem::Requirement
199
188
  - - ! '>='
200
189
  - !ruby/object:Gem::Version
201
190
  version: '0'
191
+ segments:
192
+ - 0
193
+ hash: 3452143421551285382
202
194
  required_rubygems_version: !ruby/object:Gem::Requirement
203
195
  none: false
204
196
  requirements:
205
197
  - - ! '>='
206
198
  - !ruby/object:Gem::Version
207
199
  version: '0'
200
+ segments:
201
+ - 0
202
+ hash: 3452143421551285382
208
203
  requirements: []
209
204
  rubyforge_project:
210
- rubygems_version: 1.8.6
205
+ rubygems_version: 1.8.24
211
206
  signing_key:
212
207
  specification_version: 3
213
208
  summary: Imagine is a mountable image gallery engine for rails 3.1 and later.
214
209
  test_files: []
210
+ has_rdoc:
@@ -1 +0,0 @@
1
- require 'dragonfly/rails/images'
@@ -1,7 +0,0 @@
1
- class CreateAlbums < ActiveRecord::Migration
2
- def change
3
- create_table :imagine_albums do |t|
4
- t.string :name
5
- end
6
- end
7
- end
@@ -1,9 +0,0 @@
1
- class CreateImages < ActiveRecord::Migration
2
- def change
3
- create_table :imagine_images do |t|
4
- t.string :file_name
5
- t.string :file_uid
6
- t.integer :album_id
7
- end
8
- end
9
- end