autocomplete_for 1.1 → 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: 0f2d8bc6a37381635eeb26a7b8a154136b9ff07e44c056e6ad191287f8971278
4
- data.tar.gz: e9973f4862e0b067f4319437de7fb554dbb3465be0ad040865d09b7a155226cc
3
+ metadata.gz: ed0b922317caa0d7c081c2c40b654f94ea4532a27ad706c81a08b4878d3bc81c
4
+ data.tar.gz: f085e8fc3405ba0b7bf6d52958e1f057615951f69705633b0b8d8e53eb132039
5
5
  SHA512:
6
- metadata.gz: c25f187dac5529ab52f8b7fb7901230c47a43597dc779b887b12eec274becd44d466c2a8b21362a80943a41a9f805a89eedc395bace1af49c05a18e5f3919e74
7
- data.tar.gz: 7c06ef0adc93b3e34ecb98d18d3dc2eea4976a3d64669476239ebd9198cfd6f3204c1ffbb6c41f601053a6c78abec927ebd3c6b0af70976ec32a1b38f9a307a7
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)
106
+ ActiveRecord::Base.include(AutocompleteFor)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AutocompleteFor
4
- VERSION = "1.1"
4
+ VERSION = "1.3"
5
5
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "autocomplete_for/autocomplete_for.rb"
4
- require "autocomplete_for/version.rb"
3
+ require "autocomplete_for/autocomplete_for"
4
+ require "autocomplete_for/version"
5
5
 
6
6
  module AutocompleteFor
7
7
  end
metadata CHANGED
@@ -1,34 +1,28 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autocomplete_for
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.1'
4
+ version: '1.3'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Kirby
8
8
  - Alistair McKinnell
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-11-05 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
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
27
  version: '6.1'
34
28
  - !ruby/object:Gem::Dependency
@@ -37,34 +31,28 @@ dependencies:
37
31
  requirements:
38
32
  - - "~>"
39
33
  - !ruby/object:Gem::Version
40
- version: '2.3'
34
+ version: '2.4'
41
35
  type: :development
42
36
  prerelease: false
43
37
  version_requirements: !ruby/object:Gem::Requirement
44
38
  requirements:
45
39
  - - "~>"
46
40
  - !ruby/object:Gem::Version
47
- version: '2.3'
41
+ version: '2.4'
48
42
  - !ruby/object:Gem::Dependency
49
43
  name: rails
50
44
  requirement: !ruby/object:Gem::Requirement
51
45
  requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '5.1'
55
- - - "<"
46
+ - - "~>"
56
47
  - !ruby/object:Gem::Version
57
- version: '6.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: '5.1'
65
- - - "<"
53
+ - - "~>"
66
54
  - !ruby/object:Gem::Version
67
- version: '6.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: '4.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: '4.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.2'
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.2'
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.3'
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.3'
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,7 +129,8 @@ 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
144
- post_install_message:
132
+ rubygems_mfa_required: 'true'
133
+ post_install_message:
145
134
  rdoc_options: []
146
135
  require_paths:
147
136
  - lib
@@ -149,15 +138,15 @@ 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.4
160
- signing_key:
148
+ rubygems_version: 3.4.7
149
+ signing_key:
161
150
  specification_version: 4
162
151
  summary: Autocomplete for models
163
152
  test_files: []