sqreen 1.14.0.beta2 → 1.14.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: c8e9f7d6787e8f84192ab7de4e2303173c9f814077bb6a5c41191c01aa623197
4
- data.tar.gz: 8595c7521b0eea3f48325c83d3795933396f8d97757cf32b191cce9406f17857
3
+ metadata.gz: f1a88f697fb1155fa5e354c753604e97c9446944d2c8b7c75ed8aebbb586845a
4
+ data.tar.gz: c7440ae2799d091d33a75c5b29c8d583a041335ab5b0597820388349368bf0a2
5
5
  SHA512:
6
- metadata.gz: 4fe53b581644f98930b896ff9c88d1698db0686bcf4476b48ee5f1150cb9e3e36888120a8d423c838a82adb7d6282399d805012c0e78a155c67f02cad0052b64
7
- data.tar.gz: 7acd6d40325af57610b1b90062e877c0b145f19d6f4ee47dad209aebcea9df2efb42ad1e0f87beea04aab3838aa56e52f0652299b809ebf7a98463d0cb91e9a7
6
+ metadata.gz: 64b3110988d5e5360640fb189b947320f58eb7a075cc70d39e37abc8df2802444063dc573755a1a50b47d3c9952ca4ccdf9b2272f11d82fbf689fc8e5bd6a971
7
+ data.tar.gz: 62d4e5e3f8b07b6d0aaa502decc9ff5a62fdbd1dd4a1709d37614bc70b776ddd31436587bb38200d101b9b5728e792993737d066092b3ae4a7df4c44d9b9ca33
@@ -28,36 +28,11 @@ module Sqreen
28
28
  private
29
29
 
30
30
  def detect_adapter
31
- if Sqreen.features['isolated_mini_racer'] || ENV['SQREEN_FORCE_SQ_MINI_RACER']
32
- @online = try_sq_mini_racer
33
- else
34
- @online = try_mini_racer || try_rhino || try_therubyracer
35
- end
31
+ @online = try_sq_mini_racer || try_rhino
36
32
 
37
33
  Sqreen.log.info "JS engine online: #{variant}" if @online
38
34
  end
39
35
 
40
- def try_mini_racer
41
- gem = Gem.loaded_specs['mini_racer']
42
- unless gem
43
- Sqreen.log.info "mini_racer gem not detected"
44
- return false
45
- end
46
- unless gem.version >= Gem::Version.create('0.1.15') &&
47
- gem.version < Gem::Version.create('2.0')
48
- Sqreen.log.warn 'mini_racer won\'t be used because its version is' \
49
- "#{gem.version}; not >= 0.1.15, < 2.0"
50
- return false
51
- end
52
-
53
- require 'mini_racer'
54
- require 'sqreen/js/mini_racer_adapter'
55
- @adapter = MiniRacerAdapter.new
56
- rescue LoadError => e
57
- Sqreen.log.warn "Failed loading mini_racer: #{e}"
58
- false
59
- end
60
-
61
36
  def try_sq_mini_racer
62
37
  gem = Gem.loaded_specs['sq_mini_racer']
63
38
  unless gem
@@ -87,27 +62,6 @@ module Sqreen
87
62
  Sqreen.log.warn "Failed loading rhino: #{e}"
88
63
  false
89
64
  end
90
-
91
- def try_therubyracer
92
- gem = Gem.loaded_specs['therubyracer']
93
- unless gem
94
- Sqreen.log.info "therubyracer gem not detected"
95
- return false
96
- end
97
- unless gem.version >= Gem::Version.create('0.12.1')
98
- Sqreen.log.warn 'therubyracer won\'t be used because its version is ' \
99
- "#{gem.version}; not >= 0.12.1"
100
- return false
101
- end
102
-
103
- require 'therubyracer'
104
- require 'sqreen/js/execjs_adapter'
105
- @adapter = ExecjsAdapter.new
106
- rescue LoadError => e
107
- Sqreen.log.warn "Failed loading therubyracer: #{e}"
108
- false
109
- end
110
-
111
65
  end
112
66
 
113
67
  CallContext = Struct.new(:inst, :args, :rv)
@@ -7,6 +7,7 @@ module Sqreen
7
7
  class MiniRacerAdapter < JsServiceAdapter
8
8
  def initialize(vendored = false)
9
9
  @vendored = vendored
10
+ self.class.static_init
10
11
  end
11
12
 
12
13
  def preprocess(_rule_name, code)
@@ -16,6 +17,12 @@ module Sqreen
16
17
  def variant_name
17
18
  @vendored ? 'sq_mini_racer' : 'mini_racer'
18
19
  end
20
+
21
+ def self.static_init
22
+ return if @done_static_init
23
+ Sqreen::MiniRacer::Platform.set_flags! :noconcurrent_recompilation
24
+ @done_static_init = true
25
+ end
19
26
  end
20
27
 
21
28
  # Auxiliary classes
@@ -1,5 +1,5 @@
1
1
  # Copyright (c) 2015 Sqreen. All Rights Reserved.
2
2
  # Please refer to our terms for more information: https://www.sqreen.io/terms.html
3
3
  module Sqreen
4
- VERSION = '1.14.0.beta2'.freeze
4
+ VERSION = '1.14.0.beta3'.freeze
5
5
  end
metadata CHANGED
@@ -1,57 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sqreen
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.14.0.beta2
4
+ version: 1.14.0.beta3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sqreen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-20 00:00:00.000000000 Z
11
+ date: 2018-09-06 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: execjs
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: 0.3.0
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: 0.3.0
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: sq_mini_racer
29
15
  requirement: !ruby/object:Gem::Requirement
30
16
  requirements:
31
17
  - - "~>"
32
18
  - !ruby/object:Gem::Version
33
- version: 0.2.0.beta1
19
+ version: 0.2.0.beta3
34
20
  type: :runtime
35
21
  prerelease: false
36
22
  version_requirements: !ruby/object:Gem::Requirement
37
23
  requirements:
38
24
  - - "~>"
39
25
  - !ruby/object:Gem::Version
40
- version: 0.2.0.beta1
41
- - !ruby/object:Gem::Dependency
42
- name: therubyracer
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: 0.12.1
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: 0.12.1
26
+ version: 0.2.0.beta3
55
27
  description: Sqreen is a SaaS based Application protection and monitoring platform
56
28
  that integrates directly into your Ruby applications. Learn more at https://sqreen.io.
57
29
  email: contact@sqreen.io