debase-ruby_core_source 0.7.10 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -1
- data/lib/debase/ruby_core_source.rb +35 -1
- data/lib/debase/ruby_core_source/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ee4c036d55334addd16c584406a61e95f4c33d5
|
4
|
+
data.tar.gz: 247c0675c53e6df660b35ae8c7d31da7552b33bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1aacabec300f013c38e5e482651c49a4f8ea604c8ff101c14cb7055b6c2c7dcfea34d69d9f595b9c32fc745ec81cfed4c3b36a670d6e802136cc1a3cbec7b000
|
7
|
+
data.tar.gz: 97c3db3e0f5f848ba26d114840e89f100594c010a0eee107a37493af2bc253f270b14d7212d915ff009910f219c6ee297a95da7feec454bde46816c4c4edcd51
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
## [0.8.0](https::/github.com/os97673/debase-ruby_core_source/compare/v0.7.10...v0.8.0)
|
2
|
+
|
3
|
+
* previous version of ruby is used if there is no headers for the
|
4
|
+
current one.
|
5
|
+
|
1
6
|
## [0.7.10](https://github.com/os97673/debase-ruby_core_source/compare/v0.7.9...v0.7.10)
|
2
7
|
|
3
8
|
* ruby 2.2.3 added
|
@@ -67,7 +72,7 @@
|
|
67
72
|
* gem required ruby ~> 2.0
|
68
73
|
* sources for < 2.0 removed
|
69
74
|
|
70
|
-
## 0.1.0
|
75
|
+
## 0.1.0
|
71
76
|
|
72
77
|
* Initial release - gem renamed to debase-ruby_source_code, Debugger module renamed to Debase
|
73
78
|
* sources for 2.1.3 and 2.2.0-preview1 added
|
@@ -39,7 +39,7 @@ module Debase
|
|
39
39
|
end
|
40
40
|
|
41
41
|
# Look for sources that ship with gem
|
42
|
-
dest_dir =
|
42
|
+
dest_dir = deduce_packaged_source_dir(ruby_dir)
|
43
43
|
no_source_abort(ruby_dir) unless File.directory?(dest_dir)
|
44
44
|
|
45
45
|
with_cppflags("-I" + dest_dir) {
|
@@ -51,6 +51,40 @@ module Debase
|
|
51
51
|
return false
|
52
52
|
end
|
53
53
|
|
54
|
+
def self.deduce_packaged_source_dir(ruby_dir)
|
55
|
+
prefix = File.dirname(__FILE__) + '/ruby_core_source/'
|
56
|
+
expected_directory = prefix + ruby_dir
|
57
|
+
if File.directory?(expected_directory)
|
58
|
+
expected_directory
|
59
|
+
else
|
60
|
+
# Fallback to an older version.
|
61
|
+
ruby_version = Gem::Version.new(RUBY_VERSION)
|
62
|
+
path, = Dir.glob(prefix + 'ruby-*').
|
63
|
+
select { |d| File.directory?(d) }.
|
64
|
+
map { |d| [d, ruby_source_dir_version(d)] }.
|
65
|
+
sort { |(_, v1), (_, v2)| -(v1 <=> v2) }.
|
66
|
+
find { |(_, v)| v < ruby_version }
|
67
|
+
|
68
|
+
version = File.basename(path)
|
69
|
+
fallback_source_warning(ruby_dir, version)
|
70
|
+
path
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
def self.ruby_source_dir_version(dir)
|
75
|
+
match = /ruby-([0-9\.]+)-p([0-9]+)/.match(dir)
|
76
|
+
Gem::Version.new("#{match[1]}.#{match[2]}")
|
77
|
+
end
|
78
|
+
|
79
|
+
def self.fallback_source_warning(ruby_version, fallback_version)
|
80
|
+
warn <<-STR
|
81
|
+
**************************************************************************
|
82
|
+
No source for #{ruby_version} provided with debase-ruby_core_source gem.
|
83
|
+
Falling back to #{fallback_version}.
|
84
|
+
**************************************************************************
|
85
|
+
STR
|
86
|
+
end
|
87
|
+
|
54
88
|
def self.no_source_abort(ruby_version)
|
55
89
|
abort <<-STR
|
56
90
|
Makefile creation failed
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: debase-ruby_core_source
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Moseley
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2015-08
|
13
|
+
date: 2015-10-08 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: archive-tar-minitar
|
@@ -1078,7 +1078,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1078
1078
|
version: 1.3.6
|
1079
1079
|
requirements: []
|
1080
1080
|
rubyforge_project:
|
1081
|
-
rubygems_version: 2.
|
1081
|
+
rubygems_version: 2.4.3
|
1082
1082
|
signing_key:
|
1083
1083
|
specification_version: 4
|
1084
1084
|
summary: Provide Ruby core source files
|