bootsy 2.3.1 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 38317843402b621be259f6551df33fc4f6d78426
4
- data.tar.gz: d26e71b5358a806f8661f3648f6f1a6a27b401b1
3
+ metadata.gz: b059b79617cfa637a5f1e4a78dec0b298844186e
4
+ data.tar.gz: fc2c574c79d4ebdf9c2d8ab5f089c8b8f2ebeb99
5
5
  SHA512:
6
- metadata.gz: 1b6d4c208570553fa5ab4d537fda186086e00e0a410bbdbf5015ce79267018627c12f26b47f82c399a55187736d5d8463243e2f3250c25c8c79840afa0497bd2
7
- data.tar.gz: 9722243acb3bc86e7f5377db035a87d7a14153ccd961f95af306ab59da0a4977ab9b62f362a925d950584e264676dcee7dfdef092168754910a2c1346e8b3bec
6
+ metadata.gz: '0597c2035077ab34f1d56bc7fb65f81815e4f521ea2781aeced366ccc3df9635e82bc3e3ab18ff5f1df868aa137f33fcb85219cbdc187e2b9d27fc5690553ada'
7
+ data.tar.gz: 07d5f0b6dd843038316a3eaf7040e5e607dbbb29dac3d6a0675c8038f729d7314c4bf37fb64cd550e0df1c5d2a82c4a300399225acf3818f779fb5bcfb765da3
data/README.md CHANGED
@@ -1,9 +1,9 @@
1
1
  # Bootsy
2
2
 
3
- [![Gem Version](https://badge.fury.io/rb/bootsy.png)](http://badge.fury.io/rb/bootsy)
4
- [![Build Status](https://secure.travis-ci.org/volmer/bootsy.png?branch=master)](http://travis-ci.org/volmer/bootsy)
5
- [![Dependency Status](https://gemnasium.com/volmer/bootsy.png)](https://gemnasium.com/volmer/bootsy)
6
- [![Code Climate](https://codeclimate.com/github/volmer/bootsy.png)](https://codeclimate.com/github/volmer/bootsy)
3
+ [![Gem Version](https://badge.fury.io/rb/bootsy.svg)](http://badge.fury.io/rb/bootsy)
4
+ [![Build Status](https://secure.travis-ci.org/volmer/bootsy.svg?branch=master)](http://travis-ci.org/volmer/bootsy)
5
+ [![Dependency Status](https://gemnasium.com/volmer/bootsy.svg)](https://gemnasium.com/volmer/bootsy)
6
+ [![Code Climate](https://codeclimate.com/github/volmer/bootsy.svg)](https://codeclimate.com/github/volmer/bootsy)
7
7
 
8
8
  *Bootsy* is a WYSIWYG editor for Rails based on
9
9
  [Bootstrap-wysihtml5](https://github.com/jhollingworth/bootstrap-wysihtml5) with image uploads using
@@ -167,4 +167,4 @@ You can set the locale directly by setting a `data-bootsy-locale` attribute on y
167
167
 
168
168
  ## License
169
169
 
170
- MIT License. Copyright 2012-2016 Volmer Soares
170
+ MIT License. Copyright 2012-2017 Volmer Campos Soares
data/Rakefile CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'bundler/gem_tasks'
2
3
  require 'rspec/core/rake_task'
3
4
  require 'rubocop/rake_task'
@@ -27,7 +27,7 @@ Bootsy.init = function() {
27
27
 
28
28
  /* Initialize Bootsy on document load */
29
29
  $(function() {
30
- $(window).load(function() {
30
+ $(window).on('load', function() {
31
31
  Bootsy.init();
32
32
 
33
33
  /* Reload Bootsy on page load when using Turbolinks. */
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Bootsy
2
3
  class ApplicationController < Bootsy.base_controller
3
4
  # Prevent CSRF attacks by raising an exception.
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require_dependency 'bootsy/application_controller'
2
3
 
3
4
  module Bootsy
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Bootsy
2
3
  module ApplicationHelper
3
4
  def refresh_btn
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Bootsy
2
3
  class ImageUploader < CarrierWave::Uploader::Base
3
4
  include CarrierWave::MiniMagick
@@ -32,7 +33,7 @@ module Bootsy
32
33
  process resize_to_fill: [60, 60]
33
34
  end
34
35
 
35
- def extension_white_list
36
+ def extension_whitelist
36
37
  %w(jpg jpeg gif png)
37
38
  end
38
39
  end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Use this setup block to configure all options available in Bootsy.
2
3
  Bootsy.setup do |config|
3
4
  # Default editor options
@@ -28,3 +28,9 @@ en:
28
28
  no_images_uploaded: There are currently no uploaded images.
29
29
  js:
30
30
  alert_unsaved: You have unsaved changes.
31
+ errors:
32
+ messages:
33
+ carrierwave_processing_error: Cannot resize image.
34
+ carrierwave_integrity_error: Not an image.
35
+ carrierwave_download_error: Couldn't download image.
36
+ extension_whitelist_error: "You are not allowed to upload %{extension} files, allowed types: %{allowed_types}"
@@ -28,3 +28,9 @@ pt-BR:
28
28
  no_images_uploaded: Não existem imagens salvas.
29
29
  js:
30
30
  alert_unsaved: As suas modificações ainda não foram gravadas.
31
+ errors:
32
+ messages:
33
+ carrierwave_processing_error: Impossível redimensionar imagem.
34
+ carrierwave_integrity_error: Não é uma imagem.
35
+ carrierwave_download_error: Não foi possível baixar a imagem.
36
+ extension_whitelist_error: "Arquivos %{extension} não são permitidos. Tipos permitidos: %{allowed_types}"
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  Bootsy::Engine.routes.draw do
2
3
  resources :image_galleries, only: [] do
3
4
  resources :images, only: [:index, :create, :destroy]
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  class CreateBootsyImages < ActiveRecord::Migration
2
3
  def change
3
4
  create_table :bootsy_images do |t|
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  class CreateBootsyImageGalleries < ActiveRecord::Migration
2
3
  def change
3
4
  create_table :bootsy_image_galleries do |t|
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'carrierwave'
2
3
  require 'bootsy/engine'
3
4
  require 'bootsy/container'
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Bootsy
2
3
  # Public: Model to reference the actual image stored trough Bootsy.
3
4
  # It contains the CarrierWave uploader and belongs to a
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Bootsy
2
3
  # Public: A model that groups all images related to a
3
4
  # Bootsy container (also called a resource).
@@ -10,7 +11,8 @@ module Bootsy
10
11
  # that do not point to resources older than the given time
11
12
  # limit.
12
13
  class ImageGallery < ActiveRecord::Base
13
- belongs_to :bootsy_resource, polymorphic: true, autosave: false
14
+ belongs_to :bootsy_resource, polymorphic: true, autosave: false,
15
+ optional: true
14
16
  has_many :images, dependent: :destroy
15
17
 
16
18
  scope :destroy_orphans, lambda { |time_limit|
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Bootsy
2
3
  # Public: Methods and attributes to turn any
3
4
  # model into a Bootsy Container.
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Extend and include Bootsy in proper scopes.
2
3
 
3
4
  ActionView::Base.send(:include, Bootsy::FormHelper)
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Bootsy
2
3
  # Public: Define and setup Bootsy as a Rails engine.
3
4
  class Engine < Rails::Engine
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Bootsy
2
3
  # Public: Convenience module to include Bootsy
3
4
  # in `ActionView::Helpers::FormBuilder`.
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Bootsy
2
3
  # Public: Module to include Bootsy in `ActionView::Base`.
3
4
  module FormHelper
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'simple_form'
2
3
 
3
4
  # Public: A SimpleForm Input to wrap Bootsy areas
@@ -1,4 +1,5 @@
1
+ # frozen_string_literal: true
1
2
  # Public: The gem version
2
3
  module Bootsy
3
- VERSION = '2.3.1'.freeze
4
+ VERSION = '2.4.0'
4
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootsy
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.1
4
+ version: 2.4.0
5
5
  platform: ruby
6
6
  authors:
7
- - Volmer Soares
7
+ - Volmer Campos Soares
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-21 00:00:00.000000000 Z
11
+ date: 2017-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mini_magick
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '4.5'
19
+ version: '4.6'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '4.5'
26
+ version: '4.6'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: carrierwave
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0.11'
33
+ version: '1.0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0.11'
40
+ version: '1.0'
41
41
  description: A beautiful WYSIWYG editor with image uploads for Rails.
42
42
  email:
43
43
  - rubygems@radicaos.com
@@ -105,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
105
105
  version: '0'
106
106
  requirements: []
107
107
  rubyforge_project:
108
- rubygems_version: 2.6.4
108
+ rubygems_version: 2.6.10
109
109
  signing_key:
110
110
  specification_version: 4
111
111
  summary: A beautiful WYSIWYG editor with image uploads for Rails.