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 +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/opium/model/persistable.rb +1 -1
- data/lib/opium/user.rb +1 -1
- data/lib/opium/version.rb +1 -1
- data/spec/opium/user_spec.rb +1 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13533d8b2fcc45702678a6aedb3dbbe64ed6d491
|
4
|
+
data.tar.gz: 9e1c3e23b1d6aee6bf6638c60a069178f02fb632
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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(
|
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
data/spec/opium/user_spec.rb
CHANGED
@@ -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 }
|