awesome_print 1.1.0 → 1.2.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.
@@ -52,6 +52,11 @@ describe "AwesomePrint" do
52
52
  require File.expand_path(File.dirname(__FILE__) + '/../lib/ap')
53
53
  lambda { rand.ai }.should_not raise_error
54
54
  end
55
+
56
+ it "format ENV as hash" do
57
+ ENV.ai(:plain => true).should == ENV.to_hash.ai(:plain => true)
58
+ ENV.ai.should == ENV.to_hash.ai
59
+ end
55
60
  end
56
61
 
57
62
  #------------------------------------------------------------------------------
@@ -74,13 +79,24 @@ describe "AwesomePrint" do
74
79
  markup = [ 1, :two, "three" ]
75
80
  markup.ai(:html => true).should == <<-EOS.strip
76
81
  <pre>[
77
- <kbd style="color:white">[0] </kbd><pre><kbd style="color:blue">1</kbd></pre>,
78
- <kbd style="color:white">[1] </kbd><pre><kbd style="color:darkcyan">:two</kbd></pre>,
79
- <kbd style="color:white">[2] </kbd><pre><kbd style="color:brown">&quot;three&quot;</kbd></pre>
82
+ <kbd style="color:white">[0] </kbd><kbd style="color:blue">1</kbd>,
83
+ <kbd style="color:white">[1] </kbd><kbd style="color:darkcyan">:two</kbd>,
84
+ <kbd style="color:white">[2] </kbd><kbd style="color:brown">&quot;three&quot;</kbd>
80
85
  ]</pre>
81
86
  EOS
82
87
  end
83
88
 
89
+ it "wraps hash ap output with only an outer <pre> tag" do
90
+ markup = [ { "hello" => "world" } ]
91
+ markup.ai(:html => true).should == <<-EOS.strip
92
+ <pre>[
93
+ <kbd style="color:white">[0] </kbd>{
94
+ &quot;hello&quot;<kbd style="color:slategray"> =&gt; </kbd><kbd style="color:brown">&quot;world&quot;</kbd>
95
+ }
96
+ ]</pre>
97
+ EOS
98
+ end
99
+
84
100
  it "encodes HTML entities (plain)" do
85
101
  markup = ' &<hello>'
86
102
  markup.ai(:html => true, :plain => true).should == '<pre>&quot; &amp;&lt;hello&gt;&quot;</pre>'
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2010-2012 Michael Dvorkin
1
+ # Copyright (c) 2010-2013 Michael Dvorkin
2
2
  #
3
3
  # Awesome Print is freely distributable under the terms of MIT license.
4
4
  # See LICENSE file or http://www.opensource.org/licenses/mit-license.php
metadata CHANGED
@@ -1,63 +1,55 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: awesome_print
3
- version: !ruby/object:Gem::Version
4
- hash: 19
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.2.0
5
5
  prerelease:
6
- segments:
7
- - 1
8
- - 1
9
- - 0
10
- version: 1.1.0
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Michael Dvorkin
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2012-09-11 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
12
+ date: 2013-09-24 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
21
15
  name: rspec
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
24
17
  none: false
25
- requirements:
26
- - - ">="
27
- - !ruby/object:Gem::Version
28
- hash: 23
29
- segments:
30
- - 2
31
- - 6
32
- - 0
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
33
21
  version: 2.6.0
34
22
  type: :development
35
- version_requirements: *id001
36
- - !ruby/object:Gem::Dependency
37
- name: fakefs
38
23
  prerelease: false
39
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: 2.6.0
30
+ - !ruby/object:Gem::Dependency
31
+ name: fakefs
32
+ requirement: !ruby/object:Gem::Requirement
40
33
  none: false
41
- requirements:
42
- - - ">="
43
- - !ruby/object:Gem::Version
44
- hash: 21
45
- segments:
46
- - 0
47
- - 2
48
- - 1
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
49
37
  version: 0.2.1
50
38
  type: :development
51
- version_requirements: *id002
52
- description: "Great Ruby dubugging companion: pretty print Ruby objects to visualize their structure. Supports custom object formatting via plugins"
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: 0.2.1
46
+ description: ! 'Great Ruby dubugging companion: pretty print Ruby objects to visualize
47
+ their structure. Supports custom object formatting via plugins'
53
48
  email: mike@dvorkin.net
54
49
  executables: []
55
-
56
50
  extensions: []
57
-
58
51
  extra_rdoc_files: []
59
-
60
- files:
52
+ files:
61
53
  - CHANGELOG
62
54
  - Gemfile
63
55
  - Gemfile.lock
@@ -77,7 +69,10 @@ files:
77
69
  - lib/awesome_print/ext/active_support.rb
78
70
  - lib/awesome_print/ext/mongo_mapper.rb
79
71
  - lib/awesome_print/ext/mongoid.rb
72
+ - lib/awesome_print/ext/no_brainer.rb
80
73
  - lib/awesome_print/ext/nokogiri.rb
74
+ - lib/awesome_print/ext/ripple.rb
75
+ - lib/awesome_print/ext/sequel.rb
81
76
  - lib/awesome_print/formatter.rb
82
77
  - lib/awesome_print/inspector.rb
83
78
  - lib/awesome_print/version.rb
@@ -91,38 +86,29 @@ files:
91
86
  - .gitignore
92
87
  homepage: http://github.com/michaeldv/awesome_print
93
88
  licenses: []
94
-
95
89
  post_install_message:
96
90
  rdoc_options: []
97
-
98
- require_paths:
91
+ require_paths:
99
92
  - lib
100
- required_ruby_version: !ruby/object:Gem::Requirement
93
+ required_ruby_version: !ruby/object:Gem::Requirement
101
94
  none: false
102
- requirements:
103
- - - ">="
104
- - !ruby/object:Gem::Version
105
- hash: 3
106
- segments:
107
- - 0
108
- version: "0"
109
- required_rubygems_version: !ruby/object:Gem::Requirement
95
+ requirements:
96
+ - - ! '>='
97
+ - !ruby/object:Gem::Version
98
+ version: '0'
99
+ required_rubygems_version: !ruby/object:Gem::Requirement
110
100
  none: false
111
- requirements:
112
- - - ">="
113
- - !ruby/object:Gem::Version
114
- hash: 3
115
- segments:
116
- - 0
117
- version: "0"
101
+ requirements:
102
+ - - ! '>='
103
+ - !ruby/object:Gem::Version
104
+ version: '0'
118
105
  requirements: []
119
-
120
106
  rubyforge_project: awesome_print
121
107
  rubygems_version: 1.8.24
122
108
  signing_key:
123
109
  specification_version: 3
124
110
  summary: Pretty print Ruby objects with proper indentation and colors
125
- test_files:
111
+ test_files:
126
112
  - spec/colors_spec.rb
127
113
  - spec/formats_spec.rb
128
114
  - spec/methods_spec.rb