media_gallery 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +107 -0
  4. data/Rakefile +36 -0
  5. data/app/controllers/media_gallery/application_controller.rb +28 -0
  6. data/app/controllers/media_gallery/galleries_controller.rb +49 -0
  7. data/app/controllers/media_gallery/image_infos_controller.rb +49 -0
  8. data/app/jobs/media_gallery/application_job.rb +4 -0
  9. data/app/mailers/media_gallery/application_mailer.rb +6 -0
  10. data/app/models/media_gallery/application_record.rb +5 -0
  11. data/app/models/media_gallery/gallery.rb +10 -0
  12. data/app/models/media_gallery/image_info.rb +11 -0
  13. data/app/uploaders/media_gallery/image_uploader.rb +71 -0
  14. data/app/views/media_gallery/galleries/_full_gallery.json.jbuilder +5 -0
  15. data/app/views/media_gallery/galleries/create.json.jbuilder +1 -0
  16. data/app/views/media_gallery/galleries/index.json.jbuilder +5 -0
  17. data/app/views/media_gallery/galleries/show.json.jbuilder +1 -0
  18. data/app/views/media_gallery/galleries/update.json.jbuilder +1 -0
  19. data/app/views/media_gallery/image_infos/_full_image_info.json.jbuilder +7 -0
  20. data/app/views/media_gallery/image_infos/_image_urls.json.jbuilder +6 -0
  21. data/app/views/media_gallery/image_infos/create.json.jbuilder +1 -0
  22. data/app/views/media_gallery/image_infos/index.json.jbuilder +5 -0
  23. data/app/views/media_gallery/image_infos/show.json.jbuilder +1 -0
  24. data/app/views/media_gallery/image_infos/update.json.jbuilder +1 -0
  25. data/config/routes.rb +5 -0
  26. data/db/migrate/20180221141600_create_media_gallery_galleries.rb +10 -0
  27. data/db/migrate/20180221155739_create_media_gallery_image_infos.rb +11 -0
  28. data/lib/media_gallery/engine.rb +8 -0
  29. data/lib/media_gallery/image_processing.rb +20 -0
  30. data/lib/media_gallery/version.rb +3 -0
  31. data/lib/media_gallery.rb +6 -0
  32. data/lib/tasks/media_gallery_tasks.rake +4 -0
  33. metadata +188 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: e55a087df0efcf0155fd1e4739413002f234b5ca
4
+ data.tar.gz: 72114fd4cdf5c04c1067825088c2b17c285d3356
5
+ SHA512:
6
+ metadata.gz: ab487ca5d535874a64b366fc4f105ee64289d11b4c33fff6a48e703b1f55b43db196a14d86c0e28dbb243dadd97c7cea4ca2262de40002947153d37e4d73b004
7
+ data.tar.gz: 42bddb31cdf59a6a1e6ad747cee3525bf365fa6831cf158610970a06264bad41520dabcbc82d55d1bf85884974da36539fdf24feb1d02953fe3d5a609d895bf4
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2018 Martin Beauvais
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,107 @@
1
+ # MediaGallery
2
+ This gem provides a Rails engine allowing for the storage of images on Amazon S3. Images are organized in galleries. All interactions are done through a simple REST API.
3
+
4
+ ## Usage
5
+ This section goes over the internals of the engine (i.e. how to integrate it) and the REST API itself (io.e. how to interact with the gallery). It also describes how to run the unit and integration tests (if you so desire).
6
+
7
+ ### Internals
8
+ As this is a Rails engine, you need to first mount the engine. This can be done by modifying your config/routes.rb file. You should add a mount point, something like:
9
+
10
+ ```ruby
11
+ mount MediaGallery::Engine => "/media_gallery"
12
+ ```
13
+
14
+ Next, you need to deal with access control. media_gallery uses cancancan for access_control. It does not make any assumptions as to what sign in strategy you use. It should work fine with Devise if that's what you use. There are two methods in the MediaGallerythat need to be overridden:
15
+
16
+ - current_user: This method returns the current user
17
+ - create_ability: Returns an Ability class for use in the media_gallery.
18
+
19
+ The recommended approach for this is to create an initializer. You can check out the one in spec/dummy app. It defines something like:
20
+
21
+ ```ruby
22
+ MediaGallery::ApplicationController.class_eval do
23
+
24
+ def current_user
25
+ User.find_by_token(request.headers['token'])
26
+ end
27
+
28
+ def create_ability(user)
29
+ Ability.new(user)
30
+ end
31
+ end
32
+ ```
33
+ ### REST API
34
+ The media_gallery uses a straightforward REST mechanism. Here are a few samples:
35
+
36
+ #### Creating gallery
37
+
38
+ ```json
39
+ Request -> POST .../media_gallery/galleries
40
+ {
41
+ "gallery": {
42
+ "description": "an updated text for description."
43
+ }
44
+ }
45
+
46
+ Response ->
47
+ {
48
+ "id": 1,
49
+ "name": "jdoe_gallery",
50
+ "description": "stores images for joe doe",
51
+ "nbImages": 0,
52
+ "createdAt": "2018-03-02T14:13:19.805Z"
53
+ }
54
+ ```
55
+
56
+ #### Updating a gallery
57
+
58
+ ```json
59
+ Request -> PUT .../media_gallery/galleries/1
60
+ {
61
+ "name": "jdoe_gallery",
62
+ "description": "stores images for joe doe"
63
+ }
64
+
65
+ Response ->
66
+ {
67
+ "id": 1,
68
+ "ownable_id": 1,
69
+ "ownable_type": "User",
70
+ "description": "an updated text for description.",
71
+ "name": "jdoe_gallery",
72
+ "created_at": "2018-03-01T14:20:48.117Z",
73
+ "updated_at": "2018-03-01T14:21:38.612Z"
74
+ }
75
+ ```
76
+
77
+ #### Deleting a gallery
78
+
79
+ ```json
80
+ Request -> DELETE .../media_gallery/galleries/1
81
+ Response -> (Standard HTTP code, basically 200 or something equivalent)
82
+ ```
83
+
84
+
85
+
86
+ ## Installation
87
+ Add this line to your application's Gemfile:
88
+
89
+ ```ruby
90
+ gem 'media_gallery'
91
+ ```
92
+
93
+ And then execute:
94
+ ```bash
95
+ $ bundle
96
+ ```
97
+
98
+ Or install it yourself as:
99
+ ```bash
100
+ $ gem install media_gallery
101
+ ```
102
+
103
+ ## Contributing
104
+ Contribution directions go here.
105
+
106
+ ## License
107
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,36 @@
1
+ begin
2
+ require 'bundler/setup'
3
+ rescue LoadError
4
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5
+ end
6
+
7
+ require 'rdoc/task'
8
+
9
+ RDoc::Task.new(:rdoc) do |rdoc|
10
+ rdoc.rdoc_dir = 'rdoc'
11
+ rdoc.title = 'MediaGallery'
12
+ rdoc.options << '--line-numbers'
13
+ rdoc.rdoc_files.include('README.md')
14
+ rdoc.rdoc_files.include('lib/**/*.rb')
15
+ end
16
+
17
+ APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
18
+ load 'rails/tasks/engine.rake'
19
+
20
+
21
+ load 'rails/tasks/statistics.rake'
22
+
23
+
24
+
25
+ require 'bundler/gem_tasks'
26
+
27
+ require 'rake/testtask'
28
+
29
+ Rake::TestTask.new(:test) do |t|
30
+ t.libs << 'test'
31
+ t.pattern = 'test/**/*_test.rb'
32
+ t.verbose = false
33
+ end
34
+
35
+
36
+ task default: :test
@@ -0,0 +1,28 @@
1
+ module MediaGallery
2
+ class ApplicationController < ActionController::API
3
+
4
+ include CanCan::ControllerAdditions
5
+
6
+ rescue_from CanCan::AccessDenied do |exception|
7
+ render json: { message: "Access Denied" }, status: 403
8
+ end
9
+
10
+ rescue_from ActiveRecord::RecordInvalid do |exception|
11
+ render json: { message: exception.to_s }, status: 500
12
+ end
13
+
14
+ def current_user
15
+ raise 'You need to override the current_user.'
16
+ end
17
+
18
+ def create_ability(user)
19
+ raise 'You need to override the create_ability method.'
20
+ end
21
+
22
+ def current_ability
23
+ @current_ability ||= create_ability(current_user)
24
+ end
25
+
26
+ end
27
+
28
+ end
@@ -0,0 +1,49 @@
1
+ require_dependency "media_gallery/application_controller"
2
+
3
+ module MediaGallery
4
+ class GalleriesController < ApplicationController
5
+
6
+ load_and_authorize_resource except: [ :index, :create ]
7
+
8
+ # GET /galleries
9
+ def index
10
+ @galleries = Gallery.where(ownable: current_user).order(name: :asc)
11
+ authorize! :read, @galleries[0] if @galleries.length > 0
12
+ end
13
+
14
+ # POST /galleries
15
+ def create
16
+ @gallery = Gallery.new(
17
+ name: gallery_params[:name],
18
+ ownable: current_user,
19
+ description: gallery_params[:description]
20
+ )
21
+ authorize! :create, @gallery
22
+ @gallery.save!
23
+ end
24
+
25
+ # GET /galleries/1
26
+ def show
27
+ authorize! :read, @gallery
28
+ end
29
+
30
+ # PATCH/PUT /galleries/1
31
+ def update
32
+ authorize! :update, @gallery
33
+ @gallery.update_attributes!(gallery_params)
34
+ end
35
+
36
+ # DELETE /galleries/1
37
+ def destroy
38
+ @gallery.destroy
39
+ end
40
+
41
+ private
42
+
43
+ # Only allow a trusted parameter "white list" through.
44
+ def gallery_params
45
+ params.require(:gallery).permit(:name, :description)
46
+ end
47
+
48
+ end
49
+ end
@@ -0,0 +1,49 @@
1
+ require_dependency "media_gallery/application_controller"
2
+ require "media_gallery/image_processing"
3
+
4
+ module MediaGallery
5
+ class ImageInfosController < ApplicationController
6
+
7
+ load_and_authorize_resource :gallery
8
+ load_and_authorize_resource :image_info, through: :gallery, except: [ :index, :create ]
9
+
10
+ # GET /galleries/1/image_infos
11
+ def index
12
+ end
13
+
14
+ # GET /galleries/1/image_infos/1
15
+ def show
16
+ end
17
+
18
+ # POST /galleries/1/image_infos
19
+ def create
20
+ image_file = MediaGallery::ImageProcessing.create_photo_file(image_info_params['image'], {})
21
+ @image_info = ImageInfo.new(
22
+ label: image_info_params[:label],
23
+ description: image_info_params[:description],
24
+ gallery: @gallery,
25
+ image: image_file
26
+ )
27
+ authorize! :create, @image_info
28
+ @image_info.save!
29
+ end
30
+
31
+ # PATCH/PUT /galleries/1/image_infos/1
32
+ def update
33
+ authorize! :update, @image_info
34
+ @image_info.update_attributes!(image_info_params)
35
+ end
36
+
37
+ # DELETE /galleries/1/image_infos/1
38
+ def destroy
39
+ @image_info.destroy
40
+ end
41
+
42
+ private
43
+
44
+ # Only allow a trusted parameter "white list" through.
45
+ def image_info_params
46
+ params.require(:image_info).permit(:label, :description, :image)
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,4 @@
1
+ module MediaGallery
2
+ class ApplicationJob < ActiveJob::Base
3
+ end
4
+ end
@@ -0,0 +1,6 @@
1
+ module MediaGallery
2
+ class ApplicationMailer < ActionMailer::Base
3
+ default from: 'from@example.com'
4
+ layout 'mailer'
5
+ end
6
+ end
@@ -0,0 +1,5 @@
1
+ module MediaGallery
2
+ class ApplicationRecord < ActiveRecord::Base
3
+ self.abstract_class = true
4
+ end
5
+ end
@@ -0,0 +1,10 @@
1
+ module MediaGallery
2
+ class Gallery < ApplicationRecord
3
+ belongs_to :ownable, polymorphic: true
4
+ has_many :image_infos, dependent: :destroy
5
+
6
+ validates_presence_of :name
7
+ validates :description, length: { maximum: 1024 }
8
+ validates_uniqueness_of :name, scope: :ownable, message: 'Gallery with this name already exists.'
9
+ end
10
+ end
@@ -0,0 +1,11 @@
1
+ module MediaGallery
2
+ class ImageInfo < ApplicationRecord
3
+ belongs_to :gallery
4
+
5
+ mount_uploader :image, ImageUploader
6
+
7
+ validates :label, length: { maximum: 256 }, presence: true
8
+ validates :description, length: { maximum: 1024 }
9
+
10
+ end
11
+ end
@@ -0,0 +1,71 @@
1
+ # encoding: utf-8
2
+ require 'carrierwave'
3
+ require 'fog'
4
+ require 'carrierwave/orm/activerecord'
5
+
6
+ module MediaGallery
7
+ class ImageUploader < CarrierWave::Uploader::Base
8
+ include CarrierWave::MiniMagick
9
+
10
+ storage :fog
11
+
12
+ # Override the directory where uploaded files will be stored.
13
+ # This is a sensible default for uploaders that are meant to be mounted:
14
+ def store_dir
15
+ "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
16
+ end
17
+
18
+ version :thumb do
19
+ process :resize_to_fill => [300, 180]
20
+ end
21
+
22
+ version :thumb_high do
23
+ process :resize_to_fill => [180, 300]
24
+ end
25
+
26
+ version :banner_square do
27
+ process :resize_to_fill => [500, 500]
28
+ end
29
+
30
+ version :banner_main do
31
+ process :resize_to_fill => [850, 425]
32
+ end
33
+
34
+ version :thumb_tile do
35
+ process :resize_to_fill => [80, 80]
36
+ end
37
+
38
+ # Provide a default URL as a default if there hasn't been a file uploaded:
39
+ # def default_url(*args)
40
+ # # For Rails 3.1+ asset pipeline compatibility:
41
+ # # ActionController::Base.helpers.asset_path("fallback/" + [version_name, "default.png"].compact.join('_'))
42
+ #
43
+ # "/images/fallback/" + [version_name, "default.png"].compact.join('_')
44
+ # end
45
+
46
+ # Process files as they are uploaded:
47
+ # process scale: [200, 300]
48
+ #
49
+ # def scale(width, height)
50
+ # # do something
51
+ # end
52
+
53
+ # Create different versions of your uploaded files:
54
+ # version :thumb do
55
+ # process resize_to_fit: [50, 50]
56
+ # end
57
+
58
+ # Add a white list of extensions which are allowed to be uploaded.
59
+ # For images you might use something like this:
60
+ # def extension_whitelist
61
+ # %w(jpg jpeg gif png)
62
+ # end
63
+
64
+ # Override the filename of the uploaded files:
65
+ # Avoid using model.id or version_name here, see uploader/store.rb for details.
66
+ # def filename
67
+ # "something.jpg" if original_filename
68
+ # end
69
+ end
70
+
71
+ end
@@ -0,0 +1,5 @@
1
+ json.id gallery.id
2
+ json.name gallery.name
3
+ json.description gallery.description
4
+ json.nbImages gallery.image_infos.size
5
+ json.createdAt gallery.created_at
@@ -0,0 +1 @@
1
+ json.partial! 'full_gallery', gallery: @gallery
@@ -0,0 +1,5 @@
1
+ json.array! @galleries do |gallery|
2
+ json.id gallery.id
3
+ json.name gallery.name
4
+ json.nbImages gallery.image_infos.size
5
+ end
@@ -0,0 +1 @@
1
+ json.partial! 'full_gallery', gallery: @gallery
@@ -0,0 +1 @@
1
+ json.partial! 'full_gallery', gallery: @gallery
@@ -0,0 +1,7 @@
1
+ json.id image_info.id
2
+ json.label image_info.label
3
+ json.galleryId image_info.gallery.id
4
+ json.galleryName image_info.gallery.name
5
+ json.description image_info.description
6
+ json.createdAt image_info.created_at
7
+ json.partial! 'image_urls', image_info: image_info
@@ -0,0 +1,6 @@
1
+ json.urls do
2
+ image = image_info.image
3
+ image.versions.keys.each do |key|
4
+ json.set! "#{key}", image.versions[key].url
5
+ end
6
+ end
@@ -0,0 +1 @@
1
+ json.partial! 'full_image_info', image_info: @image_info
@@ -0,0 +1,5 @@
1
+ json.array! @gallery.image_infos.order(label: :asc) do |image_info|
2
+ json.id image_info.id
3
+ json.label image_info.label
4
+ json.partial! 'image_urls', image_info: image_info
5
+ end
@@ -0,0 +1 @@
1
+ json.partial! 'full_image_info', image_info: @image_info
@@ -0,0 +1 @@
1
+ json.partial! 'full_image_info', image_info: @image_info
data/config/routes.rb ADDED
@@ -0,0 +1,5 @@
1
+ MediaGallery::Engine.routes.draw do
2
+ resources :galleries do
3
+ resources :image_infos
4
+ end
5
+ end
@@ -0,0 +1,10 @@
1
+ class CreateMediaGalleryGalleries < ActiveRecord::Migration[5.1]
2
+ def change
3
+ create_table :media_gallery_galleries do |t|
4
+ t.string :name, null: false
5
+ t.string :description, limit: 1024
6
+ t.references :ownable, polymorphic: true, index: true
7
+ t.timestamps
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,11 @@
1
+ class CreateMediaGalleryImageInfos < ActiveRecord::Migration[5.1]
2
+ def change
3
+ create_table :media_gallery_image_infos do |t|
4
+ t.string :label, null: false
5
+ t.string :description, limit: 1024
6
+ t.string :image
7
+ t.references :gallery, index: true
8
+ t.timestamps
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,8 @@
1
+ require 'cancancan'
2
+
3
+ module MediaGallery
4
+ class Engine < ::Rails::Engine
5
+ isolate_namespace MediaGallery
6
+ config.generators.api_only = true
7
+ end
8
+ end
@@ -0,0 +1,20 @@
1
+ module MediaGallery
2
+
3
+ module ImageProcessing
4
+
5
+ # Helper method that processes a b64 encoded image and returns
6
+ # the equivalent binary object.
7
+ def self.create_photo_file data, photo_params
8
+ imageContent = Base64.decode64(data)
9
+ tempfile = Tempfile.new("photoupload")
10
+ tempfile.binmode
11
+ tempfile << imageContent
12
+ tempfile.rewind
13
+ photo_params = photo_params.merge(:tempfile => tempfile)
14
+ photo = ActionDispatch::Http::UploadedFile.new(photo_params)
15
+ photo.original_filename = "photofile"
16
+ photo
17
+ end
18
+
19
+ end
20
+ end
@@ -0,0 +1,3 @@
1
+ module MediaGallery
2
+ VERSION = '1.0.0'
3
+ end
@@ -0,0 +1,6 @@
1
+ require "media_gallery/engine"
2
+ require "carrierwave"
3
+
4
+ module MediaGallery
5
+
6
+ end
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :media_gallery do
3
+ # # Task goes here
4
+ # end
metadata ADDED
@@ -0,0 +1,188 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: media_gallery
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Martin Beauvais
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2018-03-02 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 5.1.3
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 5.1.3
27
+ - !ruby/object:Gem::Dependency
28
+ name: carrierwave
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: fog
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: mini_magick
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: cancancan
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rspec-rails
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: factory_bot_rails
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: pg
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ description: Offers a REST interface allowing the management of S3 images on a gallery
126
+ basis.
127
+ email:
128
+ - mbeauv@gmail.com
129
+ executables: []
130
+ extensions: []
131
+ extra_rdoc_files: []
132
+ files:
133
+ - MIT-LICENSE
134
+ - README.md
135
+ - Rakefile
136
+ - app/controllers/media_gallery/application_controller.rb
137
+ - app/controllers/media_gallery/galleries_controller.rb
138
+ - app/controllers/media_gallery/image_infos_controller.rb
139
+ - app/jobs/media_gallery/application_job.rb
140
+ - app/mailers/media_gallery/application_mailer.rb
141
+ - app/models/media_gallery/application_record.rb
142
+ - app/models/media_gallery/gallery.rb
143
+ - app/models/media_gallery/image_info.rb
144
+ - app/uploaders/media_gallery/image_uploader.rb
145
+ - app/views/media_gallery/galleries/_full_gallery.json.jbuilder
146
+ - app/views/media_gallery/galleries/create.json.jbuilder
147
+ - app/views/media_gallery/galleries/index.json.jbuilder
148
+ - app/views/media_gallery/galleries/show.json.jbuilder
149
+ - app/views/media_gallery/galleries/update.json.jbuilder
150
+ - app/views/media_gallery/image_infos/_full_image_info.json.jbuilder
151
+ - app/views/media_gallery/image_infos/_image_urls.json.jbuilder
152
+ - app/views/media_gallery/image_infos/create.json.jbuilder
153
+ - app/views/media_gallery/image_infos/index.json.jbuilder
154
+ - app/views/media_gallery/image_infos/show.json.jbuilder
155
+ - app/views/media_gallery/image_infos/update.json.jbuilder
156
+ - config/routes.rb
157
+ - db/migrate/20180221141600_create_media_gallery_galleries.rb
158
+ - db/migrate/20180221155739_create_media_gallery_image_infos.rb
159
+ - lib/media_gallery.rb
160
+ - lib/media_gallery/engine.rb
161
+ - lib/media_gallery/image_processing.rb
162
+ - lib/media_gallery/version.rb
163
+ - lib/tasks/media_gallery_tasks.rake
164
+ homepage: https://github.com/mbeauv/media_gallery
165
+ licenses:
166
+ - MIT
167
+ metadata: {}
168
+ post_install_message:
169
+ rdoc_options: []
170
+ require_paths:
171
+ - lib
172
+ required_ruby_version: !ruby/object:Gem::Requirement
173
+ requirements:
174
+ - - ">="
175
+ - !ruby/object:Gem::Version
176
+ version: '0'
177
+ required_rubygems_version: !ruby/object:Gem::Requirement
178
+ requirements:
179
+ - - ">="
180
+ - !ruby/object:Gem::Version
181
+ version: '0'
182
+ requirements: []
183
+ rubyforge_project:
184
+ rubygems_version: 2.6.12
185
+ signing_key:
186
+ specification_version: 4
187
+ summary: Allows for the storage of images on S3 on a gallery basis.
188
+ test_files: []