ruby_core_ri 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
data/README CHANGED
@@ -1,20 +1,14 @@
1
- ruby_core_ri
1
+ ruby_core_ri gem
2
2
 
3
- Installs the ri for Ruby's core docs for your current version, even if they didn't come with your distro.
4
-
5
- This utility is for those of us whose ruby distros are lacking in core RI. For example.
3
+ This utility is for those whose ruby distros are lacking the core RI (ex: mingw). For example, if you get this:
6
4
 
7
5
  $ ri File
8
6
  Nothing known about File
9
7
 
10
- $
11
8
 
12
- now becomes
9
+ After installing this gem, you will get the following:
13
10
 
14
11
  $ ri File
15
-
16
-
17
-
18
12
  --------------------------------------------------- Class: File < Object
19
13
 
20
14
  FTOOLS.RB: EXTRA TOOLS FOR THE FILE CLASS
@@ -23,18 +17,36 @@ FTOOLS.RB: EXTRA TOOLS FOR THE FILE CLASS
23
17
  Author: WATANABE, Hirofumi
24
18
 
25
19
  Documentation: Zachary Landau
26
- ...
27
-
28
- $
20
+ ... [etc.]
29
21
 
22
+ The gem downloads the source for your current Ruby version, then does a gem --ri
23
+ against your version, thus installing the ri for Ruby's core docs locally.
30
24
 
31
- This is quite helpful for those of us who want to use ri for core classes. For me, at least, ri is quite useless without it.
25
+ This is quite helpful for those of us who want to use ri for core classes.
32
26
 
33
27
  == Installation (takes a little while) ==
34
28
 
35
- $ gem install ruby_core_ri --source=http://gemcutter.org
36
- $ install_ruby_core_ri # download core's source, ri's it locally for you
29
+ * For all versions:
30
+
31
+ $ gem install ruby_core_ri
32
+ $ ruby_core_ri # download your distro's sources, ri's them locally
33
+
34
+ * Note: for 1.9 users you have to install rdoc > 2.4.3 for it to work. To do so (until it is released):
35
+
36
+ $ gem install specific_install
37
+ $ gem specific_install -l http://github.com/downloads/rdp/ruby_core_ri/rdoc-2.4.9a.gem
38
+
39
+ Also for windows 1.9 users, you may have to manually go into your install and delete the file "test/ruby/test_sprintf.rb"
40
+ ex: C:\Ruby19\lib\ruby\gems\1.9.1\gems\ruby_core_ri-0.4.0\lib\downloaded_full_source>rm test/ruby/test_sprintf.rb (and then clear your cache--see below)
41
+
42
+ == Trouble Shooting ==
43
+
44
+ With gems v 1.3.6, it "refuses to regenerate" ri and rdoc (even on failed installs of the same).
37
45
 
46
+ So if you do an install and "nothing happens":
47
+ $ gem rdoc --no-rdoc --ri ruby_core_ri
48
+
49
+ $ # note lack of output, above
50
+ Then you may have to uninstall the gem, or remove your C:\Ruby19\lib\ruby\gems\1.9.1\doc\ruby_core_ri-0.4.0 directory before running ruby_core_ri again.
38
51
 
39
- == Known issues ==
40
- You may need to uninstall the mislav-hanna gem first, if installed.
52
+ You may also need to uninstall the mislav-hanna gem first, if you have it installed (which is probably rare).
data/Rakefile CHANGED
@@ -8,4 +8,14 @@
8
8
  s.add_development_dependency 'rspec'
9
9
  s.add_development_dependency 'sane'
10
10
  s.add_dependency 'backports'
11
+ s.add_dependency 'archive-tar-minitar'
12
+ # hopefully a warning is enough...
13
+ s.add_dependency 'rdoc', '>=2.4.3' # 1.9 needs > ... see README
14
+ s.post_install_message = "Please run
15
+
16
+ $ ruby_core_ri
17
+
18
+ To install the docs locally.
19
+ "
20
+
11
21
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.4.0
data/bin/ruby_core_ri CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
- require 'ruby_core_ri/ruby_core_source'
2
+ require 'ruby_core_ri/ruby_core_ri'
3
3
 
4
4
  # sanity check
5
5
  myself = Gem.source_index.find_name('ruby_core_ri')
@@ -10,9 +10,9 @@ myself = myself[0]
10
10
  # put it in a generic dir, until I can figure out how to get gem rdoc to accept it from elsewhere
11
11
  to_dir = myself.full_gem_path + "/lib/downloaded_full_source"
12
12
  puts "installing your full source (for rdoc/ri purposes) to #{to_dir}"
13
- Ruby_core_source.download_headers nil, to_dir, false
13
+ Ruby_core_source.download_headers nil, to_dir, false # my call
14
14
 
15
- command = "gem rdoc --no-rdoc --ri ruby_core_ri"
16
- puts "downloading--extracting out the ri via " + command
15
+ command = "gem rdoc --no-rdoc --ri ruby_core_ri" # note -- if this does nothing, it means "rubygems is cacheing your failed output" [I think]
16
+ puts "downloaded--extracting out the ri via [" + command + "]"
17
17
 
18
- system command
18
+ system command
File without changes
@@ -46,8 +46,9 @@ def download_headers hdrs, dest_dir = nil, just_headers = true, existing_pre_unp
46
46
 
47
47
  ruby_dir = ""
48
48
  ruby_version = RUBY_VERSION[0..-3]
49
+
49
50
  if RUBY_VERSION >= '1.9'
50
- ruby_version = '1.8' # for the latest 1.8.7 patch, for now [see below]
51
+ puts "Warning: if this fails, you may need to install rdoc > 2.4.3 see http://github.com/rdp/ruby_core_ri"
51
52
  end
52
53
 
53
54
  if RUBY_PATCHLEVEL < 0
@@ -63,13 +64,7 @@ def download_headers hdrs, dest_dir = nil, just_headers = true, existing_pre_unp
63
64
  else
64
65
 
65
66
  version = RUBY_VERSION.to_s
66
- patch_level = RUBY_PATCHLEVEL.to_s
67
- if RUBY_VERSION >= '1.9'
68
- $stderr.puts 'WARNING: installing the 1.8.7 source, since ri doesn\'t work on 1.9 core source quite yet'
69
- version = '1.8.7'
70
- patch_level = '160'
71
- end
72
-
67
+ patch_level = RUBY_PATCHLEVEL.to_s
73
68
  ruby_dir = "ruby-" + version + "-p" + patch_level
74
69
  end
75
70
 
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_core_ri
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 4
8
+ - 0
9
+ version: 0.4.0
5
10
  platform: ruby
6
11
  authors:
7
12
  - Roger Pack
@@ -9,39 +14,71 @@ autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
16
 
12
- date: 2010-01-16 00:00:00 -07:00
17
+ date: 2010-03-29 00:00:00 -06:00
13
18
  default_executable: ruby_core_ri
14
19
  dependencies:
15
20
  - !ruby/object:Gem::Dependency
16
21
  name: rspec
17
- type: :development
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
20
24
  requirements:
21
25
  - - ">="
22
26
  - !ruby/object:Gem::Version
27
+ segments:
28
+ - 0
23
29
  version: "0"
24
- version:
30
+ type: :development
31
+ version_requirements: *id001
25
32
  - !ruby/object:Gem::Dependency
26
33
  name: sane
27
- type: :development
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
34
+ prerelease: false
35
+ requirement: &id002 !ruby/object:Gem::Requirement
30
36
  requirements:
31
37
  - - ">="
32
38
  - !ruby/object:Gem::Version
39
+ segments:
40
+ - 0
33
41
  version: "0"
34
- version:
42
+ type: :development
43
+ version_requirements: *id002
35
44
  - !ruby/object:Gem::Dependency
36
45
  name: backports
46
+ prerelease: false
47
+ requirement: &id003 !ruby/object:Gem::Requirement
48
+ requirements:
49
+ - - ">="
50
+ - !ruby/object:Gem::Version
51
+ segments:
52
+ - 0
53
+ version: "0"
37
54
  type: :runtime
38
- version_requirement:
39
- version_requirements: !ruby/object:Gem::Requirement
55
+ version_requirements: *id003
56
+ - !ruby/object:Gem::Dependency
57
+ name: archive-tar-minitar
58
+ prerelease: false
59
+ requirement: &id004 !ruby/object:Gem::Requirement
40
60
  requirements:
41
61
  - - ">="
42
62
  - !ruby/object:Gem::Version
63
+ segments:
64
+ - 0
43
65
  version: "0"
44
- version:
66
+ type: :runtime
67
+ version_requirements: *id004
68
+ - !ruby/object:Gem::Dependency
69
+ name: rdoc
70
+ prerelease: false
71
+ requirement: &id005 !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ segments:
76
+ - 2
77
+ - 4
78
+ - 3
79
+ version: 2.4.3
80
+ type: :runtime
81
+ version_requirements: *id005
45
82
  description:
46
83
  email: rogerdpack@gmail.com
47
84
  executables:
@@ -55,14 +92,15 @@ files:
55
92
  - Rakefile
56
93
  - VERSION
57
94
  - bin/ruby_core_ri
95
+ - lib/ruby_core_ri.rb
58
96
  - lib/ruby_core_ri/contrib/progressbar.rb
59
97
  - lib/ruby_core_ri/contrib/uri_ext.rb
60
- - lib/ruby_core_ri/ruby_core_source.rb
98
+ - lib/ruby_core_ri/ruby_core_ri.rb
61
99
  has_rdoc: true
62
100
  homepage: http://github.com/rdp/ruby_core_ri
63
101
  licenses: []
64
102
 
65
- post_install_message:
103
+ post_install_message: "Please run \n \n $ ruby_core_ri\n \n To install the docs locally.\n "
66
104
  rdoc_options:
67
105
  - --charset=UTF-8
68
106
  require_paths:
@@ -71,18 +109,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
71
109
  requirements:
72
110
  - - ">="
73
111
  - !ruby/object:Gem::Version
112
+ segments:
113
+ - 0
74
114
  version: "0"
75
- version:
76
115
  required_rubygems_version: !ruby/object:Gem::Requirement
77
116
  requirements:
78
117
  - - ">="
79
118
  - !ruby/object:Gem::Version
119
+ segments:
120
+ - 0
80
121
  version: "0"
81
- version:
82
122
  requirements: []
83
123
 
84
124
  rubyforge_project:
85
- rubygems_version: 1.3.5
125
+ rubygems_version: 1.3.6
86
126
  signing_key:
87
127
  specification_version: 3
88
128
  summary: A gem to make it possible to have the core ri/rdoc (especially useful if your distro didn't include it)