edn_turbo 0.6.2 → 0.7.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 873b791ab9878f7b9bd616689fbfbef2eacb3fd1d6d8ede55a71f182fcf3b9f4
4
- data.tar.gz: a6ff013825a135846e1e3988e17a86d58ca0dd244fcde0a9b73f3eb22218e8cb
3
+ metadata.gz: 6ef6fae989e30efe46585a8cfe01ae00255e4014ade4a0ac5f36a0d7c1e98511
4
+ data.tar.gz: fc19904544cc35bfb84e08a2cb5d13e7fc4fc8b6a19117de247cc5d701c25bee
5
5
  SHA512:
6
- metadata.gz: aa606e1bc5da4be831d70052415f3c217343e334390de2e72bb141dd18986f6ef3379c03c6f1adec2de86af65951bf2902dc3fcb09fae29874ad448323a7361d
7
- data.tar.gz: 0cf810e71d6a3a3d2cabc798bed067d0826512149ef503d4f2940816e1f3cc15e71d9cffef5eb504b44efa70f597f274decc5147be878c515c3624f5a558854f
6
+ metadata.gz: d7bbeacf3d1d4e8e75356986bf87a3838d6e40729ea206aab1b55860d693b1e4e0d0bb1b63d2ae5689d3080f9a4dc239beb3aa7b29b9fe191e6d3592dfb3514b
7
+ data.tar.gz: 1877016ec61e37c41f4aed022444d721406068f062d6210cfd41cfe5d48290889de24f2d1bd5ebe00cd2ad34dd97af4904567644335a45255cb91d79e118e4fc
data/.dir-locals.el ADDED
@@ -0,0 +1,3 @@
1
+ ((c++-mode
2
+ (flycheck-clang-language-standard . "c++11")
3
+ (flycheck-gcc-language-standard . "c++11")))
data/CHANGELOG.md CHANGED
@@ -1,30 +1,62 @@
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.6.2 - 2019-05-21
4
+ ## [0.7.3] - 2021-11-06
5
+ ### Changed
6
+ * Fix by Caleb Land for new homebrew installs to /opt
7
+
8
+ ## [0.7.2] - 2021-09-20
9
+ ### Changed
10
+ * allow rake versions > 12
11
+
12
+ ## [0.7.1] - 2021-02-07
13
+ ### Changed
14
+ * Set minimum ruby version to 2.5
15
+
16
+ ### Fixed
17
+ * Compilation error when building against ruby versions > 2
18
+
19
+ ## [0.7.0] - 2020-02-07
20
+ ### Added
21
+ * big_decimal_edn_turbo method to replace calling edn-ruby's
22
+ big_decimal as it breaks things in ruby 2.7 and up
23
+
24
+ ### Changed
25
+ * Removed compiler warning due to scalar wrapped in braces
26
+ * Updated docker configs to use latest 2.4 and 2.6 ruby
27
+ versions. Added 2.5 and 2.7 too.
28
+
29
+ ## [0.6.2] - 2019-05-21
5
30
  ### Fixed
6
- - Handling of ##Inf, ##Nan, et al.
31
+ * Handling of ##Inf, ##Nan, et al.
7
32
 
8
- ## 0.6.1 - 2019-05-20
33
+ ## [0.6.1] - 2019-05-20
9
34
  ### Added
10
- - Implement parsing of Ratio literals, represented as a ruby Rational.
35
+ * Implement parsing of Ratio literals, represented as a ruby Rational.
11
36
 
12
37
  ### Fixed
13
- - Parsing of exact precision types.
38
+ * Parsing of exact precision types.
14
39
 
15
40
  ### Changed
16
- - Build lists using EDN::list method that was previously broken.
17
-
41
+ * Build lists using EDN::list method that was previously broken.
18
42
 
19
- ## 0.6.0 - 2019-05-13
43
+ ## [0.6.0] - 2019-05-13
20
44
  ### Changed
21
- - switched from MiniTest to RSpec.
22
- - replaced `NULL` with `nullptr`.
23
- - replaced old-style casts.
24
- - prohibit Parser copy and move ops.
25
- - assigning a source that does not respond to `read` now throws
45
+ * switched from MiniTest to RSpec.
46
+ * replaced `NULL` with `nullptr`.
47
+ * replaced old-style casts.
48
+ * prohibit Parser copy and move ops.
49
+ * assigning a source that does not respond to `read` now throws
26
50
  `ArgumentError` instead of `RuntimeError`.
27
51
 
28
52
  ### Added
29
- - initial version of docker configs for testing on Ubuntu.
30
-
53
+ * initial version of docker configs for testing on Ubuntu.
54
+
55
+ [Unreleased]: https://github.com/edporras/edn_turbo/-/compare/0.7.3...main
56
+ [0.7.3]: https://github.com/edporras/edn_turbo/-/compare/0.7.2...0.7.3
57
+ [0.7.2]: https://github.com/edporras/edn_turbo/-/compare/0.7.1...0.7.2
58
+ [0.7.1]: https://github.com/edporras/edn_turbo/-/compare/0.7.0...0.7.1
59
+ [0.7.0]: https://github.com/edporras/edn_turbo/-/compare/0.6.2...0.7.0
60
+ [0.6.2]: https://github.com/edporras/edn_turbo/-/compare/0.6.1...0.6.2
61
+ [0.6.1]: https://github.com/edporras/edn_turbo/-/compare/0.6.0...0.6.1
62
+ [0.6.0]: https://github.com/edporras/edn_turbo/-/compare/0.5.7...0.6.0
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2015-2019 Ed Porras
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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- edn_turbo 0.6.2
1
+ edn_turbo 0.7.3
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.4 or greater as `edn_turbo` does not use the deprecated `Fixnum` or `Bignum`.
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
- cd EXT_PATH do
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, [:machine] do |_t, args|
47
+ task :graph, %i[machine] do |_t, args|
48
48
  args.with_defaults(machine: 'EDN_value')
49
- TMPFILE = '/tmp/ragel_edn'
50
- MACHINE = args[:machine]
49
+ tmpfile = '/tmp/ragel_edn'
50
+ machine = args[:machine]
51
51
 
52
52
  # assumes graphviz is installed
53
- sh "ragel -Vp -S #{MACHINE} -o #{TMPFILE} #{EXT_PATH}/#{RAGEL_PARSER_SRC} && "\
54
- "dot -Tpng #{TMPFILE} -o #{MACHINE}.png"
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: [:clean, :ragel, :compile, :chmod]
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 ADDED
@@ -0,0 +1,40 @@
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
+ RUN rm -f .ruby-version
33
+
34
+ # the specified ruby version
35
+ RUN rbenv install $ruby_version && \
36
+ rbenv global $ruby_version
37
+
38
+ COPY --chown=ned:ned . /home/ned/src
39
+
40
+ ENTRYPOINT ["docker/entrypoint"]
data/docker/build ADDED
@@ -0,0 +1,11 @@
1
+ #!/bin/bash
2
+
3
+ . docker/common.sh
4
+
5
+ set -e
6
+
7
+ set_ruby_ver $@
8
+
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 ADDED
@@ -0,0 +1,11 @@
1
+ #!/bin/bash
2
+
3
+ if [ $# -eq 0 ]; then
4
+ RUBY_VERSION=3.0.0
5
+ else
6
+ RUBY_VERSION=$1
7
+ fi
8
+
9
+ echo "running on ruby ${RUBY_VERSION}"
10
+
11
+ docker-compose -f docker/docker-compose.yml run rb-$RUBY_VERSION /bin/bash
@@ -0,0 +1,22 @@
1
+ version: "3"
2
+ services:
3
+
4
+ rb-3.0.2:
5
+ image: digressed/test:edn_turbo-rb-3.0.2
6
+ stdin_open: true
7
+ tty: true
8
+
9
+ rb-2.7.4:
10
+ image: digressed/test:edn_turbo-rb-2.7.4
11
+ stdin_open: true
12
+ tty: true
13
+
14
+ rb-2.6.8:
15
+ image: digressed/test:edn_turbo-rb-2.6.8
16
+ stdin_open: true
17
+ tty: true
18
+
19
+ rb-2.5.9:
20
+ image: digressed/test:edn_turbo-rb-2.5.9
21
+ stdin_open: true
22
+ tty: true
data/docker/entrypoint ADDED
@@ -0,0 +1,3 @@
1
+ #!/bin/bash
2
+
3
+ exec "$@"
data/docker/make-check ADDED
@@ -0,0 +1,8 @@
1
+ #!/bin/bash
2
+
3
+ set -x -e
4
+
5
+ gem install bundler &&
6
+ bundle && \
7
+ rake compile && \
8
+ bundle exec rspec
data/docker/run ADDED
@@ -0,0 +1,9 @@
1
+ #!/bin/bash
2
+
3
+ . docker/common.sh
4
+
5
+ set -e
6
+
7
+ set_ruby_ver $@
8
+
9
+ docker-compose -f docker/docker-compose.yml run rb-$RUBY_VERSION docker/make-check
@@ -2,7 +2,7 @@
2
2
  #line 1 "edn_parser.rl"
3
3
  // The MIT License (MIT)
4
4
 
5
- // Copyright (c) 2015-2019 Ed Porras
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
@@ -1,6 +1,6 @@
1
1
  // The MIT License (MIT)
2
2
 
3
- // Copyright (c) 2015-2019 Ed Porras
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
@@ -2,18 +2,18 @@
2
2
 
3
3
  # The MIT License (MIT)
4
4
 
5
- # Copyright (c) 2015-2019 Ed Porras
6
- #
5
+ # Copyright (c) 2015-2021 Ed Porras
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
9
9
  # in the Software without restriction, including without limitation the rights
10
10
  # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
11
  # copies of the Software, and to permit persons to whom the Software is
12
12
  # furnished to do so, subject to the following conditions:
13
- #
13
+ #
14
14
  # The above copyright notice and this permission notice shall be included in
15
15
  # all copies or substantial portions of the Software.
16
- #
16
+ #
17
17
  # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
18
  # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
19
  # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -24,43 +24,29 @@
24
24
 
25
25
  require 'mkmf'
26
26
 
27
- header_dirs =
28
- if RUBY_PLATFORM =~ /darwin/
29
- abort "\n>> failed to find pkg-config binary - Is brew installed? If so, run 'brew install pkg-config'?\n\n" unless
30
- File.exist?('/usr/local/bin/pkg-config')
27
+ ENV['PKG_CONFIG_PATH'] ||= ""
28
+ ENV['PKG_CONFIG_PATH'] += if RUBY_PLATFORM =~ /darwin/
29
+ ":/usr/local/opt/icu4c/lib/pkgconfig:/opt/homebrew/opt/icu4c/lib/pkgconfig"
30
+ else
31
+ ":/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig"
32
+ end
31
33
 
32
- abort "\n>> failed to find icu4c package - Did you run 'brew install icu4c'?\n\n" unless
33
- File.exist?('/usr/local/opt/icu4c/lib/pkgconfig/icu-uc.pc')
34
-
35
- i_opt = %x[ export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig" && /usr/local/bin/pkg-config --cflags-only-I icu-uc ]
36
- [
37
- i_opt[/-I(.+?)\s/,1]
38
- ].freeze
39
- else
40
- [
41
- '/usr/local/include',
42
- '/usr/local/opt/icu4c/include',
43
- '/usr/include'
44
- ].freeze
45
- end
46
-
47
- lib_dirs =
48
- if RUBY_PLATFORM =~ /darwin/
49
- l_opt = %x[ export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig" && /usr/local/bin/pkg-config --libs icu-uc ]
50
- [
51
- l_opt[/-L(.+?)\s/,1]
52
- ].freeze
53
- else
54
- [
55
- '/usr/local/lib', # must be the first entry; add others after it
56
- '/usr/local/opt/icu4c/lib'
57
- ].freeze
58
- end
59
-
60
- dir_config('icuuc', header_dirs, lib_dirs)
34
+ pkg_config('icu-uc')
61
35
 
62
36
  # feels very hackish to do this but the new icu4c needs it on MacOS
63
- $CXXFLAGS << ' -stdlib=libc++ -Wno-deprecated-register' if RUBY_PLATFORM =~ /darwin/
37
+ if RUBY_PLATFORM =~ /darwin/
38
+ $CXXFLAGS << ' -stdlib=libc++ -Wno-deprecated-register'
39
+ else
40
+ # remove some flags that are either clang-specific or unrecognized
41
+ # but somehow get passed under linux (?!)
42
+ %w[
43
+ -Wno-self-assign -Wno-parentheses-equality -Wno-constant-logical-operand
44
+ -Wno-cast-function-type -Wdeclaration-after-statement -Wimplicit-function-declaration
45
+ -Wimplicit-int
46
+ ].each do |f|
47
+ $warnflags.sub!(f, '')
48
+ end
49
+ end
64
50
  $CXXFLAGS << ' -std=c++11 -std=gnu++11'
65
51
 
66
52
  abort "\n>> failed to find icu4c headers - is icu4c installed?\n\n" unless
@@ -1,6 +1,6 @@
1
1
  // The MIT License (MIT)
2
2
 
3
- // Copyright (c) 2015-2019 Ed Porras
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
@@ -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, {0}},
66
+ {0, delete_parser, 0, 0},
66
67
  0, 0,
67
68
  RUBY_TYPED_FREE_IMMEDIATELY,
68
69
  };
@@ -217,9 +218,11 @@ 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
+ // see lib/edn_turbo.rb
224
+ edn::EDN_MAKE_BIG_DECIMAL_METHOD = rb_intern("big_decimal_edn_turbo");
225
+
223
226
  // defined in EDNT - see edn_parser.rb
224
227
  edn::EDNT_EXTENDED_VALUE_METHOD = rb_intern("extend_for_meta");
225
228
  edn::EDN_MAKE_RATIONAL_METHOD = rb_intern("rational"); // should be in edn-ruby
@@ -1,6 +1,6 @@
1
1
  // The MIT License (MIT)
2
2
 
3
- // Copyright (c) 2015-2019 Ed Porras
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-2019 Ed Porras
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
@@ -205,7 +205,7 @@ namespace edn
205
205
  // =================================================================
206
206
  //
207
207
  // error reporting
208
- void Parser::error(const std::string& func, const std::string& err, char c) const
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 << "() "
@@ -1,6 +1,6 @@
1
1
  // The MIT License (MIT)
2
2
 
3
- // Copyright (c) 2015-2019 Ed Porras
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-2019 Ed Porras
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-2019 Ed Porras
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-2019 Ed Porras
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
@@ -2,7 +2,7 @@
2
2
 
3
3
  # The MIT License (MIT)
4
4
  #
5
- # Copyright (c) 2015-2019 Ed Porras
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
@@ -1,6 +1,8 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # The MIT License (MIT)
2
4
  #
3
- # Copyright (c) 2015-2019 Ed Porras
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.6.2'.freeze
25
- RELEASE_DATE = '2019-05-21'.freeze
26
+ VERSION = '0.7.3'
27
+ RELEASE_DATE = '2021-11-06'
26
28
  end
data/lib/edn_turbo.rb CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  # The MIT License (MIT)
4
4
  #
5
- # Copyright (c) 2015-2019 Ed Porras
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
@@ -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
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.6.2
4
+ version: 0.7.3
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: 2019-05-21 00:00:00.000000000 Z
11
+ date: 2021-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: edn
@@ -28,16 +28,22 @@ dependencies:
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '12.3'
34
+ - - "<"
35
+ - !ruby/object:Gem::Version
36
+ version: '14.0'
34
37
  type: :runtime
35
38
  prerelease: false
36
39
  version_requirements: !ruby/object:Gem::Requirement
37
40
  requirements:
38
- - - "~>"
41
+ - - ">="
39
42
  - !ruby/object:Gem::Version
40
43
  version: '12.3'
44
+ - - "<"
45
+ - !ruby/object:Gem::Version
46
+ version: '14.0'
41
47
  - !ruby/object:Gem::Dependency
42
48
  name: rake-compiler
43
49
  requirement: !ruby/object:Gem::Requirement
@@ -92,6 +98,20 @@ dependencies:
92
98
  - - "~>"
93
99
  - !ruby/object:Gem::Version
94
100
  version: 3.8.0
101
+ - !ruby/object:Gem::Dependency
102
+ name: rubocop
103
+ requirement: !ruby/object:Gem::Requirement
104
+ requirements:
105
+ - - "~>"
106
+ - !ruby/object:Gem::Version
107
+ version: '1.9'
108
+ type: :development
109
+ prerelease: false
110
+ version_requirements: !ruby/object:Gem::Requirement
111
+ requirements:
112
+ - - "~>"
113
+ - !ruby/object:Gem::Version
114
+ version: '1.9'
95
115
  description: Optimized plugin for parsing EDN files using ragel
96
116
  email: github@digressed.net
97
117
  executables:
@@ -100,19 +120,24 @@ extensions:
100
120
  - ext/edn_turbo/extconf.rb
101
121
  extra_rdoc_files: []
102
122
  files:
123
+ - ".dir-locals.el"
103
124
  - ".gitignore"
104
125
  - ".rspec"
105
126
  - CHANGELOG.md
106
- - Dockerfile
107
127
  - Gemfile
108
128
  - LICENSE
109
129
  - README.md
110
130
  - Rakefile
111
- - bin/build_docker_image.sh
112
- - bin/console.sh
113
131
  - bin/ppedn
114
132
  - bin/ppedn-ruby
115
- - docker-compose.yml
133
+ - docker/Dockerfile
134
+ - docker/build
135
+ - docker/common.sh
136
+ - docker/console
137
+ - docker/docker-compose.yml
138
+ - docker/entrypoint
139
+ - docker/make-check
140
+ - docker/run
116
141
  - ext/edn_turbo/depend
117
142
  - ext/edn_turbo/edn_parser.cc
118
143
  - ext/edn_turbo/edn_parser.rl
@@ -133,7 +158,7 @@ homepage: http://rubygems.org/gems/edn_turbo
133
158
  licenses:
134
159
  - MIT
135
160
  metadata: {}
136
- post_install_message:
161
+ post_install_message:
137
162
  rdoc_options: []
138
163
  require_paths:
139
164
  - lib
@@ -141,15 +166,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
141
166
  requirements:
142
167
  - - ">="
143
168
  - !ruby/object:Gem::Version
144
- version: '0'
169
+ version: 2.5.0
145
170
  required_rubygems_version: !ruby/object:Gem::Requirement
146
171
  requirements:
147
172
  - - ">="
148
173
  - !ruby/object:Gem::Version
149
174
  version: '0'
150
175
  requirements: []
151
- rubygems_version: 3.0.3
152
- signing_key:
176
+ rubygems_version: 3.2.22
177
+ signing_key:
153
178
  specification_version: 3
154
179
  summary: Read EDN files
155
180
  test_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/*
@@ -1,11 +0,0 @@
1
- #!/bin/bash
2
-
3
- set -e
4
-
5
- if [[ $# -eq 0 ]]; then
6
- RUBY_VERSION=2.6.3
7
- else
8
- RUBY_VERSION=$1
9
- fi
10
-
11
- docker build -t edn_turbo_image:$RUBY_VERSION .
data/bin/console.sh DELETED
@@ -1,5 +0,0 @@
1
- #!/bin/bash
2
-
3
- set -e
4
-
5
- docker-compose run edn_turbo /bin/bash
data/docker-compose.yml DELETED
@@ -1,10 +0,0 @@
1
- version: "3"
2
- services:
3
-
4
- edn_turbo:
5
- image: edn_turbo_image:2.6.3
6
- stdin_open: true
7
- tty: true
8
- volumes:
9
- - ~/.bash_history:/root/.bash_history
10
- - /Volumes/homes/ep/work/edn_turbo:/gem