bigdecimal 3.1.2 → 3.1.4

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: e9f1adb536b8ac302d4fbf06879d28687d3007aa2f0e3bf886af0ef4f8224c97
4
- data.tar.gz: 5d4b4c5a4f7251d582ac518cafb381fefaebc20f10b6247a065d68365e4a025f
3
+ metadata.gz: 4107ae2a3ed84ad02b56f2f57c31087185545454e53089e8176a23bd829c5177
4
+ data.tar.gz: 392489743d1863336597fc19039c1fd0077c5735b096de799f8adf61a5c29dbe
5
5
  SHA512:
6
- metadata.gz: b675d99a66877492caa8da094dfab99e4af68c4f53db1a4b796d896a5e2623be476594c149fe8a5a1b7f9290aee1b8499eb06202ee64e9f487c7221ef603693f
7
- data.tar.gz: 754b623ee17b5ba432c39a19250bf838531f81a2cce8ceb3f1fb2d8469da31a8f94ed2e02e4d2fad24e451c2ee25529e95519f00dc9db3c935535b7ff4eaf016
6
+ metadata.gz: 337fb13844251d627cecd341da3bc0a23b0addcc0b83f49f76e3fc0796852e24d71291712b270c79e3cb9e729bd2d831e4ca303a46dd4c7446404de6175b1f86
7
+ data.tar.gz: 4d2b9734294ff4f154df4012bd8f21964e3627b29ade7c716079ad6a74c19713a0a0a287cb57315d642cac7fe9b521db21104e9ea89eef745babcf292b7a67d2
data/bigdecimal.gemspec CHANGED
@@ -1,28 +1,29 @@
1
1
  # coding: utf-8
2
2
 
3
+ name = File.basename(__FILE__, '.*')
4
+ source_version = ["", "ext/#{name}/"].find do |dir|
5
+ begin
6
+ break File.foreach(File.join(__dir__, "#{dir}#{name}.c")) {|line|
7
+ break $1.sub("-", ".") if /^#define\s+#{name.upcase}_VERSION\s+"(.+)"/o =~ line
8
+ }
9
+ rescue Errno::ENOENT
10
+ end
11
+ end or raise "can't find #{name.upcase}_VERSION"
12
+
3
13
  Gem::Specification.new do |s|
4
- s.name = "bigdecimal"
5
- s.version = "3.1.2"
14
+ s.name = name
15
+ s.version = source_version
6
16
  s.authors = ["Kenta Murata", "Zachary Scott", "Shigeo Kobayashi"]
7
17
  s.email = ["mrkn@mrkn.jp"]
8
18
 
9
19
  s.summary = "Arbitrary-precision decimal floating-point number library."
10
20
  s.description = "This library provides arbitrary-precision decimal floating-point number class."
11
21
  s.homepage = "https://github.com/ruby/bigdecimal"
12
- s.license = "Ruby"
22
+ s.licenses = ["Ruby", "BSD-2-Clause"]
13
23
 
14
24
  s.require_paths = %w[lib]
15
- s.extensions = %w[ext/bigdecimal/extconf.rb]
16
25
  s.files = %w[
17
26
  bigdecimal.gemspec
18
- ext/bigdecimal/bigdecimal.c
19
- ext/bigdecimal/bigdecimal.h
20
- ext/bigdecimal/bits.h
21
- ext/bigdecimal/feature.h
22
- ext/bigdecimal/missing.c
23
- ext/bigdecimal/missing.h
24
- ext/bigdecimal/missing/dtoa.c
25
- ext/bigdecimal/static_assert.h
26
27
  lib/bigdecimal.rb
27
28
  lib/bigdecimal/jacobian.rb
28
29
  lib/bigdecimal/ludcmp.rb
@@ -33,6 +34,21 @@ Gem::Specification.new do |s|
33
34
  sample/nlsolve.rb
34
35
  sample/pi.rb
35
36
  ]
37
+ if Gem::Platform === s.platform and s.platform =~ 'java' or RUBY_ENGINE == 'jruby'
38
+ s.platform = 'java'
39
+ else
40
+ s.extensions = %w[ext/bigdecimal/extconf.rb]
41
+ s.files += %w[
42
+ ext/bigdecimal/bigdecimal.c
43
+ ext/bigdecimal/bigdecimal.h
44
+ ext/bigdecimal/bits.h
45
+ ext/bigdecimal/feature.h
46
+ ext/bigdecimal/missing.c
47
+ ext/bigdecimal/missing.h
48
+ ext/bigdecimal/missing/dtoa.c
49
+ ext/bigdecimal/static_assert.h
50
+ ]
51
+ end
36
52
 
37
53
  s.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
38
54
  end