edn_turbo 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.dir-locals.el +3 -0
- data/CHANGELOG.md +13 -0
- data/README.md +4 -2
- data/Rakefile +7 -15
- data/docker/Dockerfile +2 -0
- data/docker/build +5 -5
- data/docker/common.sh +28 -0
- data/docker/console +1 -1
- data/docker/docker-compose.yml +8 -10
- data/docker/run +3 -5
- data/ext/edn_turbo/edn_parser.cc +1 -1
- data/ext/edn_turbo/edn_parser.rl +1 -1
- data/ext/edn_turbo/extconf.rb +1 -1
- data/ext/edn_turbo/main.cc +1 -6
- data/ext/edn_turbo/parser.h +1 -1
- data/ext/edn_turbo/parser_def.cc +1 -1
- data/ext/edn_turbo/util.cc +1 -1
- data/ext/edn_turbo/util.h +3 -1
- data/ext/edn_turbo/util_unicode.cc +1 -1
- data/ext/edn_turbo/util_unicode.h +1 -1
- data/lib/edn_turbo.rb +1 -1
- data/lib/edn_turbo/edn_parser.rb +1 -1
- data/lib/edn_turbo/version.rb +5 -3
- metadata +23 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59342940a3cb92e4792239598d5a858376a2ed18ef78872ea2d6a00a4421e18b
|
4
|
+
data.tar.gz: 04e6d9ab8648b13a7e850ac0ea84d85464ac8e3474cde3642e83c9f9ac2a44c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 208f82034dec3313c9bc6eaacc46debb746d39379e385195ee727afce4a3e5cf26cb5f06336a137428409a2914caa3e6531138a8c36b2223620bb9920a82f024
|
7
|
+
data.tar.gz: ab5e07ba292a835729b5174973280253040ea9fdf78742ff46bd7afd271f1e9884173a4571cffd4a766f21eca9a2232edddee7b3e7c969472e888069fe60ea02
|
data/.dir-locals.el
ADDED
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,13 @@
|
|
1
1
|
# Change Log
|
2
2
|
All notable changes to this project will be documented in this file. This change log follows the conventions of [keepachangelog.com](http://keepachangelog.com/).
|
3
3
|
|
4
|
+
## 0.7.1 - 2021-02-07
|
5
|
+
### Changed
|
6
|
+
- Set minimum ruby version to 2.5
|
7
|
+
|
8
|
+
### Fixed
|
9
|
+
- Compilation error when building against ruby versions > 2
|
10
|
+
|
4
11
|
## 0.7.0 - 2020-02-07
|
5
12
|
### Added
|
6
13
|
- big_decimal_edn_turbo method to replace calling edn-ruby's
|
@@ -38,3 +45,9 @@ All notable changes to this project will be documented in this file. This change
|
|
38
45
|
### Added
|
39
46
|
- initial version of docker configs for testing on Ubuntu.
|
40
47
|
|
48
|
+
[Unreleased]: https://github.com/edporras/edn_turbo/-/compare/0.7.1...main
|
49
|
+
[0.7.1]: https://github.com/edporras/edn_turbo/-/compare/0.7.0...0.7.1
|
50
|
+
[0.7.0]: https://github.com/edporras/edn_turbo/-/compare/0.6.2...0.7.0
|
51
|
+
[0.6.2]: https://github.com/edporras/edn_turbo/-/compare/0.6.1...0.6.2
|
52
|
+
[0.6.1]: https://github.com/edporras/edn_turbo/-/compare/0.6.0...0.6.1
|
53
|
+
[0.6.0]: https://github.com/edporras/edn_turbo/-/compare/0.5.7...0.6.0
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
edn_turbo 0.7.
|
1
|
+
edn_turbo 0.7.1
|
2
2
|
===============
|
3
3
|
|
4
4
|
Fast [Ragel](http://www.colm.net/open-source/ragel/)-based EDN parser for Ruby.
|
@@ -34,7 +34,7 @@ irb(main):008:0> Benchmark.realtime { 100000.times { EDN::read(s) } }
|
|
34
34
|
Dependencies
|
35
35
|
============
|
36
36
|
|
37
|
-
Ruby 2.
|
37
|
+
Ruby 2.6 or greater.
|
38
38
|
|
39
39
|
- ruby gems:
|
40
40
|
- [rake](http://rake.rubyforge.org)
|
@@ -112,3 +112,5 @@ calls into the ruby side.
|
|
112
112
|
|
113
113
|
- As of v0.6.2, `edn_turbo` supports representation of `##Inf` as
|
114
114
|
`Float::INFINITY` and `##NaN` as `Float::NAN`.
|
115
|
+
|
116
|
+
- As of v0.7.1, `edn_turbo` requires ruby 2.5 or greater.
|
data/Rakefile
CHANGED
@@ -36,7 +36,7 @@ CLEAN.include(['*.png', '*.gem'])
|
|
36
36
|
# ragel cc source generation
|
37
37
|
task ragel: GEN_CC_PARSER_SRC_PATH
|
38
38
|
file GEN_CC_PARSER_SRC_PATH => RAGEL_PARSER_SRC_PATH do
|
39
|
-
|
39
|
+
Dir.chdir(EXT_PATH) do
|
40
40
|
sh "ragel -G2 -o #{GEN_CC_PARSER_SRC} #{RAGEL_PARSER_SRC}"
|
41
41
|
src = File.read(GEN_CC_PARSER_SRC).gsub(/[ \t]+$/, '')
|
42
42
|
File.open(GEN_CC_PARSER_SRC, 'w') { |f| f.print src }
|
@@ -44,24 +44,16 @@ file GEN_CC_PARSER_SRC_PATH => RAGEL_PARSER_SRC_PATH do
|
|
44
44
|
end
|
45
45
|
|
46
46
|
# graph generation for testing machine output
|
47
|
-
task :graph, [
|
47
|
+
task :graph, %i[machine] do |_t, args|
|
48
48
|
args.with_defaults(machine: 'EDN_value')
|
49
|
-
|
50
|
-
|
49
|
+
tmpfile = '/tmp/ragel_edn'
|
50
|
+
machine = args[:machine]
|
51
51
|
|
52
52
|
# assumes graphviz is installed
|
53
|
-
sh "ragel -Vp -S #{
|
54
|
-
"dot -Tpng #{
|
53
|
+
sh "ragel -Vp -S #{machine} -o #{tmpfile} #{EXT_PATH}/#{RAGEL_PARSER_SRC} && "\
|
54
|
+
"dot -Tpng #{tmpfile} -o #{machine}.png"
|
55
55
|
end
|
56
56
|
|
57
|
-
task build: [
|
58
|
-
|
59
|
-
# add dependency to test task
|
60
|
-
task test: EXT_BUNDLE
|
61
|
-
|
62
|
-
Rake::TestTask.new do |t|
|
63
|
-
t.libs << 'test'
|
64
|
-
t.test_files = FileList['test/test_output_diff.rb']
|
65
|
-
end
|
57
|
+
task build: %i[clean ragel compile chmod]
|
66
58
|
|
67
59
|
task default: :compile
|
data/docker/Dockerfile
CHANGED
@@ -29,6 +29,8 @@ ENV PATH "/home/ned/.rbenv/bin:/home/ned/.rbenv/shims:$PATH"
|
|
29
29
|
RUN \curl -sL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-installer | bash - && \
|
30
30
|
eval "$(rbenv init -)"
|
31
31
|
|
32
|
+
RUN rm -f .ruby-version
|
33
|
+
|
32
34
|
# the specified ruby version
|
33
35
|
RUN rbenv install $ruby_version && \
|
34
36
|
rbenv global $ruby_version
|
data/docker/build
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
#!/bin/bash
|
2
2
|
|
3
|
-
|
4
|
-
RUBY_VERSION=2.7.0
|
5
|
-
else
|
6
|
-
RUBY_VERSION=$1
|
7
|
-
fi
|
3
|
+
. docker/common.sh
|
8
4
|
|
9
5
|
set -e
|
10
6
|
|
7
|
+
set_ruby_ver $@
|
8
|
+
|
11
9
|
docker build --build-arg ruby_version=$RUBY_VERSION -f docker/Dockerfile -t digressed/test:edn_turbo-rb-$RUBY_VERSION .
|
10
|
+
docker tag "digressed/test:edn_turbo-rb-$RUBY_VERSION" "edn_turbo-rb-$RUBY_VERSION"
|
11
|
+
docker push "digressed/test:edn_turbo-rb-$RUBY_VERSION"
|
data/docker/common.sh
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
|
3
|
+
RUBY_MAJOR_VER=3.0
|
4
|
+
|
5
|
+
function update_ruby_build()
|
6
|
+
{
|
7
|
+
if [ -e "~/.rbenv/plugins/" ]; then
|
8
|
+
echo "Updating ruby-build definitions"
|
9
|
+
|
10
|
+
pushd ~/.rbenv/plugins/ruby-build/ >> /dev/null
|
11
|
+
git pull
|
12
|
+
popd >> /dev/null
|
13
|
+
fi
|
14
|
+
}
|
15
|
+
|
16
|
+
function set_ruby_ver()
|
17
|
+
{
|
18
|
+
local args=("$@")
|
19
|
+
|
20
|
+
if [ ${#args[@]} -eq 0 ]; then
|
21
|
+
update_ruby_build
|
22
|
+
RUBY_VERSION=`ruby-build --definitions | grep "^$RUBY_MAJOR_VER" | tail -1`
|
23
|
+
else
|
24
|
+
RUBY_VERSION=$1
|
25
|
+
fi
|
26
|
+
|
27
|
+
echo "Using ruby $RUBY_VERSION"
|
28
|
+
}
|
data/docker/console
CHANGED
data/docker/docker-compose.yml
CHANGED
@@ -1,24 +1,22 @@
|
|
1
1
|
version: "3"
|
2
2
|
services:
|
3
3
|
|
4
|
-
rb-
|
5
|
-
image: digressed/test:edn_turbo-rb-
|
4
|
+
rb-3.0.0:
|
5
|
+
image: digressed/test:edn_turbo-rb-3.0.0
|
6
6
|
stdin_open: true
|
7
7
|
tty: true
|
8
8
|
|
9
|
-
rb-2.
|
10
|
-
image: digressed/test:edn_turbo-rb-2.
|
9
|
+
rb-2.7.2:
|
10
|
+
image: digressed/test:edn_turbo-rb-2.7.2
|
11
11
|
stdin_open: true
|
12
12
|
tty: true
|
13
13
|
|
14
|
-
rb-2.
|
15
|
-
image: digressed/test:edn_turbo-rb-2.
|
14
|
+
rb-2.6.6:
|
15
|
+
image: digressed/test:edn_turbo-rb-2.6.6
|
16
16
|
stdin_open: true
|
17
17
|
tty: true
|
18
18
|
|
19
|
-
rb-2.
|
20
|
-
image: digressed/test:edn_turbo-rb-2.
|
19
|
+
rb-2.5.8:
|
20
|
+
image: digressed/test:edn_turbo-rb-2.5.8
|
21
21
|
stdin_open: true
|
22
22
|
tty: true
|
23
|
-
# volumes:
|
24
|
-
# - /Volumes/homes/ep/work/edn_turbo:/home/ned/app
|
data/docker/run
CHANGED
data/ext/edn_turbo/edn_parser.cc
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
#line 1 "edn_parser.rl"
|
3
3
|
// The MIT License (MIT)
|
4
4
|
|
5
|
-
// Copyright (c) 2015-
|
5
|
+
// Copyright (c) 2015-2021 Ed Porras
|
6
6
|
|
7
7
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
// of this software and associated documentation files (the "Software"), to deal
|
data/ext/edn_turbo/edn_parser.rl
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
// The MIT License (MIT)
|
2
2
|
|
3
|
-
// Copyright (c) 2015-
|
3
|
+
// Copyright (c) 2015-2021 Ed Porras
|
4
4
|
|
5
5
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
// of this software and associated documentation files (the "Software"), to deal
|
data/ext/edn_turbo/extconf.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License (MIT)
|
4
4
|
|
5
|
-
# Copyright (c) 2015-
|
5
|
+
# Copyright (c) 2015-2021 Ed Porras
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"), to deal
|
data/ext/edn_turbo/main.cc
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
// The MIT License (MIT)
|
2
2
|
|
3
|
-
// Copyright (c) 2015-
|
3
|
+
// Copyright (c) 2015-2021 Ed Porras
|
4
4
|
|
5
5
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
// of this software and associated documentation files (the "Software"), to deal
|
@@ -220,13 +220,8 @@ void Init_edn_turbo(void)
|
|
220
220
|
edn::EDN_MAKE_SET_METHOD = rb_intern("set");
|
221
221
|
edn::EDN_TAGGED_ELEM_METHOD = rb_intern("tagged_element");
|
222
222
|
|
223
|
-
#if defined(RUBY_API_VERSION_MAJOR) && (RUBY_API_VERSION_MAJOR == 2) && \
|
224
|
-
defined(RUBY_API_VERSION_MINOR) && (RUBY_API_VERSION_MINOR > 4)
|
225
223
|
// see lib/edn_turbo.rb
|
226
224
|
edn::EDN_MAKE_BIG_DECIMAL_METHOD = rb_intern("big_decimal_edn_turbo");
|
227
|
-
#else
|
228
|
-
edn::EDN_MAKE_BIG_DECIMAL_METHOD = rb_intern("big_decimal");
|
229
|
-
#endif
|
230
225
|
|
231
226
|
// defined in EDNT - see edn_parser.rb
|
232
227
|
edn::EDNT_EXTENDED_VALUE_METHOD = rb_intern("extend_for_meta");
|
data/ext/edn_turbo/parser.h
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
// The MIT License (MIT)
|
2
2
|
|
3
|
-
// Copyright (c) 2015-
|
3
|
+
// Copyright (c) 2015-2021 Ed Porras
|
4
4
|
|
5
5
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
// of this software and associated documentation files (the "Software"), to deal
|
data/ext/edn_turbo/parser_def.cc
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
// The MIT License (MIT)
|
2
2
|
|
3
|
-
// Copyright (c) 2015-
|
3
|
+
// Copyright (c) 2015-2021 Ed Porras
|
4
4
|
|
5
5
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
// of this software and associated documentation files (the "Software"), to deal
|
data/ext/edn_turbo/util.cc
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
// The MIT License (MIT)
|
2
2
|
|
3
|
-
// Copyright (c) 2015-
|
3
|
+
// Copyright (c) 2015-2021 Ed Porras
|
4
4
|
|
5
5
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
// of this software and associated documentation files (the "Software"), to deal
|
data/ext/edn_turbo/util.h
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
// The MIT License (MIT)
|
2
2
|
|
3
|
-
// Copyright (c) 2015-
|
3
|
+
// Copyright (c) 2015-2021 Ed Porras
|
4
4
|
|
5
5
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
// of this software and associated documentation files (the "Software"), to deal
|
@@ -22,6 +22,8 @@
|
|
22
22
|
|
23
23
|
#pragma once
|
24
24
|
|
25
|
+
#include <cstddef>
|
26
|
+
|
25
27
|
namespace edn
|
26
28
|
{
|
27
29
|
extern VALUE rb_mEDN;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
// The MIT License (MIT)
|
2
2
|
|
3
|
-
// Copyright (c) 2015-
|
3
|
+
// Copyright (c) 2015-2021 Ed Porras
|
4
4
|
|
5
5
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
// of this software and associated documentation files (the "Software"), to deal
|
@@ -1,6 +1,6 @@
|
|
1
1
|
// The MIT License (MIT)
|
2
2
|
|
3
|
-
// Copyright (c) 2015-
|
3
|
+
// Copyright (c) 2015-2021 Ed Porras
|
4
4
|
|
5
5
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
// of this software and associated documentation files (the "Software"), to deal
|
data/lib/edn_turbo.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License (MIT)
|
4
4
|
#
|
5
|
-
# Copyright (c) 2015-
|
5
|
+
# Copyright (c) 2015-2021 Ed Porras
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"), to deal
|
data/lib/edn_turbo/edn_parser.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License (MIT)
|
4
4
|
#
|
5
|
-
# Copyright (c) 2015-
|
5
|
+
# Copyright (c) 2015-2021 Ed Porras
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"), to deal
|
data/lib/edn_turbo/version.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# The MIT License (MIT)
|
2
4
|
#
|
3
|
-
# Copyright (c) 2015-
|
5
|
+
# Copyright (c) 2015-2021 Ed Porras
|
4
6
|
#
|
5
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
8
|
# of this software and associated documentation files (the "Software"), to deal
|
@@ -21,6 +23,6 @@
|
|
21
23
|
# THE SOFTWARE.
|
22
24
|
|
23
25
|
module EDNT
|
24
|
-
VERSION = '0.7.
|
25
|
-
RELEASE_DATE = '
|
26
|
+
VERSION = '0.7.1'
|
27
|
+
RELEASE_DATE = '2021-02-07'
|
26
28
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: edn_turbo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ed Porras
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: edn
|
@@ -92,6 +92,20 @@ dependencies:
|
|
92
92
|
- - "~>"
|
93
93
|
- !ruby/object:Gem::Version
|
94
94
|
version: 3.8.0
|
95
|
+
- !ruby/object:Gem::Dependency
|
96
|
+
name: rubocop
|
97
|
+
requirement: !ruby/object:Gem::Requirement
|
98
|
+
requirements:
|
99
|
+
- - "~>"
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '1.9'
|
102
|
+
type: :development
|
103
|
+
prerelease: false
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
requirements:
|
106
|
+
- - "~>"
|
107
|
+
- !ruby/object:Gem::Version
|
108
|
+
version: '1.9'
|
95
109
|
description: Optimized plugin for parsing EDN files using ragel
|
96
110
|
email: github@digressed.net
|
97
111
|
executables:
|
@@ -100,6 +114,7 @@ extensions:
|
|
100
114
|
- ext/edn_turbo/extconf.rb
|
101
115
|
extra_rdoc_files: []
|
102
116
|
files:
|
117
|
+
- ".dir-locals.el"
|
103
118
|
- ".gitignore"
|
104
119
|
- ".rspec"
|
105
120
|
- CHANGELOG.md
|
@@ -111,6 +126,7 @@ files:
|
|
111
126
|
- bin/ppedn-ruby
|
112
127
|
- docker/Dockerfile
|
113
128
|
- docker/build
|
129
|
+
- docker/common.sh
|
114
130
|
- docker/console
|
115
131
|
- docker/docker-compose.yml
|
116
132
|
- docker/entrypoint
|
@@ -136,7 +152,7 @@ homepage: http://rubygems.org/gems/edn_turbo
|
|
136
152
|
licenses:
|
137
153
|
- MIT
|
138
154
|
metadata: {}
|
139
|
-
post_install_message:
|
155
|
+
post_install_message:
|
140
156
|
rdoc_options: []
|
141
157
|
require_paths:
|
142
158
|
- lib
|
@@ -144,15 +160,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
144
160
|
requirements:
|
145
161
|
- - ">="
|
146
162
|
- !ruby/object:Gem::Version
|
147
|
-
version:
|
163
|
+
version: 2.5.0
|
148
164
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
149
165
|
requirements:
|
150
166
|
- - ">="
|
151
167
|
- !ruby/object:Gem::Version
|
152
168
|
version: '0'
|
153
169
|
requirements: []
|
154
|
-
rubygems_version: 3.
|
155
|
-
signing_key:
|
170
|
+
rubygems_version: 3.2.3
|
171
|
+
signing_key:
|
156
172
|
specification_version: 3
|
157
173
|
summary: Read EDN files
|
158
174
|
test_files: []
|