opium 1.1.3 → 1.1.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f0188d76c936d56885dd22cc9effcc3c85199058
4
- data.tar.gz: 5becf2dabbb64cc50a2f6232394d21f70accc99d
3
+ metadata.gz: 13533d8b2fcc45702678a6aedb3dbbe64ed6d491
4
+ data.tar.gz: 9e1c3e23b1d6aee6bf6638c60a069178f02fb632
5
5
  SHA512:
6
- metadata.gz: 675c5286bb4fbceb06ea9bdd572c16f46e4e05b2de3ba54b41bf08665ad47389ca7b0b072e376647b211020b0cfdb3eb77fb126a6347d44f224366b0fbbfab76
7
- data.tar.gz: eb9973f96862f21a909106108cfcbaa4f40c61345e368552f65d1ab229860710ced461a6dd0c103ea8b101233316df7b26d6ccdc1bd43b330b6bfb0a1ec5d24f
6
+ metadata.gz: 97acb7e80800dc6efca574bc48de2dbabeac93127e808ca61aa3b916869cfaa78835bfe1ad813e39c1b329f776f09a4293a107f571462957a07ac749bbafd081
7
+ data.tar.gz: 60d7e817319d5b7fd5c373149282f109a24fd1ed7006fdef5898453da05ce54c7c76a807c58d708c33fbe7714ce2eaaa4e5f359b94451fab2a1e4afa849ffa20
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 1.1.4
2
+ ### Resolved Issues
3
+ - Persistable now filters out any readonly fields from the data sent on create.
4
+ - #36: The `email_verified` field in `Opium::User` is now readonly.
5
+
1
6
  ## 1.1.3
2
7
  ### Resolved Issues
3
8
  - #35: The railtie now should clear the criteria model cache upon app reload.
@@ -128,7 +128,7 @@ module Opium
128
128
 
129
129
  def _create( options = {} )
130
130
  self.attributes = attributes_or_headers( :post, :create, options ) do |headers|
131
- self.class.http_post self.attributes_to_parse( except: [:id, :created_at, :updated_at] ), headers
131
+ self.class.http_post self.attributes_to_parse( not_readonly: true ), headers
132
132
  end
133
133
  end
134
134
 
data/lib/opium/user.rb CHANGED
@@ -5,7 +5,7 @@ module Opium
5
5
  field :username, type: String
6
6
  field :password, type: String
7
7
  field :email, type: String
8
- field :email_verified, type: Boolean
8
+ field :email_verified, type: Boolean, readonly: true
9
9
  field :session_token, type: String, readonly: true
10
10
 
11
11
  no_object_prefix!
data/lib/opium/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Opium
2
- VERSION = "1.1.3"
2
+ VERSION = "1.1.4"
3
3
  end
@@ -68,6 +68,7 @@ describe Opium::User do
68
68
  end
69
69
 
70
70
  it { described_class.fields[:session_token].should be_readonly }
71
+ it { expect( described_class.fields[:email_verified] ).to be_readonly }
71
72
  it { described_class.object_prefix.should be_empty }
72
73
  it { described_class.resource_name.should == 'users' }
73
74
  it { expect( described_class.requires_heightened_privileges? ).to be_truthy }
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.1.3
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Bowers