frosting 0.0.6 → 0.0.7

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: a3f915322b680a3177a849297f6bf97406e1868a
4
- data.tar.gz: a51935fa917ae9d576dda07dc2d52a07f35f0b3f
3
+ metadata.gz: 932f60f83154d1f82d66cae72c30d360c3159114
4
+ data.tar.gz: a0da567f277e1c85390f3a93b1b790e9a5bfff1c
5
5
  SHA512:
6
- metadata.gz: 8609a7b47ffaa1acc0ed0b7e721e4dbf0de7f83887db66060f00b44c6352099fa7f4697563e7bc8cc95fae4f1c65462d12fe73d6f6540c6416bdfcfd7d1dae35
7
- data.tar.gz: c616b450eb926e2955db63272f40395781dc3f3659e45cb00ae07ce9f0d0d5166685921423e37f3d0df476cbc87a14b42e5c89899279fbca7fa611e498ad7803
6
+ metadata.gz: 13715220b56d6b97d6e3273725b4512ff96f053c889fbcf7cef50dd030fd445457b82492feda752af2cc6d266d702232a8dadc7440c70620a9a07a0402c21b39
7
+ data.tar.gz: d0af2aa99517c3ad5036edd8e27c1915b4522b66c3e511e01964e18e9e507fbf486acc0122dbb521ae12b298c28f958e0c1c21abde6415ea8924663f14dd5925
data/frosting.gemspec CHANGED
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'frosting'
3
- s.version = '0.0.6'
4
- s.date = '2014-02-04'
3
+ s.version = '0.0.7'
4
+ s.date = '2016-01-26'
5
5
  s.summary = "Let's make presenters easy."
6
6
  s.description = "Adds some methods to your controllers and a base presenter. Get that presentation logic out of your models."
7
7
  s.authors = ["Ben Eddy", "Jon Evans"]
@@ -31,13 +31,17 @@ module Frosting
31
31
  class PresentedCollection < SimpleDelegator
32
32
  include Enumerable
33
33
 
34
- delegate :each, to: :presented_collection
34
+ delegate :each, :to_a, to: :presented_collection
35
35
 
36
36
  def initialize(collection, options)
37
37
  @options = options
38
38
  super(collection)
39
39
  end
40
40
 
41
+ def +(other)
42
+ to_a + other.to_a
43
+ end
44
+
41
45
  private
42
46
 
43
47
  def presented_collection
@@ -1,3 +1,3 @@
1
1
  module Frosting
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
@@ -77,12 +77,17 @@ module Frosting
77
77
  end
78
78
 
79
79
  it "presents each item in the collection with options" do
80
- expect(presented_collection.each.to_a).to eq [presented_resource]
80
+ expect(presented_collection.to_a).to eq [presented_resource]
81
81
  end
82
82
 
83
83
  it "still acts like the original collection" do
84
84
  expect(presented_collection.test_method).to eq "cats"
85
85
  end
86
+
87
+ it "allows addition of presented collections" do
88
+ expect((presented_collection + presented_collection).to_a).
89
+ to eq [presented_resource, presented_resource]
90
+ end
86
91
  end
87
92
  end
88
93
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: frosting
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Eddy
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-02-04 00:00:00.000000000 Z
12
+ date: 2016-01-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport