opium 1.5.5 → 1.5.6

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
  SHA1:
3
- metadata.gz: b53eb8b7bd8065147581a1ad93cc314190142304
4
- data.tar.gz: 19898ad35c81040d44ba9765cf66319c1a4a6bc7
3
+ metadata.gz: ed9219c48d5bf3190bed885e50f257f7c380919e
4
+ data.tar.gz: 29d74576fdc027a7b4a53598a41d0a745d780da9
5
5
  SHA512:
6
- metadata.gz: b3979d70c2107f4865da5804cddf925c7731c098f6f0dfab6180cc2388d598021937d6d441752f7a2fb8d795855357f9fe0c0b4a50bd937cd6d1bc5fb3c4114c
7
- data.tar.gz: 1351e6632df54fdf436c0c1358387d24629022fe47e00afcfd9c5efed9958c252a041cc61058ea05cdb5054dda64c205dfd72de69f57271614c737200a9cba5f
6
+ metadata.gz: f827c9f7f8178f6be7252606f4935f57d6242c872145b91d735d0d1716df80874886a1311b0f2069ccc0c7b82fb72942bfa0ae97e92d4e5a2875f736afe5cbb2
7
+ data.tar.gz: 9f0f8b60be375c0a317169a2e331a0b0bee5f8c8680f919e9d54e0a076928bed5d9c7d0086db8aee9acecdbe19306bbd97c35c0a67820645bcb2de7397d81a12
@@ -1,3 +1,7 @@
1
+ ## 1.5.6
2
+ ### Resolved Issues
3
+ - User.find_by_session_token was clobbering most of the values passed to it. Its behavior has slightly modified to prevent this, albeit at the cost of not being as restrictive on which fields it attempts to whitelist.
4
+
1
5
  ## 1.5.5
2
6
  ### Resolved Issues
3
7
  - Attributable no longer stores unknown fields within the attributes hash of the object; rather, a new accessor is created on the fly for the class to store that data. This should prevent serialization from breaking on unknown fields with more recent versions of ActiveModel.
@@ -26,7 +26,7 @@ module Opium
26
26
 
27
27
  def find_by_session_token( token )
28
28
  data = http_get id: 'me', headers: { x_parse_session_token: token }
29
- new( data.slice( *fields.keys ) )
29
+ new( data.except( '__type', 'className' ) )
30
30
  end
31
31
  end
32
32
 
@@ -1,3 +1,3 @@
1
1
  module Opium
2
- VERSION = "1.5.5"
2
+ VERSION = "1.5.6"
3
3
  end
@@ -41,6 +41,7 @@ describe Opium::User do
41
41
  createdAt: '2014-11-01T12:00:30Z',
42
42
  updatedAt: '2015-02-10T16:37:23Z',
43
43
  objectId: 'abcd1234',
44
+ sessionToken: 'super-secret-session-id',
44
45
  __type: 'Object',
45
46
  className: '_User'
46
47
  }.to_json,
@@ -119,6 +120,7 @@ describe Opium::User do
119
120
  it { expect { current_user }.to_not raise_exception }
120
121
  it { current_user.should be_a( described_class ) }
121
122
  it { expect( current_user ).to_not respond_to( :__type, :className ) }
123
+ it { expect( current_user.attributes ).to include( username: 'username', id: 'abcd1234' ) }
122
124
  end
123
125
 
124
126
  context 'with an invalid token' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opium
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.5
4
+ version: 1.5.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Bowers