pp 0.2.0 → 0.2.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
  SHA256:
3
- metadata.gz: 80f1e5fc76139b08c104dce9adb682eb3220e95d36e6fcce17667187f39831f9
4
- data.tar.gz: 620cb2b296e74d060966c7162169428ff673fbef6f63880eb4c8514706bbccc0
3
+ metadata.gz: 2faa701270cc94e8c8db4dc3ef9e142d6a6f0b35ee05dd992a030697fb2e1558
4
+ data.tar.gz: 122590c50f617dc75434ed4be205c1896cd6699b33b65f98406b9f78604e6e58
5
5
  SHA512:
6
- metadata.gz: ba3a712f99b773c8de3eb473bdb5bffe3c4f2e4d1ee57649e7df4380d9994751b47d812c44c3708c66916d82bc7b6669e7e44e95224699fa1a30dd26067f57a4
7
- data.tar.gz: d2394827137746ffc4bd03323c3245e25b1bd9b3265819be27d510fc7ad3140ab2a6d19e4873ff1e9f51672d0632323c525af3d2fd138c367882426a868988a2
6
+ metadata.gz: ec0f27ba14d0f783f64f35792be7dc2dceb7b11f3aecc7a9535968ed37f4b5659a67a038ec509f6fd9ac7d1495cf20e228df5d226b79258e1d55fd5796747455
7
+ data.tar.gz: 2ff27f1c5086edbb4677e89924411b4916484c62ec1fa620e7ca59195cff7e876e8c5103d6fa55b5ebf9d7ef7c682f85ca68d09b763a99276732fab3f7aa1484
data/lib/pp.rb CHANGED
@@ -100,6 +100,7 @@ class PP < PrettyPrint
100
100
  def sharing_detection
101
101
  Ractor.current[:pp_sharing_detection]
102
102
  end
103
+ # Sets the sharing detection flag to b.
103
104
  def sharing_detection=(b)
104
105
  Ractor.current[:pp_sharing_detection] = b
105
106
  end
@@ -236,7 +237,7 @@ class PP < PrettyPrint
236
237
  else
237
238
  sep.call
238
239
  end
239
- yield(*v, **{})
240
+ RUBY_VERSION >= "3.0" ? yield(*v, **{}) : yield(*v)
240
241
  }
241
242
  end
242
243
 
data/pp.gemspec CHANGED
@@ -1,21 +1,24 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "pp"
3
- spec.version = "0.2.0"
3
+ spec.version = "0.2.1"
4
4
  spec.authors = ["Tanaka Akira"]
5
5
  spec.email = ["akr@fsij.org"]
6
6
 
7
7
  spec.summary = %q{Provides a PrettyPrinter for Ruby objects}
8
8
  spec.description = %q{Provides a PrettyPrinter for Ruby objects}
9
9
  spec.homepage = "https://github.com/ruby/pp"
10
- spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
11
10
  spec.licenses = ["Ruby", "BSD-2-Clause"]
12
11
 
12
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
13
+
13
14
  spec.metadata["homepage_uri"] = spec.homepage
14
15
  spec.metadata["source_code_uri"] = spec.homepage
15
16
 
16
- spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
17
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
- end
17
+ spec.files = %w[
18
+ LICENSE.txt
19
+ lib/pp.rb
20
+ pp.gemspec
21
+ ]
19
22
  spec.bindir = "exe"
20
23
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
24
  spec.require_paths = ["lib"]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tanaka Akira
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-12-23 00:00:00.000000000 Z
11
+ date: 2021-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: prettyprint
@@ -31,14 +31,7 @@ executables: []
31
31
  extensions: []
32
32
  extra_rdoc_files: []
33
33
  files:
34
- - ".gitignore"
35
- - ".travis.yml"
36
- - Gemfile
37
34
  - LICENSE.txt
38
- - README.md
39
- - Rakefile
40
- - bin/console
41
- - bin/setup
42
35
  - lib/pp.rb
43
36
  - pp.gemspec
44
37
  homepage: https://github.com/ruby/pp
@@ -56,14 +49,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
56
49
  requirements:
57
50
  - - ">="
58
51
  - !ruby/object:Gem::Version
59
- version: 2.3.0
52
+ version: 2.7.0
60
53
  required_rubygems_version: !ruby/object:Gem::Requirement
61
54
  requirements:
62
55
  - - ">="
63
56
  - !ruby/object:Gem::Version
64
57
  version: '0'
65
58
  requirements: []
66
- rubygems_version: 3.2.2
59
+ rubygems_version: 3.3.0.dev
67
60
  signing_key:
68
61
  specification_version: 4
69
62
  summary: Provides a PrettyPrinter for Ruby objects
data/.gitignore DELETED
@@ -1,8 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
4
- /coverage/
5
- /doc/
6
- /pkg/
7
- /spec/reports/
8
- /tmp/
data/.travis.yml DELETED
@@ -1,6 +0,0 @@
1
- ---
2
- language: ruby
3
- cache: bundler
4
- rvm:
5
- - 2.8.0
6
- before_install: gem install bundler -v 2.1.4
data/Gemfile DELETED
@@ -1,4 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gem "rake"
4
- gem "test-unit"
data/README.md DELETED
@@ -1,39 +0,0 @@
1
- # PP
2
-
3
- A pretty-printer for Ruby objects.
4
-
5
- ## Installation
6
-
7
- Add this line to your application's Gemfile:
8
-
9
- ```ruby
10
- gem 'pp'
11
- ```
12
-
13
- And then execute:
14
-
15
- $ bundle install
16
-
17
- Or install it yourself as:
18
-
19
- $ gem install pp
20
-
21
- ## Usage
22
-
23
- ```ruby
24
- pp(obj) #=> obj
25
- pp obj #=> obj
26
- pp(obj1, obj2, ...) #=> [obj1, obj2, ...]
27
- pp() #=> nil
28
- ```
29
-
30
- ## Development
31
-
32
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
33
-
34
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
35
-
36
- ## Contributing
37
-
38
- Bug reports and pull requests are welcome on GitHub at https://github.com/ruby/pp.
39
-
data/Rakefile DELETED
@@ -1,10 +0,0 @@
1
- require "bundler/gem_tasks"
2
- require "rake/testtask"
3
-
4
- Rake::TestTask.new(:test) do |t|
5
- t.libs << "test"
6
- t.libs << "lib"
7
- t.test_files = FileList["test/**/test_*.rb"]
8
- end
9
-
10
- task :default => :test
data/bin/console DELETED
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "pp"
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require "irb"
14
- IRB.start(__FILE__)
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here