uuidable 1.0.0 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8f081ae636a60448b89df948da41feb1b11bfdc8a338d79b2c6c407732b2f3f8
4
- data.tar.gz: 0a878578bbcb7d31c48a8688feeeaef4ac1d5aff333dc7b0b9087f27668d9680
3
+ metadata.gz: aa4a74b0f2c720e55d414291fa36806fe58fc980c4f633e8986038b282519938
4
+ data.tar.gz: 5b94d93dad302eb9b5e1f1772db986077d1304ca8a1ae1c46411fc7044f2b541
5
5
  SHA512:
6
- metadata.gz: bc2257a1ce64b2e4d3a69b50fd5600b8737c1e9ad733b05cf989ec247115bcd4b002a3a564502e0a69686b37f1421a22972494471aee5d5c91ae2c9fe6b27127
7
- data.tar.gz: 1c3870cfe1234a8197a8f8d79746b8ba4c2bde15b3d61b83658c52548a2c9a4cd223141a11ac0585cfd8c545aaed7576e266155ecc4158a2d84a8d45e4927e14
6
+ metadata.gz: 15a958b147645fc441dd5cc5acc6b0387493dc18ab047286dce11489d7c9d26f65db748506dbbb7892be4391b4144c35c676cb82a542d58213fc35148c557b4e
7
+ data.tar.gz: 4ca1ea2507acba4721a10309c2909e7fd4e1ced208d35200f21cabe286dcdc3f47efc764e7a43bbe72bdc1a4a30438687c7c9e02d734adc8a948993f0ead127c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- uuidable (1.0.0)
4
+ uuidable (1.0.2)
5
5
  activerecord (>= 4.2, < 7.2)
6
6
  mysql-binuuid-rails (>= 1.3, < 2)
7
7
  uuidtools (>= 2.1, < 3)
@@ -9,22 +9,33 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- activemodel (7.0.4.1)
13
- activesupport (= 7.0.4.1)
14
- activerecord (7.0.4.1)
15
- activemodel (= 7.0.4.1)
16
- activesupport (= 7.0.4.1)
17
- activesupport (7.0.4.1)
12
+ activemodel (7.1.3.2)
13
+ activesupport (= 7.1.3.2)
14
+ activerecord (7.1.3.2)
15
+ activemodel (= 7.1.3.2)
16
+ activesupport (= 7.1.3.2)
17
+ timeout (>= 0.4.0)
18
+ activesupport (7.1.3.2)
19
+ base64
20
+ bigdecimal
18
21
  concurrent-ruby (~> 1.0, >= 1.0.2)
22
+ connection_pool (>= 2.2.5)
23
+ drb
19
24
  i18n (>= 1.6, < 2)
20
25
  minitest (>= 5.1)
26
+ mutex_m
21
27
  tzinfo (~> 2.0)
22
28
  addressable (2.8.0)
23
29
  public_suffix (>= 2.0.2, < 5.0)
24
30
  ast (2.4.2)
25
31
  backports (3.6.8)
26
- concurrent-ruby (1.1.10)
32
+ base64 (0.2.0)
33
+ bigdecimal (3.1.6)
34
+ concurrent-ruby (1.2.3)
35
+ connection_pool (2.4.1)
27
36
  diff-lcs (1.5.0)
37
+ drb (2.2.0)
38
+ ruby2_keywords
28
39
  ethon (0.8.1)
29
40
  ffi (>= 1.3.0)
30
41
  faraday (0.9.2)
@@ -40,14 +51,15 @@ GEM
40
51
  net-http-persistent (>= 2.7)
41
52
  net-http-pipeline
42
53
  highline (1.7.8)
43
- i18n (1.12.0)
54
+ i18n (1.14.1)
44
55
  concurrent-ruby (~> 1.0)
45
56
  json (2.3.1)
46
57
  launchy (2.4.3)
47
58
  addressable (~> 2.3)
48
- minitest (5.17.0)
59
+ minitest (5.22.2)
49
60
  multi_json (1.11.2)
50
61
  multipart-post (2.0.0)
62
+ mutex_m (0.2.0)
51
63
  mysql-binuuid-rails (1.3.0)
52
64
  activerecord (>= 5)
53
65
  net-http-persistent (2.9.4)
@@ -89,6 +101,8 @@ GEM
89
101
  rubocop-ast (1.19.1)
90
102
  parser (>= 3.1.1.0)
91
103
  ruby-progressbar (1.11.0)
104
+ ruby2_keywords (0.0.5)
105
+ timeout (0.4.1)
92
106
  travis (1.8.2)
93
107
  backports
94
108
  faraday (~> 0.9)
@@ -100,7 +114,7 @@ GEM
100
114
  typhoeus (~> 0.6, >= 0.6.8)
101
115
  typhoeus (0.8.0)
102
116
  ethon (>= 0.8.0)
103
- tzinfo (2.0.5)
117
+ tzinfo (2.0.6)
104
118
  concurrent-ruby (~> 1.0)
105
119
  unicode-display_width (2.2.0)
106
120
  uuidtools (2.2.0)
@@ -24,7 +24,8 @@ module Uuidable
24
24
  def uuidable(as_param: true) # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
25
25
  # Configure all uuid columns for MySQL. Database may not be connected (i.e. on assets precompile), so we must supress errors.
26
26
  conn_config = respond_to?(:connection_db_config) ? connection_db_config.configuration_hash : connection_config
27
- if conn_config[:adapter].include?('mysql')
27
+
28
+ if conn_config[:adapter].include?('mysql') && connection.data_source_exists?(table_name)
28
29
  begin
29
30
  columns.select { |c| c.type == :binary && c.limit == 16 && c.name.include?('uuid') }.each do |column|
30
31
  attribute column.name.to_sym, MySQLBinUUID::Type.new
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uuidable
4
- VERSION = '1.0.0'
4
+ VERSION = '1.0.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uuidable
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergey Gnuskov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-02-27 00:00:00.000000000 Z
11
+ date: 2024-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -177,7 +177,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
177
177
  - !ruby/object:Gem::Version
178
178
  version: '0'
179
179
  requirements: []
180
- rubygems_version: 3.5.3
180
+ rubygems_version: 3.5.9
181
181
  signing_key:
182
182
  specification_version: 4
183
183
  summary: Helps using uuid everywhere in routes instead of id for ActiveRecord models.