rogerdpack-ruby_core_ri 0.1.8 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/ruby_core_source.rb +19 -11
- metadata +9 -3
data/lib/ruby_core_source.rb
CHANGED
@@ -45,7 +45,14 @@ end
|
|
45
45
|
def download_headers hdrs, dest_dir = nil, just_headers = true, existing_pre_unpacked_dir = nil
|
46
46
|
|
47
47
|
ruby_dir = ""
|
48
|
+
ruby_version = RUBY_VERSION[0..-2]
|
49
|
+
if RUBY_VERSION >= '1.9'
|
50
|
+
ruby_version = '1.8' # for the latest 1.8.7 patch, for now [see below]
|
51
|
+
end
|
52
|
+
|
48
53
|
if RUBY_PATCHLEVEL < 0
|
54
|
+
# some type of svn checkout
|
55
|
+
# try to use mark's lookup
|
49
56
|
Tempfile.open("preview-revision") { |temp|
|
50
57
|
uri = URI.parse("http://cloud.github.com/downloads/mark-moseley/ruby_core_source/preview_revision.yml")
|
51
58
|
uri.download(temp)
|
@@ -54,23 +61,24 @@ def download_headers hdrs, dest_dir = nil, just_headers = true, existing_pre_unp
|
|
54
61
|
return false if ruby_dir.nil?
|
55
62
|
}
|
56
63
|
else
|
57
|
-
ruby_dir = "ruby-" + RUBY_VERSION.to_s + "-p" + RUBY_PATCHLEVEL.to_s
|
58
|
-
end
|
59
64
|
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
return dest_dir
|
65
|
+
version = RUBY_VERSION.to_s
|
66
|
+
patch_level = RUBY_PATCHLEVEL.to_s
|
67
|
+
if RUBY_VERSION >= '1.9'
|
68
|
+
$stderr.puts 'installing 1.8.7 source, since rdoc doesn\'t work on 1.9 core source yet'
|
69
|
+
version = '1.8.7'
|
70
|
+
patch_level = '160'
|
67
71
|
end
|
68
|
-
|
72
|
+
|
73
|
+
ruby_dir = "ruby-" + version + "-p" + patch_level
|
74
|
+
end
|
75
|
+
|
76
|
+
|
69
77
|
|
70
78
|
#
|
71
79
|
# Download the source headers
|
72
80
|
#
|
73
|
-
uri_path = "http://ftp.ruby-lang.org/pub/ruby/" +
|
81
|
+
uri_path = "http://ftp.ruby-lang.org/pub/ruby/" + ruby_version + "/" + ruby_dir + ".tar.gz"
|
74
82
|
Tempfile.open("ruby-src") { |temp|
|
75
83
|
temp.binmode
|
76
84
|
uri = URI.parse(uri_path)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rogerdpack-ruby_core_ri
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Moseley
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2009-09-
|
13
|
+
date: 2009-09-23 00:00:00 -07:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -60,7 +60,13 @@ files:
|
|
60
60
|
has_rdoc: false
|
61
61
|
homepage: http://github.com/rogerdpack
|
62
62
|
licenses:
|
63
|
-
post_install_message:
|
63
|
+
post_install_message: |+
|
64
|
+
|
65
|
+
|
66
|
+
Almost done--please run the command
|
67
|
+
$ ruby_core_ri # run this
|
68
|
+
to install the core source locally
|
69
|
+
|
64
70
|
rdoc_options:
|
65
71
|
- --charset=UTF-8
|
66
72
|
require_paths:
|