unparser 0.4.8 → 0.4.9

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.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. metadata +3 -59
  4. data/.github/workflows/ci.yml +0 -90
  5. data/.gitignore +0 -37
  6. data/.rspec +0 -4
  7. data/.rubocop.yml +0 -126
  8. data/Changelog.md +0 -162
  9. data/Gemfile +0 -9
  10. data/Gemfile.lock +0 -111
  11. data/LICENSE +0 -20
  12. data/Rakefile +0 -22
  13. data/config/devtools.yml +0 -2
  14. data/config/flay.yml +0 -3
  15. data/config/flog.yml +0 -2
  16. data/config/mutant.yml +0 -6
  17. data/config/reek.yml +0 -98
  18. data/config/yardstick.yml +0 -2
  19. data/spec/integration/unparser/corpus_spec.rb +0 -125
  20. data/spec/integrations.yml +0 -92
  21. data/spec/spec_helper.rb +0 -42
  22. data/spec/unit/unparser/buffer/append_spec.rb +0 -24
  23. data/spec/unit/unparser/buffer/append_without_prefix_spec.rb +0 -23
  24. data/spec/unit/unparser/buffer/capture_content_spec.rb +0 -17
  25. data/spec/unit/unparser/buffer/content_spec.rb +0 -38
  26. data/spec/unit/unparser/buffer/fresh_line_spec.rb +0 -20
  27. data/spec/unit/unparser/buffer/indent_spec.rb +0 -20
  28. data/spec/unit/unparser/buffer/nl_spec.rb +0 -16
  29. data/spec/unit/unparser/buffer/unindent_spec.rb +0 -20
  30. data/spec/unit/unparser/color_spec.rb +0 -40
  31. data/spec/unit/unparser/comments/consume_spec.rb +0 -22
  32. data/spec/unit/unparser/comments/take_all_spec.rb +0 -19
  33. data/spec/unit/unparser/comments/take_before_spec.rb +0 -46
  34. data/spec/unit/unparser/comments/take_eol_comments_spec.rb +0 -32
  35. data/spec/unit/unparser/diff_spec.rb +0 -189
  36. data/spec/unit/unparser/emitter/class_methods/handle_spec.rb +0 -17
  37. data/spec/unit/unparser/validation_spec.rb +0 -327
  38. data/spec/unit/unparser_spec.rb +0 -1920
  39. data/unparser.gemspec +0 -35
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0dee214bf2371dbf22755d995f36fd96cd1a93b2a2bf846382525c8d41e61ecf
4
- data.tar.gz: 6ed35f024038b383369479b1ff851a7a2cc207b248a2340f218e452b2dded583
3
+ metadata.gz: 10fe213bc822f4da69795458d89fc34693b5c57f1add6e910a77f8f456f5cff4
4
+ data.tar.gz: a1333c5af931e182f3fe0c5586d010f306f5b51d5e8f5204beb2bd47cce8a9d2
5
5
  SHA512:
6
- metadata.gz: 534bc06ed25ef60d1a111fc301b75bb97632cb988498cd48914a6cd8bef7d13710f24674ee9166c05f2f01d53cc7e2dfd13289c27d0789ade5a45b32d4a4e9a2
7
- data.tar.gz: f84a1c3efd6f6c2d77990ac57b266ca1e50b45dbd35202b294972cb9b094c6dfa4e7026986f0ab7ca0c82726f6deac77db9d7f5b6ba940f6203795649f9ee1eb
6
+ metadata.gz: aa4d72074d1f1aeeafaf7f87cc53f5a6754dcb06ae99d1c73191b776bb10c9b58db0be2fdd8c9487e61e0cfdc1918e78aac35adccc7b706ea2b9b5b4101faaaf
7
+ data.tar.gz: 336938a288a1ada6f33db990535b7d487d618a4f60725101b282c5654fd8e1c953c412c5b8dc9cad9afb936c64ddafd65b5fa0797016022c0a8ce52df35c3ec7
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  unparser
2
2
  ========
3
3
 
4
- [![CI](https://github.com/mbj/unparser/workflows/CI/badge.svg)
4
+ ![CI](https://github.com/mbj/unparser/workflows/CI/badge.svg)
5
5
  [![Gem Version](https://img.shields.io/gem/v/unparser.svg)](https://rubygems.org/gems/unparser)
6
6
 
7
7
  Generate equivalent source for ASTs from whitequarks [parser](https://github.com/whitequark/parser).
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unparser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.8
4
+ version: 0.4.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Markus Schirp
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-25 00:00:00.000000000 Z
11
+ date: 2020-09-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: abstract_type
@@ -228,23 +228,8 @@ extensions: []
228
228
  extra_rdoc_files:
229
229
  - README.md
230
230
  files:
231
- - ".github/workflows/ci.yml"
232
- - ".gitignore"
233
- - ".rspec"
234
- - ".rubocop.yml"
235
- - Changelog.md
236
- - Gemfile
237
- - Gemfile.lock
238
- - LICENSE
239
231
  - README.md
240
- - Rakefile
241
232
  - bin/unparser
242
- - config/devtools.yml
243
- - config/flay.yml
244
- - config/flog.yml
245
- - config/mutant.yml
246
- - config/reek.yml
247
- - config/yardstick.yml
248
233
  - lib/unparser.rb
249
234
  - lib/unparser/ast.rb
250
235
  - lib/unparser/ast/local_variable_scope.rb
@@ -311,27 +296,6 @@ files:
311
296
  - lib/unparser/node_helpers.rb
312
297
  - lib/unparser/preprocessor.rb
313
298
  - lib/unparser/validation.rb
314
- - spec/integration/unparser/corpus_spec.rb
315
- - spec/integrations.yml
316
- - spec/spec_helper.rb
317
- - spec/unit/unparser/buffer/append_spec.rb
318
- - spec/unit/unparser/buffer/append_without_prefix_spec.rb
319
- - spec/unit/unparser/buffer/capture_content_spec.rb
320
- - spec/unit/unparser/buffer/content_spec.rb
321
- - spec/unit/unparser/buffer/fresh_line_spec.rb
322
- - spec/unit/unparser/buffer/indent_spec.rb
323
- - spec/unit/unparser/buffer/nl_spec.rb
324
- - spec/unit/unparser/buffer/unindent_spec.rb
325
- - spec/unit/unparser/color_spec.rb
326
- - spec/unit/unparser/comments/consume_spec.rb
327
- - spec/unit/unparser/comments/take_all_spec.rb
328
- - spec/unit/unparser/comments/take_before_spec.rb
329
- - spec/unit/unparser/comments/take_eol_comments_spec.rb
330
- - spec/unit/unparser/diff_spec.rb
331
- - spec/unit/unparser/emitter/class_methods/handle_spec.rb
332
- - spec/unit/unparser/validation_spec.rb
333
- - spec/unit/unparser_spec.rb
334
- - unparser.gemspec
335
299
  homepage: http://github.com/mbj/unparser
336
300
  licenses:
337
301
  - MIT
@@ -355,24 +319,4 @@ rubygems_version: 3.0.3
355
319
  signing_key:
356
320
  specification_version: 4
357
321
  summary: Generate equivalent source for parser gem AST nodes
358
- test_files:
359
- - spec/integration/unparser/corpus_spec.rb
360
- - spec/integrations.yml
361
- - spec/spec_helper.rb
362
- - spec/unit/unparser/buffer/append_spec.rb
363
- - spec/unit/unparser/buffer/append_without_prefix_spec.rb
364
- - spec/unit/unparser/buffer/capture_content_spec.rb
365
- - spec/unit/unparser/buffer/content_spec.rb
366
- - spec/unit/unparser/buffer/fresh_line_spec.rb
367
- - spec/unit/unparser/buffer/indent_spec.rb
368
- - spec/unit/unparser/buffer/nl_spec.rb
369
- - spec/unit/unparser/buffer/unindent_spec.rb
370
- - spec/unit/unparser/color_spec.rb
371
- - spec/unit/unparser/comments/consume_spec.rb
372
- - spec/unit/unparser/comments/take_all_spec.rb
373
- - spec/unit/unparser/comments/take_before_spec.rb
374
- - spec/unit/unparser/comments/take_eol_comments_spec.rb
375
- - spec/unit/unparser/diff_spec.rb
376
- - spec/unit/unparser/emitter/class_methods/handle_spec.rb
377
- - spec/unit/unparser/validation_spec.rb
378
- - spec/unit/unparser_spec.rb
322
+ test_files: []
@@ -1,90 +0,0 @@
1
- name: CI
2
-
3
- on: push
4
-
5
- jobs:
6
- base:
7
- name: Base steps
8
- runs-on: ubuntu-latest
9
- steps:
10
- - uses: actions/checkout@v2
11
- - name: Check Whitespace
12
- run: git diff --check -- HEAD~1
13
- ruby-unit-spec:
14
- name: Unit Specs
15
- runs-on: ${{ matrix.os }}
16
- timeout-minutes: 5
17
- strategy:
18
- fail-fast: false
19
- matrix:
20
- ruby: ['2.6']
21
- os: [ubuntu-latest]
22
- steps:
23
- - uses: actions/checkout@v2
24
- - uses: actions/setup-ruby@v1
25
- with:
26
- ruby-version: ${{ matrix.ruby }}
27
- - run: |
28
- gem install bundler
29
- bundle install
30
- - run: bundle exec rspec spec/unit
31
- ruby-integration-spec:
32
- name: Integration Specs
33
- runs-on: ${{ matrix.os }}
34
- timeout-minutes: 5
35
- strategy:
36
- fail-fast: false
37
- matrix:
38
- ruby: ['2.6']
39
- os: [ubuntu-latest]
40
- steps:
41
- - uses: actions/checkout@v2
42
- - uses: actions/setup-ruby@v1
43
- with:
44
- ruby-version: ${{ matrix.ruby }}
45
- - run: |
46
- gem install bundler
47
- bundle install
48
- - run: bundle exec rspec spec/integration
49
- ruby-mutant:
50
- name: Mutation coverage
51
- runs-on: ${{ matrix.os }}
52
- timeout-minutes: 5
53
- strategy:
54
- fail-fast: false
55
- matrix:
56
- ruby: ['2.6']
57
- os: [ubuntu-latest]
58
- steps:
59
- - uses: actions/checkout@v2
60
- with:
61
- fetch-depth: 0
62
- - uses: actions/setup-ruby@v1
63
- with:
64
- ruby-version: ${{ matrix.ruby }}
65
- - run: |
66
- gem install bundler
67
- bundle install
68
- - run: |
69
- bundle exec mutant \
70
- --since HEAD~1 \
71
- --zombie \
72
- --ignore-subject 'Unparser::CLI*' \
73
- --ignore-subject 'Unparser::Validation.from_string' \
74
- -- 'Unparser*'
75
- ruby-rubocop:
76
- name: Rubocop
77
- runs-on: ${{ matrix.os }}
78
- timeout-minutes: 5
79
- strategy:
80
- fail-fast: false
81
- matrix:
82
- ruby: ['2.6']
83
- os: [ubuntu-latest]
84
- steps:
85
- - uses: actions/checkout@v2
86
- - uses: actions/setup-ruby@v1
87
- with:
88
- ruby-version: ${{ matrix.ruby }}
89
- - run: bundle install
90
- - run: bundle exec rubocop
data/.gitignore DELETED
@@ -1,37 +0,0 @@
1
- ## MAC OS
2
- .DS_Store
3
-
4
- ## TEXTMATE
5
- *.tmproj
6
- tmtags
7
-
8
- ## EMACS
9
- *~
10
- \#*
11
- .\#*
12
-
13
- ## VIM
14
- *.sw[op]
15
-
16
- ## Rubinius
17
- *.rbc
18
- .rbx
19
-
20
- ## PROJECT::GENERAL
21
- *.gem
22
- coverage
23
- profiling
24
- turbulence
25
- rdoc
26
- pkg
27
- tmp
28
- doc
29
- log
30
- .yardoc
31
- measurements
32
-
33
- ## BUNDLER
34
- .bundle
35
-
36
- ## PROJECT::SPECIFIC
37
- /vendor
data/.rspec DELETED
@@ -1,4 +0,0 @@
1
- --color
2
- --format progress
3
- --warnings
4
- --order random
@@ -1,126 +0,0 @@
1
- AllCops:
2
- Include:
3
- - 'lib/unparser.rb'
4
- - 'lib/unparser/**/*.rb'
5
- - '**/*.rake'
6
- - 'Gemfile'
7
- - 'Gemfile.triage'
8
-
9
- # Avoid parameter lists longer than five parameters.
10
- ParameterLists:
11
- Max: 3
12
- CountKeywordArgs: true
13
-
14
- MethodLength:
15
- CountComments: false
16
- Max: 17
17
-
18
- AbcSize:
19
- Max: 18
20
-
21
- # Avoid more than `Max` levels of nesting.
22
- BlockNesting:
23
- Max: 3
24
-
25
- # Align with the style guide.
26
- CollectionMethods:
27
- PreferredMethods:
28
- collect: 'map'
29
- inject: 'reduce'
30
- find: 'detect'
31
- find_all: 'select'
32
-
33
- # Limit line length
34
- LineLength:
35
- Max: 113 # TODO: lower to 79 once the rubocop branch in shared/Gemfile is removed
36
-
37
- ClassLength:
38
- Max: 204
39
-
40
- # Prefer modifiers and explicit if statements over returning early for small methods
41
- GuardClause:
42
- Enabled: false
43
-
44
- Metrics/BlockLength:
45
- Exclude:
46
- # Ignore RSpec DSL
47
- - spec/**/*
48
-
49
- # Flags freezes for singletons that could still be mutated like Regexps
50
- RedundantFreeze:
51
- Enabled: false
52
-
53
- # Allow Fixnum and Bignum. This Gem supports versions before 2.4
54
- UnifiedInteger:
55
- Enabled: false
56
-
57
- # Disabled because of indenting with private keyword in class bodies.
58
- IndentationWidth:
59
- Enabled: false
60
-
61
- # I like raise more
62
- SignalException:
63
- Enabled: false
64
-
65
- # False positive in unparser source
66
- OneLineConditional:
67
- Enabled: false
68
-
69
- Documentation:
70
- Enabled: false
71
-
72
- # Disable documentation checking until a class needs to be documented once
73
- Documentation:
74
- Enabled: false
75
-
76
- # Do not favor modifier if/unless usage when you have a single-line body
77
- IfUnlessModifier:
78
- Enabled: false
79
-
80
- # Allow case equality operator (in limited use within the specs)
81
- CaseEquality:
82
- Enabled: false
83
-
84
- # Constants do not always have to use SCREAMING_SNAKE_CASE
85
- ConstantName:
86
- Enabled: false
87
-
88
- # Not all trivial readers/writers can be defined with attr_* methods
89
- TrivialAccessors:
90
- Enabled: false
91
-
92
- # I like to have an empty line before closing the currently opened body
93
- EmptyLinesAroundBlockBody:
94
- Enabled: false
95
-
96
- EmptyLinesAroundClassBody:
97
- Enabled: false
98
-
99
- EmptyLinesAroundModuleBody:
100
- Enabled: false
101
-
102
- # I like my style more
103
- AccessModifierIndentation:
104
- Enabled: false
105
-
106
- Style/CommentedKeyword:
107
- Enabled: false
108
-
109
- Style/MixinGrouping:
110
- Enabled: false
111
-
112
- Lint/BooleanSymbol:
113
- Enabled: false
114
-
115
- Style/AccessModifierDeclarations:
116
- Enabled: false
117
-
118
- Layout/HashAlignment:
119
- EnforcedColonStyle: table
120
- EnforcedHashRocketStyle: table
121
-
122
- Naming/RescuedExceptionsVariableName:
123
- Enabled: false
124
-
125
- Layout/MultilineMethodCallIndentation:
126
- Enabled: false
@@ -1,162 +0,0 @@
1
- # v0.4.8 2020-05-25
2
-
3
- * Change to specific node type when unparser fails on an unknown node type: [#150](https://github.com/mbj/unparser/pull/150)
4
- * Significantly improve verifier (only useful for debugging)
5
- * Add `Unparser::Color` module for colorized source diffs
6
-
7
- # v0.4.7 2020-01-03
8
-
9
- * Add support for endless ranges
10
- * Change to allow parser 2.7, even while syntax is not yet supported.
11
- This reduces downstream complexity.
12
-
13
- # v0.4.6 2020-01-02
14
-
15
- * Upgrades to allow parser dependency to ~> 2.6.5
16
-
17
- # v0.4.5 2019-05-10
18
-
19
- * Bump parser dependency to ~> 2.6.3
20
-
21
- # v0.4.4 2019-03-27
22
-
23
- * Bump parser dependency to ~> 2.6.2
24
-
25
- # v0.4.3 2019-02-24
26
-
27
- * Bump parser dependency to ~> 2.6.0
28
-
29
- # v0.4.2 2018-12-04
30
-
31
- * Drop hard ruby version requirement. Still officially I'll only support 2.5.
32
-
33
- # v0.4.1 2018-12-03
34
-
35
- * Fix unparsing of `def foo(bar: bar())`
36
-
37
- # v0.4.0 2018-12-03
38
-
39
- * Change to modern AST format.
40
- * Add experimental `Unparser.{parser,parse,parse_with_comments}`
41
-
42
- # v0.3.0 2018-11-16
43
-
44
- * Drop support for Ruby < 2.5
45
-
46
- # v0.2.7 2018-07-18
47
-
48
- * Add emitters for `__FILE__` and `__LINE__`
49
- https://github.com/mbj/unparser/pull/70
50
-
51
- # v0.2.7 2018-02-09
52
-
53
- * Allow ruby_parser 2.5
54
-
55
- # v0.2.6 2017-05-30
56
-
57
- * Reduce memory consumption via not requirering all possible parsers
58
- * Allow ruby 2.4
59
- * Update parser dependency
60
-
61
- # v0.2.5 2016-01-24
62
-
63
- * Add support for ruby 2.3
64
- * Bump parser dependency to ~>2.3.0
65
- * Trade uglier for more correct dstring / dsyms
66
- * Drop support for ruby < 2.1
67
-
68
- # v0.2.4 2015-05-30
69
-
70
- * Relax parser dependency to ~>2.2.2
71
-
72
- # v0.2.3 2015-04-28
73
-
74
- * Compatibility with parser ~>2.2.2, >2.2.2.2
75
-
76
- # v0.2.2 2015-01-14
77
-
78
- * Really add back unofficial support for 1.9.3
79
-
80
- # v0.2.1 2015-01-14
81
-
82
- * Add back unofficial support for 1.9.3
83
-
84
- # v0.2.0 2015-01-12
85
-
86
- * Bump required ruby version to 2.0.0
87
-
88
- # v0.1.17 2015-01-10
89
-
90
- * Fix jruby complex / rational generation edge case
91
- * Support generation under MRI 2.2
92
-
93
- # v0.1.16 2014-11-07
94
-
95
- * Add emitter for complex and rational literals
96
- * Fix edge cases for MLHS
97
- * Fix differencies from 2.2.pre7 series of parser
98
-
99
- # v0.1.15 2014-09-24
100
-
101
- * Handle syntax edge case for MRI 2.1.3 parser.
102
-
103
- # v0.1.14 2014-06-15
104
-
105
- * Fix emitter to correctly unparse foo[] = 1
106
-
107
- # v0.1.13 2014-06-08
108
-
109
- * Add support for rubinius.
110
-
111
- # v0.1.12 2014-04-13
112
-
113
- * Add support for 2.1 kwsplat
114
-
115
- # v0.1.11 2014-04-11
116
-
117
- * Fix performance on local variable scope inspection
118
-
119
- # v0.1.10 2014-04-06
120
-
121
- * Fix emit of inline rescues in combination with control flow keywords.
122
- * Begin corpus testing on rake ci against rubyspec
123
-
124
- # v0.1.9 2014-01-14
125
-
126
- * Fix emit of proc { |(a)| }
127
-
128
- # v0.1.8 2014-01-11
129
-
130
- * Fix all bugs found while round tripping rubyspec.
131
-
132
- # v0.1.7 2014-01-03
133
-
134
- * Add back support for root nodes of type resbody https://github.com/mbj/unparser/issues/24
135
-
136
- # v0.1.6 2013-12-31
137
-
138
- * Emit 1.9 style hashes where possible: https://github.com/mbj/unparser/pull/23
139
- * Fix invalid quoting of hash keys: https://github.com/mbj/unparser/issues/22
140
- * Fix crash on take before introduced by code refactorings: https://github.com/mbj/unparser/issues/20
141
- * Fix crash on comment reproduction https://github.com/mbj/unparser/issues/17
142
-
143
- # v0.1.5 2013-11-01
144
-
145
- * Fix crash with comment reproduction.
146
-
147
- # v0.1.4 2013-11-01
148
-
149
- * Code cleanups.
150
- * Remove warnings.
151
-
152
- # v0.0.3 2013-06-17
153
-
154
- * Adjust to changes in parser 2.0.0.beta5 => beta6
155
-
156
- # v0.0.2 2013-06-17
157
-
158
- Crappy release
159
-
160
- # v0.0.1 2013-06-15
161
-
162
- Initial release