faster_rubygems 0.5.3 → 0.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README +13 -14
- data/VERSION +1 -1
- data/lib/faster_rubygems/install.rb +2 -31
- data/lib/faster_rubygems/install_helper.rb +31 -0
- data/lib/faster_rubygems/uninstall.rb +2 -0
- metadata +110 -101
data/README
CHANGED
@@ -25,27 +25,26 @@ $ gem install faster_rubygems
|
|
25
25
|
|
26
26
|
== usage ==
|
27
27
|
|
28
|
-
|
29
|
-
$ export RUBYOPTS=-rfaster_rubygems
|
28
|
+
require 'faster_rubygems' at the top of your script.
|
30
29
|
|
31
|
-
|
30
|
+
Or
|
32
31
|
|
33
|
-
|
34
|
-
|
32
|
+
1.9:
|
33
|
+
$ export RUBYOPTS=-rfaster_rubygems
|
35
34
|
|
36
|
-
|
37
|
-
|
38
|
-
>> FasterRubyGems.install_over_rubygems! # installs this to be the default for rubygems
|
35
|
+
1.8:
|
36
|
+
you can install it to be used by default thus:
|
39
37
|
|
38
|
+
>> require 'rubygems'
|
39
|
+
>> require 'faster_rubygems/install' # installs faster_rubygems to be use in place of normal rubygems when you do a "require 'rubygems'"
|
40
40
|
|
41
|
-
# later, to revert back to normal, should you so desire:
|
42
|
-
>> require 'rubygems'
|
43
|
-
>> require 'faster_rubygems/
|
44
|
-
>> FasterRubyGems.uninstall_over_rubygems!
|
41
|
+
# later, to revert back to normal, should you so desire:
|
42
|
+
>> require 'rubygems'
|
43
|
+
>> require 'faster_rubygems/uninstall'
|
45
44
|
|
46
|
-
If all else fails, you can reinstall rubygems by running setup.rb from within its package
|
45
|
+
If all else fails in this process (it typically works fine), you can reinstall normal rubygems by running setup.rb from within its package.
|
47
46
|
|
48
|
-
== More Speed Comparisons ==
|
47
|
+
== More Speed Comparisons ==
|
49
48
|
|
50
49
|
For those interested, speed difference example on linux (250 gems):
|
51
50
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.4
|
@@ -1,31 +1,2 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
def self.install_over_rubygems!
|
4
|
-
raise 'only needed on 1.8 -- for 1.9 you have to \n $ export RUBYOPT=$RUBYOPT -rfaster_rubygems' if RUBY_VERSION >= '1.9.0'
|
5
|
-
require 'fileutils'
|
6
|
-
old = rubygems_path
|
7
|
-
new = old + ".bak.rb"
|
8
|
-
raise 'cannot install twice' if File.exist?(new)
|
9
|
-
FileUtils.cp old, new
|
10
|
-
File.open(old, 'w') do |f|
|
11
|
-
f.write "require 'faster_rubygems'"
|
12
|
-
end
|
13
|
-
'success--it will load by default in place of normal rubygems'
|
14
|
-
end
|
15
|
-
|
16
|
-
def self.rubygems_path
|
17
|
-
Gem::Dependency
|
18
|
-
raise unless $LOADED_FEATURES.include? "rubygems.rb"
|
19
|
-
# now go and look for it
|
20
|
-
$:.detect{|path| File.exist?(path + '/rubygems.rb') || File.exist?(path + '/rubygems.bak.rb')} + "/rubygems.rb"
|
21
|
-
end
|
22
|
-
|
23
|
-
def self.uninstall_over_rubygems!
|
24
|
-
raise 'only needed on 1.8' if RUBY_VERSION >= '1.9.0'
|
25
|
-
require 'fileutils'
|
26
|
-
old = rubygems_path + ".bak.rb"
|
27
|
-
FileUtils.cp old, rubygems_path
|
28
|
-
File.delete old
|
29
|
-
'success!'
|
30
|
-
end
|
31
|
-
end
|
1
|
+
require File.dirname(__FILE__) + '/install_helper'
|
2
|
+
FasterRubyGems.install_over_rubygems!
|
@@ -0,0 +1,31 @@
|
|
1
|
+
|
2
|
+
module FasterRubyGems
|
3
|
+
def self.install_over_rubygems!
|
4
|
+
raise 'only needed on 1.8 -- for 1.9 you have to \n $ export RUBYOPT=$RUBYOPT -rfaster_rubygems' if RUBY_VERSION >= '1.9.0'
|
5
|
+
require 'fileutils'
|
6
|
+
old = rubygems_path
|
7
|
+
new = old + ".bak.rb"
|
8
|
+
raise 'cannot install twice--please uninstall first' if File.exist?(new)
|
9
|
+
FileUtils.cp old, new
|
10
|
+
File.open(old, 'w') do |f|
|
11
|
+
f.write "require 'faster_rubygems'"
|
12
|
+
end
|
13
|
+
puts 'success--it will load by default in place of normal rubygems'
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.rubygems_path
|
17
|
+
Gem::Dependency
|
18
|
+
raise unless $LOADED_FEATURES.include? "rubygems.rb"
|
19
|
+
# now go and look for it
|
20
|
+
$:.detect{|path| File.exist?(path + '/rubygems.rb') || File.exist?(path + '/rubygems.rb.bak.rb')} + "/rubygems.rb"
|
21
|
+
end
|
22
|
+
|
23
|
+
def self.uninstall_over_rubygems!
|
24
|
+
raise 'only needed on 1.8' if RUBY_VERSION >= '1.9.0'
|
25
|
+
require 'fileutils'
|
26
|
+
old = rubygems_path + ".bak.rb"
|
27
|
+
FileUtils.cp old, rubygems_path
|
28
|
+
File.delete old
|
29
|
+
puts 'successfully reverted back to normal rubygems'
|
30
|
+
end
|
31
|
+
end
|
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: faster_rubygems
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 3
|
4
5
|
prerelease: false
|
5
6
|
segments:
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
version: 0.5.
|
7
|
+
- 0
|
8
|
+
- 5
|
9
|
+
- 4
|
10
|
+
version: 0.5.4
|
10
11
|
platform: ruby
|
11
12
|
authors: []
|
12
13
|
|
@@ -17,91 +18,97 @@ cert_chain: []
|
|
17
18
|
date: 2010-06-21 00:00:00 -06:00
|
18
19
|
default_executable:
|
19
20
|
dependencies:
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
name: test-unit
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - "="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 25
|
30
|
+
segments:
|
31
|
+
- 1
|
32
|
+
- 2
|
33
|
+
- 3
|
34
|
+
version: 1.2.3
|
35
|
+
type: :development
|
36
|
+
version_requirements: *id001
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: test-unit
|
39
|
+
prerelease: false
|
40
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - "="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
hash: 3
|
46
|
+
segments:
|
47
|
+
- 2
|
48
|
+
- 0
|
49
|
+
- 6
|
50
|
+
version: 2.0.6
|
51
|
+
type: :development
|
52
|
+
version_requirements: *id002
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
name: after
|
55
|
+
prerelease: false
|
56
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - "="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
hash: 3
|
62
|
+
segments:
|
63
|
+
- 0
|
64
|
+
- 7
|
65
|
+
- 0
|
66
|
+
version: 0.7.0
|
67
|
+
type: :development
|
68
|
+
version_requirements: *id003
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: sane
|
71
|
+
prerelease: false
|
72
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ">="
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
hash: 3
|
78
|
+
segments:
|
79
|
+
- 0
|
80
|
+
version: "0"
|
81
|
+
type: :development
|
82
|
+
version_requirements: *id004
|
78
83
|
description:
|
79
84
|
email:
|
80
85
|
executables: []
|
81
86
|
|
82
87
|
extensions:
|
83
|
-
|
88
|
+
- ext/mkrf_conf.rb
|
84
89
|
extra_rdoc_files:
|
85
|
-
|
90
|
+
- README
|
86
91
|
files:
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
92
|
+
- README
|
93
|
+
- Rakefile
|
94
|
+
- VERSION
|
95
|
+
- examples/require_fast_start.rb
|
96
|
+
- examples/require_rubygems_normal.rb
|
97
|
+
- ext/mkrf_conf.rb
|
98
|
+
- internalize.rb
|
99
|
+
- lib/faster_rubygems.rb
|
100
|
+
- lib/faster_rubygems/install.rb
|
101
|
+
- lib/faster_rubygems/install_helper.rb
|
102
|
+
- lib/faster_rubygems/uninstall.rb
|
103
|
+
- lib/frubygems.rb
|
104
|
+
- lib/my_defaults.rb
|
105
|
+
- lib/my_gem_prelude.rb
|
106
|
+
- lib/prelude_bin_path.rb
|
107
|
+
- spec/common.rb
|
108
|
+
- spec/files/test_gem.rb
|
109
|
+
- spec/files/test_gem_const.rb
|
110
|
+
- spec/files/test_gem_func.rb
|
111
|
+
- spec/spec.faster_rubygems_cacheing.rb
|
105
112
|
has_rdoc: true
|
106
113
|
homepage:
|
107
114
|
licenses: []
|
@@ -118,25 +125,27 @@ post_install_message: |+
|
|
118
125
|
>> FasterRubyGems.install_over_rubygems!
|
119
126
|
|
120
127
|
rdoc_options:
|
121
|
-
|
128
|
+
- --charset=UTF-8
|
122
129
|
require_paths:
|
123
|
-
|
130
|
+
- lib
|
124
131
|
required_ruby_version: !ruby/object:Gem::Requirement
|
125
132
|
none: false
|
126
133
|
requirements:
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
134
|
+
- - ">="
|
135
|
+
- !ruby/object:Gem::Version
|
136
|
+
hash: 3
|
137
|
+
segments:
|
138
|
+
- 0
|
139
|
+
version: "0"
|
132
140
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
133
141
|
none: false
|
134
142
|
requirements:
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
hash: 3
|
146
|
+
segments:
|
147
|
+
- 0
|
148
|
+
version: "0"
|
140
149
|
requirements: []
|
141
150
|
|
142
151
|
rubyforge_project:
|
@@ -145,10 +154,10 @@ signing_key:
|
|
145
154
|
specification_version: 3
|
146
155
|
summary: faster gem loading
|
147
156
|
test_files:
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
157
|
+
- spec/common.rb
|
158
|
+
- spec/files/test_gem.rb
|
159
|
+
- spec/files/test_gem_const.rb
|
160
|
+
- spec/files/test_gem_func.rb
|
161
|
+
- spec/spec.faster_rubygems_cacheing.rb
|
162
|
+
- examples/require_fast_start.rb
|
163
|
+
- examples/require_rubygems_normal.rb
|