prettyprint 0.2.0 → 0.2.1
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 +4 -4
- data/.document +3 -0
- data/.github/release.yml +4 -0
- data/.github/workflows/sync-ruby.yml +33 -0
- data/.github/workflows/test.yml +2 -1
- data/lib/prettyprint.rb +20 -1
- metadata +6 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2347ac03072164e888e65757bc39fd76df6185b037084e6c1fdbf7b94b06df17
|
|
4
|
+
data.tar.gz: 46157c10defc6720310848b27b76a9e177d28f9490413c39da502419929f7dac
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d964c5444b2557f1f8502b937f8659583ebd450d649acdfa1ec2cc470883f0d0f1fb7ce5cabcb39754d6778287689547717c1eee825d831f374c4668a10bc064
|
|
7
|
+
data.tar.gz: d0f7b92dcde07eeb4dc6b372c29413d93cd98fd98b0b12e0a34756df78c82b58bd4ff56c645ff98cb7501d4ffcc82c03e5232d0e67aa6a3d38a83eee41bce09e
|
data/.document
ADDED
data/.github/release.yml
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
name: Sync ruby
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches: [master]
|
|
5
|
+
jobs:
|
|
6
|
+
sync:
|
|
7
|
+
name: Sync ruby
|
|
8
|
+
runs-on: ubuntu-latest
|
|
9
|
+
if: ${{ github.repository_owner == 'ruby' }}
|
|
10
|
+
steps:
|
|
11
|
+
- uses: actions/checkout@v7
|
|
12
|
+
|
|
13
|
+
- name: Create GitHub App token
|
|
14
|
+
id: app-token
|
|
15
|
+
uses: actions/create-github-app-token@v3
|
|
16
|
+
with:
|
|
17
|
+
app-id: 2060836
|
|
18
|
+
private-key: ${{ secrets.RUBY_SYNC_DEFAULT_GEMS_PRIVATE_KEY }}
|
|
19
|
+
owner: ruby
|
|
20
|
+
repositories: ruby
|
|
21
|
+
|
|
22
|
+
- name: Sync to ruby/ruby
|
|
23
|
+
uses: convictional/trigger-workflow-and-wait@v1.6.5
|
|
24
|
+
with:
|
|
25
|
+
owner: ruby
|
|
26
|
+
repo: ruby
|
|
27
|
+
workflow_file_name: sync_default_gems.yml
|
|
28
|
+
github_token: ${{ steps.app-token.outputs.token }}
|
|
29
|
+
ref: master
|
|
30
|
+
client_payload: |
|
|
31
|
+
{"gem":"${{ github.event.repository.name }}","before":"${{ github.event.before }}","after":"${{ github.event.after }}"}
|
|
32
|
+
propagate_failure: true
|
|
33
|
+
wait_interval: 10
|
data/.github/workflows/test.yml
CHANGED
|
@@ -20,13 +20,14 @@ jobs:
|
|
|
20
20
|
ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
|
|
21
21
|
os: [ ubuntu-latest, macos-latest, windows-latest ]
|
|
22
22
|
exclude:
|
|
23
|
+
- { os: macos-latest , ruby: 2.5 }
|
|
23
24
|
- { os: windows-latest , ruby: head }
|
|
24
25
|
include:
|
|
25
26
|
- { os: windows-latest , ruby: mingw }
|
|
26
27
|
- { os: windows-latest , ruby: mswin }
|
|
27
28
|
runs-on: ${{ matrix.os }}
|
|
28
29
|
steps:
|
|
29
|
-
- uses: actions/checkout@
|
|
30
|
+
- uses: actions/checkout@v7
|
|
30
31
|
- name: Set up Ruby
|
|
31
32
|
uses: ruby/setup-ruby@v1
|
|
32
33
|
with:
|
data/lib/prettyprint.rb
CHANGED
|
@@ -33,7 +33,8 @@
|
|
|
33
33
|
#
|
|
34
34
|
class PrettyPrint
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
# The version string
|
|
37
|
+
VERSION = "0.2.1"
|
|
37
38
|
|
|
38
39
|
# This is a convenience method which is same as follows:
|
|
39
40
|
#
|
|
@@ -486,8 +487,10 @@ class PrettyPrint
|
|
|
486
487
|
# It is passed to be similar to a PrettyPrint object itself, by responding to:
|
|
487
488
|
# * #text
|
|
488
489
|
# * #breakable
|
|
490
|
+
# * #fill_breakable
|
|
489
491
|
# * #nest
|
|
490
492
|
# * #group
|
|
493
|
+
# * #group_sub
|
|
491
494
|
# * #flush
|
|
492
495
|
# * #first?
|
|
493
496
|
#
|
|
@@ -521,6 +524,13 @@ class PrettyPrint
|
|
|
521
524
|
@output << sep
|
|
522
525
|
end
|
|
523
526
|
|
|
527
|
+
# Appends +sep+ to the text to be output. By default +sep+ is ' '
|
|
528
|
+
#
|
|
529
|
+
# +width+ argument is here for compatibility. It is a noop argument.
|
|
530
|
+
def fill_breakable(sep=' ', width=nil)
|
|
531
|
+
@output << sep
|
|
532
|
+
end
|
|
533
|
+
|
|
524
534
|
# Takes +indent+ arg, but does nothing with it.
|
|
525
535
|
#
|
|
526
536
|
# Yields to a block.
|
|
@@ -544,6 +554,15 @@ class PrettyPrint
|
|
|
544
554
|
@first.pop
|
|
545
555
|
end
|
|
546
556
|
|
|
557
|
+
# Yields to a block for compatibility.
|
|
558
|
+
def group_sub # :nodoc:
|
|
559
|
+
yield
|
|
560
|
+
end
|
|
561
|
+
|
|
562
|
+
# Method present for compatibility, but is a noop
|
|
563
|
+
def break_outmost_groups # :nodoc:
|
|
564
|
+
end
|
|
565
|
+
|
|
547
566
|
# Method present for compatibility, but is a noop
|
|
548
567
|
def flush # :nodoc:
|
|
549
568
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: prettyprint
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tanaka Akira
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: exe
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies: []
|
|
13
12
|
description: Implements a pretty printing algorithm for readable structure.
|
|
14
13
|
email:
|
|
@@ -17,7 +16,10 @@ executables: []
|
|
|
17
16
|
extensions: []
|
|
18
17
|
extra_rdoc_files: []
|
|
19
18
|
files:
|
|
19
|
+
- ".document"
|
|
20
20
|
- ".github/dependabot.yml"
|
|
21
|
+
- ".github/release.yml"
|
|
22
|
+
- ".github/workflows/sync-ruby.yml"
|
|
21
23
|
- ".github/workflows/test.yml"
|
|
22
24
|
- ".gitignore"
|
|
23
25
|
- Gemfile
|
|
@@ -35,7 +37,6 @@ licenses:
|
|
|
35
37
|
metadata:
|
|
36
38
|
homepage_uri: https://github.com/ruby/prettyprint
|
|
37
39
|
source_code_uri: https://github.com/ruby/prettyprint
|
|
38
|
-
post_install_message:
|
|
39
40
|
rdoc_options: []
|
|
40
41
|
require_paths:
|
|
41
42
|
- lib
|
|
@@ -50,8 +51,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
50
51
|
- !ruby/object:Gem::Version
|
|
51
52
|
version: '0'
|
|
52
53
|
requirements: []
|
|
53
|
-
rubygems_version:
|
|
54
|
-
signing_key:
|
|
54
|
+
rubygems_version: 4.0.20
|
|
55
55
|
specification_version: 4
|
|
56
56
|
summary: Implements a pretty printing algorithm for readable structure.
|
|
57
57
|
test_files: []
|