amazing_print 1.7.2 → 1.8.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1936b7b4ca5adfa821918412efe3e0dee3ac1bfc82f27c07374169b212fe6014
4
- data.tar.gz: 40c690d728938fbc4e2e46bde9189007acedecea5b43736ca5d1a5dbc59c5deb
3
+ metadata.gz: ab76db037a1c38f0bd372838a92ae03e453f2d81eb73e9c9df5c272b600747dc
4
+ data.tar.gz: 45a2b9d7de1d5b9f04a57277364646762fd0b84021e91ee71d7a01e966a9e6e7
5
5
  SHA512:
6
- metadata.gz: 2e406d97f347bab6f9cd2ece415bc15a1edc0d0f655d08c4f09e21802f293b5f94199f81a0fa3b80857307b0988688eb5a940da6ec1cb79e6583334db5d6b704
7
- data.tar.gz: d6f5ec436363f8ea1c48e5db11ff6ca62b3198d82be5b33dd949e98d0e700c7735c4b624a36f176cd1c5a08a2785047bfcaad0ea12f674d7138a4a32fb699861
6
+ metadata.gz: ba4f13b020e16874a0313582279b5e8d5e32455da5d8cdb6ccfac4fd21a150e6061000099558e5ae280c01ddd8c460bf8b2a1ea40301dec4e87fc47046678013
7
+ data.tar.gz: 1f60c6eb6b2b302aabb011323dae7d78ec37855b727d884c5b83256d075b416de84c87b35e6eb6d21d72e9a5670f53331f639a8310e8bbee285235e24a9c5782
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## v1.8.0
4
+
5
+ - Drop Ruby 3.0 and add Ruby 3.4 #125
6
+
3
7
  ## v1.7.2
4
8
 
5
9
  - update the version string in `AmazingPrint.version`
data/README.md CHANGED
@@ -14,8 +14,8 @@ AmazingPrint is a fork of [AwesomePrint](https://github.com/awesome-print/awesom
14
14
 
15
15
  ### Supported Versions ###
16
16
 
17
- - Ruby >= 2.5
18
- - Rails >= 5.2
17
+ - Ruby >= 3.1
18
+ - Rails >= 6.1
19
19
 
20
20
  ### Installation ###
21
21
  # Installing as Ruby gem
@@ -56,7 +56,7 @@ module AwesomeMethodArray # :nodoc:
56
56
  # the comment :-)
57
57
  #
58
58
  arr = if blk
59
- super(pattern) do |match|
59
+ super do |match|
60
60
  #
61
61
  # The binding can only be used with Ruby-defined methods, therefore
62
62
  # we must rescue potential "ArgumentError: Can't create Binding from
@@ -75,7 +75,7 @@ module AwesomeMethodArray # :nodoc:
75
75
  yield match
76
76
  end
77
77
  else
78
- super(pattern)
78
+ super
79
79
  end
80
80
  arr.instance_variable_set(:@__awesome_methods__, instance_variable_get(:@__awesome_methods__))
81
81
  arr.select! { |item| item.is_a?(Symbol) || item.is_a?(String) } # grep block might return crap.
@@ -19,8 +19,8 @@ module AmazingPrint
19
19
  cast = cast_without_mongo_mapper(object, type)
20
20
 
21
21
  if defined?(::MongoMapper::Document)
22
- if object.is_a?(Class) && !(object.ancestors & [::MongoMapper::Document,
23
- ::MongoMapper::EmbeddedDocument]).empty?
22
+ if object.is_a?(Class) && !object.ancestors.intersect?([::MongoMapper::Document,
23
+ ::MongoMapper::EmbeddedDocument]).nil?
24
24
  cast = :mongo_mapper_class
25
25
  elsif object.is_a?(::MongoMapper::Document) || object.is_a?(::MongoMapper::EmbeddedDocument)
26
26
  cast = :mongo_mapper_instance
@@ -48,7 +48,7 @@ module AmazingPrint
48
48
  elsif (hash = convert_to_hash(object))
49
49
  awesome_hash(hash)
50
50
  else
51
- awesome_simple(object.inspect.to_s, type, @inspector)
51
+ awesome_simple(object.inspect.to_s, type, @inspector) # rubocop:disable Lint/RedundantTypeConversion
52
52
  end
53
53
  end
54
54
 
@@ -110,8 +110,8 @@ module AmazingPrint
110
110
  inspector.current_indentation
111
111
  end
112
112
 
113
- def indented(&blk)
114
- inspector.increase_indentation(&blk)
113
+ def indented(&)
114
+ inspector.increase_indentation(&)
115
115
  end
116
116
 
117
117
  # precompute common indentations
@@ -107,10 +107,10 @@ module AmazingPrint
107
107
  "#{align(awesome_key, width)}#{colorize(' => ', :hash)}#{inspector.awesome(value)}"
108
108
  end
109
109
 
110
- def plain_single_line(&block)
110
+ def plain_single_line(&)
111
111
  plain = options[:plain]
112
112
  options[:plain] = true
113
- single_line(&block)
113
+ single_line(&)
114
114
  ensure
115
115
  options[:plain] = plain
116
116
  end
@@ -68,7 +68,7 @@ module AmazingPrint
68
68
  # We need to ensure that the original Kernel#format is used here instead of the one
69
69
  # defined above.
70
70
  # rubocop:disable Style/ColonMethodCall
71
- str + Kernel::format(':0x%08x', (object.__id__ * 2))
71
+ str + Kernel::format(':0x%08x', object.__id__ * 2)
72
72
  # rubocop:enable Style/ColonMethodCall
73
73
  end
74
74
 
@@ -61,7 +61,7 @@ module AmazingPrint
61
61
  # We need to ensure that the original Kernel#format is used here instead of the one defined
62
62
  # above.
63
63
  # rubocop:disable Style/ColonMethodCall
64
- Kernel::format("#{struct.class.superclass}:#{struct.class}:0x%08x", (struct.__id__ * 2))
64
+ Kernel::format("#{struct.class.superclass}:#{struct.class}:0x%08x", struct.__id__ * 2)
65
65
  # rubocop:enable Style/ColonMethodCall
66
66
  end
67
67
 
@@ -79,8 +79,8 @@ module AmazingPrint
79
79
  indentator.indentation
80
80
  end
81
81
 
82
- def increase_indentation(&blk)
83
- indentator.indent(&blk)
82
+ def increase_indentation(&)
83
+ indentator.indent(&)
84
84
  end
85
85
 
86
86
  # Dispatcher that detects data nesting and invokes object-aware formatter.
@@ -7,6 +7,6 @@
7
7
  #------------------------------------------------------------------------------
8
8
  module AmazingPrint
9
9
  def self.version
10
- '1.7.2'
10
+ '1.8.0'
11
11
  end
12
12
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amazing_print
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.2
4
+ version: 1.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Dvorkin
8
8
  - Kevin McCormackPatrik Wenger
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-01-07 00:00:00.000000000 Z
11
+ date: 1980-01-02 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: 'Great Ruby debugging companion: pretty print Ruby objects to visualize
14
14
  their structure. Supports custom object formatting via plugins'
@@ -69,14 +69,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
69
69
  requirements:
70
70
  - - ">="
71
71
  - !ruby/object:Gem::Version
72
- version: 3.0.0
72
+ version: 3.1.0
73
73
  required_rubygems_version: !ruby/object:Gem::Requirement
74
74
  requirements:
75
75
  - - ">="
76
76
  - !ruby/object:Gem::Version
77
77
  version: '0'
78
78
  requirements: []
79
- rubygems_version: 3.6.2
79
+ rubygems_version: 3.6.7
80
80
  specification_version: 4
81
81
  summary: Pretty print Ruby objects with proper indentation and colors
82
82
  test_files: []