dynamic_query 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/dynamic_query.rb CHANGED
@@ -58,7 +58,7 @@ module DynamicQuery
58
58
 
59
59
  unless @reveal_keys
60
60
  @columns.keys.each do |key|
61
- @columns.delete(key) if key =~ /.id$/ || key =~ /_id$/
61
+ @columns.delete(key) if key =~ /\.id$/ || key =~ /_id$/
62
62
  end
63
63
  end
64
64
 
@@ -80,7 +80,7 @@ module DynamicQuery
80
80
 
81
81
  panel = filter_valid_info(query)
82
82
  panel_action(panel, action)
83
- panel[:columns] = @columns
83
+ panel[:columns] = @columns.clone
84
84
 
85
85
  panel
86
86
  end
@@ -157,13 +157,13 @@ module DynamicQuery
157
157
  when /^add_or$/
158
158
  or_key = get_new_or_condition_key(panel)
159
159
  panel[or_key] = { 'and_1' => { :column => '', :operator => '', :value1 => '', :value2 => '' } }
160
- when /^remove_or_\d+/
160
+ when /^remove_or_\d+$/
161
161
  panel.delete("or_#{action.keys.first.match(/\d+/)[0]}")
162
- when /add_and_to_or_\d+/
162
+ when /^add_and_to_or_\d+$/
163
163
  or_key = "or_#{action.keys.first.match(/\d+/)[0]}"
164
164
  and_key = get_new_and_condition_key(panel[or_key])
165
165
  panel[or_key][and_key] = { :column => '', :operator => '', :value1 => '', :value2 => '' }
166
- when /remove_and_\d+_from_or_\d+/
166
+ when /^remove_and_\d+_from_or_\d+$/
167
167
  or_key = "or_#{action.keys.first.scan(/\d+/)[1]}"
168
168
  and_key = "and_#{action.keys.first.scan(/\d+/)[0]}"
169
169
  panel[or_key].delete(and_key) if panel[or_key]
@@ -3,7 +3,7 @@ class DynamicQuery
3
3
  module Version
4
4
  MAJOR = 0
5
5
  MINOR = 3
6
- PATCH = 0
6
+ PATCH = 1
7
7
 
8
8
  STRING = [MAJOR, MINOR, PATCH].compact.join('.')
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dynamic_query
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-23 00:00:00.000000000 Z
12
+ date: 2012-10-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -143,7 +143,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
143
143
  version: '0'
144
144
  segments:
145
145
  - 0
146
- hash: -1018923921235041626
146
+ hash: 1729559994982098119
147
147
  required_rubygems_version: !ruby/object:Gem::Requirement
148
148
  none: false
149
149
  requirements:
@@ -155,5 +155,5 @@ rubyforge_project:
155
155
  rubygems_version: 1.8.24
156
156
  signing_key:
157
157
  specification_version: 3
158
- summary: dynamic_query-0.3.0
158
+ summary: dynamic_query-0.3.1
159
159
  test_files: []