awesome_print 1.6.0 → 1.6.1

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: aabb3e481a4a95d63ef09c71a7536fe4af4ad8da
4
- data.tar.gz: 3c8b4bba0f9e8ee7dd138f1f1ad9035b87405629
3
+ metadata.gz: fb92d5e2cf0fdfb4adea4dce07a036029b215e53
4
+ data.tar.gz: 5ff2f87c655f96bdbf5393d18432dd967f3c48ef
5
5
  SHA512:
6
- metadata.gz: 1e2c1ddea1248d991a213d6cf36d9f88eedb8c8c0b5b293fa3bc5ef4870bd8a9b52b9b45deef4fa848008e2abb77dccf13d1af9eaa0f5ff669919e03a549b0e9
7
- data.tar.gz: bea6f63b5c6f0ab9093a8273012f7069791e0486e06d04d2ae399903663664f53ffc50599f46bce190dbeb92cea0864ab2fb58d121ea3cf3c193c88ff2c1119c
6
+ metadata.gz: e41bf9d0871110552cd501c718276cf610c14dad19732a75670d81b9028c84fe21af86405bca36a3b5d3f35ef1180bb6d3ae0871b26d8bd313091b8298a4a147
7
+ data.tar.gz: 7980fa638d522e0be24381a8edca2c480f1a3579b4c310bbee2c2228c41c4b9c1a738e23251381e52b8e2744d860e7ab35dcef654af37a003e2366a8a67c3b75
data/.gitignore CHANGED
@@ -21,6 +21,8 @@ coverage
21
21
  rdoc
22
22
  pkg
23
23
  .ruby-version
24
+ gemfiles/*.gemfile.lock
25
+ Gemfile.lock
24
26
 
25
27
  ## PROJECT::RVM
26
28
  .rvmrc
@@ -0,0 +1,39 @@
1
+ appraise 'rails-3.2' do
2
+ gem 'rails', '~> 3.2.0'
3
+ end
4
+
5
+ appraise 'rails-4.0' do
6
+ gem 'rails', '~> 4.0.0'
7
+ end
8
+
9
+ appraise 'rails-4.1' do
10
+ gem 'rails', '~> 4.1.0'
11
+ end
12
+
13
+ appraise 'rails-4.2' do
14
+ gem 'rails', '~> 4.2.0'
15
+ end
16
+
17
+ appraise 'mongoid-3.0' do
18
+ gem 'rails', '~> 3.2.0'
19
+ gem 'mongoid', '~> 3.0.0'
20
+ end
21
+
22
+ appraise 'mongoid-3.1' do
23
+ gem 'rails', '~> 3.2.0'
24
+ gem 'mongoid', '~> 3.1.0'
25
+ end
26
+
27
+ appraise 'mongoid-4.0' do
28
+ gem 'rails', '~> 4.2.0'
29
+ gem 'mongoid', '~> 4.0.0'
30
+ end
31
+
32
+ appraise 'mongo_mapper' do
33
+ gem 'mongo_mapper'
34
+ end
35
+
36
+ appraise 'ripple' do
37
+ gem 'tzinfo'
38
+ gem 'ripple'
39
+ end
data/CHANGELOG CHANGED
@@ -1,3 +1,10 @@
1
+ 1.6.1
2
+ - Fixes specs on all rails dependencies (Mauro George)
3
+ - Updates specs for mongoid, mongo_mapper and ripple (James Cox)
4
+ - Adds appraisals for simpler version/scenario management (Mauro George)
5
+ - Add Travis (Mauro George)
6
+ - Update documentation (Mauro George)
7
+
1
8
  1.6.0
2
9
  semi-major release since it's been a while, and there are several
3
10
  improvements.
@@ -93,7 +100,7 @@
93
100
 
94
101
  0.1.3
95
102
  - Added support for setting custom defaults in ~/.aprc
96
-
103
+
97
104
  0.1.2
98
105
  - Correctly handle empty arrays and hashes
99
106
  - Use alias_method instead of alias (fixes non-tty method aliasing)
@@ -102,7 +109,7 @@
102
109
  0.1.1
103
110
  - Added support for tableless ActiveRecord models
104
111
  - Left align hash keys if @options[:indent] is negative
105
-
112
+
106
113
  0.1.0
107
114
  - Initial Release.
108
-
115
+
@@ -0,0 +1,41 @@
1
+ # Contributing
2
+
3
+ We love pull requests. Here's a quick guide:
4
+
5
+ 1. Fork the repo.
6
+
7
+ 1. Create your feature branch (`git checkout -b my-new-feature`)
8
+
9
+ 1. Update [CHANGELOG.md](https://github.com/michaeldv/awesome_print/blob/master/CHANGELOG.md) with a brief description of your changes under the `unreleased` heading.
10
+
11
+ 1. Commit your changes (`git commit -am 'Added some feature'`)
12
+
13
+ 1. Push to the branch (`git push origin my-new-feature`)
14
+
15
+ 1. Create new Pull Request
16
+
17
+ At this point you're waiting on us. We like to at least comment on, if not
18
+ accept, pull requests within three business days (and, typically, one business
19
+ day). We may suggest some changes or improvements or alternatives.
20
+
21
+ Some things that will increase the chance that your pull request is accepted is to follow the practices described on [Ruby style guide](https://github.com/bbatsov/ruby-style-guide), [Rails style guide](https://github.com/bbatsov/rails-style-guide) and [Better Specs](http://betterspecs.org/).
22
+
23
+ ## Specs
24
+
25
+ To run all the specs in all gemfiles just run:
26
+
27
+ ```
28
+ $ rake
29
+ ```
30
+
31
+ To run specs of a single gemfile run:
32
+
33
+ ```
34
+ $ appraisal rails-3.2 rake
35
+ ```
36
+
37
+ If you want to run a specific spec in a gemfile run:
38
+
39
+ ```
40
+ $ appraisal rails-3.2 rspec spec/colors_spec.rb
41
+ ```
data/Gemfile CHANGED
@@ -1,41 +1,4 @@
1
1
  source 'https://rubygems.org'
2
- gemspec
3
-
4
- group :development do
5
-
6
- # ActionView extension
7
- # ####################
8
- gem 'actionview', '>= 4.2.0'
9
-
10
- # ActiveSupport extension
11
- # #######################
12
- gem 'activesupport', '>= 4.2.0'
13
-
14
- # ActiveRecord extension
15
- # ######################
16
- # * To simplify creating test models we use an in-memory SQLite DB
17
- gem 'activerecord', '>= 4.2.0'
18
- gem 'sqlite3'
19
2
 
20
- # MongoMapper extension
21
- # #####################
22
- # * cannot be enabled at the same time as mongoid
23
- # gem 'mongo_mapper', '~> 0.13.0'
24
- # gem 'bson_ext'
25
-
26
- # Nokogiri extension
27
- # ##################
28
- gem 'nokogiri', '>= 1.6.5'
29
-
30
- # Ripple extension
31
- # ################
32
- #
33
- # * Ripple is abandoned http://basho.com/tag/ripple-client-apis/
34
- # * Ripple is not currently compatible with Rails 4
35
- # gem 'ripple', '~> 0.9.5'
36
-
37
- # Mongoid extension
38
- # #################
39
- # * cannot be enabled at the same time as mongo_mapper
40
- gem 'mongoid', '>= 4.0.0'
41
- end
3
+ # Specify your gem's dependencies in awesome_print.gemspec
4
+ gemspec
@@ -1,91 +1,43 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- awesome_print (1.2.0)
4
+ awesome_print (1.6.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
- actionview (4.2.0)
10
- activesupport (= 4.2.0)
11
- builder (~> 3.1)
12
- erubis (~> 2.7.0)
13
- rails-dom-testing (~> 1.0, >= 1.0.5)
14
- rails-html-sanitizer (~> 1.0, >= 1.0.1)
15
- activemodel (4.2.0)
16
- activesupport (= 4.2.0)
17
- builder (~> 3.1)
18
- activerecord (4.2.0)
19
- activemodel (= 4.2.0)
20
- activesupport (= 4.2.0)
21
- arel (~> 6.0)
22
- activesupport (4.2.0)
23
- i18n (~> 0.7)
24
- json (~> 1.7, >= 1.7.7)
25
- minitest (~> 5.1)
26
- thread_safe (~> 0.3, >= 0.3.4)
27
- tzinfo (~> 1.1)
28
- arel (6.0.0)
29
- bson (2.3.0)
30
- builder (3.2.2)
31
- connection_pool (2.1.0)
9
+ appraisal (1.0.2)
10
+ bundler
11
+ rake
12
+ thor (>= 0.14.0)
32
13
  diff-lcs (1.2.5)
33
- erubis (2.7.0)
34
- fakefs (0.5.3)
35
- i18n (0.7.0)
36
- json (1.8.1)
37
- loofah (2.0.1)
38
- nokogiri (>= 1.5.9)
39
- mini_portile (0.6.1)
40
- minitest (5.5.0)
41
- mongoid (4.0.0)
42
- activemodel (~> 4.0)
43
- moped (~> 2.0.0)
44
- origin (~> 2.1)
45
- tzinfo (>= 0.3.37)
46
- moped (2.0.2)
47
- bson (~> 2.2)
48
- connection_pool (~> 2.0)
49
- optionable (~> 0.2.0)
14
+ fakefs (0.6.0)
15
+ mini_portile (0.6.2)
50
16
  nokogiri (1.6.5)
51
17
  mini_portile (~> 0.6.0)
52
- optionable (0.2.0)
53
- origin (2.1.1)
54
- rails-deprecated_sanitizer (1.0.3)
55
- activesupport (>= 4.2.0.alpha)
56
- rails-dom-testing (1.0.5)
57
- activesupport (>= 4.2.0.beta, < 5.0)
58
- nokogiri (~> 1.6.0)
59
- rails-deprecated_sanitizer (>= 1.0.1)
60
- rails-html-sanitizer (1.0.1)
61
- loofah (~> 2.0)
62
- rspec (3.0.0)
63
- rspec-core (~> 3.0.0)
64
- rspec-expectations (~> 3.0.0)
65
- rspec-mocks (~> 3.0.0)
66
- rspec-core (3.0.4)
67
- rspec-support (~> 3.0.0)
68
- rspec-expectations (3.0.4)
18
+ rake (10.4.2)
19
+ rspec (3.1.0)
20
+ rspec-core (~> 3.1.0)
21
+ rspec-expectations (~> 3.1.0)
22
+ rspec-mocks (~> 3.1.0)
23
+ rspec-core (3.1.7)
24
+ rspec-support (~> 3.1.0)
25
+ rspec-expectations (3.1.2)
69
26
  diff-lcs (>= 1.2.0, < 2.0)
70
- rspec-support (~> 3.0.0)
71
- rspec-mocks (3.0.4)
72
- rspec-support (~> 3.0.0)
73
- rspec-support (3.0.4)
27
+ rspec-support (~> 3.1.0)
28
+ rspec-mocks (3.1.3)
29
+ rspec-support (~> 3.1.0)
30
+ rspec-support (3.1.2)
74
31
  sqlite3 (1.3.10)
75
- thread_safe (0.3.4)
76
- tzinfo (1.2.2)
77
- thread_safe (~> 0.1)
32
+ thor (0.19.1)
78
33
 
79
34
  PLATFORMS
80
35
  ruby
81
36
 
82
37
  DEPENDENCIES
83
- actionview (>= 4.2.0)
84
- activerecord (>= 4.2.0)
85
- activesupport (>= 4.2.0)
38
+ appraisal
86
39
  awesome_print!
87
40
  fakefs (>= 0.2.1)
88
- mongoid (>= 4.0.0)
89
41
  nokogiri (>= 1.6.5)
90
42
  rspec (>= 3.0.0)
91
43
  sqlite3
data/README.md CHANGED
@@ -1,7 +1,12 @@
1
1
  ## Awesome Print ##
2
2
 
3
+ [![RubyGems][gem_version_badge]][ruby_gems]
4
+ [![Travis CI][travis_ci_badge]][travis_ci]
5
+ [![Code Climate][code_climate_badge]][code_climate]
6
+ [![RubyGems][gem_downloads_badge]][ruby_gems]
3
7
  [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/michaeldv/awesome_print?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
4
8
 
9
+
5
10
  Awesome Print is a Ruby library that pretty prints Ruby objects in full color
6
11
  exposing their internal structure with proper indentation. Rails ActiveRecord
7
12
  objects and usage within Rails templates are supported via included mixins.
@@ -307,6 +312,10 @@ AwesomePrint.defaults = {
307
312
  }
308
313
  ```
309
314
 
315
+ ## Versioning
316
+
317
+ AwesomePrint follows the [Semantic Versioning](http://semver.org/) standard.
318
+
310
319
  ### Running Specs ###
311
320
 
312
321
  $ gem install rspec # RSpec 2.x is the requirement.
@@ -367,3 +376,11 @@ http://www.dvorkin.net
367
376
  %w(mike dvorkin.net) * "@" || "twitter.com/mid"
368
377
 
369
378
  Released under the MIT license. See LICENSE file for details.
379
+
380
+ [gem_version_badge]: https://img.shields.io/gem/v/awesome_print.svg?style=flat
381
+ [gem_downloads_badge]: http://img.shields.io/gem/dt/awesome_print.svg?style=flat
382
+ [ruby_gems]: http://rubygems.org/gems/awesome_print
383
+ [travis_ci]: http://travis-ci.org/michaeldv/awesome_print
384
+ [travis_ci_badge]: https://img.shields.io/travis/michaeldv/awesome_print.svg?style=flat
385
+ [code_climate]: https://codeclimate.com/github/michaeldv/awesome_print
386
+ [code_climate_badge]: http://img.shields.io/codeclimate/github/michaeldv/awesome_print.svg?style=flat
data/Rakefile CHANGED
@@ -1,7 +1,20 @@
1
+ require "rubygems"
2
+ require "bundler/setup"
3
+
1
4
  require "bundler"
2
5
  Bundler::GemHelper.install_tasks
3
6
 
4
- task :default => :spec
7
+ task :default do
8
+ if ENV['BUNDLE_GEMFILE'] =~ /gemfiles/
9
+ Rake::Task['spec'].invoke
10
+ else
11
+ Rake::Task['appraise'].invoke
12
+ end
13
+ end
14
+
15
+ task :appraise do
16
+ exec 'appraisal install && appraisal rake'
17
+ end
5
18
 
6
19
  desc "Run all awesome_print gem specs"
7
20
  task :spec do
@@ -52,7 +52,7 @@ module AwesomePrint
52
52
  end
53
53
  end
54
54
 
55
- "##{object} " << awesome_hash(data)
55
+ "#{object} " << awesome_hash(data)
56
56
  end
57
57
 
58
58
  # Format Ripple class object.
@@ -5,6 +5,6 @@
5
5
  #------------------------------------------------------------------------------
6
6
  module AwesomePrint
7
7
  def self.version
8
- "1.6.0"
8
+ "1.6.1"
9
9
  end
10
10
  end
@@ -27,14 +27,6 @@ class SubUser < User; end
27
27
  # Helper methods
28
28
  # ##############
29
29
 
30
- def activerecord_version
31
- # ActiveRecord 4+
32
- return ActiveRecord.version.to_s if ActiveRecord.method_defined? :version
33
-
34
- # everything else
35
- ActiveRecord::VERSION::STRING
36
- end
37
-
38
30
  # we only work with ActiveRecord 2+
39
31
  def is_usable_activerecord?
40
32
  defined?(ActiveRecord::VERSION::MAJOR) && ActiveRecord::VERSION::MAJOR >= 2
@@ -18,6 +18,10 @@ $LOAD_PATH.unshift(File.dirname(__FILE__))
18
18
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
19
19
  require 'awesome_print'
20
20
 
21
+ Dir[File.dirname(__FILE__) + '/support/**/*.rb'].each do |file|
22
+ require file
23
+ end
24
+
21
25
  def stub_dotfile!
22
26
  dotfile = File.join(ENV["HOME"], ".aprc")
23
27
  expect(File).to receive(:readable?).at_least(:once).with(dotfile).and_return(false)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: awesome_print
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Dvorkin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-29 00:00:00.000000000 Z
11
+ date: 2014-12-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 3.0.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: appraisal
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: fakefs
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -38,6 +52,34 @@ dependencies:
38
52
  - - ">="
39
53
  - !ruby/object:Gem::Version
40
54
  version: 0.2.1
55
+ - !ruby/object:Gem::Dependency
56
+ name: sqlite3
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: nokogiri
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: 1.6.5
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: 1.6.5
41
83
  description: 'Great Ruby dubugging companion: pretty print Ruby objects to visualize
42
84
  their structure. Supports custom object formatting via plugins'
43
85
  email: mike@dvorkin.net
@@ -46,7 +88,9 @@ extensions: []
46
88
  extra_rdoc_files: []
47
89
  files:
48
90
  - ".gitignore"
91
+ - Appraisals
49
92
  - CHANGELOG
93
+ - CONTRIBUTING.md
50
94
  - Gemfile
51
95
  - Gemfile.lock
52
96
  - LICENSE