lib-ruby-parser 1.0.0-x86_64-linux → 4.0.3.1-x86_64-linux

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: 3b865bd520186c6b5ad002626994309720d1242a0ecac29432e1bb257fb34710
4
- data.tar.gz: afade9734c6e6a4426c5b4c3b585372f3b893561629178c01ae7c2cbb8457ffe
3
+ metadata.gz: 7764901f13ab83cf4adcc61a3274509305aa2fba63bc0f31ec61d514aa4f3def
4
+ data.tar.gz: b3285289b4a44528d20cc724ac3f6e85a1afb684ffd20a650a0ca72ea8fe4401
5
5
  SHA512:
6
- metadata.gz: 48ae514318629559b51c36e4d45a1f4f27b71fd30409064b3303628b012965879d31813fee01d5596dc45025dbbcbe340442d42b151443fcf3e7aae1ab84ac43
7
- data.tar.gz: 6e0906bb9404cc27cd95b6152d22daafadfc32a99d02ea0f9016809dda3ec82e8084444deeaffe8f76e90b96005aee050615d65b7f7edac6ec72ce83b750c176
6
+ metadata.gz: e635b5691127525b5294a42e7a6be94e94c90f616daad6031f9e09d9503cf1afeb40537a917c771fb1623bdc7c9edfaf135d905faa63c7f8280e1ffae6d1bc20
7
+ data.tar.gz: 8d6c22a98c8e004ca707c70911730285536df43fc7528512f640d29cf062e8779c57a169e362f733d6cd706dc6ccdaa7f938e2accecf724dec1d2300233a78e2
@@ -1,4 +1,4 @@
1
1
  module LibRubyParser
2
- # Version of the lib-ruby-parser + monotonically increasing ".N"
3
- VERSION = '1.0.0'
2
+ # Version of the lib-ruby-parser
3
+ VERSION = '4.0.3.1'
4
4
  end
@@ -293,22 +293,31 @@ require_relative './lib-ruby-parser/messages'
293
293
 
294
294
  require 'rbconfig'
295
295
 
296
- os = RbConfig::CONFIG['host_os']
297
296
  ruby_version = Gem::Version.new(RUBY_VERSION).segments.first(2).join('.')
298
-
299
- case ruby_version
300
- when '3.0', '2.7', '2.6'
301
- # ok
302
- else
303
- warn "[lib-ruby-parser] You are running on windows/mingw with Ruby #{ruby_version}."
304
- warn '[lib-ruby-parser] This version has not been tested, so it may crash.'
297
+ unless ['3.2', '3.1', '3.0'].include?(ruby_version)
298
+ raise "[lib-ruby-parser] Unsupported ruby-version #{ruby_version}"
305
299
  end
306
300
 
307
- case os
308
- when /mingw/
309
- require_relative "./lib-ruby-parser/native/#{ruby_version}/lib_ruby_parser"
310
- when /darwin/, /linux/
311
- require_relative './lib-ruby-parser/native/lib_ruby_parser'
312
- else
313
- raise "[lib-ruby-parser] Unsupported OS '#{os}'"
314
- end
301
+ os = RbConfig::CONFIG['host_os']
302
+ is_windows = !!(os =~ /mingw/)
303
+ is_darwin = !!(os =~ /darwin/)
304
+ is_linux = !!(os =~ /linux/)
305
+
306
+ cpu = RbConfig::CONFIG['host_cpu']
307
+ is_x86_64 = cpu == 'x86_64' || cpu == 'x64'
308
+ is_arm64 = ['arm64', 'aarch64'].include?(cpu)
309
+
310
+ triplet =
311
+ if is_darwin && is_x86_64
312
+ 'x86_64-apple-darwin'
313
+ elsif is_darwin && is_arm64
314
+ 'aarch64-apple-darwin'
315
+ elsif is_linux && is_x86_64
316
+ 'x86_64-unknown-linux-gnu'
317
+ elsif is_windows && is_x86_64
318
+ 'x86_64-pc-windows-gnu'
319
+ else
320
+ raise "[lib-ruby-parser] Unsupported os/cpu combination '#{os}'/'#{cpu}'"
321
+ end
322
+
323
+ require_relative "./lib-ruby-parser/native/#{triplet}/#{ruby_version}/lib_ruby_parser"
@@ -26,7 +26,9 @@ Gem::Specification.new do |spec|
26
26
  'lib/lib-ruby-parser/version.rb',
27
27
  'lib/lib-ruby-parser/messages.rb',
28
28
  'lib/lib-ruby-parser/nodes.rb',
29
- 'lib/lib-ruby-parser/native/lib_ruby_parser.so',
29
+ 'lib/lib-ruby-parser/native/x86_64-unknown-linux-gnu/3.2/lib_ruby_parser.so',
30
+ 'lib/lib-ruby-parser/native/x86_64-unknown-linux-gnu/3.1/lib_ruby_parser.so',
31
+ 'lib/lib-ruby-parser/native/x86_64-unknown-linux-gnu/3.0/lib_ruby_parser.so',
30
32
  ]
31
33
  spec.bindir = 'exe'
32
34
  spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lib-ruby-parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 4.0.3.1
5
5
  platform: x86_64-linux
6
6
  authors:
7
7
  - Ilya Bylich
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-05-07 00:00:00.000000000 Z
11
+ date: 2023-03-21 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Ruby bindings for lib-ruby-parser.
14
14
  email:
@@ -21,7 +21,9 @@ files:
21
21
  - lib-ruby-parser.gemspec
22
22
  - lib/lib-ruby-parser.rb
23
23
  - lib/lib-ruby-parser/messages.rb
24
- - lib/lib-ruby-parser/native/lib_ruby_parser.so
24
+ - lib/lib-ruby-parser/native/x86_64-unknown-linux-gnu/3.0/lib_ruby_parser.so
25
+ - lib/lib-ruby-parser/native/x86_64-unknown-linux-gnu/3.1/lib_ruby_parser.so
26
+ - lib/lib-ruby-parser/native/x86_64-unknown-linux-gnu/3.2/lib_ruby_parser.so
25
27
  - lib/lib-ruby-parser/nodes.rb
26
28
  - lib/lib-ruby-parser/version.rb
27
29
  homepage: https://github.com/lib-ruby-parser/ruby-bindings
@@ -45,7 +47,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
45
47
  - !ruby/object:Gem::Version
46
48
  version: '0'
47
49
  requirements: []
48
- rubygems_version: 3.3.7
50
+ rubygems_version: 3.4.6
49
51
  signing_key:
50
52
  specification_version: 4
51
53
  summary: Ruby parser written in Rust.