rpr 1.1.1 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.coveralls.yml +1 -0
- data/README.md +1 -0
- data/Rakefile +1 -1
- data/lib/rpr.rb +5 -2
- data/lib/rpr/parser/rubyparser.rb +11 -0
- data/lib/rpr/version.rb +1 -1
- data/rpr.gemspec +3 -0
- metadata +46 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a2199d1611e7fb482fd0193477f7a506c1f6577
|
4
|
+
data.tar.gz: 5e97607538a10944b8a12f611357245051458883
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1a0138bd66546ae5dbb857280c878a5bbc8ba170ea050fcdd71084415e0a9ba86f82ed509a3ef37a339a9a6a1e4215cd6caa38684a9d6e965b2150ac94137a7
|
7
|
+
data.tar.gz: c26a5d7485c38a7b99a7e088ea3f79d77a8244f0f85a8a20d0a0503535a8e7f900ee1e305563df25402b64d8c7e5ba592354dc8dd5fcac344d81131b04a2565f
|
data/.coveralls.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
service_name: travis-ci
|
data/README.md
CHANGED
@@ -4,6 +4,7 @@ RPR displays Ruby's AST on command line.
|
|
4
4
|
|
5
5
|
[![Gem Version](https://badge.fury.io/rb/rpr.svg)](https://badge.fury.io/rb/rpr)
|
6
6
|
[![Build Status](https://travis-ci.org/pocke/rpr.svg?branch=master)](https://travis-ci.org/pocke/rpr)
|
7
|
+
[![Coverage Status](https://coveralls.io/repos/github/pocke/rpr/badge.svg?branch=master)](https://coveralls.io/github/pocke/rpr?branch=master)
|
7
8
|
|
8
9
|
## Support parsers
|
9
10
|
|
data/Rakefile
CHANGED
data/lib/rpr.rb
CHANGED
@@ -6,6 +6,9 @@ require 'optparse'
|
|
6
6
|
require 'stringio'
|
7
7
|
|
8
8
|
module Rpr
|
9
|
+
class UnknownFormatter < ArgumentError; end
|
10
|
+
class UnknownParser < ArgumentError; end
|
11
|
+
|
9
12
|
class << self
|
10
13
|
# @param [Array<String>] args
|
11
14
|
def run(args)
|
@@ -40,7 +43,7 @@ module Rpr
|
|
40
43
|
require "rpr/formatter/#{name}"
|
41
44
|
Formatter.const_get(:"#{name[0].upcase}#{name[1..-1]}")
|
42
45
|
rescue LoadError
|
43
|
-
raise "#{name} is unknown formatter."
|
46
|
+
raise UnknownFormatter, "#{name} is unknown formatter."
|
44
47
|
end
|
45
48
|
|
46
49
|
# @param [Symbol] name
|
@@ -49,7 +52,7 @@ module Rpr
|
|
49
52
|
require "rpr/parser/#{name}"
|
50
53
|
Parser.const_get(:"#{name[0].upcase}#{name[1..-1]}")
|
51
54
|
rescue LoadError
|
52
|
-
raise "#{name} is unknown parser."
|
55
|
+
raise UnknownParser, "#{name} is unknown parser."
|
53
56
|
end
|
54
57
|
|
55
58
|
# @param [Array<String>] args
|
data/lib/rpr/version.rb
CHANGED
data/rpr.gemspec
CHANGED
@@ -22,6 +22,7 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.add_runtime_dependency 'pry', '~> 0.10.3'
|
23
23
|
spec.add_runtime_dependency 'rubocop', '~> 0.40.0'
|
24
24
|
spec.add_runtime_dependency 'parser', '~> 2.3.1.0'
|
25
|
+
spec.add_runtime_dependency 'ruby_parser', '~> 3.8.3'
|
25
26
|
|
26
27
|
spec.add_development_dependency "bundler", "~> 1.11"
|
27
28
|
spec.add_development_dependency "rake", "~> 10.0"
|
@@ -32,4 +33,6 @@ Gem::Specification.new do |spec|
|
|
32
33
|
spec.add_development_dependency 'guard', '~> 2.13.0'
|
33
34
|
spec.add_development_dependency 'guard-minitest', '~> 2.4.4'
|
34
35
|
spec.add_development_dependency 'guard-bundler', '~> 2.1.0'
|
36
|
+
spec.add_development_dependency 'coveralls', '~> 0.8.13'
|
37
|
+
spec.add_development_dependency 'simplecov', '~> 0.11.0'
|
35
38
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rpr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masataka Kuwabara
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 2.3.1.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: ruby_parser
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 3.8.3
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 3.8.3
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: bundler
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -150,6 +164,34 @@ dependencies:
|
|
150
164
|
- - "~>"
|
151
165
|
- !ruby/object:Gem::Version
|
152
166
|
version: 2.1.0
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: coveralls
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - "~>"
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: 0.8.13
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - "~>"
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: 0.8.13
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: simplecov
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - "~>"
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: 0.11.0
|
188
|
+
type: :development
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - "~>"
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: 0.11.0
|
153
195
|
description: RPR displays Ruby's AST on command line.
|
154
196
|
email:
|
155
197
|
- p.ck.t22@gmail.com
|
@@ -158,6 +200,7 @@ executables:
|
|
158
200
|
extensions: []
|
159
201
|
extra_rdoc_files: []
|
160
202
|
files:
|
203
|
+
- ".coveralls.yml"
|
161
204
|
- ".gitignore"
|
162
205
|
- ".rubocop.yml"
|
163
206
|
- ".travis.yml"
|
@@ -176,6 +219,7 @@ files:
|
|
176
219
|
- lib/rpr/formatter/pry.rb
|
177
220
|
- lib/rpr/parser/parser.rb
|
178
221
|
- lib/rpr/parser/rubocop.rb
|
222
|
+
- lib/rpr/parser/rubyparser.rb
|
179
223
|
- lib/rpr/parser/sexp.rb
|
180
224
|
- lib/rpr/parser/tokenize.rb
|
181
225
|
- lib/rpr/version.rb
|