agilibox 1.3.5 → 1.3.6

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
  SHA256:
3
- metadata.gz: 66337e184cad2e838e45b87d65dc32fba8939e49d57651c0116aa52940ae14ff
4
- data.tar.gz: 01b1e3d2c551d68b8a5e7f69bb4e48200bd8db63d07cd43eb482e3cf7d3958d4
3
+ metadata.gz: 4f15e9e0b1db8b6b6735af5aa25e30390bfecbc8556c1f3a460e123335dde463
4
+ data.tar.gz: 1bacaf3648533dfc130a0a77256e5a11c1583aaec0d2c5299a1a85cba862c7ae
5
5
  SHA512:
6
- metadata.gz: 2b9211f2cf491df7db05981879b35c466a4b13217c18c76d612585d2d83a951d0d88967f499fec90bdf63d940fa269ca40e9b6f70589c523fa098de284b67146
7
- data.tar.gz: a56c82f2d46b32db501e31a1e684f76db80c7742b5a498d7e579916ab72092ec9f9bc601b22fcd7aec4c85af9c954bc1ca6dcb64965378e66f9c446fa8b69bb1
6
+ metadata.gz: 4b03b38d3f15eed681d0cb69e8d620acaa1b95b900233a42ad4f2b7bc46d98600162baefc077af9f69c875b6c426a7a3ac0671afda9cefde23e2c67ec199aa24
7
+ data.tar.gz: 469426483f126c9fc06f475799e741bcde20e9e64d7cf3e2a7c7239681efa3add46a9c251f2d2d9e9da7662e35c135bf410a89872f4436833e33680f8d30ffdf
data/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  ## Next version
4
4
 
5
+ ## 1.3.6
6
+
7
+ - Remove deprecated `Agilibox::SortableUUIDGenerator::generate`
8
+ - `Agilibox::ActiveRecordUUIDConcern` improvements
9
+ - `Agilibox::DefaultValuesConcern` improvements
10
+ - Fix FontAwesome version error
11
+
5
12
  ## 1.3.5
6
13
 
7
14
  - Add `Agilibox::Monkey`
@@ -34,7 +34,7 @@ module Agilibox::FontAwesomeHelper
34
34
 
35
35
  def download_database!
36
36
  require "open-uri"
37
- url = "https://raw.githubusercontent.com/FortAwesome/Font-Awesome/master/advanced-options/metadata/icons.yml"
37
+ url = "https://raw.githubusercontent.com/FortAwesome/Font-Awesome/#{FontAwesome::Sass::VERSION}/advanced-options/metadata/icons.yml"
38
38
  data = URI.parse(url).open.read
39
39
  File.write(database_path, data)
40
40
  end
@@ -8,9 +8,4 @@ class Agilibox::SortableUUIDGenerator
8
8
  suffix = SecureRandom.hex(8)
9
9
  (prefix + suffix).gsub(REGEX_WITHOUT_DASHES, '\1-\2-\3-\4-\5')
10
10
  end
11
-
12
- def self.generate
13
- warn "#{self}::generate is deprecared, please use ::call"
14
- call
15
- end
16
11
  end
@@ -4,9 +4,11 @@ module Agilibox::ActiveRecordUUIDConcern
4
4
  private
5
5
 
6
6
  def assign_default_uuid
7
- if id.nil? && self.class.columns_hash["id"].type == :uuid
8
- self.id = ::Agilibox::SortableUUIDGenerator.generate
7
+ unless self.class.columns_hash["id"].type == :uuid
8
+ raise "invalid id type, please change to uuid"
9
9
  end
10
+
11
+ self.id ||= ::Agilibox::SortableUUIDGenerator.call
10
12
  end
11
13
 
12
14
  included do
@@ -9,6 +9,6 @@ module Agilibox::DefaultValuesConcern
9
9
  end
10
10
 
11
11
  included do
12
- after_initialize :assign_default_values
12
+ after_initialize :assign_default_values, if: :new_record?
13
13
  end
14
14
  end
@@ -0,0 +1,7 @@
1
+ class EnableAgiliboxExtensions < ActiveRecord::Migration[5.1]
2
+ def change
3
+ enable_extension "pgcrypto"
4
+ enable_extension "unaccent"
5
+ enable_extension "uuid-ossp"
6
+ end
7
+ end
@@ -1,3 +1,3 @@
1
1
  module Agilibox
2
- VERSION = "1.3.5"
2
+ VERSION = "1.3.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: agilibox
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.5
4
+ version: 1.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - agilidée
@@ -150,7 +150,7 @@ files:
150
150
  - config/locales/errors.en.yml
151
151
  - config/locales/errors.fr.yml
152
152
  - config/routes.rb
153
- - db/migrate/20170502143330_enable_unaccent.rb
153
+ - db/migrate/20000101000000_enable_agilibox_extensions.rb
154
154
  - lib/agilibox.rb
155
155
  - lib/agilibox/active_model_custom_error_messages.rb
156
156
  - lib/agilibox/active_record_comma_type_cast.rb
@@ -1,5 +0,0 @@
1
- class EnableUnaccent < ActiveRecord::Migration[5.0]
2
- def change
3
- enable_extension "unaccent"
4
- end
5
- end