rails_admin_featured_content 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +15 -0
  3. data/.rspec +2 -0
  4. data/.ruby-gemset +1 -0
  5. data/.ruby-version +1 -0
  6. data/.travis.yml +5 -0
  7. data/CODE_OF_CONDUCT.md +49 -0
  8. data/Gemfile +13 -0
  9. data/LICENSE.txt +21 -0
  10. data/README.md +81 -0
  11. data/Rakefile +21 -0
  12. data/app/assets/images/fc-image-default.jpg +0 -0
  13. data/app/assets/images/fc-loading.svg +1 -0
  14. data/app/assets/images/fc-snippet-highlight.jpg +0 -0
  15. data/app/assets/images/fc-snippet-slide.jpg +0 -0
  16. data/app/assets/images/fc-snippet-text.jpg +0 -0
  17. data/app/assets/images/fc-snippet-three.jpg +0 -0
  18. data/app/assets/images/fc-snippet-two.jpg +0 -0
  19. data/app/assets/javascripts/rails_admin/featured_content.js.erb +399 -0
  20. data/app/assets/stylesheets/rails_admin/featured_content.scss +599 -0
  21. data/app/controllers/rails_admin_featured_content/featured_content_controller.rb +28 -0
  22. data/app/models/.keep +0 -0
  23. data/app/models/rails_admin_featured_content/featured_content.rb +16 -0
  24. data/app/models/rails_admin_featured_content/featured_content_image.rb +9 -0
  25. data/app/views/.gitkeep +0 -0
  26. data/app/views/rails_admin/main/featured_content.html.erb +42 -0
  27. data/bin/console +14 -0
  28. data/bin/setup +8 -0
  29. data/config/initializers/assets.rb +7 -0
  30. data/config/locales/featured_content.en.yml +17 -0
  31. data/config/locales/featured_content.pt-BR.yml +17 -0
  32. data/config/routes.rb +9 -0
  33. data/lib/generators/rails_admin_featured_content_generator.rb +31 -0
  34. data/lib/generators/templates/create_featured_content_images_migration.rb +10 -0
  35. data/lib/generators/templates/create_featured_content_migration.rb +11 -0
  36. data/lib/generators/templates/featured_content_image_uploader.rb +50 -0
  37. data/lib/generators/templates/rails_admin_featured_content.rb +22 -0
  38. data/lib/rails_admin_featured_content.rb +55 -0
  39. data/lib/rails_admin_featured_content/engine.rb +23 -0
  40. data/lib/rails_admin_featured_content/version.rb +3 -0
  41. data/rails_admin_featured_content.gemspec +45 -0
  42. data/spec/controllers/rails_admin_featured_content/featured_content_controller_spec.rb +42 -0
  43. data/spec/dummy/Gemfile +11 -0
  44. data/spec/dummy/Gemfile.lock +235 -0
  45. data/spec/dummy/Rakefile +6 -0
  46. data/spec/dummy/app/assets/javascripts/application.js +13 -0
  47. data/spec/dummy/app/assets/stylesheets/application.css +15 -0
  48. data/spec/dummy/app/controllers/application_controller.rb +5 -0
  49. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  50. data/spec/dummy/app/uploaders/content_builder_image_uploader.rb +54 -0
  51. data/spec/dummy/app/uploaders/featured_content_image_uploader.rb +50 -0
  52. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  53. data/spec/dummy/bin/bundle +3 -0
  54. data/spec/dummy/bin/rails +4 -0
  55. data/spec/dummy/bin/rake +4 -0
  56. data/spec/dummy/bin/setup +29 -0
  57. data/spec/dummy/config.ru +4 -0
  58. data/spec/dummy/config/application.rb +31 -0
  59. data/spec/dummy/config/boot.rb +5 -0
  60. data/spec/dummy/config/database.yml +25 -0
  61. data/spec/dummy/config/environment.rb +5 -0
  62. data/spec/dummy/config/environments/development.rb +41 -0
  63. data/spec/dummy/config/environments/production.rb +79 -0
  64. data/spec/dummy/config/environments/test.rb +42 -0
  65. data/spec/dummy/config/initializers/assets.rb +11 -0
  66. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  67. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
  68. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  69. data/spec/dummy/config/initializers/inflections.rb +16 -0
  70. data/spec/dummy/config/initializers/mime_types.rb +4 -0
  71. data/spec/dummy/config/initializers/rails_admin.rb +37 -0
  72. data/spec/dummy/config/initializers/rails_admin_content_builder.rb +37 -0
  73. data/spec/dummy/config/initializers/rails_admin_featured_content.rb +22 -0
  74. data/spec/dummy/config/initializers/session_store.rb +3 -0
  75. data/spec/dummy/config/initializers/simple_form.rb +165 -0
  76. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  77. data/spec/dummy/config/locales/en.yml +23 -0
  78. data/spec/dummy/config/locales/simple_form.en.yml +31 -0
  79. data/spec/dummy/config/routes.rb +57 -0
  80. data/spec/dummy/config/secrets.yml +22 -0
  81. data/spec/dummy/db/development.sqlite3 +0 -0
  82. data/spec/dummy/db/migrate/20160729105801_create_content_builder_categories.rb +10 -0
  83. data/spec/dummy/db/migrate/20160729105802_create_content_builders.rb +16 -0
  84. data/spec/dummy/db/migrate/20160729105803_create_content_builder_images.rb +10 -0
  85. data/spec/dummy/db/migrate/20160729105947_create_featured_contents.rb +11 -0
  86. data/spec/dummy/db/migrate/20160729105948_create_featured_content_images.rb +10 -0
  87. data/spec/dummy/db/schema.rb +64 -0
  88. data/spec/dummy/db/test.sqlite3 +0 -0
  89. data/spec/dummy/lib/templates/erb/scaffold/_form.html.erb +13 -0
  90. data/spec/dummy/log/development.log +1698 -0
  91. data/spec/dummy/log/test.log +36 -0
  92. data/spec/dummy/public/404.html +67 -0
  93. data/spec/dummy/public/422.html +67 -0
  94. data/spec/dummy/public/500.html +66 -0
  95. data/spec/dummy/public/favicon.ico +0 -0
  96. data/spec/dummy/public/uploads/rails_admin_content_builder/content_builder_image/image/1/center_example.jpg +0 -0
  97. data/spec/dummy/public/uploads/rails_admin_content_builder/content_builder_image/image/1/example.jpg +0 -0
  98. data/spec/dummy/public/uploads/rails_admin_content_builder/content_builder_image/image/1/left_or_right_example.jpg +0 -0
  99. data/spec/dummy/public/uploads/rails_admin_content_builder/content_builder_image/image/2/center_example.jpg +0 -0
  100. data/spec/dummy/public/uploads/rails_admin_content_builder/content_builder_image/image/2/example.jpg +0 -0
  101. data/spec/dummy/public/uploads/rails_admin_content_builder/content_builder_image/image/2/left_or_right_example.jpg +0 -0
  102. data/spec/dummy/public/uploads/rails_admin_featured_content/featured_content_image/image/1/example.jpg +0 -0
  103. data/spec/dummy/public/uploads/rails_admin_featured_content/featured_content_image/image/1/thumb_example.jpg +0 -0
  104. data/spec/dummy/public/uploads/tmp/1461693110-14578-0001-7683/center_example.jpg +0 -0
  105. data/spec/dummy/public/uploads/tmp/1461693110-14578-0001-7683/example.jpg +0 -0
  106. data/spec/dummy/public/uploads/tmp/1461693110-14578-0001-7683/left_or_right_example.jpg +0 -0
  107. data/spec/dummy/public/uploads/tmp/1461693202-14651-0001-6505/center_example.jpg +0 -0
  108. data/spec/dummy/public/uploads/tmp/1461693202-14651-0001-6505/example.jpg +0 -0
  109. data/spec/dummy/public/uploads/tmp/1461693202-14651-0001-6505/left_or_right_example.jpg +0 -0
  110. data/spec/dummy/public/uploads/tmp/1461693245-14728-0001-4392/center_example.jpg +0 -0
  111. data/spec/dummy/public/uploads/tmp/1461693245-14728-0001-4392/example.jpg +0 -0
  112. data/spec/dummy/public/uploads/tmp/1461693245-14728-0001-4392/left_or_right_example.jpg +0 -0
  113. data/spec/factories/featured_content.rb +7 -0
  114. data/spec/factories/featured_content_image.rb +7 -0
  115. data/spec/fixtures/assets/example.jpg +0 -0
  116. data/spec/spec_helper.rb +20 -0
  117. data/spec/version_spec.rb +7 -0
  118. data/vendor/assets/stylesheets/rails_admin_featured_content.scss +557 -0
  119. metadata +575 -0
@@ -0,0 +1,28 @@
1
+ module RailsAdminFeaturedContent
2
+ class FeaturedContentController < ::ApplicationController
3
+ def search_content
4
+ @content_builder = RailsAdminContentBuilder::ContentBuilder.order('date_publish desc').limit(10).search(params[:term])
5
+ if @content_builder
6
+ render json: @content_builder.to_json(:include => { :content_builder_category => {:only => [:name, :slug]} })
7
+ else
8
+ render json: @content_builder.errors
9
+ end
10
+ end
11
+
12
+ def create_images
13
+ @featured_content = FeaturedContent.find(params[:id])
14
+ @image = @featured_content.featured_content_images.create(image: params[:featured_content_image])
15
+ if @image
16
+ render json: find_image(@image.id)
17
+ else
18
+ render json: @image.errors
19
+ end
20
+ end
21
+
22
+ private
23
+
24
+ def find_image(id)
25
+ FeaturedContentImage.find(id).image.to_json
26
+ end
27
+ end
28
+ end
data/app/models/.keep ADDED
File without changes
@@ -0,0 +1,16 @@
1
+ module RailsAdminFeaturedContent
2
+ class FeaturedContent < ActiveRecord::Base
3
+ self.table_name = 'featured_contents'
4
+
5
+ has_many :featured_content_images, inverse_of: :featured_content, dependent: :destroy
6
+
7
+ def featured_sanitized
8
+ white_list_sanitizer = Rails::Html::WhiteListSanitizer.new
9
+ white_list_sanitizer.sanitize(
10
+ self.content,
11
+ tags: %w(div h1 h2 b u p img section figure figcaption a iframe),
12
+ attributes: %w(src class alt href allowfullscreen frameborder height width)
13
+ ).try(:html_safe)
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,9 @@
1
+ module RailsAdminFeaturedContent
2
+ class FeaturedContentImage < ActiveRecord::Base
3
+ self.table_name = 'featured_content_images'
4
+
5
+ validates :image, presence: true
6
+ mount_uploader :image, FeaturedContentImageUploader
7
+ belongs_to :featured_content, inverse_of: :featured_content_images
8
+ end
9
+ end
File without changes
@@ -0,0 +1,42 @@
1
+ <%= stylesheet_link_tag 'rails_admin/featured_content' %>
2
+ <%= javascript_include_tag 'rails_admin/featured_content' %>
3
+
4
+ <div class="fc-snippet">
5
+ <%= link_to '#', class: 'fc-snippet__btn', data: {snippet: '1'} do %>
6
+ <%= image_tag 'fc-snippet-highlight.jpg', class: 'fc-snippet__image' %>
7
+ <% end %>
8
+
9
+ <%= link_to '#', class: 'fc-snippet__btn', data: {snippet: '2'} do %>
10
+ <%= image_tag 'fc-snippet-text.jpg', class: 'fc-snippet__image' %>
11
+ <% end %>
12
+
13
+ <%= link_to '#', class: 'fc-snippet__btn', data: {snippet: '3'} do %>
14
+ <%= image_tag 'fc-snippet-slide.jpg', class: 'fc-snippet__image' %>
15
+ <% end %>
16
+
17
+ <%= link_to '#', class: 'fc-snippet__btn', data: {snippet: '4'} do %>
18
+ <%= image_tag 'fc-snippet-three.jpg', class: 'fc-snippet__image' %>
19
+ <% end %>
20
+
21
+ <%= link_to '#', class: 'fc-snippet__btn', data: {snippet: '5'} do %>
22
+ <%= image_tag 'fc-snippet-two.jpg', class: 'fc-snippet__image' %>
23
+ <% end %>
24
+ </div>
25
+
26
+ <%= simple_form_for rails_admin.featured_content_url(@abstract_model.to_param, id: @object.id), html: { class: 'fc-form' }, remote: false do |f| %>
27
+ <div class="fc-controls">
28
+ <%= f.button :submit, "Salvar", name: 'save', class: 'btn btn-block btn-primary' %>
29
+ <% if @object.status %>
30
+ <%= f.button :submit, "Despublicar", name: 'unpublish', class: 'btn btn-block btn-danger' %>
31
+ <% else %>
32
+ <%= f.button :submit, "Publicar", name: 'publish', class: 'btn btn-block btn-success' %>
33
+ <% end %>
34
+ </div>
35
+
36
+ <div class="fc-container">
37
+ <%= @object.content.try(:html_safe) %>
38
+ </div>
39
+
40
+ <%= f.input :id, as: :hidden, :input_html => { :name => "id", :value => @object.id } %>
41
+ <%= f.input :content, as: :hidden, :input_html => { :name => "content", :id => "content", :value => @object.content } %>
42
+ <% end %>
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "rails_admin_featured_content"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,7 @@
1
+ Rails.application.config.assets.precompile += %w( fc-loading.svg )
2
+ Rails.application.config.assets.precompile += %w( fc-image-default.jpg )
3
+ Rails.application.config.assets.precompile += %w( fc-snippet-highlight.jpg )
4
+ Rails.application.config.assets.precompile += %w( fc-snippet-slide.jpg )
5
+ Rails.application.config.assets.precompile += %w( fc-snippet-text.jpg )
6
+ Rails.application.config.assets.precompile += %w( fc-snippet-three.jpg )
7
+ Rails.application.config.assets.precompile += %w( fc-snippet-two.jpg )
@@ -0,0 +1,17 @@
1
+ en:
2
+ admin:
3
+ actions:
4
+ featured_content:
5
+ title: "Create News"
6
+ menu: "Create New"
7
+ breadcrumb: "Create New"
8
+ delete_block: "Do you want to remove this content?"
9
+ success_save: "Successfully updated"
10
+ error_save: "Error updating"
11
+ written_by: "Writter By"
12
+ news_source: "News source"
13
+ summary: "Summary"
14
+ button:
15
+ save: "Save"
16
+ publish: "Publish"
17
+ unpublish: 'Unpublish'
@@ -0,0 +1,17 @@
1
+ pt-BR:
2
+ admin:
3
+ actions:
4
+ featured_content:
5
+ title: "Criar Notícia"
6
+ menu: "Criar Notícia"
7
+ breadcrumb: "Criar Notícia"
8
+ delete_block: "Deseja mesmo remover esse conteúdo?"
9
+ success_save: "Atualizado com sucesso"
10
+ error_save: "Erro ao atualizar"
11
+ written_by: "Autor"
12
+ news_source: "Fonte"
13
+ summary: "Resumo"
14
+ button:
15
+ save: "Salvar"
16
+ publish: "Publicar"
17
+ unpublish: 'Despublicar'
data/config/routes.rb ADDED
@@ -0,0 +1,9 @@
1
+ Rails.application.routes.draw do
2
+ get_path_url = 'admin/rails_admin_featured_content~featured_content/:id/search_content'
3
+ get_path_method = 'rails_admin_featured_content/featured_content#search_content'
4
+ get get_path_url => get_path_method
5
+
6
+ put_path_url = 'admin/rails_admin_featured_content~featured_content/:id/create_images'
7
+ put_path_method = 'rails_admin_featured_content/featured_content#create_images'
8
+ put put_path_url => put_path_method
9
+ end
@@ -0,0 +1,31 @@
1
+ require 'rails/generators'
2
+
3
+ class RailsAdminFeaturedContentGenerator < Rails::Generators::Base
4
+ include Rails::Generators::Migration
5
+
6
+ def self.source_root
7
+ @source_root ||= File.expand_path(File.join(File.dirname(__FILE__), 'templates/'))
8
+ end
9
+
10
+ def self.next_migration_number(*)
11
+ unless @migration
12
+ @migration = Time.now.utc.strftime("%Y%m%d%H%M%S").to_i
13
+ else
14
+ @migration += 1
15
+ end
16
+ @migration.to_s
17
+ end
18
+
19
+ def create_uploader_featured_content_image_model
20
+ template "featured_content_image_uploader.rb", "app/uploaders/featured_content_image_uploader.rb"
21
+ end
22
+
23
+ def create_rails_admin_config_in_initializer
24
+ template "rails_admin_featured_content.rb", "config/initializers/rails_admin_featured_content.rb"
25
+ end
26
+
27
+ def create_migrations
28
+ migration_template "create_featured_content_migration.rb", File.join('db/migrate', "create_featured_contents.rb")
29
+ migration_template "create_featured_content_images_migration.rb", File.join('db/migrate', "create_featured_content_images.rb")
30
+ end
31
+ end
@@ -0,0 +1,10 @@
1
+ class CreateFeaturedContentImages < ActiveRecord::Migration
2
+ def change
3
+ create_table :featured_content_images do |t|
4
+ t.string :image
5
+ t.references :featured_content, index: true, foreign_key: true
6
+
7
+ t.timestamps null: false
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,11 @@
1
+ class CreateFeaturedContents < ActiveRecord::Migration
2
+ def change
3
+ create_table :featured_contents do |t|
4
+ t.string :title
5
+ t.text :content
6
+ t.boolean :status, default: false
7
+
8
+ t.timestamps null: false
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,50 @@
1
+ # encoding: utf-8
2
+
3
+ class FeaturedContentImageUploader < CarrierWave::Uploader::Base
4
+ # Include RMagick or MiniMagick support:
5
+ # include CarrierWave::RMagick
6
+ include CarrierWave::MiniMagick
7
+
8
+ # Choose what kind of storage to use for this uploader:
9
+ storage :file
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
+ # Provide a default URL as a default if there hasn't been a file uploaded:
19
+ # def default_url
20
+ # # For Rails 3.1+ asset pipeline compatibility:
21
+ # # ActionController::Base.helpers.asset_path("fallback/" + [version_name, "default.png"].compact.join('_'))
22
+ #
23
+ # "/images/fallback/" + [version_name, "default.png"].compact.join('_')
24
+ # end
25
+
26
+ # Process files as they are uploaded:
27
+ # process :scale => [200, 300]
28
+ #
29
+ # def scale(width, height)
30
+ # # do something
31
+ # end
32
+
33
+ # Create different versions of your uploaded files:
34
+ version :thumb do
35
+ process :resize_to_fit => [400, 400]
36
+ end
37
+
38
+ # Add a white list of extensions which are allowed to be uploaded.
39
+ # For images you might use something like this:
40
+ def extension_white_list
41
+ %w(jpg jpeg gif png)
42
+ end
43
+
44
+ # Override the filename of the uploaded files:
45
+ # Avoid using model.id or version_name here, see uploader/store.rb for details.
46
+ # def filename
47
+ # "something.jpg" if original_filename
48
+ # end
49
+
50
+ end
@@ -0,0 +1,22 @@
1
+ RailsAdmin.config do |config|
2
+ config.actions do
3
+ featured_content do
4
+ only ['RailsAdminFeaturedContent::FeaturedContent']
5
+ end
6
+
7
+ config.model 'RailsAdminFeaturedContent::FeaturedContent' do
8
+ list do
9
+ field :id
10
+ field :title
11
+ field :status
12
+ end
13
+ edit do
14
+ field :title
15
+ end
16
+ end
17
+
18
+ config.model 'RailsAdminFeaturedContent::FeaturedContentImage' do
19
+ visible false
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,55 @@
1
+ require "rails_admin_featured_content/engine"
2
+
3
+ module RailsAdminFeaturedContent
4
+ end
5
+
6
+ require 'rails_admin/config/actions'
7
+
8
+ module RailsAdmin
9
+ module Config
10
+ module Actions
11
+ class FeaturedContent < Base
12
+ RailsAdmin::Config::Actions.register(self)
13
+ register_instance_option :member do
14
+ true
15
+ end
16
+
17
+ register_instance_option :link_icon do
18
+ 'icon-align-justify'
19
+ end
20
+
21
+ register_instance_option :http_methods do
22
+ [:get, :post]
23
+ end
24
+
25
+ register_instance_option :controller do
26
+ Proc.new do
27
+ @object = @abstract_model.model.find(params[:id])
28
+ @response = {}
29
+
30
+ if request.post?
31
+ if params.present?
32
+
33
+ if params[:publish]
34
+ status = true
35
+ elsif params[:unpublish]
36
+ status = false
37
+ elsif params[:save]
38
+ status = @object.status
39
+ end
40
+
41
+ if @object.update(content: params[:content], status: status)
42
+ flash[:success] = "Sucesso"
43
+ else
44
+ flash[:error] = "Erro"
45
+ end
46
+ end
47
+ end
48
+
49
+ render :action => @action.template_name
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end
55
+ end
@@ -0,0 +1,23 @@
1
+ require 'simple_form'
2
+ require 'owlcarousel-rails'
3
+
4
+ module RailsAdminFeaturedContent
5
+ class Engine < ::Rails::Engine
6
+ isolate_namespace RailsAdminFeaturedContent
7
+
8
+ initializer 'rails_admin_featured_content.load_static_assets' do |app|
9
+ app.middleware.use ::ActionDispatch::Static, "#{root}/vendor"
10
+ app.config.assets.precompile += %w(
11
+ rails_admin/featured_content.js
12
+ rails_admin/featured_content.css
13
+ )
14
+ end
15
+
16
+ config.generators do |g|
17
+ g.test_framework :rspec, :fixture => false
18
+ g.fixture_replacement :factory_girl, :dir => 'spec/factories'
19
+ g.assets false
20
+ g.helper false
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,3 @@
1
+ module RailsAdminFeaturedContent
2
+ VERSION = "1.0.3"
3
+ end
@@ -0,0 +1,45 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'rails_admin_featured_content/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "rails_admin_featured_content"
8
+ spec.version = RailsAdminFeaturedContent::VERSION
9
+ spec.authors = ["Luiz Picolo"]
10
+ spec.email = ["luizpicolo@gmail.com"]
11
+
12
+ spec.summary = "Summary"
13
+ spec.description = "Description"
14
+ spec.homepage = "http://github.com/luizpicolo/rails_admin_featured_content"
15
+ spec.license = "MIT"
16
+
17
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
+ spec.bindir = "exe"
19
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
+ spec.require_paths = ["lib"]
21
+
22
+ spec.test_files = Dir["spec/**/*"]
23
+
24
+ spec.add_development_dependency "bundler", "~> 1.11"
25
+ spec.add_development_dependency "rake", "~> 10.0"
26
+ spec.add_development_dependency "rails", [">= 4.0", "< 5"]
27
+ spec.add_development_dependency "rspec-rails", "~> 3.0"
28
+ spec.add_development_dependency "rails_admin", "~> 0.8.1"
29
+ spec.add_development_dependency 'capybara', '~> 2.7', '>= 2.7.0'
30
+ spec.add_development_dependency 'launchy', '~> 2.4', '>= 2.4.3'
31
+ spec.add_development_dependency "shoulda-matchers", "~> 3.1"
32
+ spec.add_development_dependency 'selenium-webdriver', '~> 2.53', '>= 2.53.4'
33
+ spec.add_development_dependency 'factory_girl_rails', '~> 4.7', '>= 4.7.0'
34
+ spec.add_development_dependency 'faker', '~> 1.6', '>= 1.6.3'
35
+
36
+ spec.add_runtime_dependency "carrierwave", '~> 0.11', '>= 0.11.0'
37
+ spec.add_runtime_dependency "croppie_rails", '~> 1.2', '>= 1.2.0'
38
+ spec.add_runtime_dependency 'medium-editor-rails', '~> 2.1', '>= 2.1.0'
39
+ spec.add_runtime_dependency 'mini_magick', '~> 4.5', '>= 4.5.1'
40
+ spec.add_runtime_dependency 'friendly_id', '~> 5.1', '>= 5.1.0'
41
+ spec.add_runtime_dependency "simple_form", "~> 3.2"
42
+ spec.add_runtime_dependency 'rails-html-sanitizer', '~> 1.0', '>= 1.0.3'
43
+
44
+ spec.add_runtime_dependency 'owlcarousel-rails', '~> 0'
45
+ end