query_string_interface 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -2,16 +2,10 @@ source "http://rubygems.org"
2
2
 
3
3
  gemspec
4
4
 
5
- gem "rake", "0.8.7"
5
+ gem "rake"
6
6
  gem "i18n"
7
7
  gem "tzinfo"
8
8
 
9
- platforms :mri_18 do
10
- gem "ruby-debug"
11
- end
12
-
13
- platforms :mri_19 do
14
- gem "ruby-debug19", :require => 'ruby-debug' if RUBY_VERSION < "1.9.3"
15
- gem 'simplecov', :require => false
16
- end
9
+ gem "debugger"
10
+ gem 'simplecov', :require => false
17
11
 
data/Gemfile.lock CHANGED
@@ -1,63 +1,55 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- query_string_interface (0.5.0)
4
+ query_string_interface (0.6.0)
5
5
  activesupport (>= 3.0.0)
6
6
 
7
7
  GEM
8
8
  remote: http://rubygems.org/
9
9
  specs:
10
- activesupport (3.1.3)
11
- multi_json (~> 1.0)
12
- archive-tar-minitar (0.5.2)
13
- columnize (0.3.5)
14
- diff-lcs (1.1.3)
15
- i18n (0.6.0)
16
- linecache (0.46)
17
- rbx-require-relative (> 0.0.4)
18
- linecache19 (0.5.12)
19
- ruby_core_source (>= 0.1.4)
20
- multi_json (1.0.4)
21
- rake (0.8.7)
22
- rbx-require-relative (0.0.5)
23
- rspec (2.7.0)
24
- rspec-core (~> 2.7.0)
25
- rspec-expectations (~> 2.7.0)
26
- rspec-mocks (~> 2.7.0)
27
- rspec-core (2.7.1)
28
- rspec-expectations (2.7.0)
29
- diff-lcs (~> 1.1.2)
30
- rspec-mocks (2.7.0)
31
- ruby-debug (0.10.4)
32
- columnize (>= 0.1)
33
- ruby-debug-base (~> 0.10.4.0)
34
- ruby-debug-base (0.10.4)
35
- linecache (>= 0.3)
36
- ruby-debug-base19 (0.11.25)
37
- columnize (>= 0.3.1)
38
- linecache19 (>= 0.5.11)
39
- ruby_core_source (>= 0.1.4)
40
- ruby-debug19 (0.11.6)
10
+ activesupport (4.0.0)
11
+ i18n (~> 0.6, >= 0.6.4)
12
+ minitest (~> 4.2)
13
+ multi_json (~> 1.3)
14
+ thread_safe (~> 0.1)
15
+ tzinfo (~> 0.3.37)
16
+ atomic (1.1.10)
17
+ columnize (0.3.6)
18
+ debugger (1.6.0)
41
19
  columnize (>= 0.3.1)
42
- linecache19 (>= 0.5.11)
43
- ruby-debug-base19 (>= 0.11.19)
44
- ruby_core_source (0.1.5)
45
- archive-tar-minitar (>= 0.5.2)
46
- simplecov (0.5.4)
47
- multi_json (~> 1.0.3)
48
- simplecov-html (~> 0.5.3)
49
- simplecov-html (0.5.3)
50
- tzinfo (0.3.31)
20
+ debugger-linecache (~> 1.2.0)
21
+ debugger-ruby_core_source (~> 1.2.1)
22
+ debugger-linecache (1.2.0)
23
+ debugger-ruby_core_source (1.2.3)
24
+ diff-lcs (1.2.4)
25
+ i18n (0.6.4)
26
+ minitest (4.7.5)
27
+ multi_json (1.7.7)
28
+ rake (10.1.0)
29
+ rspec (2.13.0)
30
+ rspec-core (~> 2.13.0)
31
+ rspec-expectations (~> 2.13.0)
32
+ rspec-mocks (~> 2.13.0)
33
+ rspec-core (2.13.1)
34
+ rspec-expectations (2.13.0)
35
+ diff-lcs (>= 1.1.3, < 2.0)
36
+ rspec-mocks (2.13.1)
37
+ simplecov (0.7.1)
38
+ multi_json (~> 1.0)
39
+ simplecov-html (~> 0.7.1)
40
+ simplecov-html (0.7.1)
41
+ thread_safe (0.1.0)
42
+ atomic
43
+ tzinfo (0.3.37)
51
44
 
52
45
  PLATFORMS
53
46
  ruby
54
47
 
55
48
  DEPENDENCIES
49
+ debugger
56
50
  i18n
57
51
  query_string_interface!
58
- rake (= 0.8.7)
52
+ rake
59
53
  rspec (>= 2.6.0)
60
- ruby-debug
61
- ruby-debug19
62
54
  simplecov
63
55
  tzinfo
@@ -70,8 +70,8 @@ module QueryStringInterface
70
70
 
71
71
  private
72
72
  def parsed_attribute
73
- if raw_attribute.respond_to?(:key)
74
- raw_attribute.key.to_s
73
+ if raw_attribute.respond_to?(:name)
74
+ raw_attribute.name.to_s
75
75
  elsif or_attribute?
76
76
  '$or'
77
77
  elsif raw_attribute =~ QueryStringInterface::ATTRIBUTE_REGEX
@@ -27,8 +27,8 @@ module QueryStringInterface
27
27
 
28
28
  private
29
29
  def replace(filter)
30
- if filter.respond_to?(:key) && filter.respond_to?(:operator)
31
- replaced_item_for filter.key, filter.operator
30
+ if filter.respond_to?(:name) && filter.respond_to?(:operator)
31
+ replaced_item_for filter.name, filter.operator == 1 ? :asc : :desc
32
32
  elsif filter.is_a?(String) or filter.is_a?(Symbol)
33
33
  if match = matches?(filter)
34
34
  replaced_item_for match[1], match[2]
@@ -48,4 +48,4 @@ module QueryStringInterface
48
48
  filter.match(SORTING_FIELD_REGEXP)
49
49
  end
50
50
  end
51
- end
51
+ end
@@ -1,3 +1,3 @@
1
1
  module QueryStringInterface
2
- VERSION = "0.5.0"
2
+ VERSION = "0.6.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: query_string_interface
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-20 00:00:00.000000000Z
12
+ date: 2013-06-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
16
- requirement: &2168557900 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,15 @@ dependencies:
21
21
  version: 3.0.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2168557900
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: 3.0.0
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: rspec
27
- requirement: &2168557380 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
35
  - - ! '>='
@@ -32,7 +37,12 @@ dependencies:
32
37
  version: 2.6.0
33
38
  type: :development
34
39
  prerelease: false
35
- version_requirements: *2168557380
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: 2.6.0
36
46
  description: This gem extracts params given as a hash to structured data, that can
37
47
  be used when creating queries
38
48
  email:
@@ -69,15 +79,21 @@ required_ruby_version: !ruby/object:Gem::Requirement
69
79
  - - ! '>='
70
80
  - !ruby/object:Gem::Version
71
81
  version: '0'
82
+ segments:
83
+ - 0
84
+ hash: 984341770598898315
72
85
  required_rubygems_version: !ruby/object:Gem::Requirement
73
86
  none: false
74
87
  requirements:
75
88
  - - ! '>='
76
89
  - !ruby/object:Gem::Version
77
90
  version: '0'
91
+ segments:
92
+ - 0
93
+ hash: 984341770598898315
78
94
  requirements: []
79
95
  rubyforge_project: query_string_interface
80
- rubygems_version: 1.8.15
96
+ rubygems_version: 1.8.25
81
97
  signing_key:
82
98
  specification_version: 3
83
99
  summary: Extracts query string params to a structured data, suitable to use for model