cistern 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -16,6 +16,8 @@ module AwesomePrint::Cistern
16
16
  cast = cast_without_cistern(object, type)
17
17
  if object.is_a?(Cistern::Model)
18
18
  cast = :cistern_model
19
+ elsif object.is_a?(Cistern::Collection)
20
+ cast = :cistern_collection
19
21
  end
20
22
  cast
21
23
  end
@@ -26,6 +28,12 @@ module AwesomePrint::Cistern
26
28
  data = object.attributes.keys.inject({}){|r,k| r.merge(k => object.send(k))}
27
29
  "#{object} " << awesome_hash(data)
28
30
  end
31
+
32
+ # Format Cistern::Model
33
+ #------------------------------------------------------------------------------
34
+ def awesome_cistern_collection(object)
35
+ "#{object.class.name} " << awesome_array(object)
36
+ end
29
37
  end
30
38
 
31
39
  AwesomePrint::Formatter.send(:include, AwesomePrint::Cistern)
@@ -1,3 +1,3 @@
1
1
  module Cistern
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
@@ -57,7 +57,7 @@ describe "#inspect" do
57
57
  end
58
58
  it "should use awesome_print" do
59
59
  Cistern.formatter = Cistern::Formatter::AwesomePrint
60
- Inspectors.new.all.inspect.should match(/^\[.*\]$/m) # close enough
60
+ Inspectors.new.all.inspect.should match(/Inspectors\s+\[.*\]$/m) # close enough
61
61
  end
62
62
  it "should use formatador"
63
63
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cistern
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: