Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 76a5322

Browse files
committed
Bump to v2.0.1
1 parent cdecb9e commit 76a5322

File tree

5 files changed

+19
-13
lines changed

5 files changed

+19
-13
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
66

77
## [Unreleased]
88

9+
## [2.0.1] - 2022-03-31
10+
11+
### Changed
12+
13+
- Move the `SyntaxTree.register_handler` method to the correct location.
14+
915
## [2.0.0] - 2022-03-31
1016

1117
### Added

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
syntax_tree (2.0.0)
4+
syntax_tree (2.0.1)
55

66
GEM
77
remote: https://rubygems.org/

lib/syntax_tree.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,17 @@
2525
end
2626

2727
module SyntaxTree
28+
# This holds references to objects that respond to both #parse and #format
29+
# so that we can use them in the CLI.
30+
HANDLERS = {}
31+
HANDLERS.default = SyntaxTree
32+
33+
# This is a hook provided so that plugins can register themselves as the
34+
# handler for a particular file type.
35+
def self.register_handler(extension, handler)
36+
HANDLERS[extension] = handler
37+
end
38+
2839
# Parses the given source and returns the syntax tree.
2940
def self.parse(source)
3041
parser = Parser.new(source)

lib/syntax_tree/cli.rb

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,6 @@
22

33
module SyntaxTree
44
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-
165
# A utility wrapper around colored strings in the output.
176
class Color
187
attr_reader :value, :code

lib/syntax_tree/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module SyntaxTree
4-
VERSION = "2.0.0"
4+
VERSION = "2.0.1"
55
end

0 commit comments

Comments
 (0)