autocomplete_for 1.2 → 1.3

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: 1a866f0de096b328e242405a2f80cdb0b4427bba76c4b82802db7caa65bdbdb1
4
- data.tar.gz: 0711f05bd588f7813bf76dcc6ce9c943dd9c3e750c9da6a737c68a472567f21f
3
+ metadata.gz: ed0b922317caa0d7c081c2c40b654f94ea4532a27ad706c81a08b4878d3bc81c
4
+ data.tar.gz: f085e8fc3405ba0b7bf6d52958e1f057615951f69705633b0b8d8e53eb132039
5
5
  SHA512:
6
- metadata.gz: 0646dee01dff94a2cf93e99b344f155769cddf7c22e237a713f9897fe0237218761c11f5273624405cf09a6dfd1febbcc9e08959b1ae222ce84e03c5235f2cf9
7
- data.tar.gz: 1c80fb60a11a62d12eb978e30ea2b3d5a89e5bcefbc27836e30a1bef2b57f3d272046366ae046626d04d522ddaccd5bead10b6b7cd572ace1197339d31d7d86f
6
+ metadata.gz: '0149cac0d2d08ba879a28d463d7e3233b43a1bd9beb0c6bebd91ed7d332a59348ba5a2ce394b91fe5b8abb482630936d74f39eca171e5855e66c5c5d44acf5d8'
7
+ data.tar.gz: 0d6bd3760680801998c6f3f665219b7fbbd6343014191a3722c6aace0a8269c9c468809afb52a7a20a98ccdecb8abfd6d472c6912dbe0939b01adcb6bec5d928
data/README.markdown CHANGED
@@ -5,8 +5,6 @@
5
5
  This version was introduced to support Rails 5. It depends on activerecord ~> 5.0 and contains several large gem upgrades.
6
6
  This is not a backwards compatible upgrade, and introduces many breaking changes if there is no gem compatibility.
7
7
 
8
- For Rails 4 support please use: [v0.3.0](https://github.com/nulogy/autocomplete_for/tree/v0.3.0)
9
-
10
8
  AutocompleteFor
11
9
  ===============
12
10
 
@@ -54,5 +52,3 @@ Errors are generated automatically if the given information does not correspond
54
52
 
55
53
  ### Running the tests
56
54
  You can run the unit tests using `rake`
57
-
58
- Copyright (c) 2019 Nulogy Corporation, released under the MIT license
@@ -6,8 +6,7 @@ module AutocompleteFor
6
6
  end
7
7
 
8
8
  module ClassMethods
9
- def autocomplete_for(association, field, options = {}, &block)
10
- allow_nil = options[:allow_nil] || false
9
+ def autocomplete_for(association, field, allow_nil: false, &block)
11
10
  validate :"validate_#{association}_by_#{field}"
12
11
  before_validation :"associate_#{association}_by_#{field}"
13
12
  instance_variable_set(:"@#{association}_#{field}_allow_nil", allow_nil)
@@ -96,7 +95,7 @@ module AutocompleteFor
96
95
  return if self.class.instance_variable_get(error_fields_name).any? { |ef| errors[ef].any? }
97
96
  return unless send(:read_attribute_for_validation, association.to_sym).blank?
98
97
 
99
- errors.add(association.to_sym, :blank, options)
98
+ errors.add(association.to_sym, :blank)
100
99
  end
101
100
  end
102
101
  end
@@ -104,4 +103,4 @@ module AutocompleteFor
104
103
  end
105
104
  end
106
105
 
107
- ActiveRecord::Base.send(:include, AutocompleteFor) # rubocop:disable Lint/SendWithMixinArgument
106
+ ActiveRecord::Base.include(AutocompleteFor)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AutocompleteFor
4
- VERSION = "1.2"
4
+ VERSION = "1.3"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autocomplete_for
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.2'
4
+ version: '1.3'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Kirby
@@ -9,28 +9,22 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-07-13 00:00:00.000000000 Z
12
+ date: 2023-03-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ">="
19
- - !ruby/object:Gem::Version
20
- version: '5.1'
21
- - - "<"
18
+ - - "~>"
22
19
  - !ruby/object:Gem::Version
23
- version: '7.0'
20
+ version: '6.1'
24
21
  type: :runtime
25
22
  prerelease: false
26
23
  version_requirements: !ruby/object:Gem::Requirement
27
24
  requirements:
28
- - - ">="
29
- - !ruby/object:Gem::Version
30
- version: '5.1'
31
- - - "<"
25
+ - - "~>"
32
26
  - !ruby/object:Gem::Version
33
- version: '7.0'
27
+ version: '6.1'
34
28
  - !ruby/object:Gem::Dependency
35
29
  name: appraisal
36
30
  requirement: !ruby/object:Gem::Requirement
@@ -49,22 +43,16 @@ dependencies:
49
43
  name: rails
50
44
  requirement: !ruby/object:Gem::Requirement
51
45
  requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '6.0'
55
- - - "<"
46
+ - - "~>"
56
47
  - !ruby/object:Gem::Version
57
- version: '7.0'
48
+ version: '6.1'
58
49
  type: :development
59
50
  prerelease: false
60
51
  version_requirements: !ruby/object:Gem::Requirement
61
52
  requirements:
62
- - - ">="
63
- - !ruby/object:Gem::Version
64
- version: '6.0'
65
- - - "<"
53
+ - - "~>"
66
54
  - !ruby/object:Gem::Version
67
- version: '7.0'
55
+ version: '6.1'
68
56
  - !ruby/object:Gem::Dependency
69
57
  name: rake
70
58
  requirement: !ruby/object:Gem::Requirement
@@ -85,42 +73,42 @@ dependencies:
85
73
  requirements:
86
74
  - - "~>"
87
75
  - !ruby/object:Gem::Version
88
- version: '5.0'
76
+ version: '6.0'
89
77
  type: :development
90
78
  prerelease: false
91
79
  version_requirements: !ruby/object:Gem::Requirement
92
80
  requirements:
93
81
  - - "~>"
94
82
  - !ruby/object:Gem::Version
95
- version: '5.0'
83
+ version: '6.0'
96
84
  - !ruby/object:Gem::Dependency
97
85
  name: rubocop
98
86
  requirement: !ruby/object:Gem::Requirement
99
87
  requirements:
100
88
  - - "~>"
101
89
  - !ruby/object:Gem::Version
102
- version: '1.18'
90
+ version: '1.47'
103
91
  type: :development
104
92
  prerelease: false
105
93
  version_requirements: !ruby/object:Gem::Requirement
106
94
  requirements:
107
95
  - - "~>"
108
96
  - !ruby/object:Gem::Version
109
- version: '1.18'
97
+ version: '1.47'
110
98
  - !ruby/object:Gem::Dependency
111
99
  name: sqlite3
112
100
  requirement: !ruby/object:Gem::Requirement
113
101
  requirements:
114
102
  - - "~>"
115
103
  - !ruby/object:Gem::Version
116
- version: '1.4'
104
+ version: '1.6'
117
105
  type: :development
118
106
  prerelease: false
119
107
  version_requirements: !ruby/object:Gem::Requirement
120
108
  requirements:
121
109
  - - "~>"
122
110
  - !ruby/object:Gem::Version
123
- version: '1.4'
111
+ version: '1.6'
124
112
  description: Model-side logic for autocompleting belongs_to associations
125
113
  email: skirby@gmail.com
126
114
  executables: []
@@ -141,6 +129,7 @@ metadata:
141
129
  changelog_uri: https://github.com/nulogy/autocomplete_for/blob/master/CHANGELOG.md
142
130
  source_code_uri: https://github.com/nulogy/autocomplete_for
143
131
  bug_tracker_uri: https://github.com/nulogy/autocomplete_for/issues
132
+ rubygems_mfa_required: 'true'
144
133
  post_install_message:
145
134
  rdoc_options: []
146
135
  require_paths:
@@ -149,14 +138,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
149
138
  requirements:
150
139
  - - ">="
151
140
  - !ruby/object:Gem::Version
152
- version: '2.6'
141
+ version: '2.7'
153
142
  required_rubygems_version: !ruby/object:Gem::Requirement
154
143
  requirements:
155
144
  - - ">="
156
145
  - !ruby/object:Gem::Version
157
146
  version: '0'
158
147
  requirements: []
159
- rubygems_version: 3.1.6
148
+ rubygems_version: 3.4.7
160
149
  signing_key:
161
150
  specification_version: 4
162
151
  summary: Autocomplete for models