spyke 5.4.2 → 5.4.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: a67a8bfd8ac985172e534108b72f8a03a206daeb7fbd33a04c94f22b45e0126c
4
- data.tar.gz: 360d138ed27015204ad9a7b9be20e068b214cb1e1c4dfcea9e23da08a68f02cb
3
+ metadata.gz: c76cac75e27368d88332f307ad042deb3038232fa0e01f9dd74064fce975fce9
4
+ data.tar.gz: 0bcb6c9dce2c00ae43800407d0f60593c30849a3649c1b4729baf07eb56877b9
5
5
  SHA512:
6
- metadata.gz: 8aac5b80d13d31fc9ecf437f0437dc98c59de493591ebc4307882570bea75e934e208ae991f881ab45b628e4cd177857d63dbe8546d66e6faa79c32cfe7c320a
7
- data.tar.gz: e7857930a37776d02a75493597d6859268b8955fcad572993f5666598177e352b5b5d0ca8200ab65411839ec857afe9782d7ec59d7431943a1a3e4a9b859d294
6
+ metadata.gz: 03efb5a7687d3ff25a72eaf0abcc8f3eb03b3035b1942bb02ea7b36eb14443ad3eb168483669df84764514d52a36ed79bfda3c9be770e54a7b09056cc9b075b4
7
+ data.tar.gz: b1927128da543354a1927ea2b38b09a7019331026751a2dc96b4dc2e1411073ebdac61f92b72bef40306a420dc08194ff74274b10b0b9e620699b8a2b38ca5a8
@@ -5,7 +5,7 @@ module Spyke
5
5
  include Enumerable
6
6
 
7
7
  attr_reader :klass
8
- attr_accessor :params
8
+ attr_reader :params
9
9
  delegate :to_ary, :[], :any?, :empty?, :last, :size, :metadata, to: :find_some
10
10
 
11
11
  def initialize(klass, options = {})
@@ -21,6 +21,10 @@ module Spyke
21
21
  relation
22
22
  end
23
23
 
24
+ def params=(params)
25
+ @params = params.symbolize_keys
26
+ end
27
+
24
28
  def with(uri)
25
29
  if uri.is_a? Symbol
26
30
  @options[:uri] = File.join @options[:uri], uri.to_s
data/lib/spyke/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Spyke
2
- VERSION = '5.4.2'
2
+ VERSION = '5.4.3'
3
3
  end
data/test/scopes_test.rb CHANGED
@@ -61,6 +61,14 @@ module Spyke
61
61
  assert_requested endpoint
62
62
  end
63
63
 
64
+ def test_where_with_stringified_keys
65
+ endpoint = stub_request(:get, 'http://sushi.com/recipes/1/image')
66
+
67
+ RecipeImage.where("recipe_id" => 1).to_a
68
+
69
+ assert_requested endpoint
70
+ end
71
+
64
72
  def test_chainable_class_method
65
73
  endpoint = stub_request(:get, 'http://sushi.com/recipes?status=published&per_page=3')
66
74
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spyke
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.4.2
4
+ version: 5.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jens Balvig
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-15 00:00:00.000000000 Z
11
+ date: 2021-04-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport