can_has_validations 1.8.0 → 1.8.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: c78f8e5cbb5c2bd034070fad41bbaf78b622430b2c0546b6cf2cb22f05fe0d93
4
- data.tar.gz: e852f21850a91d4a0f348b96b913c315de7d663d812ac05b30f16917b216ad5a
3
+ metadata.gz: 2f635564611bf5299054332c630d3a8b79f35df7d7043c2c5fa69916fb9b1c6d
4
+ data.tar.gz: f4285094a1ce68e23afbadfa184e15a369b80fc17cf7b7f3c3290d03a33ae0b9
5
5
  SHA512:
6
- metadata.gz: ef126f2bd28db8947e189adef8572ca63d3cd964ab19732fd1291d49315c703b0f386793aeb2df22c4cea97ef195be9b6e6affacb91a49748f0df9cc05152cc3
7
- data.tar.gz: 920a6ca45c368c4e3ddd077018b0ea67bb3bc11a46ca0855480077d3e62c8c5ccccbb6b55da1fbf99b3b727d9408f264b3744d6f938b9e6db1bfef390ff25434
6
+ metadata.gz: cf8882a6d062c0cb28820fd8fcdd8807033e9a70a7ad870cf601e3358cba9f583d83e42e64a340da811c4d54e20713266c93d21cc23626098aebbbc02491fc64
7
+ data.tar.gz: aaabdb88bc3eded9d74a7bdbaac39a2ea3fb7d66a33a7b9fc6cc3e7b2e6d4975b7203feb18e1e4d7f6f0042b5a5755c942d1886d5f1cae5064e3b9daf88e101a
@@ -1,4 +1,4 @@
1
- Copyright 2012-2023 thomas morgan
1
+ Copyright 2012-2024 thomas morgan
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -12,7 +12,7 @@
12
12
  # If the addressable gem is present, will automatically turn unicode domains
13
13
  # into their punycode (xn--) equivalent. Otherwise, unicode characters will
14
14
  # cause the validation to fail.
15
- #
15
+ #
16
16
  # eg: validates :domain, hostname: true
17
17
  # validates :domain, hostname: {allow_wildcard: true}
18
18
  # allows '*.example.com'
@@ -52,7 +52,7 @@ module ActiveModel::Validations
52
52
  if defined?(Addressable::IDNA)
53
53
  value &&= Addressable::IDNA.to_ascii(value)
54
54
  end
55
- labels = value.split('.')
55
+ labels = value.split('.', -1)
56
56
 
57
57
  is_valid = true
58
58
  is_valid &&= value.length <= 255
@@ -72,15 +72,13 @@ module ActiveModel::Validations
72
72
  end
73
73
 
74
74
  def resolve_array(record, val)
75
- res = if val.respond_to?(:call)
75
+ if val.respond_to?(:call)
76
76
  val.call(record)
77
77
  elsif val.is_a?(Symbol)
78
78
  record.send(val)
79
79
  else
80
80
  val
81
81
  end
82
- # raise "#{val.inspect} did not resolve to an Array of IPAddr" unless res.is_a?(Array) && res.all?{|r| r.is_a?(IPAddr)}
83
- # res
84
82
  end
85
83
 
86
84
  end
@@ -1,3 +1,3 @@
1
1
  module CanHasValidations
2
- VERSION = '1.8.0'
2
+ VERSION = '1.8.2'
3
3
  end
Binary file
@@ -1,22 +1,58 @@
1
-  (1.0ms) SELECT sqlite_version(*)
2
- TRANSACTION (0.1ms) begin transaction
1
+ TRANSACTION (0.0ms) begin transaction
3
2
  ---------------------------------
4
3
  CanHasValidationsTest: test_truth
5
4
  ---------------------------------
6
5
  TRANSACTION (0.0ms) rollback transaction
7
-  (0.8ms) SELECT sqlite_version(*)
8
- TRANSACTION (0.1ms) begin transaction
6
+ TRANSACTION (0.0ms) begin transaction
9
7
  ---------------------------------
10
8
  CanHasValidationsTest: test_truth
11
9
  ---------------------------------
12
10
  TRANSACTION (0.0ms) rollback transaction
13
-  (0.6ms) SELECT sqlite_version(*)
14
- TRANSACTION (0.1ms) begin transaction
11
+ TRANSACTION (0.0ms) begin transaction
15
12
  ---------------------------------
16
13
  CanHasValidationsTest: test_truth
17
14
  ---------------------------------
18
15
  TRANSACTION (0.0ms) rollback transaction
19
- TRANSACTION (0.1ms) begin transaction
16
+  (0.3ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
17
+  (0.1ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)
18
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
19
+ TRANSACTION (0.0ms) begin transaction
20
+ ---------------------------------
21
+ CanHasValidationsTest: test_truth
22
+ ---------------------------------
23
+ TRANSACTION (0.0ms) rollback transaction
24
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
25
+ TRANSACTION (0.0ms) begin transaction
26
+ ---------------------------------
27
+ CanHasValidationsTest: test_truth
28
+ ---------------------------------
29
+ TRANSACTION (0.0ms) rollback transaction
30
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
31
+ TRANSACTION (0.0ms) begin transaction
32
+ ---------------------------------
33
+ CanHasValidationsTest: test_truth
34
+ ---------------------------------
35
+ TRANSACTION (0.0ms) rollback transaction
36
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
37
+ TRANSACTION (0.0ms) begin transaction
38
+ ---------------------------------
39
+ CanHasValidationsTest: test_truth
40
+ ---------------------------------
41
+ TRANSACTION (0.0ms) rollback transaction
42
+ ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
43
+ TRANSACTION (0.0ms) begin transaction
44
+ ---------------------------------
45
+ CanHasValidationsTest: test_truth
46
+ ---------------------------------
47
+ TRANSACTION (0.0ms) rollback transaction
48
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
49
+ TRANSACTION (0.0ms) begin transaction
50
+ ---------------------------------
51
+ CanHasValidationsTest: test_truth
52
+ ---------------------------------
53
+ TRANSACTION (0.0ms) rollback transaction
54
+ ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
55
+ TRANSACTION (0.0ms) begin transaction
20
56
  ---------------------------------
21
57
  CanHasValidationsTest: test_truth
22
58
  ---------------------------------
@@ -0,0 +1 @@
1
+ 61a3c8e99a7b6cc0bb0f95a6ae452d5b035a9b9d0ff2f176f3a0726e9b80c930654d3c14096e5f0db05bcf7cc079f0a68a94c2ff61e27a40d6ed12d1544c112f
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: can_has_validations
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.0
4
+ version: 1.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - thomas morgan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-13 00:00:00.000000000 Z
11
+ date: 2024-06-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '5.2'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '7.1'
22
+ version: '7.2'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '5.2'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '7.1'
32
+ version: '7.2'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: rake
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -48,16 +48,16 @@ dependencies:
48
48
  name: sqlite3
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
- - - ">="
51
+ - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: '0'
53
+ version: '1.4'
54
54
  type: :development
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
- - - ">="
58
+ - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: '0'
60
+ version: '1.4'
61
61
  description: 'Assorted Rails 5.x-7.x validators: Array, Email, Existence, Grandparent,
62
62
  Hash keys, Hash values, Hostname, IP address, Ordering, URL, Write Once'
63
63
  email:
@@ -66,7 +66,7 @@ executables: []
66
66
  extensions: []
67
67
  extra_rdoc_files: []
68
68
  files:
69
- - MIT-LICENSE
69
+ - LICENSE.txt
70
70
  - README.md
71
71
  - Rakefile
72
72
  - lib/can_has_validations.rb
@@ -119,7 +119,6 @@ files:
119
119
  - test/dummy/config/routes.rb
120
120
  - test/dummy/config/storage.yml
121
121
  - test/dummy/db/test.sqlite3
122
- - test/dummy/log/development.log
123
122
  - test/dummy/log/test.log
124
123
  - test/dummy/public/404.html
125
124
  - test/dummy/public/422.html
@@ -127,6 +126,7 @@ files:
127
126
  - test/dummy/public/favicon.ico
128
127
  - test/dummy/script/rails
129
128
  - test/dummy/tmp/development_secret.txt
129
+ - test/dummy/tmp/local_secret.txt
130
130
  - test/test_helper.rb
131
131
  homepage: https://github.com/zarqman/can_has_validations
132
132
  licenses:
@@ -147,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
147
147
  - !ruby/object:Gem::Version
148
148
  version: '0'
149
149
  requirements: []
150
- rubygems_version: 3.3.26
150
+ rubygems_version: 3.5.11
151
151
  signing_key:
152
152
  specification_version: 4
153
153
  summary: Assorted Rails 5.x-7.x validators
@@ -185,7 +185,6 @@ test_files:
185
185
  - test/dummy/config/storage.yml
186
186
  - test/dummy/config.ru
187
187
  - test/dummy/db/test.sqlite3
188
- - test/dummy/log/development.log
189
188
  - test/dummy/log/test.log
190
189
  - test/dummy/public/404.html
191
190
  - test/dummy/public/422.html
@@ -193,4 +192,5 @@ test_files:
193
192
  - test/dummy/public/favicon.ico
194
193
  - test/dummy/script/rails
195
194
  - test/dummy/tmp/development_secret.txt
195
+ - test/dummy/tmp/local_secret.txt
196
196
  - test/test_helper.rb
@@ -1,8 +0,0 @@
1
- DEPRECATION WARNING: Using legacy connection handling is deprecated. Please set
2
- `legacy_connection_handling` to `false` in your application.
3
-
4
- The new connection handling does not support `connection_handlers`
5
- getter and setter.
6
-
7
- Read more about how to migrate at: https://guides.rubyonrails.org/active_record_multiple_databases.html#migrate-to-the-new-connection-handling
8
- (called from require at script/rails:6)