upholsterer 0.4.3 → 0.4.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/Gemfile.lock +1 -1
- data/lib/upholsterer/json_presenter.rb +4 -1
- data/lib/upholsterer/version.rb +1 -1
- data/spec/base_spec.rb +7 -0
- data/spec/support/expose_all_presenter.rb +3 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 101c0c9e901285c9521bc7b2a073d1c74dbb16f0
|
4
|
+
data.tar.gz: 50346783ee4f0b56113d6b78bda0047f44f18433
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea9046f5a9977cccda59b29de1af0523a5e25823951dd9666e4bee990abb9cb61c4247af8746bedb7298e3672b5d62077e9172559ad86c8d440eac82a2aad0a0
|
7
|
+
data.tar.gz: 7149150db503374b4a2a10def99d98a5d893b3eb1bf15d7ba2653d1849aaa7593eb44c80864b1d8a337c4bd42e2d541753b0d9809183e38ec62387d10c4e6e05
|
data/Gemfile.lock
CHANGED
@@ -13,10 +13,13 @@ module Upholsterer
|
|
13
13
|
alias :to_h :to_hash
|
14
14
|
alias :as_json :to_json
|
15
15
|
|
16
|
-
|
16
|
+
private
|
17
|
+
|
17
18
|
def json_fields
|
18
19
|
@json_fields ||= public_methods(false).tap do |fields|
|
19
20
|
fields.delete(:subject)
|
21
|
+
fields.delete(:respond_to?)
|
22
|
+
fields.delete(:method_missing)
|
20
23
|
end
|
21
24
|
end
|
22
25
|
end
|
data/lib/upholsterer/version.rb
CHANGED
data/spec/base_spec.rb
CHANGED
@@ -179,6 +179,13 @@ describe Upholsterer::Base do
|
|
179
179
|
its([:post_title]) { should eq 'Some post'}
|
180
180
|
end
|
181
181
|
|
182
|
+
describe 'as json with expose all' do
|
183
|
+
let(:comment) { double body: 'Some comment', user: 'user' }
|
184
|
+
subject { ExposeAllPresenter.new(comment).to_json }
|
185
|
+
|
186
|
+
it { should eq '' }
|
187
|
+
end
|
188
|
+
|
182
189
|
describe 'expose with block' do
|
183
190
|
let(:project) { double id: 1, description: 'description', type: 'type' }
|
184
191
|
subject { CollectPresenter.new(entity) }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: upholsterer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nando Vieira
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-12-
|
13
|
+
date: 2014-12-15 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rake
|
@@ -96,6 +96,7 @@ files:
|
|
96
96
|
- spec/support/collect_presenter.rb
|
97
97
|
- spec/support/comment.rb
|
98
98
|
- spec/support/comment_presenter.rb
|
99
|
+
- spec/support/expose_all_presenter.rb
|
99
100
|
- spec/support/iterator_presenter.rb
|
100
101
|
- spec/support/user.rb
|
101
102
|
- spec/support/user_presenter.rb
|