sexpistol 0.0.6 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.github/workflows/build.yml +30 -0
- data/.gitignore +3 -1
- data/.rspec +2 -0
- data/.rubocop.yml +27 -0
- data/Gemfile +5 -0
- data/Gemfile.lock +61 -0
- data/MIT-LICENSE +1 -1
- data/README.md +135 -0
- data/lib/sexpistol/parser.rb +62 -0
- data/lib/sexpistol/s_expression_array.rb +6 -0
- data/lib/sexpistol/version.rb +5 -0
- data/lib/sexpistol.rb +37 -1
- data/sexpistol.gemspec +25 -63
- metadata +87 -82
- data/README.rdoc +0 -73
- data/Rakefile +0 -42
- data/VERSION +0 -1
- data/lib/sexpistol/sexpistol.rb +0 -154
- data/test/performance/benchmark_test.rb +0 -34
- data/test/setup/test_unit_extensions.rb +0 -21
- data/test/test_helper.rb +0 -10
- data/test/unit/float_literal_test.rb +0 -35
- data/test/unit/integer_literal_test.rb +0 -24
- data/test/unit/ruby_keyword_literals_test.rb +0 -45
- data/test/unit/scheme_compatability_test.rb +0 -29
- data/test/unit/string_literal_test.rb +0 -39
- data/test/unit/structure_test.rb +0 -30
- data/test/unit/symbol_test.rb +0 -74
- data/test/unit/to_sexp_test.rb +0 -51
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: a23e0ce0544e9283ef642b526913ab4cc8e02b2d5cb99639b39093e2fdbad776
|
4
|
+
data.tar.gz: 79ff60a0e79eb517f9ace663c86a29eb0923721516316161ac8a85e212164857
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 12df1844e76a6c3f054e10ce2b27a6438c5774cb8b099296263e2ecb05e5d56d269d5cf1f7cf6bafe3f3e6331cf53243b470cd61d311ec6f86b23d00e133ca56
|
7
|
+
data.tar.gz: d572e231a3aef14615db2587d4889a14b69d6912c56ca592bdb8f503316e55be559e491fd76219ecf46368232722104e25c0ca0ceb1db02c3d7ee8deb4b95f45
|
@@ -0,0 +1,30 @@
|
|
1
|
+
name: build
|
2
|
+
|
3
|
+
on: [push, pull_request]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
build:
|
7
|
+
runs-on: ubuntu-latest
|
8
|
+
|
9
|
+
steps:
|
10
|
+
- uses: actions/checkout@v1
|
11
|
+
|
12
|
+
- name: Install Ruby (2.6)
|
13
|
+
uses: actions/setup-ruby@v1
|
14
|
+
with:
|
15
|
+
ruby-version: 2.6.x
|
16
|
+
|
17
|
+
- name: Setup Code Climate test-reporter
|
18
|
+
run: |
|
19
|
+
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
20
|
+
chmod +x ./cc-test-reporter
|
21
|
+
./cc-test-reporter before-build
|
22
|
+
- name: Build and test with RSpec
|
23
|
+
run: |
|
24
|
+
gem install bundler
|
25
|
+
bundle install --jobs 4 --retry 3
|
26
|
+
bundle exec rspec
|
27
|
+
- name: Publish code coverage
|
28
|
+
run: |
|
29
|
+
export GIT_BRANCH="${GITHUB_REF/refs\/heads\//}"
|
30
|
+
./cc-test-reporter after-build --id ${{secrets.CC_TEST_REPORTER_ID}} --coverage-input-type simplecov
|
data/.gitignore
CHANGED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
Metrics/BlockLength:
|
2
|
+
IgnoredMethods: ['describe', 'context']
|
3
|
+
|
4
|
+
Style/SymbolProc:
|
5
|
+
IgnoredMethods: ['configure']
|
6
|
+
|
7
|
+
AllCops:
|
8
|
+
SuggestExtensions: false
|
9
|
+
NewCops: enable
|
10
|
+
|
11
|
+
Lint/BooleanSymbol:
|
12
|
+
Enabled: false
|
13
|
+
|
14
|
+
Style/Documentation:
|
15
|
+
Enabled: false
|
16
|
+
|
17
|
+
Metrics/AbcSize:
|
18
|
+
Max: 20
|
19
|
+
|
20
|
+
Metrics/MethodLength:
|
21
|
+
Max: 15
|
22
|
+
|
23
|
+
Metrics/CyclomaticComplexity:
|
24
|
+
Max: 10
|
25
|
+
|
26
|
+
Gemspec/RequireMFA:
|
27
|
+
Enabled: false
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,61 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
sexpistol (0.1.1)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
ast (2.4.2)
|
10
|
+
diff-lcs (1.5.0)
|
11
|
+
docile (1.3.5)
|
12
|
+
json (2.6.1)
|
13
|
+
parallel (1.21.0)
|
14
|
+
parser (3.1.0.0)
|
15
|
+
ast (~> 2.4.1)
|
16
|
+
rainbow (3.0.0)
|
17
|
+
regexp_parser (2.2.0)
|
18
|
+
rexml (3.2.5)
|
19
|
+
rspec (3.10.0)
|
20
|
+
rspec-core (~> 3.10.0)
|
21
|
+
rspec-expectations (~> 3.10.0)
|
22
|
+
rspec-mocks (~> 3.10.0)
|
23
|
+
rspec-core (3.10.1)
|
24
|
+
rspec-support (~> 3.10.0)
|
25
|
+
rspec-expectations (3.10.1)
|
26
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
27
|
+
rspec-support (~> 3.10.0)
|
28
|
+
rspec-mocks (3.10.2)
|
29
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
30
|
+
rspec-support (~> 3.10.0)
|
31
|
+
rspec-support (3.10.3)
|
32
|
+
rubocop (1.24.1)
|
33
|
+
parallel (~> 1.10)
|
34
|
+
parser (>= 3.0.0.0)
|
35
|
+
rainbow (>= 2.2.2, < 4.0)
|
36
|
+
regexp_parser (>= 1.8, < 3.0)
|
37
|
+
rexml
|
38
|
+
rubocop-ast (>= 1.15.1, < 2.0)
|
39
|
+
ruby-progressbar (~> 1.7)
|
40
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
41
|
+
rubocop-ast (1.15.1)
|
42
|
+
parser (>= 3.0.1.1)
|
43
|
+
ruby-progressbar (1.11.0)
|
44
|
+
simplecov (0.17.1)
|
45
|
+
docile (~> 1.1)
|
46
|
+
json (>= 1.8, < 3)
|
47
|
+
simplecov-html (~> 0.10.0)
|
48
|
+
simplecov-html (0.10.2)
|
49
|
+
unicode-display_width (2.1.0)
|
50
|
+
|
51
|
+
PLATFORMS
|
52
|
+
ruby
|
53
|
+
|
54
|
+
DEPENDENCIES
|
55
|
+
rspec (~> 3.2)
|
56
|
+
rubocop
|
57
|
+
sexpistol!
|
58
|
+
simplecov (~> 0.17.1)
|
59
|
+
|
60
|
+
BUNDLED WITH
|
61
|
+
2.3.4
|
data/MIT-LICENSE
CHANGED
data/README.md
ADDED
@@ -0,0 +1,135 @@
|
|
1
|
+
[![Ruby Style Guide](https://img.shields.io/badge/code_style-rubocop-brightgreen.svg)](https://github.com/rubocop/rubocop)
|
2
|
+
[![Actions Status](https://github.com/aarongough/sexpistol/actions/workflows/build.yml/badge.svg)](https://github.com/aarongough/sexpistol/actions/workflows/build.yml)
|
3
|
+
[![Maintainability](https://api.codeclimate.com/v1/badges/a5ce9269a7b23614103c/maintainability)](https://codeclimate.com/github/aarongough/sexpistol/maintainability)
|
4
|
+
[![Test Coverage](https://api.codeclimate.com/v1/badges/a5ce9269a7b23614103c/test_coverage)](https://codeclimate.com/github/aarongough/sexpistol/test_coverage)
|
5
|
+
[![Gem Version](https://badge.fury.io/rb/sexpistol.svg)](https://badge.fury.io/rb/sexpistol)
|
6
|
+
|
7
|
+
# Sexpistol
|
8
|
+
|
9
|
+
Sexpistol is a very fast and easy-to-use library for parsing S-Expressions in Ruby. Sexpistol takes an S-Expression in string form and turns it into a native Ruby data structure made up of nested sets of arrays.
|
10
|
+
|
11
|
+
### Example:
|
12
|
+
|
13
|
+
```scheme
|
14
|
+
(define test (lambda () (
|
15
|
+
(print "Hello world!\n")
|
16
|
+
(print 1)
|
17
|
+
(print 9.01)
|
18
|
+
(print 2.0e10)
|
19
|
+
(print (+ 10 12 13))
|
20
|
+
)))
|
21
|
+
```
|
22
|
+
|
23
|
+
would be parsed by Sexpistol like so:
|
24
|
+
|
25
|
+
```ruby
|
26
|
+
[:define, :test, [:lambda, [], [
|
27
|
+
[:print, "Hello world!\n"],
|
28
|
+
[:print, 1],
|
29
|
+
[:print, 9.01],
|
30
|
+
[:print, 2.0e10],
|
31
|
+
[:print, [:+, 10, 12, 13]]
|
32
|
+
]]]
|
33
|
+
```
|
34
|
+
|
35
|
+
### Usage:
|
36
|
+
|
37
|
+
```ruby
|
38
|
+
# Parse an s-expression
|
39
|
+
ast = Sexpistol.parse("(string (to (parse)))")
|
40
|
+
#=> [:string, [:to, [:parse]]]
|
41
|
+
|
42
|
+
# Change the representation
|
43
|
+
ast[1][0] = :is
|
44
|
+
ast[1][1][0] = :parsed
|
45
|
+
#=> [:string, [:is, [:parsed]]]
|
46
|
+
|
47
|
+
# Turn the array structure back into an S-Expression
|
48
|
+
Sexpistol.to_sexp(ast)
|
49
|
+
#=> "(string (is (parsed)))"
|
50
|
+
```
|
51
|
+
|
52
|
+
### API:
|
53
|
+
```ruby
|
54
|
+
Sexpistol.parse(string, parse_ruby_keyword_literals: false)
|
55
|
+
# Parse an s-expression given as a string. Optionally convert
|
56
|
+
# ruby keyword literals to their native Ruby equivalents.
|
57
|
+
|
58
|
+
Sexpistol.to_sexp(structure, scheme_compatability: false)
|
59
|
+
# Output a nested set of arrays as an s-expression. Optionally
|
60
|
+
# output `true, false, nil` as their Scheme literal equivalents.
|
61
|
+
|
62
|
+
Sexpistol.convert_ruby_keyword_literals(data)
|
63
|
+
# Recursively maps over a nested array structure and converts
|
64
|
+
# any instances of :nil, :true, :false to their native Ruby equivalents.
|
65
|
+
|
66
|
+
Sexpistol.convert_scheme_literals(data)
|
67
|
+
# Converts Ruby literals to their equivalent Scheme literals
|
68
|
+
|
69
|
+
Sexpistol.recursive_map(data, &block)
|
70
|
+
# Recursively map over a nested set of arrays, applying the block
|
71
|
+
# to each item and returning the result.
|
72
|
+
```
|
73
|
+
|
74
|
+
### Type mappings:
|
75
|
+
|
76
|
+
Sexpistol supports all of the standard datatypes and converts them directly to their Ruby equivalents:
|
77
|
+
|
78
|
+
- Lists (a b c) -> `[:a, :b, :c]`
|
79
|
+
- Integers (1 2 3) -> `[1, 2, 3]`
|
80
|
+
- Floats (1.0 42.9 3e6 1.2e2) -> `[1.0, 42.9, 3e6, 1.2e2]`
|
81
|
+
- Strings ("\t\"Hello world!\"\n") -> `["\t\"Hello world!\"\n"]`
|
82
|
+
- Symbols (symbol symbol? + - a+ e$, etc...) -> `[:symbol, :symbol?, :+, :-, :a+, :'e$', :'etc...']`
|
83
|
+
|
84
|
+
Sexpistol also supports mapping the Ruby keyword literals (`nil`, `true`, `false`) to their native Ruby types, although this is disabled by default for compatibility. To enable it use `parse_ruby_keyword_literals: true`, eg:
|
85
|
+
|
86
|
+
```ruby
|
87
|
+
Sexpistol.parse("(nil false true)")
|
88
|
+
#=> [:nil, :false, :true]
|
89
|
+
|
90
|
+
Sexpistol.parse("(nil false true)", parse_ruby_keyword_literals: true)
|
91
|
+
#=> [nil, false, true]
|
92
|
+
```
|
93
|
+
|
94
|
+
### Scheme compatibility:
|
95
|
+
|
96
|
+
Sexpistol strives to be compatible with Scheme-style S-Expressions. Sexpistol can generate Scheme compatible external representations when the 'scheme_compatability' option is set to true:
|
97
|
+
|
98
|
+
```ruby
|
99
|
+
Sexpistol.to_sexp([true, false, nil])
|
100
|
+
#=> "(true false nil)"
|
101
|
+
|
102
|
+
Sexpistol.to_sexp([true, false, nil], scheme_compatability: true)
|
103
|
+
#=> "(#t #f ())"
|
104
|
+
```
|
105
|
+
|
106
|
+
### Installation:
|
107
|
+
|
108
|
+
Add Sexpistol to your gemfile:
|
109
|
+
|
110
|
+
```ruby
|
111
|
+
gem 'sexpistol', '~>0.10.0'
|
112
|
+
```
|
113
|
+
|
114
|
+
And then execute:
|
115
|
+
|
116
|
+
```
|
117
|
+
bundle install
|
118
|
+
```
|
119
|
+
|
120
|
+
Or install it manually by entering the following at your command line:
|
121
|
+
|
122
|
+
```
|
123
|
+
gem install sexpistol
|
124
|
+
```
|
125
|
+
|
126
|
+
### Contributing:
|
127
|
+
|
128
|
+
Contributions are always welcome! Please create a pull request that clearly outlines the work you've done. Make sure your changes include updating or adding relevant tests, and use [Rubocop](https://github.com/rubocop/rubocop) to make sure your additions adhere to the same style as the rest of the project!
|
129
|
+
|
130
|
+
### Author & Credits:
|
131
|
+
|
132
|
+
Author: [Aaron Gough](mailto:aaron@aarongough.com)
|
133
|
+
Contributors: [Shane Hanna](http://github.com/shanna)
|
134
|
+
|
135
|
+
Copyright © 2022 [Aaron Gough](http://thingsaaronmade.com/), released under the MIT license
|
@@ -0,0 +1,62 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'strscan'
|
4
|
+
|
5
|
+
class Sexpistol
|
6
|
+
class Parser < StringScanner
|
7
|
+
PARANTHESES = /[()]/.freeze
|
8
|
+
STRING = /"([^"\\]|\\.)*"/.freeze
|
9
|
+
FLOAT = /[\-+]? [0-9]+ ((e[0-9]+) | (\.[0-9]+(e[0-9]+)?)) (?=[\s()])/x.freeze
|
10
|
+
INTEGER = /([\-+]?[0-9]+)(?=[\s()])/.freeze
|
11
|
+
SYMBOL = /[^0-9()\s]+[^()\s]*/.freeze
|
12
|
+
|
13
|
+
def initialize(string, parse_ruby_keyword_literals = false)
|
14
|
+
raise 'String given is not an s-expression' if string.strip[0] != '('
|
15
|
+
raise 'Invalid s-expression' if string.count('(') != string.count(')')
|
16
|
+
|
17
|
+
@parse_ruby_keyword_literals = parse_ruby_keyword_literals
|
18
|
+
|
19
|
+
super(string.strip)
|
20
|
+
end
|
21
|
+
|
22
|
+
def parse(level = 0, exp = [])
|
23
|
+
until eos?
|
24
|
+
case token = fetch_token
|
25
|
+
when ')' then break
|
26
|
+
when '(' then exp << parse(level + 1)
|
27
|
+
when String, Integer, Float, Symbol then exp << convert_ruby_keyword_literals(token)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
if level.zero?
|
32
|
+
exp = exp.first if exp.first.is_a?(Array) && exp.length == 1
|
33
|
+
exp = Sexpistol::SExpressionArray.new(exp) if exp.all? { |item| item.is_a?(Array) }
|
34
|
+
end
|
35
|
+
|
36
|
+
exp
|
37
|
+
end
|
38
|
+
|
39
|
+
def fetch_token
|
40
|
+
skip(/\s+/)
|
41
|
+
|
42
|
+
return matched if scan(PARANTHESES)
|
43
|
+
return matched.undump if scan(STRING)
|
44
|
+
return matched.to_f if scan(FLOAT)
|
45
|
+
return matched.to_i if scan(INTEGER)
|
46
|
+
return matched.to_sym if scan(SYMBOL)
|
47
|
+
|
48
|
+
raise "Invalid token at position #{pos} near '#{scan(/.{0,20}/)}'."
|
49
|
+
end
|
50
|
+
|
51
|
+
def convert_ruby_keyword_literals(token)
|
52
|
+
return token unless @parse_ruby_keyword_literals && token.is_a?(Symbol)
|
53
|
+
|
54
|
+
case token
|
55
|
+
when :nil then nil
|
56
|
+
when :true then true
|
57
|
+
when :false then false
|
58
|
+
else token
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
data/lib/sexpistol.rb
CHANGED
@@ -1 +1,37 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'sexpistol/parser'
|
4
|
+
require 'sexpistol/version'
|
5
|
+
require 'sexpistol/s_expression_array'
|
6
|
+
|
7
|
+
class Sexpistol
|
8
|
+
class << self
|
9
|
+
def parse(string, parse_ruby_keyword_literals: false)
|
10
|
+
Sexpistol::Parser.new(string, parse_ruby_keyword_literals).parse
|
11
|
+
end
|
12
|
+
|
13
|
+
def to_sexp(data, scheme_compatability: false)
|
14
|
+
data = convert_scheme_literals(data) if scheme_compatability
|
15
|
+
|
16
|
+
return "\"#{data}\"" if data.is_a?(String)
|
17
|
+
return data.to_s unless data.is_a?(Array)
|
18
|
+
|
19
|
+
if data.is_a?(SExpressionArray)
|
20
|
+
data.map { |x| to_sexp(x, scheme_compatability: scheme_compatability) }.join(' ')
|
21
|
+
else
|
22
|
+
"(#{data.map { |x| to_sexp(x, scheme_compatability: scheme_compatability) }.join(' ')})"
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
private
|
27
|
+
|
28
|
+
def convert_scheme_literals(data)
|
29
|
+
case data
|
30
|
+
when nil then []
|
31
|
+
when true then :'#t'
|
32
|
+
when false then :'#f'
|
33
|
+
else data
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
data/sexpistol.gemspec
CHANGED
@@ -1,69 +1,31 @@
|
|
1
|
-
#
|
2
|
-
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
|
-
# -*- encoding: utf-8 -*-
|
1
|
+
# frozen_string_literal: true
|
5
2
|
|
6
|
-
|
7
|
-
|
8
|
-
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
require 'sexpistol/version'
|
9
6
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
s.extra_rdoc_files = [
|
16
|
-
"MIT-LICENSE",
|
17
|
-
"README.rdoc"
|
18
|
-
]
|
19
|
-
s.files = [
|
20
|
-
".gitignore",
|
21
|
-
"MIT-LICENSE",
|
22
|
-
"README.rdoc",
|
23
|
-
"Rakefile",
|
24
|
-
"VERSION",
|
25
|
-
"lib/sexpistol.rb",
|
26
|
-
"lib/sexpistol/sexpistol.rb",
|
27
|
-
"sexpistol.gemspec",
|
28
|
-
"test/performance/benchmark_test.rb",
|
29
|
-
"test/setup/test_unit_extensions.rb",
|
30
|
-
"test/test_helper.rb",
|
31
|
-
"test/unit/float_literal_test.rb",
|
32
|
-
"test/unit/integer_literal_test.rb",
|
33
|
-
"test/unit/ruby_keyword_literals_test.rb",
|
34
|
-
"test/unit/scheme_compatability_test.rb",
|
35
|
-
"test/unit/string_literal_test.rb",
|
36
|
-
"test/unit/structure_test.rb",
|
37
|
-
"test/unit/symbol_test.rb",
|
38
|
-
"test/unit/to_sexp_test.rb"
|
39
|
-
]
|
40
|
-
s.homepage = %q{http://github.com/aarongough/sexpistol}
|
41
|
-
s.rdoc_options = ["--charset=UTF-8", "--line-numbers", "--inline-source"]
|
42
|
-
s.require_paths = ["lib"]
|
43
|
-
s.rubygems_version = %q{1.3.7}
|
44
|
-
s.summary = %q{An S-Expression Parser Library for Ruby}
|
45
|
-
s.test_files = [
|
46
|
-
"test/performance/benchmark_test.rb",
|
47
|
-
"test/setup/test_unit_extensions.rb",
|
48
|
-
"test/test_helper.rb",
|
49
|
-
"test/unit/float_literal_test.rb",
|
50
|
-
"test/unit/integer_literal_test.rb",
|
51
|
-
"test/unit/ruby_keyword_literals_test.rb",
|
52
|
-
"test/unit/scheme_compatability_test.rb",
|
53
|
-
"test/unit/string_literal_test.rb",
|
54
|
-
"test/unit/structure_test.rb",
|
55
|
-
"test/unit/symbol_test.rb",
|
56
|
-
"test/unit/to_sexp_test.rb"
|
57
|
-
]
|
7
|
+
Gem::Specification.new do |spec|
|
8
|
+
spec.name = 'sexpistol'
|
9
|
+
spec.version = Sexpistol::VERSION
|
10
|
+
spec.authors = ['Aaron Gough']
|
11
|
+
spec.email = ['aaron@aarongough.com']
|
58
12
|
|
59
|
-
|
60
|
-
|
61
|
-
|
13
|
+
spec.summary = 'Sexpistol is an easy-to-use S-Expression parser for Ruby. It is fast and has no dependencies.'
|
14
|
+
spec.description = 'Sexpistol is an easy-to-use S-Expression parser for Ruby. It is fast and has no dependencies.'
|
15
|
+
spec.homepage = 'https://github.com/aarongough/sexpistol'
|
16
|
+
spec.license = 'MIT'
|
62
17
|
|
63
|
-
|
64
|
-
|
65
|
-
end
|
66
|
-
else
|
18
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
19
|
+
f.match(%r{^(test|spec|features)/})
|
67
20
|
end
|
68
|
-
end
|
69
21
|
|
22
|
+
spec.bindir = 'exe'
|
23
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
|
+
spec.require_paths = ['lib']
|
25
|
+
|
26
|
+
spec.required_ruby_version = '>= 2.5.0'
|
27
|
+
|
28
|
+
spec.add_development_dependency 'rspec', '~> 3.2'
|
29
|
+
spec.add_development_dependency 'rubocop'
|
30
|
+
spec.add_development_dependency 'simplecov', '~> 0.17.1'
|
31
|
+
end
|
metadata
CHANGED
@@ -1,95 +1,100 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: sexpistol
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
segments:
|
6
|
-
- 0
|
7
|
-
- 0
|
8
|
-
- 6
|
9
|
-
version: 0.0.6
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.2
|
10
5
|
platform: ruby
|
11
|
-
authors:
|
6
|
+
authors:
|
12
7
|
- Aaron Gough
|
13
|
-
autorequire:
|
14
|
-
bindir:
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
15
10
|
cert_chain: []
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
11
|
+
date: 2022-01-09 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rspec
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3.2'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '3.2'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rubocop
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: simplecov
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.17.1
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.17.1
|
55
|
+
description: Sexpistol is an easy-to-use S-Expression parser for Ruby. It is fast
|
56
|
+
and has no dependencies.
|
57
|
+
email:
|
58
|
+
- aaron@aarongough.com
|
23
59
|
executables: []
|
24
|
-
|
25
60
|
extensions: []
|
26
|
-
|
27
|
-
|
28
|
-
-
|
29
|
-
-
|
30
|
-
|
31
|
-
- .
|
61
|
+
extra_rdoc_files: []
|
62
|
+
files:
|
63
|
+
- ".github/workflows/build.yml"
|
64
|
+
- ".gitignore"
|
65
|
+
- ".rspec"
|
66
|
+
- ".rubocop.yml"
|
67
|
+
- Gemfile
|
68
|
+
- Gemfile.lock
|
32
69
|
- MIT-LICENSE
|
33
|
-
- README.
|
34
|
-
- Rakefile
|
35
|
-
- VERSION
|
70
|
+
- README.md
|
36
71
|
- lib/sexpistol.rb
|
37
|
-
- lib/sexpistol/
|
72
|
+
- lib/sexpistol/parser.rb
|
73
|
+
- lib/sexpistol/s_expression_array.rb
|
74
|
+
- lib/sexpistol/version.rb
|
38
75
|
- sexpistol.gemspec
|
39
|
-
|
40
|
-
|
41
|
-
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
- test/unit/string_literal_test.rb
|
47
|
-
- test/unit/structure_test.rb
|
48
|
-
- test/unit/symbol_test.rb
|
49
|
-
- test/unit/to_sexp_test.rb
|
50
|
-
has_rdoc: true
|
51
|
-
homepage: http://github.com/aarongough/sexpistol
|
52
|
-
licenses: []
|
53
|
-
|
54
|
-
post_install_message:
|
55
|
-
rdoc_options:
|
56
|
-
- --charset=UTF-8
|
57
|
-
- --line-numbers
|
58
|
-
- --inline-source
|
59
|
-
require_paths:
|
76
|
+
homepage: https://github.com/aarongough/sexpistol
|
77
|
+
licenses:
|
78
|
+
- MIT
|
79
|
+
metadata: {}
|
80
|
+
post_install_message:
|
81
|
+
rdoc_options: []
|
82
|
+
require_paths:
|
60
83
|
- lib
|
61
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
62
|
-
|
63
|
-
requirements:
|
84
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
64
86
|
- - ">="
|
65
|
-
- !ruby/object:Gem::Version
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
70
|
-
none: false
|
71
|
-
requirements:
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: 2.5.0
|
89
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
90
|
+
requirements:
|
72
91
|
- - ">="
|
73
|
-
- !ruby/object:Gem::Version
|
74
|
-
|
75
|
-
- 0
|
76
|
-
version: "0"
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
77
94
|
requirements: []
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
test_files:
|
85
|
-
- test/performance/benchmark_test.rb
|
86
|
-
- test/setup/test_unit_extensions.rb
|
87
|
-
- test/test_helper.rb
|
88
|
-
- test/unit/float_literal_test.rb
|
89
|
-
- test/unit/integer_literal_test.rb
|
90
|
-
- test/unit/ruby_keyword_literals_test.rb
|
91
|
-
- test/unit/scheme_compatability_test.rb
|
92
|
-
- test/unit/string_literal_test.rb
|
93
|
-
- test/unit/structure_test.rb
|
94
|
-
- test/unit/symbol_test.rb
|
95
|
-
- test/unit/to_sexp_test.rb
|
95
|
+
rubygems_version: 3.0.8
|
96
|
+
signing_key:
|
97
|
+
specification_version: 4
|
98
|
+
summary: Sexpistol is an easy-to-use S-Expression parser for Ruby. It is fast and
|
99
|
+
has no dependencies.
|
100
|
+
test_files: []
|