rubygems-update 0.8.6 → 0.8.8
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.
Potentially problematic release.
This version of rubygems-update might be problematic. Click here for more details.
- data/ChangeLog +134 -0
- data/Rakefile +41 -17
- data/bin/gemwhich +61 -0
- data/examples/application/an-app.gemspec +1 -0
- data/lib/gemconfigure.rb +18 -0
- data/lib/rubygems.rb +65 -47
- data/lib/rubygems/cmd_manager.rb +3 -1
- data/lib/rubygems/command.rb +4 -0
- data/lib/rubygems/config_file.rb +2 -6
- data/lib/rubygems/custom_require.rb +2 -2
- data/lib/rubygems/dependency_list.rb +131 -0
- data/lib/rubygems/deployment.rb +265 -0
- data/lib/rubygems/doc_manager.rb +1 -0
- data/lib/rubygems/gem_commands.rb +216 -15
- data/lib/rubygems/installer.rb +111 -286
- data/lib/rubygems/remote_installer.rb +16 -6
- data/lib/rubygems/rubygems_version.rb +1 -1
- data/lib/rubygems/source_index.rb +11 -5
- data/lib/rubygems/specification.rb +5 -0
- data/lib/rubygems/version.rb +146 -129
- data/test/test_configfile.rb +1 -1
- data/test/test_dependency_list.rb +163 -0
- data/test/test_deployment.rb +93 -0
- data/test/test_remote_fetcher.rb +38 -36
- metadata +23 -47
- data/test/data/a-0.0.1.gem +0 -0
- data/test/data/a-0.0.2.gem +0 -0
- data/test/data/b-0.0.2.gem +0 -0
- data/test/data/c-1.2.gem +0 -0
- data/test/data/gemhome/cache/a-0.0.1.gem +0 -0
- data/test/data/gemhome/cache/a-0.0.2.gem +0 -0
- data/test/data/gemhome/cache/b-0.0.2.gem +0 -0
- data/test/data/gemhome/cache/c-1.2.gem +0 -0
- data/test/data/gemhome/gems/a-0.0.1/lib/code.rb +0 -1
- data/test/data/gemhome/gems/a-0.0.2/lib/code.rb +0 -1
- data/test/data/gemhome/gems/b-0.0.2/lib/code.rb +0 -1
- data/test/data/gemhome/gems/c-1.2/lib/code.rb +0 -1
- data/test/data/gemhome/specifications/a-0.0.1.gemspec +0 -8
- data/test/data/gemhome/specifications/a-0.0.2.gemspec +0 -8
- data/test/data/gemhome/specifications/b-0.0.2.gemspec +0 -8
- data/test/data/gemhome/specifications/c-1.2.gemspec +0 -8
- data/test/data/one/one-0.0.1.gem +0 -0
@@ -0,0 +1,93 @@
|
|
1
|
+
$:.unshift '../lib'
|
2
|
+
require 'test/unit'
|
3
|
+
require 'rubygems'
|
4
|
+
Gem::manage_gems
|
5
|
+
|
6
|
+
class TestDeployment < Test::Unit::TestCase
|
7
|
+
|
8
|
+
DEPLOYMENT_TEST_DIR = "deployment_test"
|
9
|
+
|
10
|
+
def remove_temp_files
|
11
|
+
@filectl.rm_rf(DEPLOYMENT_TEST_DIR) if File.exist?(DEPLOYMENT_TEST_DIR)
|
12
|
+
@filectl.rm_f(Gem::Deployment::Manager::DEPLOYMENTS_DB) if File.exist?(Gem::Deployment::Manager::DEPLOYMENTS_DB)
|
13
|
+
end
|
14
|
+
|
15
|
+
def reset_paths
|
16
|
+
remove_temp_files
|
17
|
+
Dir.mkdir DEPLOYMENT_TEST_DIR
|
18
|
+
end
|
19
|
+
|
20
|
+
def test_deploy_dependencies
|
21
|
+
return unless @rails_gem
|
22
|
+
reset_paths
|
23
|
+
dm = Gem::Deployment::Manager.new
|
24
|
+
deployment = dm.new_deployment(DEPLOYMENT_TEST_DIR)
|
25
|
+
deployment.add_gem(@rails_gem)
|
26
|
+
assert deployment.deployed_gems.size > 1
|
27
|
+
end
|
28
|
+
|
29
|
+
def test_deploy_rails
|
30
|
+
return unless @rails_gem
|
31
|
+
reset_paths
|
32
|
+
dm = Gem::Deployment::Manager.new
|
33
|
+
deployment = dm.new_deployment(DEPLOYMENT_TEST_DIR)
|
34
|
+
deployment.add_gem(@rails_gem)
|
35
|
+
deployment.prepare
|
36
|
+
deployment.deploy
|
37
|
+
dm2 = Gem::Deployment::Manager.new
|
38
|
+
deployment = dm2[DEPLOYMENT_TEST_DIR]
|
39
|
+
|
40
|
+
assert_not_nil deployment
|
41
|
+
assert_equal File.expand_path(DEPLOYMENT_TEST_DIR), deployment.target_directory
|
42
|
+
#puts deployment.deployed_gems.collect {|gem| gem.gem_name}
|
43
|
+
#deployment.fully_deployed?
|
44
|
+
end
|
45
|
+
|
46
|
+
def xtest_deploy_sources
|
47
|
+
reset_paths
|
48
|
+
dm = Gem::Deployment::Manager.new
|
49
|
+
deployment = dm.new_deployment(DEPLOYMENT_TEST_DIR)
|
50
|
+
deployment.add_gem(@sources_gem)
|
51
|
+
deployment2 = dm[DEPLOYMENT_TEST_DIR]
|
52
|
+
assert_not_nil deployment2
|
53
|
+
assert_equal 1, deployment.deployed_gems.size
|
54
|
+
deployed_sources = deployment.deployed_gems[0]
|
55
|
+
assert_equal "sources-0.0.1", deployed_sources.gem_name
|
56
|
+
assert_equal 0, deployed_sources.deployed_files.size
|
57
|
+
deployment.prepare
|
58
|
+
assert_equal 1, deployed_sources.deployed_files.size
|
59
|
+
assert deployed_sources.deployed_files[0].source_path.include?("sources.rb")
|
60
|
+
deployment.deploy
|
61
|
+
assert File.exist?(File.join(DEPLOYMENT_TEST_DIR, "sources.rb"))
|
62
|
+
end
|
63
|
+
|
64
|
+
def test_deployed_file
|
65
|
+
basename = "deploy_#{Time.now.to_i}"
|
66
|
+
source_file = File.expand_path(basename+"1.tmp")
|
67
|
+
dest_file = File.expand_path(basename+"2.tmp")
|
68
|
+
File.open(source_file, "wb") {|file| file.print "Data"}
|
69
|
+
df = Gem::Deployment::DeployedFile.new(source_file, dest_file)
|
70
|
+
assert_equal source_file, df.source_path
|
71
|
+
assert_equal dest_file, df.destination_path
|
72
|
+
assert_nil df.checksum
|
73
|
+
df.prepare
|
74
|
+
assert_equal Digest::SHA1.new("Data").hexdigest, df.checksum
|
75
|
+
df.deploy
|
76
|
+
assert File.exist?(dest_file)
|
77
|
+
assert df.deployed?
|
78
|
+
assert_equal "Data", File.binread(dest_file)
|
79
|
+
@filectl.rm_f source_file
|
80
|
+
@filectl.rm_f dest_file
|
81
|
+
end
|
82
|
+
|
83
|
+
def teardown
|
84
|
+
remove_temp_files
|
85
|
+
end
|
86
|
+
|
87
|
+
def setup
|
88
|
+
@filectl = Object.new
|
89
|
+
@filectl.extend Gem::Deployment::FileOperations
|
90
|
+
@rails_gem = Gem.cache.search("rails").sort.last
|
91
|
+
@sources_gem = Gem.cache.search("sources").sort.last
|
92
|
+
end
|
93
|
+
end
|
data/test/test_remote_fetcher.rb
CHANGED
@@ -37,7 +37,9 @@ class TestRemoteFetcher < Test::Unit::TestCase
|
|
37
37
|
|
38
38
|
def test_explicit_proxy
|
39
39
|
use_ui(MockGemUi.new) do
|
40
|
-
fetcher = Gem::RemoteSourceFetcher.new(
|
40
|
+
fetcher = Gem::RemoteSourceFetcher.new(
|
41
|
+
"http://localhost:12344",
|
42
|
+
"http://localhost:12345")
|
41
43
|
assert_equal PROXY_DATA.size, fetcher.size
|
42
44
|
assert_equal PROXY_DATA, fetcher.fetch_path("/yaml")
|
43
45
|
source_index = fetcher.source_index
|
@@ -114,48 +116,48 @@ class TestRemoteFetcher < Test::Unit::TestCase
|
|
114
116
|
@proxy_server ||= start_server(12345, PROXY_DATA)
|
115
117
|
@enable_yaml = true
|
116
118
|
@enable_zip = false
|
117
|
-
sleep 1
|
118
119
|
end
|
119
120
|
|
120
121
|
private
|
121
122
|
|
122
123
|
def start_server(port, data)
|
123
124
|
Thread.new do
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
125
|
+
begin
|
126
|
+
null_logger = Log.new('/dev/null')
|
127
|
+
s = HTTPServer.new(
|
128
|
+
:Port => port,
|
129
|
+
:DocumentRoot => ".",
|
130
|
+
:Logger => null_logger,
|
131
|
+
:AccessLog => null_logger
|
132
|
+
)
|
133
|
+
s.mount_proc("/kill") { |req, res| s.shutdown }
|
134
|
+
s.mount_proc("/yaml") { |req, res|
|
135
|
+
if @enable_yaml
|
136
|
+
res.body = data
|
137
|
+
res['Content-Type'] = 'text/plain'
|
138
|
+
res['content-length'] = data.size
|
139
|
+
else
|
140
|
+
res.code = "404"
|
141
|
+
res.body = "<h1>NOT FOUND</h1>"
|
142
|
+
res['Content-Type'] = 'text/html'
|
143
|
+
end
|
144
|
+
}
|
145
|
+
s.mount_proc("/yaml.Z") { |req, res|
|
146
|
+
if @enable_zip
|
147
|
+
res.body = Zlib::Deflate.deflate(data)
|
148
|
+
res['Content-Type'] = 'text/plain'
|
149
|
+
else
|
150
|
+
res.code = "404"
|
151
|
+
res.body = "<h1>NOT FOUND</h1>"
|
152
|
+
res['Content-Type'] = 'text/html'
|
153
|
+
end
|
154
|
+
}
|
155
|
+
s.start
|
156
|
+
rescue Exception => ex
|
157
|
+
puts "ERROR during server thread: #{ex.message}"
|
158
|
+
end
|
158
159
|
end
|
160
|
+
sleep 1
|
159
161
|
end
|
160
162
|
end
|
161
163
|
|
metadata
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.8.
|
2
|
+
rubygems_version: 0.8.7.1
|
3
3
|
specification_version: 1
|
4
4
|
name: rubygems-update
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.8.
|
7
|
-
date: 2005-
|
6
|
+
version: 0.8.8
|
7
|
+
date: 2005-03-14
|
8
8
|
summary: RubyGems Update GEM
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -34,6 +34,7 @@ files:
|
|
34
34
|
- README
|
35
35
|
- setup.rb
|
36
36
|
- post-install.rb
|
37
|
+
- bin/gemwhich
|
37
38
|
- bin/gem
|
38
39
|
- bin/gem_server
|
39
40
|
- bin/generate_yaml_index.rb
|
@@ -41,32 +42,33 @@ files:
|
|
41
42
|
- doc/doc.css
|
42
43
|
- doc/makedoc.rb
|
43
44
|
- examples/application
|
44
|
-
- examples/application/an-app.gemspec
|
45
45
|
- examples/application/bin
|
46
46
|
- examples/application/lib
|
47
|
+
- examples/application/an-app.gemspec
|
47
48
|
- examples/application/bin/myapp
|
48
49
|
- examples/application/lib/somefunctionality.rb
|
50
|
+
- gemspecs/ook.gemspec
|
51
|
+
- gemspecs/README
|
49
52
|
- gemspecs/cgikit-1.1.0.gemspec
|
50
53
|
- gemspecs/jabber4r.gemspec
|
51
54
|
- gemspecs/linguistics.gemspec
|
52
|
-
- gemspecs/ook.gemspec
|
53
55
|
- gemspecs/progressbar.gemspec
|
54
|
-
- gemspecs/README
|
55
56
|
- gemspecs/redcloth.gemspec
|
56
57
|
- gemspecs/rublog.gemspec
|
57
58
|
- gemspecs/ruby-doom.gemspec
|
58
59
|
- gemspecs/rubyjdwp.gemspec
|
59
60
|
- gemspecs/statistics.gemspec
|
60
|
-
- lib/rubygems.rb
|
61
61
|
- lib/ubygems.rb
|
62
|
+
- lib/rubygems.rb
|
63
|
+
- lib/gemconfigure.rb
|
64
|
+
- lib/rubygems/specification.rb
|
62
65
|
- lib/rubygems/builder.rb
|
63
|
-
- lib/rubygems/cmd_manager.rb
|
64
66
|
- lib/rubygems/command.rb
|
65
67
|
- lib/rubygems/config_file.rb
|
66
68
|
- lib/rubygems/custom_require.rb
|
67
69
|
- lib/rubygems/doc_manager.rb
|
68
70
|
- lib/rubygems/format.rb
|
69
|
-
- lib/rubygems/
|
71
|
+
- lib/rubygems/cmd_manager.rb
|
70
72
|
- lib/rubygems/gem_runner.rb
|
71
73
|
- lib/rubygems/installer.rb
|
72
74
|
- lib/rubygems/loadpath_manager.rb
|
@@ -76,11 +78,13 @@ files:
|
|
76
78
|
- lib/rubygems/remote_installer.rb
|
77
79
|
- lib/rubygems/rubygems_version.rb
|
78
80
|
- lib/rubygems/source_index.rb
|
79
|
-
- lib/rubygems/
|
81
|
+
- lib/rubygems/deployment.rb
|
80
82
|
- lib/rubygems/timer.rb
|
81
83
|
- lib/rubygems/user_interaction.rb
|
82
84
|
- lib/rubygems/validator.rb
|
83
85
|
- lib/rubygems/version.rb
|
86
|
+
- lib/rubygems/dependency_list.rb
|
87
|
+
- lib/rubygems/gem_commands.rb
|
84
88
|
- pkgs/sources
|
85
89
|
- pkgs/sources/lib
|
86
90
|
- pkgs/sources/sources.gemspec
|
@@ -90,13 +94,13 @@ files:
|
|
90
94
|
- scripts/gemdoc.rb
|
91
95
|
- scripts/runtest.rb
|
92
96
|
- scripts/specdoc.rb
|
93
|
-
- test/bogussources.rb
|
94
97
|
- test/data
|
98
|
+
- test/mock
|
99
|
+
- test/bogussources.rb
|
95
100
|
- test/functional.rb
|
96
101
|
- test/gemenvironment.rb
|
97
102
|
- test/gemutilities.rb
|
98
103
|
- test/insure_session.rb
|
99
|
-
- test/mock
|
100
104
|
- test/mockgemui.rb
|
101
105
|
- test/onegem.rb
|
102
106
|
- test/simple_gem.rb
|
@@ -122,48 +126,20 @@ files:
|
|
122
126
|
- test/testgem.rc
|
123
127
|
- test/user_capture.rb
|
124
128
|
- test/yaml_data.rb
|
125
|
-
- test/
|
126
|
-
- test/
|
127
|
-
- test/data/b-0.0.2.gem
|
128
|
-
- test/data/c-1.2.gem
|
129
|
-
- test/data/gemhome
|
129
|
+
- test/test_dependency_list.rb
|
130
|
+
- test/test_deployment.rb
|
130
131
|
- test/data/gems
|
132
|
+
- test/data/one
|
131
133
|
- test/data/legacy
|
132
134
|
- test/data/lib
|
133
|
-
- test/data/one
|
134
|
-
- test/data/gemhome/cache
|
135
|
-
- test/data/gemhome/doc
|
136
|
-
- test/data/gemhome/gems
|
137
|
-
- test/data/gemhome/specifications
|
138
|
-
- test/data/gemhome/cache/a-0.0.1.gem
|
139
|
-
- test/data/gemhome/cache/a-0.0.2.gem
|
140
|
-
- test/data/gemhome/cache/b-0.0.2.gem
|
141
|
-
- test/data/gemhome/cache/c-1.2.gem
|
142
|
-
- test/data/gemhome/gems/a-0.0.1
|
143
|
-
- test/data/gemhome/gems/a-0.0.2
|
144
|
-
- test/data/gemhome/gems/b-0.0.2
|
145
|
-
- test/data/gemhome/gems/c-1.2
|
146
|
-
- test/data/gemhome/gems/a-0.0.1/lib
|
147
|
-
- test/data/gemhome/gems/a-0.0.1/lib/code.rb
|
148
|
-
- test/data/gemhome/gems/a-0.0.2/lib
|
149
|
-
- test/data/gemhome/gems/a-0.0.2/lib/code.rb
|
150
|
-
- test/data/gemhome/gems/b-0.0.2/lib
|
151
|
-
- test/data/gemhome/gems/b-0.0.2/lib/code.rb
|
152
|
-
- test/data/gemhome/gems/c-1.2/lib
|
153
|
-
- test/data/gemhome/gems/c-1.2/lib/code.rb
|
154
|
-
- test/data/gemhome/specifications/a-0.0.1.gemspec
|
155
|
-
- test/data/gemhome/specifications/a-0.0.2.gemspec
|
156
|
-
- test/data/gemhome/specifications/b-0.0.2.gemspec
|
157
|
-
- test/data/gemhome/specifications/c-1.2.gemspec
|
158
|
-
- test/data/legacy/keyedlist-0.4.0.ruby
|
159
|
-
- test/data/legacy/keyedlist-0.4.0.yaml
|
160
|
-
- test/data/lib/code.rb
|
161
135
|
- test/data/one/lib
|
162
|
-
- test/data/one/one
|
136
|
+
- test/data/one/README.one
|
163
137
|
- test/data/one/one.gemspec
|
164
138
|
- test/data/one/one.yaml
|
165
|
-
- test/data/one/README.one
|
166
139
|
- test/data/one/lib/one.rb
|
140
|
+
- test/data/legacy/keyedlist-0.4.0.ruby
|
141
|
+
- test/data/legacy/keyedlist-0.4.0.yaml
|
142
|
+
- test/data/lib/code.rb
|
167
143
|
- test/mock/gems
|
168
144
|
- test/mock/gems/cache
|
169
145
|
- test/mock/gems/doc
|
data/test/data/a-0.0.1.gem
DELETED
Binary file
|
data/test/data/a-0.0.2.gem
DELETED
Binary file
|
data/test/data/b-0.0.2.gem
DELETED
Binary file
|
data/test/data/c-1.2.gem
DELETED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -1 +0,0 @@
|
|
1
|
-
CODE = 1
|
@@ -1 +0,0 @@
|
|
1
|
-
CODE = 1
|
@@ -1 +0,0 @@
|
|
1
|
-
CODE = 1
|
@@ -1 +0,0 @@
|
|
1
|
-
CODE = 1
|
data/test/data/one/one-0.0.1.gem
DELETED
Binary file
|