mini_racer 0.6.2 → 0.8.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.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mini_racer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Saffron
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-16 00:00:00.000000000 Z
11
+ date: 2023-05-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 16.10.0.0
89
+ version: 18.16.0.0
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 16.10.0.0
96
+ version: 18.16.0.0
97
97
  description: Minimal embedded v8 engine for Ruby
98
98
  email:
99
99
  - sam.saffron@gmail.com
@@ -103,34 +103,27 @@ extensions:
103
103
  - ext/mini_racer_extension/extconf.rb
104
104
  extra_rdoc_files: []
105
105
  files:
106
- - ".dockerignore"
107
- - ".github/workflows/ci.yml"
108
- - ".gitignore"
109
- - ".travis.yml"
110
106
  - CHANGELOG
111
107
  - CODE_OF_CONDUCT.md
112
- - Dockerfile
113
- - Gemfile
114
108
  - LICENSE.txt
115
109
  - README.md
116
- - Rakefile
117
- - bin/console
118
- - bin/setup
119
110
  - ext/mini_racer_extension/extconf.rb
120
111
  - ext/mini_racer_extension/mini_racer_extension.cc
121
112
  - ext/mini_racer_loader/extconf.rb
122
113
  - ext/mini_racer_loader/mini_racer_loader.c
123
114
  - lib/mini_racer.rb
115
+ - lib/mini_racer/truffleruby.rb
124
116
  - lib/mini_racer/version.rb
125
- - mini_racer.gemspec
117
+ - lib/mini_racer_extension.so
118
+ - lib/mini_racer_loader.so
126
119
  homepage: https://github.com/discourse/mini_racer
127
120
  licenses:
128
121
  - MIT
129
122
  metadata:
130
123
  bug_tracker_uri: https://github.com/discourse/mini_racer/issues
131
- changelog_uri: https://github.com/discourse/mini_racer/blob/v0.6.2/CHANGELOG
132
- documentation_uri: https://www.rubydoc.info/gems/mini_racer/0.6.2
133
- source_code_uri: https://github.com/discourse/mini_racer/tree/v0.6.2
124
+ changelog_uri: https://github.com/discourse/mini_racer/blob/v0.8.0/CHANGELOG
125
+ documentation_uri: https://www.rubydoc.info/gems/mini_racer/0.8.0
126
+ source_code_uri: https://github.com/discourse/mini_racer/tree/v0.8.0
134
127
  post_install_message:
135
128
  rdoc_options: []
136
129
  require_paths:
@@ -140,14 +133,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
140
133
  requirements:
141
134
  - - ">="
142
135
  - !ruby/object:Gem::Version
143
- version: '2.6'
136
+ version: '3.0'
144
137
  required_rubygems_version: !ruby/object:Gem::Requirement
145
138
  requirements:
146
139
  - - ">="
147
140
  - !ruby/object:Gem::Version
148
141
  version: '0'
149
142
  requirements: []
150
- rubygems_version: 3.1.6
143
+ rubygems_version: 3.4.6
151
144
  signing_key:
152
145
  specification_version: 4
153
146
  summary: Minimal embedded v8 for Ruby
data/.dockerignore DELETED
@@ -1,12 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- Gemfile.lock
4
- /_yardoc/
5
- /coverage/
6
- /doc/
7
- /pkg/
8
- /spec/reports/
9
- /tmp/
10
- lib/mini_racer_extension.so
11
- lib/mini_racer_loader.so
12
- *.bundle
@@ -1,78 +0,0 @@
1
- name: Test
2
- on:
3
- - push
4
-
5
- jobs:
6
- test-darwin:
7
- strategy:
8
- fail-fast: false
9
- matrix:
10
- os:
11
- - '10.15'
12
- - '11.0'
13
- platform:
14
- - x86_64
15
- # arm64
16
- name: Test (darwin)
17
- runs-on: macos-${{ matrix.os }}
18
- steps:
19
- - name: Checkout
20
- uses: actions/checkout@v2
21
- - name: Bundle
22
- run: bundle install
23
- - name: Compile
24
- run: bundle exec rake compile
25
- - name: Test
26
- run: bundle exec rake test
27
- test-linux:
28
- strategy:
29
- fail-fast: false
30
- matrix:
31
- ruby:
32
- - '2.6'
33
- - '2.7'
34
- - '3.0'
35
- platform:
36
- - amd64
37
- - arm64
38
- # arm
39
- # ppc64le
40
- # s390x
41
- libc:
42
- - gnu
43
- - musl
44
- name: Test (linux)
45
- runs-on: ubuntu-20.04
46
- steps:
47
- - name: Enable ${{ matrix.platform }} platform
48
- id: qemu
49
- if: ${{ matrix.platform != 'amd64' }}
50
- run: |
51
- docker run --privileged --rm tonistiigi/binfmt:latest --install ${{ matrix.platform }} | tee platforms.json
52
- echo "::set-output name=platforms::$(cat platforms.json)"
53
- - name: Start container
54
- id: container
55
- run: |
56
- case ${{ matrix.libc }} in
57
- gnu)
58
- echo 'ruby:${{ matrix.ruby }}'
59
- ;;
60
- musl)
61
- echo 'ruby:${{ matrix.ruby }}-alpine'
62
- ;;
63
- esac > container_image
64
- echo "::set-output name=image::$(cat container_image)"
65
- docker run --rm -d -v "${PWD}":"${PWD}" -w "${PWD}" --platform linux/${{ matrix.platform }} $(cat container_image) /bin/sleep 64d | tee container_id
66
- docker exec -w "${PWD}" $(cat container_id) uname -a
67
- echo "::set-output name=id::$(cat container_id)"
68
- - name: Install Alpine system dependencies
69
- if: ${{ matrix.libc == 'musl' }}
70
- run: docker exec -w "${PWD}" ${{ steps.container.outputs.id }} apk add --no-cache build-base linux-headers bash python2 python3 git curl tar clang binutils-gold
71
- - name: Checkout
72
- uses: actions/checkout@v2
73
- - name: Bundle
74
- run: docker exec -w "${PWD}" ${{ steps.container.outputs.id }} bundle install
75
- - name: Compile
76
- run: docker exec -w "${PWD}" ${{ steps.container.outputs.id }} bundle exec rake compile
77
- - name: Test
78
- run: docker exec -w "${PWD}" ${{ steps.container.outputs.id }} bundle exec rake test
data/.gitignore DELETED
@@ -1,13 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- Gemfile.lock
4
- /_yardoc/
5
- /coverage/
6
- /doc/
7
- /pkg/
8
- /spec/reports/
9
- /tmp/
10
- lib/mini_racer_extension.so
11
- lib/mini_racer_loader.so
12
- *.bundle
13
- .vscode/
data/.travis.yml DELETED
@@ -1,23 +0,0 @@
1
- language: ruby
2
- os: linux
3
- rvm:
4
- - 2.6
5
- - 2.7
6
- - 3.0
7
- - ruby-head
8
- arch:
9
- - amd64
10
- - arm64
11
- jobs:
12
- include:
13
- - rvm: 2.6
14
- os: osx
15
- osx_image: xcode11.3
16
- - rvm: 2.6
17
- os: osx
18
- osx_image: xcode12.2
19
- - rvm: 2.7
20
- os: osx
21
- osx_image: xcode12.2
22
- dist: xenial
23
- cache: bundler
data/Dockerfile DELETED
@@ -1,21 +0,0 @@
1
- ARG RUBY_VERSION=2.7
2
- FROM ruby:${RUBY_VERSION}
3
-
4
- RUN test ! -f /etc/alpine-release || apk add --no-cache build-base git
5
-
6
- # without this `COPY .git`, we get the following error:
7
- # fatal: not a git repository (or any of the parent directories): .git
8
- # but with it we need the full gem just to compile the extension because
9
- # of gemspec's `git --ls-files`
10
- # COPY .git /code/.git
11
- COPY Gemfile mini_racer.gemspec /code/
12
- COPY lib/mini_racer/version.rb /code/lib/mini_racer/version.rb
13
- WORKDIR /code
14
- RUN bundle install
15
-
16
- COPY Rakefile /code/
17
- COPY ext /code/ext/
18
- RUN bundle exec rake compile
19
-
20
- COPY . /code/
21
- CMD bundle exec irb -rmini_racer
data/Gemfile DELETED
@@ -1,4 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in mini_racer.gemspec
4
- gemspec
data/Rakefile DELETED
@@ -1,96 +0,0 @@
1
- require "bundler/gem_tasks"
2
- require "rake/testtask"
3
- require "rake/extensiontask"
4
-
5
- Rake::TestTask.new(:test) do |t|
6
- t.libs << "test"
7
- t.libs << "lib"
8
- t.test_files = FileList['test/**/*_test.rb']
9
- end
10
-
11
- task :default => [:compile, :test]
12
-
13
- gem = Gem::Specification.load( File.dirname(__FILE__) + '/mini_racer.gemspec' )
14
- Rake::ExtensionTask.new( 'mini_racer_loader', gem )
15
- Rake::ExtensionTask.new( 'mini_racer_extension', gem )
16
-
17
-
18
- # via http://blog.flavorjon.es/2009/06/easily-valgrind-gdb-your-ruby-c.html
19
- namespace :test do
20
- desc "run test suite with Address Sanitizer"
21
- task :asan do
22
- ENV["CONFIGURE_ARGS"] = [ENV["CONFIGURE_ARGS"], '--enable-asan'].compact.join(' ')
23
- Rake::Task['compile'].invoke
24
-
25
- asan_path = `ldconfig -N -p |grep libasan | grep -v 32 | sed 's/.* => \\(.*\\)$/\\1/'`.chomp.split("\n")[-1]
26
-
27
-
28
- cmdline = "env LD_PRELOAD=\"#{asan_path}\" ruby test/test_leak.rb"
29
- puts cmdline
30
- system cmdline
31
-
32
- cmdline = "env LD_PRELOAD=\"#{asan_path}\" rake test"
33
- puts cmdline
34
- system cmdline
35
- end
36
- # partial-loads-ok and undef-value-errors necessary to ignore
37
- # spurious (and eminently ignorable) warnings from the ruby
38
- # interpreter
39
- VALGRIND_BASIC_OPTS = "--num-callers=50 --error-limit=no \
40
- --partial-loads-ok=yes --undef-value-errors=no"
41
-
42
- desc "run test suite under valgrind with basic ruby options"
43
- task :valgrind => :compile do
44
- cmdline = "valgrind #{VALGRIND_BASIC_OPTS} ruby test/test_leak.rb"
45
- puts cmdline
46
- system cmdline
47
- end
48
-
49
- desc "run test suite under valgrind with leak-check=full"
50
- task :valgrind_leak_check => :compile do
51
- cmdline = "valgrind #{VALGRIND_BASIC_OPTS} --leak-check=full ruby test/test_leak.rb"
52
- puts cmdline
53
- require 'open3'
54
- _, stderr = Open3.capture3(cmdline)
55
-
56
- section = ""
57
- stderr.split("\n").each do |line|
58
-
59
- if line =~ /==.*==\s*$/
60
- if (section =~ /mini_racer|SUMMARY/)
61
- puts
62
- puts section
63
- puts
64
- end
65
- section = ""
66
- else
67
- section << line << "\n"
68
- end
69
- end
70
- end
71
- end
72
-
73
- desc 'run clang-tidy linter on mini_racer_extension.cc'
74
- task :lint do
75
- require 'mkmf'
76
- require 'libv8'
77
-
78
- Libv8.configure_makefile
79
-
80
- conf = RbConfig::CONFIG.merge('hdrdir' => $hdrdir.quote, 'srcdir' => $srcdir.quote,
81
- 'arch_hdrdir' => $arch_hdrdir.quote,
82
- 'top_srcdir' => $top_srcdir.quote)
83
- if $universal and (arch_flag = conf['ARCH_FLAG']) and !arch_flag.empty?
84
- conf['ARCH_FLAG'] = arch_flag.gsub(/(?:\G|\s)-arch\s+\S+/, '')
85
- end
86
-
87
- checks = %W(bugprone-*
88
- cert-*
89
- cppcoreguidelines-*
90
- clang-analyzer-*
91
- performance-*
92
- portability-*
93
- readability-*).join(',')
94
-
95
- sh RbConfig::expand("clang-tidy -checks='#{checks}' ext/mini_racer_extension/mini_racer_extension.cc -- #$INCFLAGS #$CXXFLAGS", conf)
96
- end
data/bin/console DELETED
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "mini_racer"
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require "irb"
14
- IRB.start
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
data/mini_racer.gemspec DELETED
@@ -1,39 +0,0 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'mini_racer/version'
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = "mini_racer"
8
- spec.version = MiniRacer::VERSION
9
- spec.authors = ["Sam Saffron"]
10
- spec.email = ["sam.saffron@gmail.com"]
11
-
12
- spec.summary = %q{Minimal embedded v8 for Ruby}
13
- spec.description = %q{Minimal embedded v8 engine for Ruby}
14
- spec.homepage = "https://github.com/discourse/mini_racer"
15
- spec.license = "MIT"
16
-
17
- spec.metadata = {
18
- "bug_tracker_uri" => "https://github.com/discourse/mini_racer/issues",
19
- "changelog_uri" => "https://github.com/discourse/mini_racer/blob/v#{spec.version}/CHANGELOG",
20
- "documentation_uri" => "https://www.rubydoc.info/gems/mini_racer/#{spec.version}",
21
- "source_code_uri" => "https://github.com/discourse/mini_racer/tree/v#{spec.version}",
22
- }
23
-
24
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(benchmark|test|spec|features|examples)/}) }
25
- spec.require_paths = ["lib"]
26
-
27
- spec.add_development_dependency "bundler"
28
- spec.add_development_dependency "rake", ">= 12.3.3"
29
- spec.add_development_dependency "minitest", "~> 5.0"
30
- spec.add_development_dependency "rake-compiler"
31
- spec.add_development_dependency "m"
32
-
33
- spec.add_dependency 'libv8-node', MiniRacer::LIBV8_NODE_VERSION
34
- spec.require_paths = ["lib", "ext"]
35
-
36
- spec.extensions = ["ext/mini_racer_loader/extconf.rb", "ext/mini_racer_extension/extconf.rb"]
37
-
38
- spec.required_ruby_version = '>= 2.6'
39
- end