redactor2_rails 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +1 -1
  3. data/app/controller/redactor2_rails/files_controller.rb +3 -3
  4. data/app/controller/redactor2_rails/images_controller.rb +3 -3
  5. data/bin/console +3 -3
  6. data/config/routes.rb +2 -2
  7. data/lib/generators/redactor2/config_generator.rb +0 -1
  8. data/lib/generators/redactor2/install_generator.rb +10 -11
  9. data/lib/generators/redactor2/templates/active_record/carrierwave/devise_migration.rb +5 -5
  10. data/lib/generators/redactor2/templates/active_record/carrierwave/migration.rb +5 -5
  11. data/lib/generators/redactor2/templates/active_record/carrierwave/redactor2/asset.rb +1 -1
  12. data/lib/generators/redactor2/templates/active_record/carrierwave/redactor2/file.rb +1 -1
  13. data/lib/generators/redactor2/templates/active_record/carrierwave/redactor2/image.rb +1 -1
  14. data/lib/generators/redactor2/templates/base/carrierwave/uploaders/redactor2_rails_file_uploader.rb +1 -1
  15. data/lib/generators/redactor2/templates/base/carrierwave/uploaders/redactor2_rails_image_uploader.rb +3 -3
  16. data/lib/generators/redactor2/templates/mongoid/carrierwave/{redactor → redactor2}/asset.rb +1 -1
  17. data/lib/generators/redactor2/templates/mongoid/carrierwave/{redactor → redactor2}/file.rb +1 -1
  18. data/lib/generators/redactor2/templates/mongoid/carrierwave/redactor2/image.rb +7 -0
  19. data/lib/redactor2_rails.rb +9 -10
  20. data/lib/redactor2_rails/backend/carrierwave.rb +8 -7
  21. data/lib/redactor2_rails/engine.rb +1 -1
  22. data/lib/redactor2_rails/http.rb +8 -11
  23. data/lib/redactor2_rails/orm/active_record.rb +2 -2
  24. data/lib/redactor2_rails/orm/base.rb +4 -4
  25. data/lib/redactor2_rails/orm/mongoid.rb +10 -11
  26. data/lib/redactor2_rails/version.rb +1 -1
  27. data/redactor2_rails.gemspec +14 -14
  28. metadata +9 -10
  29. data/lib/generators/redactor2/templates/mongoid/carrierwave/redactor/picture.rb +0 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4a7e267e200c5068fbbf5016efb8e3c59bc307ff
4
- data.tar.gz: 83da0705e59b2e2878106c1050a517add424dfde
3
+ metadata.gz: 7235648affe33e7f56ec9fd0eed22e655669cfa3
4
+ data.tar.gz: 9b9f719fa178e217376ff3f9e537423993ce240f
5
5
  SHA512:
6
- metadata.gz: 31a5bdd5605515304c9aa83715eeeef28b3bfbe6c623d5b7af40701da51c8d349779750201b5f1d04e8fcb25f0a2ec000540667d99da9a15ccbc3950dcefeace
7
- data.tar.gz: 025d2d4b90e1070b51f9b807f4d0f352571c85474e58588081d9608ab294438f6110222e4184e59475c31794ec8fa8d20856d19bd9cb0ce80e3c073d95004ec9
6
+ metadata.gz: 789c251543eaab9781a0c9d615fefe0807d6484ba4f373fc0d79143e488ef95a994a796bb9a60f2199d0b18ab99a6cdcad0f164bc842c87fc9a936cb09bbc26f
7
+ data.tar.gz: f9a4d0eeb8b194a07e72477fbbfc6a2e0bf5f363e4665b88f18d361eb3d118934dd8e4724c3f3a78af3225ac8b2423440eae941e93f8dd30be250faa1054104d
data/Rakefile CHANGED
@@ -1,2 +1,2 @@
1
- require "bundler"
1
+ require 'bundler'
2
2
  Bundler::GemHelper.install_tasks
@@ -1,5 +1,5 @@
1
1
  class Redactor2Rails::FilesController < ApplicationController
2
- before_filter :redactor2_authenticate_user!
2
+ before_action :redactor2_authenticate_user!
3
3
 
4
4
  def create
5
5
  @file = Redactor2Rails.file_model.new
@@ -7,8 +7,8 @@ class Redactor2Rails::FilesController < ApplicationController
7
7
  file = params[:file]
8
8
  @file.data = Redactor2Rails::Http.normalize_param(file, request)
9
9
  if @file.has_attribute?(:"#{Redactor2Rails.devise_user_key}")
10
- @file.send("#{Redactor2Rails.devise_user}=", redactor_current_user)
11
- @file.assetable = redactor_current_user
10
+ @file.send("#{Redactor2Rails.devise_user}=", redactor2_current_user)
11
+ @file.assetable = redactor2_current_user
12
12
  end
13
13
 
14
14
  if @file.save
@@ -1,5 +1,5 @@
1
1
  class Redactor2Rails::ImagesController < ApplicationController
2
- before_filter :redactor2_authenticate_user!
2
+ before_action :redactor2_authenticate_user!
3
3
 
4
4
  def create
5
5
  @image = Redactor2Rails.image_model.new
@@ -7,8 +7,8 @@ class Redactor2Rails::ImagesController < ApplicationController
7
7
  file = params[:file]
8
8
  @image.data = Redactor2Rails::Http.normalize_param(file, request)
9
9
  if @image.has_attribute?(:"#{Redactor2Rails.devise_user_key}")
10
- @image.send("#{Redactor2Rails.devise_user}=", redactor_current_user)
11
- @image.assetable = redactor_current_user
10
+ @image.send("#{Redactor2Rails.devise_user}=", redactor2_current_user)
11
+ @image.assetable = redactor2_current_user
12
12
  end
13
13
 
14
14
  if @image.save
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require "bundler/setup"
4
- require "redactor2_rails"
3
+ require 'bundler/setup'
4
+ require 'redactor2_rails'
5
5
 
6
6
  # You can add fixtures and/or initialization code here to make experimenting
7
7
  # with your gem easier. You can also use a different console, if you like.
@@ -10,5 +10,5 @@ require "redactor2_rails"
10
10
  # require "pry"
11
11
  # Pry.start
12
12
 
13
- require "irb"
13
+ require 'irb'
14
14
  IRB.start
@@ -1,4 +1,4 @@
1
1
  Redactor2Rails::Engine.routes.draw do
2
- resources :images, :only => :create
3
- resources :files, :only => :create
2
+ resources :images, only: :create
3
+ resources :files, only: :create
4
4
  end
@@ -9,7 +9,6 @@ module Redactor2
9
9
  @source_root ||= File.expand_path(File.join(File.dirname(__FILE__), 'templates'))
10
10
  end
11
11
 
12
-
13
12
  def create_config
14
13
  template 'config.js', File.join('app/assets/javascripts/redactor2_rails', 'config.js')
15
14
  end
@@ -6,17 +6,17 @@ module Redactor2
6
6
  include ::Rails::Generators::Migration
7
7
  desc 'Generates redactor2_rails models, uploaders and migration'
8
8
 
9
- class_option :orm, :type => :string, :default => 'active_record',
10
- :desc => 'ORM (active_record/mongoid)'
9
+ class_option :orm, type: :string, default: 'active_record',
10
+ desc: 'ORM (active_record/mongoid)'
11
11
 
12
- class_option :upload_processor, :type => :string, :default => 'carrierwave',
13
- :desc => 'Image processor (carrierwave)'
12
+ class_option :upload_processor, type: :string, default: 'carrierwave',
13
+ desc: 'Image processor (carrierwave)'
14
14
 
15
15
  def self.source_root
16
16
  @source_root ||= File.expand_path(File.join(File.dirname(__FILE__), 'templates'))
17
17
  end
18
18
 
19
- def self.next_migration_number(dirname)
19
+ def self.next_migration_number(_dirname)
20
20
  Time.now.strftime('%Y%m%d%H%M%S')
21
21
  end
22
22
 
@@ -25,21 +25,21 @@ module Redactor2
25
25
  end
26
26
 
27
27
  def create_models
28
- [:asset, :image, :file].each do |filename|
28
+ %i[asset image file].each do |filename|
29
29
  template "#{generator_dir}/redactor2/#{filename}.rb",
30
30
  File.join('app/models', redactor2_dir, "#{filename}.rb")
31
31
  end
32
32
 
33
33
  if upload_processor.to_s == 'carrierwave'
34
- [:image, :file].each do |filename|
34
+ %i[image file].each do |filename|
35
35
  template "#{uploaders_dir}/uploaders/redactor2_rails_#{filename}_uploader.rb",
36
- File.join("app/uploaders", "redactor2_rails_#{filename}_uploader.rb")
36
+ File.join('app/uploaders', "redactor2_rails_#{filename}_uploader.rb")
37
37
  end
38
38
  end
39
39
  end
40
40
 
41
41
  def create_migrations
42
- if orm.to_s == "active_record"
42
+ if orm.to_s == 'active_record'
43
43
  if ARGV.include?('--devise')
44
44
  migration_template "#{generator_dir}/devise_migration.rb", File.join('db/migrate', 'create_redactor2_assets.rb')
45
45
  else
@@ -59,7 +59,7 @@ module Redactor2
59
59
  end
60
60
 
61
61
  def uploaders_dir
62
- @uploaders_dir ||= ['base', 'carrierwave'].join('/')
62
+ @uploaders_dir ||= %w[base carrierwave].join('/')
63
63
  end
64
64
 
65
65
  def orm
@@ -69,7 +69,6 @@ module Redactor2
69
69
  def upload_processor
70
70
  options[:upload_processor] || 'carrierwave'
71
71
  end
72
-
73
72
  end
74
73
  end
75
74
  end
@@ -4,13 +4,13 @@ class CreateRedactor2Assets < ActiveRecord::Migration
4
4
  # Change column name and override Redactor2Rails.devise_user_key
5
5
  t.integer :user_id
6
6
 
7
- t.string :data_file_name, :null => false
7
+ t.string :data_file_name, null: false
8
8
  t.string :data_content_type
9
9
  t.integer :data_file_size
10
10
 
11
11
  t.integer :assetable_id
12
- t.string :assetable_type, :limit => 30
13
- t.string :type, :limit => 30
12
+ t.string :assetable_type, limit: 30
13
+ t.string :type, limit: 30
14
14
 
15
15
  t.integer :width
16
16
  t.integer :height
@@ -18,8 +18,8 @@ class CreateRedactor2Assets < ActiveRecord::Migration
18
18
  t.timestamps
19
19
  end
20
20
 
21
- add_index 'redactor2_assets', ['assetable_type', 'type', 'assetable_id'], :name => 'idx_redactor2_assetable_type'
22
- add_index 'redactor2_assets', ['assetable_type', 'assetable_id'], :name => 'idx_redactor2_assetable'
21
+ add_index 'redactor2_assets', %w[assetable_type type assetable_id], name: 'idx_redactor2_assetable_type'
22
+ add_index 'redactor2_assets', %w[assetable_type assetable_id], name: 'idx_redactor2_assetable'
23
23
  end
24
24
 
25
25
  def self.down
@@ -1,13 +1,13 @@
1
1
  class CreateRedactor2Assets < ActiveRecord::Migration
2
2
  def self.up
3
3
  create_table :redactor2_assets do |t|
4
- t.string :data_file_name, :null => false
4
+ t.string :data_file_name, null: false
5
5
  t.string :data_content_type
6
6
  t.integer :data_file_size
7
7
 
8
8
  t.integer :assetable_id
9
- t.string :assetable_type, :limit => 30
10
- t.string :type, :limit => 30
9
+ t.string :assetable_type, limit: 30
10
+ t.string :type, limit: 30
11
11
 
12
12
  t.integer :width
13
13
  t.integer :height
@@ -15,8 +15,8 @@ class CreateRedactor2Assets < ActiveRecord::Migration
15
15
  t.timestamps
16
16
  end
17
17
 
18
- add_index 'redactor2_assets', ['assetable_type', 'type', 'assetable_id'], :name => 'idx_redactor2_assetable_type'
19
- add_index 'redactor2_assets', ['assetable_type', 'assetable_id'], :name => 'idx_redactor2_assetable'
18
+ add_index 'redactor2_assets', %w[assetable_type type assetable_id], name: 'idx_redactor2_assetable_type'
19
+ add_index 'redactor2_assets', %w[assetable_type assetable_id], name: 'idx_redactor2_assetable'
20
20
  end
21
21
 
22
22
  def self.down
@@ -1,6 +1,6 @@
1
1
  class Redactor2Rails::Asset < ActiveRecord::Base
2
2
  include Redactor2Rails::Orm::ActiveRecord::AssetBase
3
3
 
4
- delegate :url, :current_path, :size, :content_type, :filename, :to => :data
4
+ delegate :url, :current_path, :size, :content_type, :filename, to: :data
5
5
  validates_presence_of :data
6
6
  end
@@ -1,5 +1,5 @@
1
1
  class Redactor2Rails::File < Redactor2Rails::Asset
2
- mount_uploader :data, Redactor2RailsFileUploader, :mount_on => :data_file_name
2
+ mount_uploader :data, Redactor2RailsFileUploader, mount_on: :data_file_name
3
3
 
4
4
  def url_content
5
5
  url(:content)
@@ -1,5 +1,5 @@
1
1
  class Redactor2Rails::Image < Redactor2Rails::Asset
2
- mount_uploader :data, Redactor2RailsImageUploader, :mount_on => :data_file_name
2
+ mount_uploader :data, Redactor2RailsImageUploader, mount_on: :data_file_name
3
3
 
4
4
  def url_content
5
5
  url(:content)
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+
2
2
  class Redactor2RailsFileUploader < CarrierWave::Uploader::Base
3
3
  include Redactor2Rails::Backend::CarrierWave
4
4
 
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+
2
2
  class Redactor2RailsImageUploader < CarrierWave::Uploader::Base
3
3
  include Redactor2Rails::Backend::CarrierWave
4
4
 
@@ -33,11 +33,11 @@ class Redactor2RailsImageUploader < CarrierWave::Uploader::Base
33
33
 
34
34
  # Create different versions of your uploaded files:
35
35
  version :thumb do
36
- process :resize_to_fill => [100, 100]
36
+ process resize_to_fill: [100, 100]
37
37
  end
38
38
 
39
39
  version :content do
40
- process :resize_to_limit => [800, 800]
40
+ process resize_to_limit: [800, 800]
41
41
  end
42
42
 
43
43
  # Add a white list of extensions which are allowed to be uploaded.
@@ -4,6 +4,6 @@ class Redactor2Rails::Asset
4
4
 
5
5
  include Redactor2Rails::Orm::Mongoid::AssetBase
6
6
 
7
- delegate :url, :current_path, :size, :content_type, :filename, :to => :data
7
+ delegate :url, :current_path, :size, :content_type, :filename, to: :data
8
8
  validates_presence_of :data
9
9
  end
@@ -1,5 +1,5 @@
1
1
  class Redactor2Rails::File < Redactor2Rails::Asset
2
- mount_uploader :data, Redactor2RailsFileUploader, :mount_on => :data_file_name
2
+ mount_uploader :data, Redactor2RailsFileUploader, mount_on: :data_file_name
3
3
 
4
4
  def url_content
5
5
  url(:content)
@@ -0,0 +1,7 @@
1
+ class Redactor2Rails::Image < Redactor2Rails::Asset
2
+ mount_uploader :data, Redactor2RailsImageUploader, mount_on: :data_file_name
3
+
4
+ def url_content
5
+ url(:content)
6
+ end
7
+ end
@@ -2,9 +2,9 @@ require 'redactor2_rails/version'
2
2
  require 'orm_adapter'
3
3
 
4
4
  module Redactor2Rails
5
- IMAGE_TYPES = ['image/jpeg', 'image/png', 'image/gif', 'image/jpg', 'image/pjpeg', 'image/tiff', 'image/x-png']
5
+ IMAGE_TYPES = ['image/jpeg', 'image/png', 'image/gif', 'image/jpg', 'image/pjpeg', 'image/tiff', 'image/x-png'].freeze
6
6
 
7
- FILE_TYPES = ['application/msword', 'application/pdf', 'text/plain', 'text/rtf', 'application/vnd.ms-excel']
7
+ FILE_TYPES = ['application/msword', 'application/pdf', 'text/plain', 'text/rtf', 'application/vnd.ms-excel'].freeze
8
8
 
9
9
  autoload :Http, 'redactor2_rails/http'
10
10
  autoload :Devise, 'redactor2_rails/devise'
@@ -17,24 +17,23 @@ module Redactor2Rails
17
17
  require 'redactor2_rails/orm/mongoid'
18
18
  require 'redactor2_rails/engine'
19
19
 
20
- mattr_accessor :images_file_types, :files_file_types
21
- @@images_file_types = ['jpg', 'jpeg', 'png', 'gif', 'tiff']
22
- @@files_file_types = ['pdf', 'doc', 'docx', 'xls', 'xlsx', 'rtf', 'txt']
23
-
20
+ mattr_accessor :images_file_types, :files_file_types, :devise_user, :image_model, :file_model
21
+ @@images_file_types = %w[jpg jpeg png gif tiff]
22
+ @@files_file_types = %w[pdf doc docx xls xlsx rtf txt]
24
23
 
25
24
  def self.image_model
26
- Redactor2Rails::Image
25
+ @image_model || Redactor2Rails::Image
27
26
  end
28
27
 
29
28
  def self.file_model
30
- Redactor2Rails::File
29
+ @file_model || Redactor2Rails::File
31
30
  end
32
31
 
33
32
  def self.devise_user
34
- :user
33
+ @devise_user || :user
35
34
  end
36
35
 
37
36
  def self.devise_user_key
38
- "#{self.devise_user.to_s}_id".to_sym
37
+ "#{devise_user}_id".to_sym
39
38
  end
40
39
  end
@@ -38,11 +38,12 @@ module Redactor2Rails
38
38
  end
39
39
 
40
40
  def extract_content_type
41
- if file.content_type == 'application/octet-stream' || file.content_type.blank?
42
- content_type = MIME::Types.type_for(original_filename).first
43
- else
44
- content_type = file.content_type
45
- end
41
+ content_type = if file.content_type == 'application/octet-stream' ||
42
+ file.content_type.blank?
43
+ MIME::Types.type_for(original_filename).first
44
+ else
45
+ file.content_type
46
+ end
46
47
 
47
48
  model.data_content_type = content_type.to_s
48
49
  end
@@ -54,10 +55,10 @@ module Redactor2Rails
54
55
  def read_dimensions
55
56
  if model.image? && model.has_dimensions?
56
57
  magick = ::MiniMagick::Image.new(current_path)
57
- model.width, model.height = magick[:width], magick[:height]
58
+ model.width = magick[:width]
59
+ model.height = magick[:height]
58
60
  end
59
61
  end
60
-
61
62
  end
62
63
  end
63
64
  end
@@ -2,7 +2,7 @@ module Redactor2Rails
2
2
  class Engine < Rails::Engine
3
3
  isolate_namespace Redactor2Rails
4
4
 
5
- initializer 'redactor2_devise' do |app|
5
+ initializer 'redactor2_devise' do |_app|
6
6
  ActionController::Base.send :include, Redactor2Rails::Devise
7
7
  end
8
8
  end
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+
2
2
  require 'digest/sha1'
3
3
  require 'mime/types'
4
4
 
@@ -40,9 +40,8 @@ module Redactor2Rails
40
40
  # Usage (paperclip example)
41
41
  # @asset.data = QqFile.new(params[:qqfile], request)
42
42
  class QqFile < ::Tempfile
43
-
44
- def initialize(filename, request, tmpdir = Dir::tmpdir)
45
- @original_filename = filename
43
+ def initialize(filename, request, tmpdir = Dir.tmpdir)
44
+ @original_filename = filename
46
45
  @request = request
47
46
 
48
47
  super Digest::SHA1.hexdigest(filename), tmpdir
@@ -50,14 +49,12 @@ module Redactor2Rails
50
49
  end
51
50
 
52
51
  def fetch
53
- self.write(body)
54
- self.rewind
52
+ write(body)
53
+ rewind
55
54
  self
56
55
  end
57
56
 
58
- def original_filename
59
- @original_filename
60
- end
57
+ attr_reader :original_filename
61
58
 
62
59
  def content_type
63
60
  types = MIME::Types.type_for(original_filename)
@@ -66,7 +63,7 @@ module Redactor2Rails
66
63
 
67
64
  def body
68
65
  if @request.raw_post.respond_to?(:force_encoding)
69
- @request.raw_post.force_encoding("UTF-8")
66
+ @request.raw_post.force_encoding('UTF-8')
70
67
  else
71
68
  @request.raw_post
72
69
  end
@@ -77,7 +74,7 @@ module Redactor2Rails
77
74
  # file upload hash with UploadedFile objects
78
75
  def self.normalize_param(*args)
79
76
  value = args.first
80
- if Hash === value && value.has_key?(:tempfile)
77
+ if Hash === value && value.key?(:tempfile)
81
78
  UploadedFile.new(value)
82
79
  elsif value.is_a?(String)
83
80
  QqFile.new(*args)
@@ -14,8 +14,8 @@ module Redactor2Rails
14
14
  base.class_eval do
15
15
  self.table_name = 'redactor2_assets'
16
16
 
17
- belongs_to :assetable, :polymorphic => true
18
- belongs_to Redactor2Rails.devise_user, :foreign_key => Redactor2Rails.devise_user_key
17
+ belongs_to :assetable, polymorphic: true, required: false
18
+ belongs_to Redactor2Rails.devise_user, foreign_key: Redactor2Rails.devise_user_key, required: false
19
19
 
20
20
  if defined?(ActiveModel::ForbiddenAttributesProtection) && base.ancestors.include?(ActiveModel::ForbiddenAttributesProtection)
21
21
  # Ok
@@ -20,13 +20,13 @@ module Redactor2Rails
20
20
  end
21
21
 
22
22
  def as_json_methods
23
- [:image, :thumb]
23
+ %i[image thumb]
24
24
  end
25
25
 
26
- def as_json(options = nil)
26
+ def as_json(_options = nil)
27
27
  options = {
28
- :methods => as_json_methods,
29
- :root => false
28
+ methods: as_json_methods,
29
+ root: false
30
30
  }
31
31
 
32
32
  super options
@@ -12,22 +12,21 @@ module Redactor2Rails
12
12
  module ClassMethods
13
13
  def self.extended(base)
14
14
  base.class_eval do
15
- store_in :collection => 'redactor2_assets'
15
+ store_in collection: 'redactor2_assets'
16
16
 
17
- belongs_to :assetable, :polymorphic => true
17
+ belongs_to :assetable, polymorphic: true
18
18
 
19
- field :data_file_name, :type => String
20
- field :data_content_type, :type => String
21
- field :data_file_size, :type => Integer
19
+ field :data_file_name, type: String
20
+ field :data_content_type, type: String
21
+ field :data_file_size, type: Integer
22
22
 
23
- field :type, :type => String
23
+ field :type, type: String
24
24
 
25
- field :width, :type => Integer
26
- field :height, :type => Integer
27
-
28
- index(:assetable => 1, :type => 1)
29
- index(:assetable => 1)
25
+ field :width, type: Integer
26
+ field :height, type: Integer
30
27
 
28
+ index(assetable: 1, type: 1)
29
+ index(assetable: 1)
31
30
  end
32
31
  end
33
32
  end
@@ -1,3 +1,3 @@
1
1
  module Redactor2Rails
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
@@ -1,28 +1,28 @@
1
- # coding: utf-8
1
+
2
2
  lib = File.expand_path('../lib', __FILE__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
  require 'redactor2_rails/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
- spec.name = "redactor2_rails"
7
+ spec.name = 'redactor2_rails'
8
8
  spec.version = Redactor2Rails::VERSION
9
- spec.authors = ["Oleg Sulyanov"]
10
- spec.email = ["oleg@sulyanov.com"]
9
+ spec.authors = ['Oleg Sulyanov']
10
+ spec.email = ['oleg@sulyanov.com']
11
11
 
12
- spec.summary = %q{Imperavi Redactor for Rails 3.x - 4 Asset Pipeline}
13
- spec.homepage = "https://github.com/osulyanov/redactor2_rails"
14
- spec.license = "MIT"
12
+ spec.summary = 'Imperavi Redactor for Rails 3.x - 4 Asset Pipeline'
13
+ spec.homepage = 'https://github.com/osulyanov/redactor2_rails'
14
+ spec.license = 'MIT'
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
17
- spec.bindir = "bin"
17
+ spec.bindir = 'bin'
18
18
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
19
19
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
- spec.require_paths = ["lib"]
20
+ spec.require_paths = ['lib']
21
21
 
22
- spec.add_dependency("mime-types")
23
- spec.add_dependency("orm_adapter")
24
- spec.add_dependency("devise")
22
+ spec.add_dependency('devise')
23
+ spec.add_dependency('mime-types')
24
+ spec.add_dependency('orm_adapter')
25
25
 
26
- spec.add_development_dependency "bundler", "~> 1.10"
27
- spec.add_development_dependency "rake", "~> 10.0"
26
+ spec.add_development_dependency 'bundler', '~> 1.10'
27
+ spec.add_development_dependency 'rake', '~> 10.0'
28
28
  end
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redactor2_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oleg Sulyanov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-04 00:00:00.000000000 Z
11
+ date: 2017-11-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: mime-types
14
+ name: devise
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ">="
@@ -25,7 +25,7 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: orm_adapter
28
+ name: mime-types
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
@@ -39,7 +39,7 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: devise
42
+ name: orm_adapter
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ">="
@@ -110,9 +110,9 @@ files:
110
110
  - lib/generators/redactor2/templates/base/carrierwave/uploaders/redactor2_rails_file_uploader.rb
111
111
  - lib/generators/redactor2/templates/base/carrierwave/uploaders/redactor2_rails_image_uploader.rb
112
112
  - lib/generators/redactor2/templates/config.js
113
- - lib/generators/redactor2/templates/mongoid/carrierwave/redactor/asset.rb
114
- - lib/generators/redactor2/templates/mongoid/carrierwave/redactor/file.rb
115
- - lib/generators/redactor2/templates/mongoid/carrierwave/redactor/picture.rb
113
+ - lib/generators/redactor2/templates/mongoid/carrierwave/redactor2/asset.rb
114
+ - lib/generators/redactor2/templates/mongoid/carrierwave/redactor2/file.rb
115
+ - lib/generators/redactor2/templates/mongoid/carrierwave/redactor2/image.rb
116
116
  - lib/redactor2_rails.rb
117
117
  - lib/redactor2_rails/backend/carrierwave.rb
118
118
  - lib/redactor2_rails/devise.rb
@@ -145,9 +145,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
145
145
  version: '0'
146
146
  requirements: []
147
147
  rubyforge_project:
148
- rubygems_version: 2.4.5.1
148
+ rubygems_version: 2.6.11
149
149
  signing_key:
150
150
  specification_version: 4
151
151
  summary: Imperavi Redactor for Rails 3.x - 4 Asset Pipeline
152
152
  test_files: []
153
- has_rdoc:
@@ -1,7 +0,0 @@
1
- class Redactor2Rails::Picture < Redactor2Rails::Asset
2
- mount_uploader :data, Redactor2RailsImageUploader, :mount_on => :data_file_name
3
-
4
- def url_content
5
- url(:content)
6
- end
7
- end