discerner 2.0.15 → 2.0.16

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 49628dbdcf63e05933a54b84e4d6f0162c322f78
4
- data.tar.gz: ca6cc17e8d4f66c9484508e195d7f6ddead236d3
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ ODE5YWI0NTJhZjZhNmJiMTQxNjFiNDI3N2ZkNGQ4YzNjNGM3MjA5MQ==
5
+ data.tar.gz: !binary |-
6
+ YTE4YjcyMDhmZmI3ZDY1MDA1NWVhMDQ5MTMzZjZiNmMwZmRhYTRjNw==
5
7
  SHA512:
6
- metadata.gz: 6f8194a039eba254752279fe88b6aa848c7cd8085f88df29358b4ea6d5d9a9885825188560fa5af22829197826b404233707dfe90430af1022e6edd26af44bc0
7
- data.tar.gz: e7306ba0e1dcc68816bf0b516440e20d8e843209c05f7182a8b9f8686e8c1e2a53609210bafe17077e7e22e74fa0c52de2227c4d5ea5b193d7794d79f3d28464
8
+ metadata.gz: !binary |-
9
+ NmIyYTgxYzhkMDQyNTE0ZWEwMmViZWExNzYzNzViMzhjN2E4MjBjMjZhMTJh
10
+ YTc1M2I0MjljODFhMDhiZWY3OTc1MzUxNWQyNzQzMTdkODAwNTdjOGQzOGMz
11
+ NzJlZDE5ODdkN2Y0ZTA1ZDQ3NjUwYmU4ODg0YjYwZWM1NWVjMGE=
12
+ data.tar.gz: !binary |-
13
+ YTJlN2QwZjQ3ZmZmZWQ5MTM4ODg2ZGY0MDBhNjQ0MWFmYjVjMWMwMTdjOGJm
14
+ NDBlMmI5M2M4NmIyMmE5M2M2MzYxODNmMzkxMDQwOTUxMjQzMzFlMGU0ZjY5
15
+ NjNmY2Y1NmYyMGQ4MWE1NmY1YTUwMWY0ZjhiMjdiMGEyMmZkY2Y=
@@ -53,7 +53,9 @@ module Discerner
53
53
  end
54
54
 
55
55
  def validate_unique_identifier
56
- return if self.parameter_category.blank?
56
+ puts 'moomin says hi'
57
+ puts "#{self.unique_identifier}"
58
+ return if self.parameter_category.blank? #|| self.parameter_category.dictionary.blank?
57
59
  existing_parameters = Discerner::Parameter.
58
60
  joins({ parameter_category: :dictionary }).
59
61
  where('discerner_dictionaries.id = ? and discerner_parameters.unique_identifier = ?', self.parameter_category.dictionary.id, self.unique_identifier)
@@ -91,8 +91,7 @@ module Discerner
91
91
 
92
92
  def to_sql
93
93
  sql = prepare_sql
94
- if search_model_class && !search_model_attribute_method?
95
- raise "Search model #{parameter.search_model} does not respond to search method #{parameter.search_method}" unless search_model_class.respond_to?(parameter.search_method)
94
+ if search_model_class && !search_model_attribute_method? && search_model_class.respond_to?(parameter.search_method)
96
95
  sql = search_model_class.send(parameter.search_method, sql)
97
96
  end
98
97
  sql
@@ -449,6 +449,7 @@ module Discerner
449
449
  notification_message("marking parameter category #{r.name} as deleted");
450
450
  r.deleted_at = Time.now
451
451
  error_message "parameter category could not be deleted: #{r.errors.full_messages}", r.name unless r.save
452
+ # r.save
452
453
  end
453
454
 
454
455
  unless not_used_categories.blank?
@@ -1,3 +1,3 @@
1
1
  module Discerner
2
- VERSION = "2.0.15"
2
+ VERSION = "2.0.16"
3
3
  end
metadata CHANGED
@@ -1,293 +1,293 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: discerner
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.15
4
+ version: 2.0.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Gurley, Yulia Bushmanova
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-15 00:00:00.000000000 Z
11
+ date: 2016-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
19
  version: '4.1'
20
- - - ">="
20
+ - - ! '>='
21
21
  - !ruby/object:Gem::Version
22
22
  version: 4.1.0
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - "~>"
27
+ - - ~>
28
28
  - !ruby/object:Gem::Version
29
29
  version: '4.1'
30
- - - ">="
30
+ - - ! '>='
31
31
  - !ruby/object:Gem::Version
32
32
  version: 4.1.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: jquery-rails
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
- - - "~>"
37
+ - - ~>
38
38
  - !ruby/object:Gem::Version
39
39
  version: 4.0.0
40
- - - ">="
40
+ - - ! '>='
41
41
  - !ruby/object:Gem::Version
42
42
  version: 4.0.0
43
43
  type: :runtime
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
46
46
  requirements:
47
- - - "~>"
47
+ - - ~>
48
48
  - !ruby/object:Gem::Version
49
49
  version: 4.0.0
50
- - - ">="
50
+ - - ! '>='
51
51
  - !ruby/object:Gem::Version
52
52
  version: 4.0.0
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: haml
55
55
  requirement: !ruby/object:Gem::Requirement
56
56
  requirements:
57
- - - "~>"
57
+ - - ~>
58
58
  - !ruby/object:Gem::Version
59
59
  version: '4.0'
60
- - - ">="
60
+ - - ! '>='
61
61
  - !ruby/object:Gem::Version
62
62
  version: 4.0.5
63
63
  type: :runtime
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - "~>"
67
+ - - ~>
68
68
  - !ruby/object:Gem::Version
69
69
  version: '4.0'
70
- - - ">="
70
+ - - ! '>='
71
71
  - !ruby/object:Gem::Version
72
72
  version: 4.0.5
73
73
  - !ruby/object:Gem::Dependency
74
74
  name: sass-rails
75
75
  requirement: !ruby/object:Gem::Requirement
76
76
  requirements:
77
- - - "~>"
77
+ - - ~>
78
78
  - !ruby/object:Gem::Version
79
79
  version: '4.0'
80
- - - ">="
80
+ - - ! '>='
81
81
  - !ruby/object:Gem::Version
82
82
  version: 4.0.1
83
83
  type: :runtime
84
84
  prerelease: false
85
85
  version_requirements: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ~>
88
88
  - !ruby/object:Gem::Version
89
89
  version: '4.0'
90
- - - ">="
90
+ - - ! '>='
91
91
  - !ruby/object:Gem::Version
92
92
  version: 4.0.1
93
93
  - !ruby/object:Gem::Dependency
94
94
  name: sqlite3
95
95
  requirement: !ruby/object:Gem::Requirement
96
96
  requirements:
97
- - - "~>"
97
+ - - ~>
98
98
  - !ruby/object:Gem::Version
99
99
  version: 1.3.9
100
- - - ">="
100
+ - - ! '>='
101
101
  - !ruby/object:Gem::Version
102
102
  version: 1.3.9
103
103
  type: :development
104
104
  prerelease: false
105
105
  version_requirements: !ruby/object:Gem::Requirement
106
106
  requirements:
107
- - - "~>"
107
+ - - ~>
108
108
  - !ruby/object:Gem::Version
109
109
  version: 1.3.9
110
- - - ">="
110
+ - - ! '>='
111
111
  - !ruby/object:Gem::Version
112
112
  version: 1.3.9
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: rspec-rails
115
115
  requirement: !ruby/object:Gem::Requirement
116
116
  requirements:
117
- - - "~>"
117
+ - - ~>
118
118
  - !ruby/object:Gem::Version
119
119
  version: 3.0.2
120
- - - ">="
120
+ - - ! '>='
121
121
  - !ruby/object:Gem::Version
122
122
  version: 3.0.2
123
123
  type: :development
124
124
  prerelease: false
125
125
  version_requirements: !ruby/object:Gem::Requirement
126
126
  requirements:
127
- - - "~>"
127
+ - - ~>
128
128
  - !ruby/object:Gem::Version
129
129
  version: 3.0.2
130
- - - ">="
130
+ - - ! '>='
131
131
  - !ruby/object:Gem::Version
132
132
  version: 3.0.2
133
133
  - !ruby/object:Gem::Dependency
134
134
  name: factory_girl_rails
135
135
  requirement: !ruby/object:Gem::Requirement
136
136
  requirements:
137
- - - "~>"
137
+ - - ~>
138
138
  - !ruby/object:Gem::Version
139
139
  version: 4.4.1
140
- - - ">="
140
+ - - ! '>='
141
141
  - !ruby/object:Gem::Version
142
142
  version: 4.4.1
143
143
  type: :development
144
144
  prerelease: false
145
145
  version_requirements: !ruby/object:Gem::Requirement
146
146
  requirements:
147
- - - "~>"
147
+ - - ~>
148
148
  - !ruby/object:Gem::Version
149
149
  version: 4.4.1
150
- - - ">="
150
+ - - ! '>='
151
151
  - !ruby/object:Gem::Version
152
152
  version: 4.4.1
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: capybara
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
- - - "~>"
157
+ - - ~>
158
158
  - !ruby/object:Gem::Version
159
159
  version: 2.4.1
160
- - - ">="
160
+ - - ! '>='
161
161
  - !ruby/object:Gem::Version
162
162
  version: 2.4.1
163
163
  type: :development
164
164
  prerelease: false
165
165
  version_requirements: !ruby/object:Gem::Requirement
166
166
  requirements:
167
- - - "~>"
167
+ - - ~>
168
168
  - !ruby/object:Gem::Version
169
169
  version: 2.4.1
170
- - - ">="
170
+ - - ! '>='
171
171
  - !ruby/object:Gem::Version
172
172
  version: 2.4.1
173
173
  - !ruby/object:Gem::Dependency
174
174
  name: selenium-webdriver
175
175
  requirement: !ruby/object:Gem::Requirement
176
176
  requirements:
177
- - - "~>"
177
+ - - ~>
178
178
  - !ruby/object:Gem::Version
179
179
  version: 2.42.0
180
- - - ">="
180
+ - - ! '>='
181
181
  - !ruby/object:Gem::Version
182
182
  version: 2.42.0
183
183
  type: :development
184
184
  prerelease: false
185
185
  version_requirements: !ruby/object:Gem::Requirement
186
186
  requirements:
187
- - - "~>"
187
+ - - ~>
188
188
  - !ruby/object:Gem::Version
189
189
  version: 2.42.0
190
- - - ">="
190
+ - - ! '>='
191
191
  - !ruby/object:Gem::Version
192
192
  version: 2.42.0
193
193
  - !ruby/object:Gem::Dependency
194
194
  name: database_cleaner
195
195
  requirement: !ruby/object:Gem::Requirement
196
196
  requirements:
197
- - - "~>"
197
+ - - ~>
198
198
  - !ruby/object:Gem::Version
199
199
  version: 1.3.0
200
- - - ">="
200
+ - - ! '>='
201
201
  - !ruby/object:Gem::Version
202
202
  version: 1.3.0
203
203
  type: :development
204
204
  prerelease: false
205
205
  version_requirements: !ruby/object:Gem::Requirement
206
206
  requirements:
207
- - - "~>"
207
+ - - ~>
208
208
  - !ruby/object:Gem::Version
209
209
  version: 1.3.0
210
- - - ">="
210
+ - - ! '>='
211
211
  - !ruby/object:Gem::Version
212
212
  version: 1.3.0
213
213
  - !ruby/object:Gem::Dependency
214
214
  name: ansi
215
215
  requirement: !ruby/object:Gem::Requirement
216
216
  requirements:
217
- - - "~>"
217
+ - - ~>
218
218
  - !ruby/object:Gem::Version
219
219
  version: 1.4.3
220
- - - ">="
220
+ - - ! '>='
221
221
  - !ruby/object:Gem::Version
222
222
  version: 1.4.3
223
223
  type: :development
224
224
  prerelease: false
225
225
  version_requirements: !ruby/object:Gem::Requirement
226
226
  requirements:
227
- - - "~>"
227
+ - - ~>
228
228
  - !ruby/object:Gem::Version
229
229
  version: 1.4.3
230
- - - ">="
230
+ - - ! '>='
231
231
  - !ruby/object:Gem::Version
232
232
  version: 1.4.3
233
233
  - !ruby/object:Gem::Dependency
234
234
  name: sprockets
235
235
  requirement: !ruby/object:Gem::Requirement
236
236
  requirements:
237
- - - "~>"
237
+ - - ~>
238
238
  - !ruby/object:Gem::Version
239
239
  version: 2.12.1
240
- - - ">="
240
+ - - ! '>='
241
241
  - !ruby/object:Gem::Version
242
242
  version: 2.12.1
243
243
  type: :development
244
244
  prerelease: false
245
245
  version_requirements: !ruby/object:Gem::Requirement
246
246
  requirements:
247
- - - "~>"
247
+ - - ~>
248
248
  - !ruby/object:Gem::Version
249
249
  version: 2.12.1
250
- - - ">="
250
+ - - ! '>='
251
251
  - !ruby/object:Gem::Version
252
252
  version: 2.12.1
253
253
  - !ruby/object:Gem::Dependency
254
254
  name: yard
255
255
  requirement: !ruby/object:Gem::Requirement
256
256
  requirements:
257
- - - "~>"
257
+ - - ~>
258
258
  - !ruby/object:Gem::Version
259
259
  version: 0.8.7.4
260
- - - ">="
260
+ - - ! '>='
261
261
  - !ruby/object:Gem::Version
262
262
  version: 0.8.7.4
263
263
  type: :development
264
264
  prerelease: false
265
265
  version_requirements: !ruby/object:Gem::Requirement
266
266
  requirements:
267
- - - "~>"
267
+ - - ~>
268
268
  - !ruby/object:Gem::Version
269
269
  version: 0.8.7.4
270
- - - ">="
270
+ - - ! '>='
271
271
  - !ruby/object:Gem::Version
272
272
  version: 0.8.7.4
273
273
  - !ruby/object:Gem::Dependency
274
274
  name: redcarpet
275
275
  requirement: !ruby/object:Gem::Requirement
276
276
  requirements:
277
- - - "~>"
277
+ - - ~>
278
278
  - !ruby/object:Gem::Version
279
279
  version: 3.1.2
280
- - - ">="
280
+ - - ! '>='
281
281
  - !ruby/object:Gem::Version
282
282
  version: 3.1.2
283
283
  type: :development
284
284
  prerelease: false
285
285
  version_requirements: !ruby/object:Gem::Requirement
286
286
  requirements:
287
- - - "~>"
287
+ - - ~>
288
288
  - !ruby/object:Gem::Version
289
289
  version: 3.1.2
290
- - - ">="
290
+ - - ! '>='
291
291
  - !ruby/object:Gem::Version
292
292
  version: 3.1.2
293
293
  description: Discerner is an engine for Rails that provides basic search UI, search
@@ -436,7 +436,6 @@ files:
436
436
  - db/seeds.rb
437
437
  - lib/discerner.rb
438
438
  - lib/discerner/engine.rb
439
- - lib/discerner/enum.rb
440
439
  - lib/discerner/methods/controllers/export_parameters_controller.rb
441
440
  - lib/discerner/methods/controllers/parameters_controller.rb
442
441
  - lib/discerner/methods/controllers/searches_controller.rb
@@ -498,17 +497,17 @@ require_paths:
498
497
  - lib
499
498
  required_ruby_version: !ruby/object:Gem::Requirement
500
499
  requirements:
501
- - - ">="
500
+ - - ! '>='
502
501
  - !ruby/object:Gem::Version
503
502
  version: 1.9.0
504
503
  required_rubygems_version: !ruby/object:Gem::Requirement
505
504
  requirements:
506
- - - ">="
505
+ - - ! '>='
507
506
  - !ruby/object:Gem::Version
508
507
  version: '0'
509
508
  requirements: []
510
509
  rubyforge_project:
511
- rubygems_version: 2.2.2
510
+ rubygems_version: 2.4.2
512
511
  signing_key:
513
512
  specification_version: 4
514
513
  summary: Rails engine that provides dictionary-based search functionality
@@ -1,29 +0,0 @@
1
- module Discerner
2
- module Enum
3
- DISCERNER_PARAMETER_TYPE_NUMERIC = 'numeric'
4
- DISCERNER_PARAMETER_TYPE_DATE = 'numeric'
5
- DISCERNER_PARAMETER_TYPES = ['numeric', 'date', 'list', 'combobox', 'text', 'string', 'search', 'exclusive_list'].freeze
6
-
7
- ABSTRACTION_OTHER_VALUE_TYPE_NOT_APPLICABLE = 'not applicable'
8
- ABSTRACTION_OTHER_VALUE_TYPES = [ABSTRACTION_OTHER_VALUE_TYPE_UNKNOWN, ABSTRACTION_OTHER_VALUE_TYPE_NOT_APPLICABLE]
9
-
10
- ABSTRACTION_STATUS_NEEDS_REVIEW = 'needs review'
11
- ABSTRACTION_STATUS_REVIEWED = 'reviewed'
12
- ABSTRACTION_STATUS_ACTUALLY_ANSWERED = 'actually answered'
13
- ABSTRACTION_STATUSES = [ABSTRACTION_STATUS_NEEDS_REVIEW, ABSTRACTION_STATUS_REVIEWED, ABSTRACTION_STATUS_ACTUALLY_ANSWERED]
14
-
15
- ABSTRACTION_SUGGESTION_TYPE_UNKNOWN = 'unknown'
16
- ABSTRACTION_SUGGESTION_TYPE_SUGGESTED = 'suggested'
17
- ABSTRACTION_SUGGESTION_TYPES = [ABSTRACTION_SUGGESTION_TYPE_UNKNOWN, ABSTRACTION_SUGGESTION_TYPE_SUGGESTED]
18
-
19
- ABSTRACTOR_SECTION_TYPE_CUSTOM = 'custom'
20
- ABSTRACTOR_SECTION_TYPE_NAME_VALUE = 'name/value'
21
- ABSTRACTOR_SECTION_TYPES = [ABSTRACTOR_SECTION_TYPE_CUSTOM, ABSTRACTOR_SECTION_TYPE_NAME_VALUE]
22
-
23
- ABSTRACTOR_SUGGESTION_STATUS_NEEDS_REVIEW = 'Needs review'
24
- ABSTRACTOR_SUGGESTION_STATUS_ACCEPTED = 'Accepted'
25
- ABSTRACTOR_SUGGESTION_STATUS_REJECTED = 'Rejected'
26
- ABSTRACTOR_SUGGESTION_STATUSES = [ABSTRACTOR_SUGGESTION_STATUS_NEEDS_REVIEW, ABSTRACTOR_SUGGESTION_STATUS_ACCEPTED, ABSTRACTOR_SUGGESTION_STATUS_REJECTED]
27
- ABSTRACTOR_GROUP_SENTINENTAL_SUBTYPE = 'sentinental'
28
- end
29
- end