sq_mini_racer 0.2.0.beta2 → 0.2.0.beta3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 65b4056233ba1d99be6825857054e8b9eee2453c46c3e4c6431d2a158814c86c
4
- data.tar.gz: 64e99c3e4c0377382cbadc36a44ba1492edb7e5d39d3c56078f0cdb2640438a4
3
+ metadata.gz: 1a99c5ed3e33dfd07476a7253922cc9c3f9883acc5b1609294c764835cd1e85a
4
+ data.tar.gz: ac449e5f8972f479e18d175fcb4cc35feb526022d50a7bbc101850468a05f866
5
5
  SHA512:
6
- metadata.gz: 5ae861aaaa02dd06cedadf043799d8949979524c0e6fe8f77222101da8dd03f34300dc98d881f3390f3281842806459ccbd2a8c47660d32b077d8a6f27dec915
7
- data.tar.gz: 8c52c12fcc7b9de6955a522eee1928ea80af768e3555625bf2f5e5e3aaabfa108ec1af2c1662c0eb36490c4429b909489111115d38dea585b5a5780c5f6f84c9
6
+ metadata.gz: e5d98113a974be0f12cfb65e4231ff107b1591b0c7a3adc04fa5f8fc047fae783cb316b2a51c38af258f5114152802e337d75f88c4204267e1e1cfcd3ff034c2
7
+ data.tar.gz: aa2bf6b4e16a5fd0f1fc33b975516b1b91f9954f03d38e432fce22fcbcffb5a2242b341c619cb02dc77642f935f56e873079b87960f00ccd63605c7329f7089f
@@ -28,14 +28,19 @@ matrix:
28
28
  - os: linux
29
29
  dist: trusty
30
30
  sudo: true
31
+ env:
32
+ - LOAD_MINI_RACER=1
33
+ rvm: 2.5
34
+ - os: linux
35
+ dist: trusty
36
+ sudo: true
37
+ env:
38
+ - LOAD_THERUBYRACER=1
31
39
  rvm: 2.5
32
40
  - os: linux
33
41
  dist: trusty
34
42
  sudo: true
35
43
  rvm: ruby-head
36
- - os: osx
37
- osx_image: xcode6.4
38
- rvm: 2.1
39
44
  - os: osx
40
45
  osx_image: xcode7.3
41
46
  rvm: 2.1
@@ -48,9 +53,6 @@ matrix:
48
53
  - os: osx
49
54
  osx_image: xcode9.4
50
55
  rvm: 2.1
51
- - os: osx
52
- osx_image: xcode10
53
- rvm: 1.9
54
56
  - os: osx
55
57
  osx_image: xcode10
56
58
  rvm: 2.3
@@ -12,7 +12,7 @@ $CPPFLAGS += " -fpermissive"
12
12
  $CPPFLAGS += " -fno-omit-frame-pointer"
13
13
  $CPPFLAGS += " -Wno-reserved-user-defined-literal" if RUBY_PLATFORM =~ /darwin/
14
14
 
15
- $LDFLAGS.insert 0, " -stdlib=libstdc++ " if RUBY_PLATFORM =~ /darwin/
15
+ $LDFLAGS.insert 0, $1.to_i < 18 ? " -stdlib=libstdc++ " : " -stdlib=libc++ " if RUBY_PLATFORM =~ /darwin(\d+)/
16
16
 
17
17
  if ENV['CXX']
18
18
  puts "SETTING CXX"
@@ -51,12 +51,22 @@ if enable_config('debug')
51
51
  CONFIG['debugflags'] << ' -ggdb3 -O0'
52
52
  end
53
53
 
54
+ def fixup_libtinfo
55
+ dirs = %w[/lib64 /usr/lib64 /lib /usr/lib]
56
+ found_v5 = dirs.map { |d| "#{d}/libtinfo.so.5" }.find &File.method(:file?)
57
+ return '' if found_v5
58
+ found_v6 = dirs.map { |d| "#{d}/libtinfo.so.6" }.find &File.method(:file?)
59
+ return '' unless found_v6
60
+ FileUtils.ln_s found_v6, 'gemdir/libtinfo.so.5', :force => true
61
+ "LD_LIBRARY_PATH='#{File.expand_path('gemdir')}:#{ENV['LD_LIBRARY_PATH']}"
62
+ end
63
+
54
64
  LIBV8_VERSION = '6.7.288.46.1'
55
65
  libv8_rb = Dir.glob('**/libv8.rb').first
56
66
  FileUtils.mkdir_p('gemdir')
57
67
  unless libv8_rb
58
68
  puts "Will try downloading libv8 gem, version #{LIBV8_VERSION}"
59
- `gem install --version '= #{LIBV8_VERSION}' --install-dir gemdir libv8`
69
+ `#{fixup_libtinfo} gem install --version '= #{LIBV8_VERSION}' --install-dir gemdir libv8`
60
70
  unless $?.success?
61
71
  warn <<EOS
62
72
 
@@ -570,6 +570,13 @@ static VALUE rb_snapshot_load(VALUE self, VALUE str) {
570
570
  return Qnil;
571
571
  }
572
572
 
573
+ static VALUE rb_snapshot_dump(VALUE self, VALUE str) {
574
+ SnapshotInfo* snapshot_info;
575
+ Data_Get_Struct(self, SnapshotInfo, snapshot_info);
576
+
577
+ return rb_str_new(snapshot_info->data, snapshot_info->raw_size);
578
+ }
579
+
573
580
  static VALUE rb_snapshot_warmup_unsafe(VALUE self, VALUE str) {
574
581
  SnapshotInfo* snapshot_info;
575
582
  Data_Get_Struct(self, SnapshotInfo, snapshot_info);
@@ -1406,6 +1413,7 @@ extern "C" {
1406
1413
  rb_define_alloc_func(rb_cExternalFunction, allocate_external_function);
1407
1414
 
1408
1415
  rb_define_method(rb_cSnapshot, "size", (VALUE(*)(...))&rb_snapshot_size, 0);
1416
+ rb_define_method(rb_cSnapshot, "dump", (VALUE(*)(...))&rb_snapshot_dump, 0);
1409
1417
  rb_define_method(rb_cSnapshot, "warmup_unsafe!", (VALUE(*)(...))&rb_snapshot_warmup_unsafe, 1);
1410
1418
  rb_define_private_method(rb_cSnapshot, "load", (VALUE(*)(...))&rb_snapshot_load, 1);
1411
1419
 
@@ -1,5 +1,5 @@
1
1
  module Sqreen
2
2
  module MiniRacer
3
- VERSION = "0.2.0.beta2"
3
+ VERSION = "0.2.0.beta3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sq_mini_racer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0.beta2
4
+ version: 0.2.0.beta3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Saffron
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-08-28 00:00:00.000000000 Z
11
+ date: 2018-09-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler