upholsterer 0.5.0 → 1.0.0
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 +4 -1
- data/lib/upholsterer/base.rb +4 -4
- data/lib/upholsterer/version.rb +2 -2
- data/spec/base_spec.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 79b625b13949006b5ee9984702f5eb5af079a88f
|
4
|
+
data.tar.gz: bfdb699846f9722fdc5baacf3a00cac38f6bdb9a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69d3ecd24a9694a4a89fd7ef9ce3407ffaacea6171f66536b284061bbbb3b37c9f82c1ed57167fb1d046e1f232e23aab81dd57b5db188b40da7d1ded505dab31
|
7
|
+
data.tar.gz: fe5cfa268a0a419b4bc83b7b92aa4c7b14683e4d82adb73fa49efc7d850abf07c6b6cd6c1ec9280440919bc91e9cf038700d2f452576c59ed91e82f0227bae1c
|
data/Gemfile.lock
CHANGED
data/lib/upholsterer/base.rb
CHANGED
@@ -72,12 +72,12 @@ module Upholsterer
|
|
72
72
|
# users = UserPresenter.map(User.all)
|
73
73
|
#
|
74
74
|
# If your presenter accepts more than one subject, you can provided
|
75
|
-
# them as
|
75
|
+
# them as array of parameters.
|
76
76
|
#
|
77
|
-
# comments = CommentPresenter.map(
|
77
|
+
# comments = CommentPresenter.map([[comment, post]])
|
78
78
|
#
|
79
|
-
def self.map(collection
|
80
|
-
collection.map {|
|
79
|
+
def self.map(collection)
|
80
|
+
collection.map {|items| new(*items) }
|
81
81
|
end
|
82
82
|
|
83
83
|
# The list of attributes that will be exposed.
|
data/lib/upholsterer/version.rb
CHANGED
data/spec/base_spec.rb
CHANGED
@@ -130,7 +130,7 @@ describe Upholsterer::Base do
|
|
130
130
|
let(:comment) { double body: 'Some comment' }
|
131
131
|
let(:post) { double title: 'Some post' }
|
132
132
|
let(:user) { double name: 'John Doe' }
|
133
|
-
subject { CommentPresenter.map([comment
|
133
|
+
subject { CommentPresenter.map([[comment, post]])[0] }
|
134
134
|
|
135
135
|
it { should be_a(CommentPresenter) }
|
136
136
|
its(:body) { should == 'Some comment' }
|
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
|
+
version: 1.0.0
|
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: 2015-
|
13
|
+
date: 2015-08-26 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rake
|
@@ -122,7 +122,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
122
122
|
version: '0'
|
123
123
|
requirements: []
|
124
124
|
rubyforge_project:
|
125
|
-
rubygems_version: 2.
|
125
|
+
rubygems_version: 2.4.8
|
126
126
|
signing_key:
|
127
127
|
specification_version: 4
|
128
128
|
summary: A simple presenter/facade/decorator/whatever implementation.
|