upholsterer 0.4.3 → 0.4.4

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: 17fec00a11db180ca10fe6899d6fa5440659de45
4
- data.tar.gz: b416b4055f2b49985cbb5db9fccf62c305ba4006
3
+ metadata.gz: 101c0c9e901285c9521bc7b2a073d1c74dbb16f0
4
+ data.tar.gz: 50346783ee4f0b56113d6b78bda0047f44f18433
5
5
  SHA512:
6
- metadata.gz: 515ee2f1a69389d7d1c10dda8db4d125003a50eac00444953d042e2c1529232271d466556fedfd76262609cc86426e33b679532a5f55b21a9ff9ecca7f72547c
7
- data.tar.gz: 20ad64d2d44f79dc21f6fcfdb26a63093abe8500a52b7547015270e77b1f2810ce7b1153e4301df2e50ca4fe024e0ba0aa7aff250def2308501f4a3f03ef406b
6
+ metadata.gz: ea9046f5a9977cccda59b29de1af0523a5e25823951dd9666e4bee990abb9cb61c4247af8746bedb7298e3672b5d62077e9172559ad86c8d440eac82a2aad0a0
7
+ data.tar.gz: 7149150db503374b4a2a10def99d98a5d893b3eb1bf15d7ba2653d1849aaa7593eb44c80864b1d8a337c4bd42e2d541753b0d9809183e38ec62387d10c4e6e05
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- upholsterer (0.4.3)
4
+ upholsterer (0.4.4)
5
5
  activesupport
6
6
 
7
7
  GEM
@@ -13,10 +13,13 @@ module Upholsterer
13
13
  alias :to_h :to_hash
14
14
  alias :as_json :to_json
15
15
 
16
- private
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
@@ -2,7 +2,7 @@ module Upholsterer
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 4
5
- PATCH = 3
5
+ PATCH = 4
6
6
  STRING = "#{MAJOR}.#{MINOR}.#{PATCH}"
7
7
  end
8
8
  end
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) }
@@ -0,0 +1,3 @@
1
+ class ExposeAllPresenter < Presenter
2
+ expose_all
3
+ end
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.3
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-09 00:00:00.000000000 Z
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