edn_turbo 0.6.2 → 0.7.0
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/CHANGELOG.md +10 -0
- data/README.md +1 -1
- data/docker/Dockerfile +38 -0
- data/docker/build +11 -0
- data/docker/console +11 -0
- data/docker/docker-compose.yml +24 -0
- data/docker/entrypoint +3 -0
- data/docker/make-check +8 -0
- data/docker/run +11 -0
- data/ext/edn_turbo/edn_parser.cc +1 -1
- data/ext/edn_turbo/edn_parser.rl +1 -1
- data/ext/edn_turbo/extconf.rb +13 -1
- data/ext/edn_turbo/main.cc +11 -3
- data/ext/edn_turbo/parser.h +1 -1
- data/ext/edn_turbo/parser_def.cc +2 -2
- data/ext/edn_turbo/util.cc +1 -1
- data/ext/edn_turbo/util.h +1 -1
- data/ext/edn_turbo/util_unicode.cc +1 -1
- data/lib/edn_turbo.rb +7 -1
- data/lib/edn_turbo/edn_parser.rb +1 -1
- data/lib/edn_turbo/version.rb +3 -3
- metadata +10 -7
- data/Dockerfile +0 -34
- data/bin/build_docker_image.sh +0 -11
- data/bin/console.sh +0 -5
- data/docker-compose.yml +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 52581ae198013dd710765482a20fa056d4cd34e889ae1e22b86d3fa4bbf14316
|
4
|
+
data.tar.gz: 88352b596f68647b0106cf95b7c1f5cf6cdb398852de65b2feebe11a1b61506e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ca4bc29b2d5dd0cbd051dbf77ae1362ea4c9e935166144137e7f37d5025db171ed309e5cd9e405f3f3ac207551dcf64eaf7eb908592dfb0ef440f73917d03db
|
7
|
+
data.tar.gz: 1cea625a086d7c9268427d2fd678cc27ff1647014fcf89cf6484511b14659e57bf10fb45fc73aeb85793cbee3a66b15940dac20fd5ff066afb19c48e8e938143
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,16 @@
|
|
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.0 - 2020-02-07
|
5
|
+
### Added
|
6
|
+
- big_decimal_edn_turbo method to replace calling edn-ruby's
|
7
|
+
big_decimal as it breaks things in ruby 2.7 and up
|
8
|
+
|
9
|
+
### Changed
|
10
|
+
- Removed compiler warning due to scalar wrapped in braces
|
11
|
+
- Updated docker configs to use latest 2.4 and 2.6 ruby
|
12
|
+
versions. Added 2.5 and 2.7 too.
|
13
|
+
|
4
14
|
## 0.6.2 - 2019-05-21
|
5
15
|
### Fixed
|
6
16
|
- Handling of ##Inf, ##Nan, et al.
|
data/README.md
CHANGED
data/docker/Dockerfile
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
FROM buildpack-deps:stretch
|
2
|
+
MAINTAINER github@digressed.net
|
3
|
+
ARG ruby_version
|
4
|
+
|
5
|
+
ENV LC_ALL C.UTF-8
|
6
|
+
|
7
|
+
USER root
|
8
|
+
RUN groupadd -r ned -g 1000 && \
|
9
|
+
useradd -u 1000 -r -g ned -m -s /sbin/nologin -c "Docker image user" ned && \
|
10
|
+
mkdir /home/ned/bin && \
|
11
|
+
mkdir /home/ned/src && \
|
12
|
+
chown -R ned:ned /home/ned
|
13
|
+
|
14
|
+
WORKDIR /home/ned/src
|
15
|
+
|
16
|
+
# Update Ubuntu Software repository && update deps
|
17
|
+
RUN apt-get update && \
|
18
|
+
apt-get install -y \
|
19
|
+
libicu-dev \
|
20
|
+
libreadline-dev \
|
21
|
+
ragel && \
|
22
|
+
rm -rf /var/lib/apt/lists/*
|
23
|
+
|
24
|
+
USER ned
|
25
|
+
|
26
|
+
ENV PATH "/home/ned/.rbenv/bin:/home/ned/.rbenv/shims:$PATH"
|
27
|
+
|
28
|
+
# install rbenv
|
29
|
+
RUN \curl -sL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-installer | bash - && \
|
30
|
+
eval "$(rbenv init -)"
|
31
|
+
|
32
|
+
# the specified ruby version
|
33
|
+
RUN rbenv install $ruby_version && \
|
34
|
+
rbenv global $ruby_version
|
35
|
+
|
36
|
+
COPY --chown=ned:ned . /home/ned/src
|
37
|
+
|
38
|
+
ENTRYPOINT ["docker/entrypoint"]
|
data/docker/build
ADDED
data/docker/console
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
version: "3"
|
2
|
+
services:
|
3
|
+
|
4
|
+
rb-2.7.0:
|
5
|
+
image: digressed/test:edn_turbo-rb-2.7.0
|
6
|
+
stdin_open: true
|
7
|
+
tty: true
|
8
|
+
|
9
|
+
rb-2.6.5:
|
10
|
+
image: digressed/test:edn_turbo-rb-2.6.5
|
11
|
+
stdin_open: true
|
12
|
+
tty: true
|
13
|
+
|
14
|
+
rb-2.5.7:
|
15
|
+
image: digressed/test:edn_turbo-rb-2.5.7
|
16
|
+
stdin_open: true
|
17
|
+
tty: true
|
18
|
+
|
19
|
+
rb-2.4.9:
|
20
|
+
image: digressed/test:edn_turbo-rb-2.4.9
|
21
|
+
stdin_open: true
|
22
|
+
tty: true
|
23
|
+
# volumes:
|
24
|
+
# - /Volumes/homes/ep/work/edn_turbo:/home/ned/app
|
data/docker/entrypoint
ADDED
data/docker/make-check
ADDED
data/docker/run
ADDED
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-2020 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-2020 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
@@ -60,7 +60,19 @@ lib_dirs =
|
|
60
60
|
dir_config('icuuc', header_dirs, lib_dirs)
|
61
61
|
|
62
62
|
# feels very hackish to do this but the new icu4c needs it on MacOS
|
63
|
-
|
63
|
+
if RUBY_PLATFORM =~ /darwin/
|
64
|
+
$CXXFLAGS << ' -stdlib=libc++ -Wno-deprecated-register'
|
65
|
+
else
|
66
|
+
# remove some flags that are either clang-specific or unrecognized
|
67
|
+
# but somehow get passed under linux (?!)
|
68
|
+
%w[
|
69
|
+
-Wno-self-assign -Wno-parentheses-equality -Wno-constant-logical-operand
|
70
|
+
-Wno-cast-function-type -Wdeclaration-after-statement -Wimplicit-function-declaration
|
71
|
+
-Wimplicit-int
|
72
|
+
].each do |f|
|
73
|
+
$warnflags.sub!(f, '')
|
74
|
+
end
|
75
|
+
end
|
64
76
|
$CXXFLAGS << ' -std=c++11 -std=gnu++11'
|
65
77
|
|
66
78
|
abort "\n>> failed to find icu4c headers - is icu4c installed?\n\n" unless
|
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-2020 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
|
@@ -26,6 +26,7 @@
|
|
26
26
|
#include <cstring>
|
27
27
|
|
28
28
|
#include <ruby/ruby.h>
|
29
|
+
#include <ruby/version.h>
|
29
30
|
#include <ruby/io.h>
|
30
31
|
|
31
32
|
#include "parser.h"
|
@@ -62,7 +63,7 @@ namespace edn {
|
|
62
63
|
|
63
64
|
static const rb_data_type_t parser_data_type = {
|
64
65
|
"edn_turbo::Parser",
|
65
|
-
{0, delete_parser, 0,
|
66
|
+
{0, delete_parser, 0, 0},
|
66
67
|
0, 0,
|
67
68
|
RUBY_TYPED_FREE_IMMEDIATELY,
|
68
69
|
};
|
@@ -217,9 +218,16 @@ void Init_edn_turbo(void)
|
|
217
218
|
edn::EDN_MAKE_SYMBOL_METHOD = rb_intern("symbol");
|
218
219
|
edn::EDN_MAKE_LIST_METHOD = rb_intern("list");
|
219
220
|
edn::EDN_MAKE_SET_METHOD = rb_intern("set");
|
220
|
-
edn::EDN_MAKE_BIG_DECIMAL_METHOD = rb_intern("big_decimal");
|
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
|
+
// see lib/edn_turbo.rb
|
226
|
+
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
|
+
|
223
231
|
// defined in EDNT - see edn_parser.rb
|
224
232
|
edn::EDNT_EXTENDED_VALUE_METHOD = rb_intern("extend_for_meta");
|
225
233
|
edn::EDN_MAKE_RATIONAL_METHOD = rb_intern("rational"); // should be in edn-ruby
|
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-2020 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-2020 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
|
@@ -205,7 +205,7 @@ namespace edn
|
|
205
205
|
// =================================================================
|
206
206
|
//
|
207
207
|
// error reporting
|
208
|
-
void Parser::error(const std::string& func
|
208
|
+
void Parser::error(const std::string& /*func*/, const std::string& err, char c) const
|
209
209
|
{
|
210
210
|
std::cerr << "Parse error "
|
211
211
|
// "from " << func << "() "
|
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-2020 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-2020 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-2020 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-2020 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
|
@@ -36,4 +36,10 @@ module EDN
|
|
36
36
|
def self.rational(value)
|
37
37
|
Rational(value)
|
38
38
|
end
|
39
|
+
|
40
|
+
# edn-ruby uses BigDecimal.new() which breaks in ruby >= 2.7.0 so we
|
41
|
+
# use this instead
|
42
|
+
def self.big_decimal_edn_turbo(value)
|
43
|
+
BigDecimal(value)
|
44
|
+
end
|
39
45
|
end
|
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-2020 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,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c) 2015-
|
3
|
+
# Copyright (c) 2015-2020 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
|
@@ -21,6 +21,6 @@
|
|
21
21
|
# THE SOFTWARE.
|
22
22
|
|
23
23
|
module EDNT
|
24
|
-
VERSION = '0.
|
25
|
-
RELEASE_DATE = '
|
24
|
+
VERSION = '0.7.0'.freeze
|
25
|
+
RELEASE_DATE = '2020-02-07'.freeze
|
26
26
|
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.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ed Porras
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: edn
|
@@ -103,16 +103,19 @@ files:
|
|
103
103
|
- ".gitignore"
|
104
104
|
- ".rspec"
|
105
105
|
- CHANGELOG.md
|
106
|
-
- Dockerfile
|
107
106
|
- Gemfile
|
108
107
|
- LICENSE
|
109
108
|
- README.md
|
110
109
|
- Rakefile
|
111
|
-
- bin/build_docker_image.sh
|
112
|
-
- bin/console.sh
|
113
110
|
- bin/ppedn
|
114
111
|
- bin/ppedn-ruby
|
115
|
-
- docker
|
112
|
+
- docker/Dockerfile
|
113
|
+
- docker/build
|
114
|
+
- docker/console
|
115
|
+
- docker/docker-compose.yml
|
116
|
+
- docker/entrypoint
|
117
|
+
- docker/make-check
|
118
|
+
- docker/run
|
116
119
|
- ext/edn_turbo/depend
|
117
120
|
- ext/edn_turbo/edn_parser.cc
|
118
121
|
- ext/edn_turbo/edn_parser.rl
|
@@ -148,7 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
148
151
|
- !ruby/object:Gem::Version
|
149
152
|
version: '0'
|
150
153
|
requirements: []
|
151
|
-
rubygems_version: 3.
|
154
|
+
rubygems_version: 3.1.2
|
152
155
|
signing_key:
|
153
156
|
specification_version: 3
|
154
157
|
summary: Read EDN files
|
data/Dockerfile
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
FROM buildpack-deps:stretch
|
2
|
-
MAINTAINER github@digressed.net
|
3
|
-
|
4
|
-
ENV LC_ALL C.UTF-8
|
5
|
-
|
6
|
-
# Update Ubuntu Software repository
|
7
|
-
RUN apt-get update
|
8
|
-
|
9
|
-
# install dependencies & utils
|
10
|
-
RUN apt-get install -y \
|
11
|
-
libicu-dev \
|
12
|
-
curl \
|
13
|
-
libreadline-dev
|
14
|
-
|
15
|
-
# aliases, environment
|
16
|
-
RUN echo 'alias h="history"' >> /root/.bashrc
|
17
|
-
RUN echo 'alias be="bundle exec"' >> /root/.bashrc
|
18
|
-
ENV PATH "/root/.rbenv/bin:/root/.rbenv/shims:$PATH"
|
19
|
-
|
20
|
-
# install rbenv & ruby
|
21
|
-
RUN \curl -sL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-installer | bash -
|
22
|
-
RUN eval "$(rbenv init -)"
|
23
|
-
|
24
|
-
ENV RUBY_VERSION=2.6.3
|
25
|
-
RUN rbenv install ${RUBY_VERSION}
|
26
|
-
RUN rbenv global ${RUBY_VERSION}
|
27
|
-
|
28
|
-
# mute bundle warning about root user
|
29
|
-
RUN bundle config --global silence_root_warning 1
|
30
|
-
|
31
|
-
WORKDIR /gem
|
32
|
-
|
33
|
-
# cleanup
|
34
|
-
RUN rm -rf /var/lib/apt/lists/*
|
data/bin/build_docker_image.sh
DELETED
data/bin/console.sh
DELETED