obitum-remixr 0.1.2 → 0.1.3
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/Gemfile.lock +1 -1
- data/History +1 -0
- data/Rakefile +1 -1
- data/VERSION.yml +1 -1
- data/lib/remixr.rb +2 -2
- data/lib/remixr/client.rb +3 -3
- data/test/remixr/client_test.rb +7 -2
- metadata +3 -3
data/Gemfile.lock
CHANGED
data/History
CHANGED
data/Rakefile
CHANGED
@@ -6,7 +6,7 @@ begin
|
|
6
6
|
require 'jeweler'
|
7
7
|
Jeweler::Tasks.new do |gem|
|
8
8
|
gem.name = "obitum-remixr"
|
9
|
-
gem.version = "0.1.
|
9
|
+
gem.version = "0.1.3"
|
10
10
|
gem.description = %Q{Wrapper for the BestBuy Remix api}
|
11
11
|
gem.summary = %Q{Wrapper for the BestBuy Remix api}
|
12
12
|
gem.email = "wynn@squeejee.com"
|
data/VERSION.yml
CHANGED
data/lib/remixr.rb
CHANGED
data/lib/remixr/client.rb
CHANGED
@@ -76,7 +76,7 @@ module Remixr
|
|
76
76
|
@api_path = URI.escape(@api_path)
|
77
77
|
response = self.class.get("/" + @api_path, :query => opts)
|
78
78
|
@api_path = ''
|
79
|
-
Mash.new response
|
79
|
+
Hashie::Mash.new response
|
80
80
|
end
|
81
81
|
|
82
82
|
private
|
@@ -99,7 +99,7 @@ module Remixr
|
|
99
99
|
def filter_params_string(filters)
|
100
100
|
return "" unless filters.is_a?(Hash)
|
101
101
|
|
102
|
-
filters = Mash.new filters.to_hash # calling Mash.new on a mash is bad mmmm k?
|
102
|
+
filters = Hashie::Mash.new filters.to_hash # calling Hashie::Mash.new on a mash is bad mmmm k?
|
103
103
|
params = []
|
104
104
|
filters.each do |key, value|
|
105
105
|
if value.is_a?(Hash)
|
@@ -133,7 +133,7 @@ module Remixr
|
|
133
133
|
end
|
134
134
|
|
135
135
|
def scrub_options(options)
|
136
|
-
options = Mash.new(options.to_hash)
|
136
|
+
options = Hashie::Mash.new(options.to_hash)
|
137
137
|
show = options.delete('show')
|
138
138
|
unless show.blank?
|
139
139
|
if show.is_a?(String)
|
data/test/remixr/client_test.rb
CHANGED
@@ -96,8 +96,13 @@ class ClientTest < Test::Unit::TestCase
|
|
96
96
|
should "return a products with nested stores" do
|
97
97
|
stub_get '/products(salePrice%3E3000)+stores(area(76227,50))?apiKey=OU812&format=json', 'products_over_3k_within_50_miles.json'
|
98
98
|
results = @client.products({'salePrice' => {'$gt' => 3000}}).stores({'area' => ['76227', 50]}).fetch
|
99
|
-
|
100
|
-
|
99
|
+
|
100
|
+
# not sure where should_respond_to or should_not_respond_to are
|
101
|
+
# calling from - but they don't work here
|
102
|
+
assert results.respond_to?(:products)
|
103
|
+
assert !results.respond_to?(:stores)
|
104
|
+
# results.should_respond_to :products
|
105
|
+
# results.should_not_respond_to :stores
|
101
106
|
results.products.first.sku.should == 9234198
|
102
107
|
end
|
103
108
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: obitum-remixr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 3
|
10
|
+
version: 0.1.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Wynn Netherland
|