syntax_tree 2.0.0 → 2.0.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/.gitignore +1 -0
- data/CHANGELOG.md +13 -6
- data/Gemfile.lock +1 -1
- data/README.md +2 -6
- data/lib/syntax_tree/cli.rb +0 -11
- data/lib/syntax_tree/node.rb +3 -477
- data/lib/syntax_tree/version.rb +1 -1
- data/lib/syntax_tree.rb +11 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3595c635a0aa27ef38bab6d57816ece35357b4c16d6c7dd6e460cf0dc601acfd
|
4
|
+
data.tar.gz: 2d5bcca68c0340efd9bade62ce2c933036a9c711cad68b0dd494d9eaf24eb16a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4e2f4e06886a26e32627389e7fa178a2a2991b9e8dda80cc234804659320797cfdb4d76646d293668f8ac64748f5991023ca33efd68f9771e67653f64662cd2
|
7
|
+
data.tar.gz: ae29dcc05bb1e83a4c43405d9044766b896fb4c5af9262c909bfdf5d4824228426c493fd3345c4ff4f64d57384068b3afba78913fa4bf2b02d866deed1c40ef5
|
data/.gitignore
CHANGED
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
|
+
## [2.0.1] - 2022-03-31
|
10
|
+
|
11
|
+
### Changed
|
12
|
+
|
13
|
+
- Move the `SyntaxTree.register_handler` method to the correct location.
|
14
|
+
|
9
15
|
## [2.0.0] - 2022-03-31
|
10
16
|
|
11
17
|
### Added
|
@@ -122,9 +128,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
122
128
|
|
123
129
|
- 🎉 Initial release! 🎉
|
124
130
|
|
125
|
-
[unreleased]: https://github.com/
|
126
|
-
[
|
127
|
-
[1.
|
128
|
-
[1.1.
|
129
|
-
[1.
|
130
|
-
[
|
131
|
+
[unreleased]: https://github.com/ruby-syntax-tree/syntax_tree/compare/v2.0.0...HEAD
|
132
|
+
[2.0.0]: https://github.com/ruby-syntax-tree/syntax_tree/compare/v1.2.0...v2.0.0
|
133
|
+
[1.2.0]: https://github.com/ruby-syntax-tree/syntax_tree/compare/v1.1.1...v1.2.0
|
134
|
+
[1.1.1]: https://github.com/ruby-syntax-tree/syntax_tree/compare/v1.1.0...v1.1.1
|
135
|
+
[1.1.0]: https://github.com/ruby-syntax-tree/syntax_tree/compare/v1.0.0...v1.1.0
|
136
|
+
[1.0.0]: https://github.com/ruby-syntax-tree/syntax_tree/compare/v0.1.0...v1.0.0
|
137
|
+
[0.1.0]: https://github.com/ruby-syntax-tree/syntax_tree/compare/8aa1f5...v0.1.0
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
# SyntaxTree
|
6
6
|
|
7
|
-
[](https://github.com/ruby-syntax-tree/syntax_tree/actions/workflows/main.yml)
|
8
8
|
[](https://rubygems.org/gems/syntax_tree)
|
9
9
|
|
10
10
|
A fast Ruby parser and formatter with only standard library dependencies.
|
@@ -68,12 +68,8 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
68
68
|
|
69
69
|
## Contributing
|
70
70
|
|
71
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
71
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/ruby-syntax-tree/syntax_tree.
|
72
72
|
|
73
73
|
## License
|
74
74
|
|
75
75
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
76
|
-
|
77
|
-
## Code of Conduct
|
78
|
-
|
79
|
-
Everyone interacting in the syntax_tree project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/kddnewton/syntax_tree/blob/main/CODE_OF_CONDUCT.md).
|
data/lib/syntax_tree/cli.rb
CHANGED
@@ -2,17 +2,6 @@
|
|
2
2
|
|
3
3
|
module SyntaxTree
|
4
4
|
module CLI
|
5
|
-
# This holds references to objects that respond to both #parse and #format
|
6
|
-
# so that we can use them in the CLI.
|
7
|
-
HANDLERS = {}
|
8
|
-
HANDLERS.default = SyntaxTree
|
9
|
-
|
10
|
-
# This is a hook provided so that plugins can register themselves as the
|
11
|
-
# handler for a particular file type.
|
12
|
-
def self.register_handler(extension, handler)
|
13
|
-
HANDLERS[extension] = handler
|
14
|
-
end
|
15
|
-
|
16
5
|
# A utility wrapper around colored strings in the output.
|
17
6
|
class Color
|
18
7
|
attr_reader :value, :code
|