prettier_print 1.2.0 → 1.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: cd1acc23437a5cf57c8f770a8f6ae6273d14c4716a64566f7966c19fe0f63276
4
- data.tar.gz: bee4b7fcdd680e7a3747ad025054830426638f166bd14229e1a3386350fd542e
3
+ metadata.gz: 5d7e2d82792d59bc2b9c28ef209091c7a258fa6e7729cccf7e182de3021c1533
4
+ data.tar.gz: 9a9d0b4689234dc396354279f07c13337ff8b423b974f43ba3f1bf411aa8d793
5
5
  SHA512:
6
- metadata.gz: e59fb5d9131f40d75e458b45ad069329da4ae83df63f3111f7ffba01347d1ddf1a214f636a4bf5afa08502458c171ed7d17a8e358294ef101c9f1db68a924e20
7
- data.tar.gz: ae31224da56d3983e6c3fa4329dbaa1bb86a4cf8b500852cfc105cfb01d69b11d61b285860e924768664f652964e300c72dbca141441e3f31222dad7be1545e7
6
+ metadata.gz: b0ccf56fb3f3887e6d2dd3f72b1ac5944e2ad9e754cd15cc41541e36e79b481cc50a429feaac41302bc9363415bdc2242a8bc0b1719f8e779794ec66a7ae0087
7
+ data.tar.gz: c7304db0e58c2898a26f92a698d633dbf8df419faa77aa3b82815db191bffeb26d37dacad8793964a6a87517ae5a78a990491607df03f270c98d7e540edf1956
@@ -4,3 +4,7 @@ updates:
4
4
  directory: "/"
5
5
  schedule:
6
6
  interval: "daily"
7
+ - package-ecosystem: "github-actions"
8
+ directory: "/"
9
+ schedule:
10
+ interval: "daily"
@@ -12,7 +12,7 @@ jobs:
12
12
  steps:
13
13
  - name: Dependabot metadata
14
14
  id: metadata
15
- uses: dependabot/fetch-metadata@v1.3.3
15
+ uses: dependabot/fetch-metadata@v1.3.6
16
16
  with:
17
17
  github-token: "${{ secrets.GITHUB_TOKEN }}"
18
18
  - name: Enable auto-merge for Dependabot PRs
@@ -1,16 +1,18 @@
1
1
  name: Main
2
+
2
3
  on:
3
4
  - push
4
- - pull_request_target
5
+ - pull_request
6
+
5
7
  jobs:
6
8
  ci:
7
9
  strategy:
8
10
  fail-fast: false
9
11
  matrix:
10
12
  ruby:
11
- - '2.7'
12
13
  - '3.0'
13
14
  - '3.1'
15
+ - '3.2'
14
16
  - head
15
17
  name: CI
16
18
  runs-on: ubuntu-latest
data/CHANGELOG.md CHANGED
@@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.2.1] - 2023-03-09
10
+
11
+ ### Changed
12
+
13
+ - Fixed a bug where having line suffixes on the final line without a breakable could cause an infinite loop.
14
+
9
15
  ## [1.2.0] - 2022-12-23
10
16
 
11
17
  ### Added
@@ -55,7 +61,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
55
61
 
56
62
  - 🎉 Initial release! 🎉
57
63
 
58
- [unreleased]: https://github.com/ruby-syntax-tree/prettier_print/compare/v1.2.0...HEAD
64
+ [unreleased]: https://github.com/ruby-syntax-tree/prettier_print/compare/v1.2.1...HEAD
65
+ [1.2.1]: https://github.com/ruby-syntax-tree/prettier_print/compare/v1.2.0...v1.2.1
59
66
  [1.2.0]: https://github.com/ruby-syntax-tree/prettier_print/compare/v1.1.0...v1.2.0
60
67
  [1.1.0]: https://github.com/ruby-syntax-tree/prettier_print/compare/v1.0.2...v1.1.0
61
68
  [1.0.2]: https://github.com/ruby-syntax-tree/prettier_print/compare/v1.0.1...v1.0.2
@@ -0,0 +1,76 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, sex characteristics, gender identity and expression,
9
+ level of experience, education, socio-economic status, nationality, personal
10
+ appearance, race, religion, or sexual identity and orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ - Using welcoming and inclusive language
18
+ - Being respectful of differing viewpoints and experiences
19
+ - Gracefully accepting constructive criticism
20
+ - Focusing on what is best for the community
21
+ - Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ - The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ - Trolling, insulting/derogatory comments, and personal or political attacks
28
+ - Public or private harassment
29
+ - Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ - Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at kddnewton@gmail.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72
+
73
+ [homepage]: https://www.contributor-covenant.org
74
+
75
+ For answers to common questions about this code of conduct, see
76
+ https://www.contributor-covenant.org/faq
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- prettier_print (1.2.0)
4
+ prettier_print (1.2.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -9,7 +9,7 @@ GEM
9
9
  docile (1.4.0)
10
10
  power_assert (2.0.2)
11
11
  rake (13.0.6)
12
- simplecov (0.21.2)
12
+ simplecov (0.22.0)
13
13
  docile (~> 1.1)
14
14
  simplecov-html (~> 0.11)
15
15
  simplecov_json_formatter (~> 0.1)
@@ -20,6 +20,7 @@ GEM
20
20
 
21
21
  PLATFORMS
22
22
  arm64-darwin-21
23
+ arm64-darwin-22
23
24
  x86_64-darwin-21
24
25
  x86_64-linux
25
26
 
data/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # PrettierPrint
2
2
 
3
+ [![Build Status](https://github.com/ruby-syntax-tree/prettier_print/workflows/Main/badge.svg)](https://github.com/ruby-syntax-tree/prettier_print/actions)
4
+ [![Gem Version](https://img.shields.io/gem/v/prettier_print.svg)](https://rubygems.org/gems/prettier_print)
5
+
3
6
  A drop-in replacement for the `prettyprint` gem with more functionality.
4
7
 
5
8
  ## Installation
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class PrettierPrint
4
- VERSION = "1.2.0"
4
+ VERSION = "1.2.1"
5
5
  end
@@ -616,8 +616,11 @@ class PrettierPrint
616
616
  end
617
617
 
618
618
  if commands.empty? && line_suffixes.any?
619
- commands += line_suffixes.sort_by(&line_suffix_sort)
620
- line_suffixes = []
619
+ line_suffixes.sort_by(&line_suffix_sort).each do |(indent, mode, doc)|
620
+ commands += doc.contents.reverse.map { |part| [indent, mode, part] }
621
+ end
622
+
623
+ line_suffixes.clear
621
624
  end
622
625
  end
623
626
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prettier_print
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Newton
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-12-23 00:00:00.000000000 Z
11
+ date: 2023-03-09 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email:
@@ -22,6 +22,7 @@ files:
22
22
  - ".github/workflows/main.yml"
23
23
  - ".gitignore"
24
24
  - CHANGELOG.md
25
+ - CODE_OF_CONDUCT.md
25
26
  - Gemfile
26
27
  - Gemfile.lock
27
28
  - LICENSE
@@ -52,7 +53,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
52
53
  - !ruby/object:Gem::Version
53
54
  version: '0'
54
55
  requirements: []
55
- rubygems_version: 3.3.21
56
+ rubygems_version: 3.4.1
56
57
  signing_key:
57
58
  specification_version: 4
58
59
  summary: A drop-in replacement for the prettyprint gem with more functionality.