rubygems-update 0.9.4 → 0.9.5
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of rubygems-update might be problematic. Click here for more details.
- data/ChangeLog +587 -0
- data/README +0 -1
- data/Rakefile +39 -12
- data/TODO +0 -5
- data/bin/gem +7 -7
- data/bin/update_rubygems +1 -1
- data/examples/application/an-app.gemspec +1 -1
- data/gemspecs/cgikit-1.1.0.gemspec +1 -2
- data/gemspecs/jabber4r.gemspec +1 -1
- data/gemspecs/linguistics.gemspec +1 -1
- data/gemspecs/ook.gemspec +1 -1
- data/gemspecs/progressbar.gemspec +1 -1
- data/gemspecs/redcloth.gemspec +1 -1
- data/gemspecs/rublog.gemspec +1 -1
- data/gemspecs/ruby-doom.gemspec +1 -1
- data/gemspecs/rubyjdwp.gemspec +1 -1
- data/gemspecs/statistics.gemspec +1 -1
- data/lib/rubygems.rb +167 -105
- data/lib/rubygems/builder.rb +12 -10
- data/lib/rubygems/command.rb +177 -60
- data/lib/rubygems/command_manager.rb +30 -38
- data/lib/rubygems/commands/build_command.rb +42 -46
- data/lib/rubygems/commands/cert_command.rb +72 -69
- data/lib/rubygems/commands/check_command.rb +63 -63
- data/lib/rubygems/commands/cleanup_command.rb +25 -7
- data/lib/rubygems/commands/contents_command.rb +70 -62
- data/lib/rubygems/commands/dependency_command.rb +131 -86
- data/lib/rubygems/commands/environment_command.rb +67 -46
- data/lib/rubygems/commands/fetch_command.rb +62 -0
- data/lib/rubygems/commands/generate_index_command.rb +57 -0
- data/lib/rubygems/commands/help_command.rb +163 -73
- data/lib/rubygems/commands/install_command.rb +114 -128
- data/lib/rubygems/commands/list_command.rb +10 -8
- data/lib/rubygems/commands/lock_command.rb +101 -0
- data/lib/rubygems/commands/mirror_command.rb +105 -0
- data/lib/rubygems/commands/outdated_command.rb +24 -15
- data/lib/rubygems/commands/pristine_command.rb +118 -88
- data/lib/rubygems/commands/query_command.rb +109 -77
- data/lib/rubygems/commands/rdoc_command.rb +13 -10
- data/lib/rubygems/commands/search_command.rb +10 -8
- data/lib/rubygems/commands/server_command.rb +48 -0
- data/lib/rubygems/commands/sources_command.rb +104 -83
- data/lib/rubygems/commands/specification_command.rb +65 -51
- data/lib/rubygems/commands/uninstall_command.rb +17 -12
- data/lib/rubygems/commands/unpack_command.rb +68 -68
- data/lib/rubygems/commands/update_command.rb +72 -25
- data/lib/rubygems/commands/which_command.rb +86 -0
- data/lib/rubygems/config_file.rb +202 -78
- data/lib/rubygems/custom_require.rb +7 -88
- data/lib/rubygems/dependency.rb +65 -0
- data/lib/rubygems/dependency_installer.rb +232 -0
- data/lib/rubygems/dependency_list.rb +133 -105
- data/lib/rubygems/digest/md5.rb +4 -1
- data/lib/rubygems/digest/sha2.rb +1 -1
- data/lib/rubygems/doc_manager.rb +41 -19
- data/lib/rubygems/exceptions.rb +63 -0
- data/lib/rubygems/ext.rb +18 -0
- data/lib/rubygems/ext/builder.rb +56 -0
- data/lib/rubygems/ext/configure_builder.rb +24 -0
- data/lib/rubygems/ext/ext_conf_builder.rb +23 -0
- data/lib/rubygems/ext/rake_builder.rb +27 -0
- data/lib/rubygems/format.rb +16 -6
- data/lib/rubygems/gem_openssl.rb +43 -6
- data/lib/rubygems/gem_path_searcher.rb +84 -0
- data/lib/rubygems/gem_runner.rb +20 -5
- data/lib/rubygems/indexer.rb +163 -0
- data/lib/rubygems/indexer/abstract_index_builder.rb +80 -0
- data/lib/rubygems/indexer/marshal_index_builder.rb +17 -0
- data/lib/rubygems/indexer/master_index_builder.rb +53 -0
- data/lib/rubygems/indexer/quick_index_builder.rb +48 -0
- data/lib/rubygems/install_update_options.rb +87 -0
- data/lib/rubygems/installer.rb +316 -562
- data/lib/rubygems/local_remote_options.rb +106 -0
- data/lib/rubygems/old_format.rb +5 -13
- data/lib/rubygems/open-uri.rb +2 -0
- data/lib/rubygems/package.rb +28 -32
- data/lib/rubygems/platform.rb +187 -0
- data/lib/rubygems/remote_fetcher.rb +46 -29
- data/lib/rubygems/remote_installer.rb +11 -18
- data/lib/rubygems/requirement.rb +157 -0
- data/lib/rubygems/rubygems_version.rb +1 -1
- data/lib/rubygems/security.rb +715 -457
- data/lib/rubygems/server.rb +77 -59
- data/lib/rubygems/source_index.rb +154 -83
- data/lib/rubygems/source_info_cache.rb +73 -30
- data/lib/rubygems/source_info_cache_entry.rb +12 -3
- data/lib/rubygems/specification.rb +378 -145
- data/lib/rubygems/uninstaller.rb +183 -0
- data/lib/rubygems/user_interaction.rb +38 -9
- data/lib/rubygems/validator.rb +53 -24
- data/lib/rubygems/version.rb +126 -289
- data/lib/rubygems/version_option.rb +49 -0
- data/pkgs/sources/lib/sources.rb +1 -4
- data/pkgs/sources/sources.gemspec +3 -3
- data/scripts/gemdoc.rb +0 -1
- data/setup.rb +166 -1505
- data/test/bogussources.rb +0 -1
- data/test/data/gem-private_key.pem +27 -0
- data/test/data/gem-public_cert.pem +20 -0
- data/test/functional.rb +3 -105
- data/test/gemutilities.rb +145 -24
- data/test/insure_session.rb +0 -1
- data/test/{test_datadir.rb → test_config.rb} +7 -13
- data/test/test_gem.rb +360 -9
- data/test/test_gem_builder.rb +34 -0
- data/test/{test_command.rb → test_gem_command.rb} +119 -62
- data/test/{test_parse_commands.rb → test_gem_command_manager.rb} +64 -40
- data/test/test_gem_commands_build_command.rb +75 -0
- data/test/test_gem_commands_cert_command.rb +122 -0
- data/test/test_gem_commands_check_command.rb +25 -0
- data/test/test_gem_commands_contents_command.rb +92 -0
- data/test/test_gem_commands_dependency_command.rb +108 -0
- data/test/test_gem_commands_environment_command.rb +117 -0
- data/test/test_gem_commands_fetch_command.rb +34 -0
- data/test/test_gem_commands_generate_index_command.rb +32 -0
- data/test/test_gem_commands_install_command.rb +160 -0
- data/test/test_gem_commands_mirror_command.rb +56 -0
- data/test/test_gem_commands_pristine_command.rb +100 -0
- data/test/test_gem_commands_query_command.rb +82 -0
- data/test/test_gem_commands_sources_command.rb +147 -0
- data/test/test_gem_commands_specification_command.rb +93 -0
- data/test/test_gem_commands_unpack_command.rb +55 -0
- data/test/test_gem_config_file.rb +210 -0
- data/test/test_gem_dependency.rb +89 -0
- data/test/test_gem_dependency_installer.rb +542 -0
- data/test/test_gem_dependency_list.rb +212 -0
- data/test/test_gem_doc_manager.rb +32 -0
- data/test/test_gem_ext_configure_builder.rb +13 -17
- data/test/test_gem_ext_ext_conf_builder.rb +9 -9
- data/test/test_gem_ext_rake_builder.rb +23 -11
- data/test/test_gem_format.rb +69 -0
- data/test/test_gem_gem_path_searcher.rb +57 -0
- data/test/test_gem_gem_runner.rb +35 -0
- data/test/test_gem_indexer.rb +119 -0
- data/test/test_gem_install_update_options.rb +40 -0
- data/test/test_gem_installer.rb +796 -0
- data/test/test_gem_local_remote_options.rb +84 -0
- data/test/test_gem_outdated_command.rb +11 -9
- data/test/test_gem_platform.rb +240 -0
- data/test/{test_remote_fetcher.rb → test_gem_remote_fetcher.rb} +124 -55
- data/test/{test_remote_installer.rb → test_gem_remote_installer.rb} +3 -4
- data/test/test_gem_requirement.rb +223 -0
- data/test/test_gem_server.rb +71 -0
- data/test/test_gem_source_index.rb +429 -0
- data/test/test_gem_source_info_cache.rb +79 -17
- data/test/test_gem_source_info_cache_entry.rb +11 -9
- data/test/test_gem_specification.rb +738 -0
- data/test/test_gem_stream_ui.rb +117 -0
- data/test/test_gem_validator.rb +70 -0
- data/test/test_gem_version.rb +191 -0
- data/test/test_gem_version_option.rb +77 -0
- data/test/{test_require_gem.rb → test_kernel.rb} +19 -12
- data/test/test_open_uri.rb +1 -2
- data/test/test_package.rb +45 -34
- metadata +116 -141
- data/Releases +0 -127
- data/bin/gem_mirror +0 -73
- data/bin/gem_server +0 -6
- data/bin/gemlock +0 -127
- data/bin/gemri +0 -24
- data/bin/gemwhich +0 -89
- data/bin/index_gem_repository.rb +0 -302
- data/lib/gemconfigure.rb +0 -24
- data/lib/rubygems/gem_commands.rb +0 -273
- data/pkgs/sources/sources-0.0.1.gem +0 -0
- data/post-install.rb +0 -121
- data/test/brokenbuildgem.rb +0 -35
- data/test/data/PostMessage-0.0.1.gem +0 -0
- 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/broken-1.0.0.gem +0 -0
- data/test/data/broken_build/broken-build.gemspec +0 -20
- data/test/data/broken_build/ext/extconf.rb +0 -3
- data/test/data/broken_build/ext/foo.c +0 -1
- 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/legacy/keyedlist-0.4.0.ruby +0 -11
- data/test/data/legacy/keyedlist-0.4.0.yaml +0 -16
- data/test/data/lib/code.rb +0 -1
- data/test/data/one/README.one +0 -1
- data/test/data/one/lib/one.rb +0 -9
- data/test/data/one/one-0.0.1.gem +0 -0
- data/test/data/one/one.gemspec +0 -17
- data/test/data/one/one.yaml +0 -40
- data/test/data/post_install.gemspec +0 -19
- data/test/functional_extension_gems.rb +0 -48
- data/test/functional_generate_yaml_index.rb +0 -104
- data/test/gemenvironment.rb +0 -59
- data/test/io_capture.rb +0 -33
- data/test/mock/gems/gems/sources-0.0.1/lib/sources.rb +0 -11
- data/test/mock/gems/specifications/sources-0.0.1.gemspec +0 -8
- data/test/onegem.rb +0 -35
- data/test/test_builder.rb +0 -34
- data/test/test_check_command.rb +0 -34
- data/test/test_configfile.rb +0 -42
- data/test/test_dependency_list.rb +0 -169
- data/test/test_file_list.rb +0 -101
- data/test/test_format.rb +0 -49
- data/test/test_gem_sources_command.rb +0 -135
- data/test/test_gemloadpaths.rb +0 -51
- data/test/test_gempaths.rb +0 -170
- data/test/test_installer.rb +0 -369
- data/test/test_loadmanager.rb +0 -48
- data/test/test_process_commands.rb +0 -52
- data/test/test_source_index.rb +0 -231
- data/test/test_specific_extras.rb +0 -46
- data/test/test_specification.rb +0 -565
- data/test/test_user_interaction.rb +0 -48
- data/test/test_validator.rb +0 -59
- data/test/test_version_comparison.rb +0 -321
- data/test/testgem.rc +0 -7
- data/test/user_capture.rb +0 -7
- data/test/yaml_data.rb +0 -63
Binary file
|
data/post-install.rb
DELETED
@@ -1,121 +0,0 @@
|
|
1
|
-
#--
|
2
|
-
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
|
3
|
-
# All rights reserved.
|
4
|
-
# See LICENSE.txt for permissions.
|
5
|
-
#++
|
6
|
-
|
7
|
-
require 'rbconfig'
|
8
|
-
|
9
|
-
def run_rdoc(*args)
|
10
|
-
args << '--quiet'
|
11
|
-
args << '--main' << 'README'
|
12
|
-
args << '.' << 'README' << 'LICENSE.txt' << 'GPL.txt'
|
13
|
-
|
14
|
-
r = RDoc::RDoc.new
|
15
|
-
r.document args
|
16
|
-
end
|
17
|
-
|
18
|
-
def remove_stubs
|
19
|
-
is_apparent_stub = lambda { |path|
|
20
|
-
break unless File.readable? path
|
21
|
-
File.read(path, 40) =~ /^# This file was generated by RubyGems/ and
|
22
|
-
File.readlines(path).size < 20
|
23
|
-
}
|
24
|
-
puts %{
|
25
|
-
As of RubyGems 0.8.0, library stubs are no longer needed.
|
26
|
-
Searching $LOAD_PATH for stubs to optionally delete (may take a while)...
|
27
|
-
}.gsub(/^ */, '')
|
28
|
-
gemfiles = Dir.glob("{#{($LOAD_PATH).join(',')}}/**/*.rb").collect {|file| File.expand_path(file)}.uniq
|
29
|
-
puts "...done."
|
30
|
-
seen_stub = false
|
31
|
-
gemfiles.each do |file|
|
32
|
-
unless File.directory?(file)
|
33
|
-
if is_apparent_stub[file]
|
34
|
-
unless seen_stub
|
35
|
-
puts "\nRubyGems has detected stubs that can be removed. Confirm their removal:"
|
36
|
-
end
|
37
|
-
seen_stub = true
|
38
|
-
print " * remove #{file}? [y/n] "
|
39
|
-
answer = gets
|
40
|
-
if answer =~ /y/i then
|
41
|
-
File.unlink(file)
|
42
|
-
puts " (removed)"
|
43
|
-
else
|
44
|
-
puts " (skipping)"
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
48
|
-
end
|
49
|
-
if seen_stub
|
50
|
-
puts "Finished with library stubs."
|
51
|
-
else
|
52
|
-
puts "No library stubs found."
|
53
|
-
end
|
54
|
-
puts
|
55
|
-
end
|
56
|
-
|
57
|
-
def install_windows_batch_files
|
58
|
-
bindir = Config::CONFIG['bindir']
|
59
|
-
ruby_install_name = Config::CONFIG['ruby_install_name']
|
60
|
-
is_windows_platform = Config::CONFIG["arch"] =~ /dos|win32/i
|
61
|
-
require 'find'
|
62
|
-
Find.find('bin') do |f|
|
63
|
-
next if f =~ /\bCVS\b/
|
64
|
-
next if f =~ /~$/
|
65
|
-
next if FileTest.directory?(f)
|
66
|
-
next if f =~ /\.rb$/
|
67
|
-
next if File.basename(f) =~ /^\./
|
68
|
-
source = f
|
69
|
-
target = File.join(bindir, File.basename(f))
|
70
|
-
if is_windows_platform
|
71
|
-
File.open(target+".cmd", "w") do |file|
|
72
|
-
ruby_cmd = Gem.ruby rescue 'ruby'
|
73
|
-
file.puts %{@"#{ruby_cmd}" "#{target}" %1 %2 %3 %4 %5 %6 %7 %8 %9}
|
74
|
-
end
|
75
|
-
end
|
76
|
-
end
|
77
|
-
end
|
78
|
-
|
79
|
-
def install_sources
|
80
|
-
$: << "lib"
|
81
|
-
require 'rubygems'
|
82
|
-
require 'rubygems/builder'
|
83
|
-
require 'rubygems/installer'
|
84
|
-
Dir.chdir("pkgs/sources") do
|
85
|
-
load "sources.gemspec"
|
86
|
-
spec = Gem.sources_spec
|
87
|
-
gem_file = Gem::Builder.new(spec).build
|
88
|
-
Gem::Installer.new(gem_file).install(true, Gem.dir, false)
|
89
|
-
end
|
90
|
-
end
|
91
|
-
|
92
|
-
def remove_old_rdoc
|
93
|
-
require 'rubygems'
|
94
|
-
require 'fileutils'
|
95
|
-
|
96
|
-
puts "Removing old RubyGems RDoc and ri..."
|
97
|
-
Dir[File.join(Gem.dir, 'doc', 'rubygems-*')].each do |dir|
|
98
|
-
FileUtils.rm_rf dir
|
99
|
-
end
|
100
|
-
end
|
101
|
-
|
102
|
-
def install_rdoc
|
103
|
-
require 'rdoc/rdoc'
|
104
|
-
require 'rubygems'
|
105
|
-
|
106
|
-
rubygems_name = "rubygems-#{Gem::RubyGemsVersion}"
|
107
|
-
|
108
|
-
doc_dir = File.join Gem.dir, 'doc', rubygems_name
|
109
|
-
|
110
|
-
puts "Installing #{rubygems_name} ri..."
|
111
|
-
run_rdoc '--ri', '--op', File.join(doc_dir, 'ri')
|
112
|
-
puts "Installing #{rubygems_name} rdoc..."
|
113
|
-
run_rdoc '--op', File.join(doc_dir, 'rdoc')
|
114
|
-
end
|
115
|
-
|
116
|
-
install_sources
|
117
|
-
remove_old_rdoc
|
118
|
-
install_rdoc
|
119
|
-
install_windows_batch_files
|
120
|
-
remove_stubs
|
121
|
-
|
data/test/brokenbuildgem.rb
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
#--
|
2
|
-
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
|
3
|
-
# All rights reserved.
|
4
|
-
# See LICENSE.txt for permissions.
|
5
|
-
#++
|
6
|
-
|
7
|
-
module BrokenBuildGem
|
8
|
-
|
9
|
-
DIR = "test/data/broken_build"
|
10
|
-
NAME = "broken-build-0.0.1.gem"
|
11
|
-
GEM = "#{DIR}/#{NAME}"
|
12
|
-
|
13
|
-
def clear
|
14
|
-
FileUtils.rm_f GEM
|
15
|
-
end
|
16
|
-
|
17
|
-
def make(controller)
|
18
|
-
unless File.exist?(GEM)
|
19
|
-
build(controller)
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
def build(controller)
|
24
|
-
Dir.chdir(DIR) do
|
25
|
-
controller.gem "build broken-build.gemspec"
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
def install(controller)
|
30
|
-
make(controller)
|
31
|
-
controller.gem "install #{GEM}"
|
32
|
-
end
|
33
|
-
|
34
|
-
extend self
|
35
|
-
end
|
Binary file
|
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/broken-1.0.0.gem
DELETED
Binary file
|
@@ -1,20 +0,0 @@
|
|
1
|
-
$:.unshift '../lib'
|
2
|
-
require 'rubygems'
|
3
|
-
|
4
|
-
spec = Gem::Specification.new do |s|
|
5
|
-
s.name = 'broken-build'
|
6
|
-
s.version = "0.0.1"
|
7
|
-
s.required_ruby_version = ">= 1.8.1"
|
8
|
-
s.platform = Gem::Platform::RUBY
|
9
|
-
s.summary = "This gem demonstrates extensions that don't compile"
|
10
|
-
s.files = Dir.glob("ext/**/*").delete_if {|item| item.include?("CVS")}
|
11
|
-
s.require_path = 'lib'
|
12
|
-
s.extensions << "ext/extconf.rb"
|
13
|
-
s.bindir = "bin"
|
14
|
-
end
|
15
|
-
|
16
|
-
if $0==__FILE__
|
17
|
-
Gem::manage_gems
|
18
|
-
Gem::Builder.new(spec).build
|
19
|
-
end
|
20
|
-
|
@@ -1 +0,0 @@
|
|
1
|
-
will not compile
|
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
|
@@ -1,11 +0,0 @@
|
|
1
|
-
Gem::Specification.new do |s|
|
2
|
-
s.name = %q{keyedlist}
|
3
|
-
s.version = %q{0.4.0}
|
4
|
-
s.has_rdoc = true
|
5
|
-
s.summary = %q{A Hash which automatically computes keys.}
|
6
|
-
s.files = ["lib/keyedlist.rb"]
|
7
|
-
s.require_paths = ["lib"]
|
8
|
-
s.autorequire = %q{keyedlist}
|
9
|
-
s.author = %q{Florian Gross}
|
10
|
-
s.email = %q{flgr@ccan.de}
|
11
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: "1.0"
|
3
|
-
name: keyedlist
|
4
|
-
version: !ruby/object:Gem::Version
|
5
|
-
version: 0.4.0
|
6
|
-
date: 2004-03-28 15:37:49.828000 +02:00
|
7
|
-
platform:
|
8
|
-
summary: A Hash which automatically computes keys.
|
9
|
-
require_paths:
|
10
|
-
- lib
|
11
|
-
files:
|
12
|
-
- lib/keyedlist.rb
|
13
|
-
autorequire: keyedlist
|
14
|
-
author: Florian Gross
|
15
|
-
email: flgr@ccan.de
|
16
|
-
has_rdoc: true
|
data/test/data/lib/code.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
CODE = 1
|
data/test/data/one/README.one
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
README for the One GEM.
|
data/test/data/one/lib/one.rb
DELETED
data/test/data/one/one-0.0.1.gem
DELETED
Binary file
|
data/test/data/one/one.gemspec
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
spec = Gem::Specification.new do |s|
|
4
|
-
s.platform = Gem::Platform::RUBY
|
5
|
-
s.summary = "Test GEM One"
|
6
|
-
s.name = 'one'
|
7
|
-
s.version = '0.0.1'
|
8
|
-
s.requirements << 'none'
|
9
|
-
s.require_path = 'lib'
|
10
|
-
s.autorequire = 'one'
|
11
|
-
s.files = ['lib/one.rb', 'README.one']
|
12
|
-
s.author = 'Jim Weirich'
|
13
|
-
s.email = 'jim@weirichhouse.org'
|
14
|
-
s.homepage = 'http://onestepback.org'
|
15
|
-
s.has_rdoc = true
|
16
|
-
s.description = "Test GEM for customer tests"
|
17
|
-
end
|
data/test/data/one/one.yaml
DELETED
@@ -1,40 +0,0 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: "0.7"
|
3
|
-
specification_version: 1
|
4
|
-
name: one
|
5
|
-
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.0.1
|
7
|
-
date: 2004-08-07
|
8
|
-
summary: Test GEM One
|
9
|
-
require_paths:
|
10
|
-
- lib
|
11
|
-
author: Jim Weirich
|
12
|
-
email: jim@weirichhouse.org
|
13
|
-
homepage: http://onestepback.org
|
14
|
-
rubyforge_project:
|
15
|
-
description: Test GEM for customer tests
|
16
|
-
autorequire: one
|
17
|
-
default_executable:
|
18
|
-
bindir: bin
|
19
|
-
has_rdoc: true
|
20
|
-
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
21
|
-
requirements:
|
22
|
-
-
|
23
|
-
- ">"
|
24
|
-
- !ruby/object:Gem::Version
|
25
|
-
version: 0.0.0
|
26
|
-
version:
|
27
|
-
platform: ruby
|
28
|
-
files:
|
29
|
-
- lib/one.rb
|
30
|
-
- README.one
|
31
|
-
test_files: []
|
32
|
-
library_stubs: []
|
33
|
-
rdoc_options: []
|
34
|
-
extra_rdoc_files: []
|
35
|
-
executables: []
|
36
|
-
extensions: []
|
37
|
-
requirements:
|
38
|
-
- none
|
39
|
-
dependencies: []
|
40
|
-
|
@@ -1,19 +0,0 @@
|
|
1
|
-
# -*- ruby -*-
|
2
|
-
|
3
|
-
require 'rubygems'
|
4
|
-
|
5
|
-
spec = Gem::Specification.new do |s|
|
6
|
-
|
7
|
-
s.name = 'PostMessage'
|
8
|
-
s.version = "0.0.1"
|
9
|
-
s.summary = "Test for post install messages with gems."
|
10
|
-
|
11
|
-
s.author = "Geoffrey Grosenbach"
|
12
|
-
s.email = "no@example.com"
|
13
|
-
s.post_install_message = "I am a shiny gem!"
|
14
|
-
end
|
15
|
-
|
16
|
-
if $0 == __FILE__
|
17
|
-
Gem.manage_gems
|
18
|
-
Gem::Builder.new(spec).build
|
19
|
-
end
|
@@ -1,48 +0,0 @@
|
|
1
|
-
require 'test/unit'
|
2
|
-
require 'fileutils'
|
3
|
-
require 'test/insure_session'
|
4
|
-
require 'test/brokenbuildgem'
|
5
|
-
|
6
|
-
# ====================================================================
|
7
|
-
class TestExtensionGems < Test::Unit::TestCase
|
8
|
-
def setup
|
9
|
-
@orig_gem_home = ENV['GEM_HOME']
|
10
|
-
ENV['GEM_HOME'] = File.expand_path("test/data/gemhome")
|
11
|
-
@gem_path = File.expand_path("bin/gem")
|
12
|
-
lib_path = File.expand_path("lib")
|
13
|
-
@ruby_options = "-I#{lib_path} -I."
|
14
|
-
@verbose = false
|
15
|
-
Dir.chdir("pkgs/sources") do
|
16
|
-
load "sources.gemspec"
|
17
|
-
spec = Gem.sources_spec
|
18
|
-
gem_file = Gem::Builder.new(spec).build
|
19
|
-
Gem::Installer.new(gem_file).install(true, ENV['GEM_HOME'], false)
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
def teardown
|
24
|
-
FileUtils.rm_rf 'test/data/broken_build/broken-build-0.0.1.gem'
|
25
|
-
ENV['GEM_HOME'] = @orig_gem_home
|
26
|
-
Gem.clear_paths
|
27
|
-
end
|
28
|
-
|
29
|
-
def test_gem_with_broken_extension_does_not_install
|
30
|
-
BrokenBuildGem.install(self)
|
31
|
-
assert_no_match(/Successfully installed/, @out)
|
32
|
-
end
|
33
|
-
|
34
|
-
# Run a gem command for the functional test.
|
35
|
-
def gem(options="")
|
36
|
-
shell = Session::Shell.new
|
37
|
-
options = options + " --config-file missing_file" if options !~ /--config-file/
|
38
|
-
command = "#{Gem.ruby} #{@ruby_options} #{@gem_path} #{options}"
|
39
|
-
puts "\n\nCOMMAND: [#{command}]" if @verbose
|
40
|
-
@out, @err = shell.execute command
|
41
|
-
@status = shell.exit_status
|
42
|
-
puts "STATUS: [#{@status}]" if @verbose
|
43
|
-
puts "OUTPUT: [#{@out}]" if @verbose
|
44
|
-
puts "ERROR: [#{@err}]" if @verbose
|
45
|
-
puts "PWD: [#{Dir.pwd}]" if @verbose
|
46
|
-
shell.close
|
47
|
-
end
|
48
|
-
end
|
@@ -1,104 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
#--
|
3
|
-
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
|
4
|
-
# All rights reserved.
|
5
|
-
# See LICENSE.txt for permissions.
|
6
|
-
#++
|
7
|
-
|
8
|
-
require 'test/unit'
|
9
|
-
require 'fileutils'
|
10
|
-
require 'test/insure_session'
|
11
|
-
require 'test/onegem'
|
12
|
-
|
13
|
-
# ====================================================================
|
14
|
-
class TestGenerateYamlIndex < Test::Unit::TestCase
|
15
|
-
|
16
|
-
SERVER_DIR = 'test/temp/server'
|
17
|
-
|
18
|
-
def setup
|
19
|
-
@gyi_path = File.expand_path("bin/index_gem_repository.rb")
|
20
|
-
@gem_path = File.expand_path("bin/gem")
|
21
|
-
lib_path = File.expand_path("lib")
|
22
|
-
@ruby_options = "-I#{lib_path} -I."
|
23
|
-
@verbose = false
|
24
|
-
end
|
25
|
-
|
26
|
-
def test_build_gem
|
27
|
-
OneGem.make(self)
|
28
|
-
end
|
29
|
-
|
30
|
-
def test_server_dir_initialize_really_works
|
31
|
-
initialize_server_directory
|
32
|
-
assert File.exist?(srvfile("gems"))
|
33
|
-
assert File.exist?(srvfile("gems/one-0.0.1.gem"))
|
34
|
-
assert ! File.exist?(srvfile("yaml"))
|
35
|
-
assert ! File.exist?(srvfile("yaml.Z"))
|
36
|
-
assert ! File.exist?(srvfile("quick"))
|
37
|
-
end
|
38
|
-
|
39
|
-
def test_generate_old_style_index
|
40
|
-
initialize_server_directory
|
41
|
-
|
42
|
-
generate_yaml_index("--directory #{SERVER_DIR} --no-quick")
|
43
|
-
|
44
|
-
assert_equal '', @out
|
45
|
-
assert_equal '', @err
|
46
|
-
assert_equal 0, @status, "no status error"
|
47
|
-
assert File.exist?(srvfile("yaml"))
|
48
|
-
assert File.exist?(srvfile("yaml.Z"))
|
49
|
-
assert ! File.exist?(srvfile("quick"))
|
50
|
-
end
|
51
|
-
|
52
|
-
def test_generate_quick_index
|
53
|
-
initialize_server_directory
|
54
|
-
|
55
|
-
generate_yaml_index("--directory #{SERVER_DIR}")
|
56
|
-
|
57
|
-
assert_equal '', @out
|
58
|
-
assert_equal '', @err
|
59
|
-
assert_equal 0, @status, "no status error"
|
60
|
-
assert File.exist?(srvfile("yaml"))
|
61
|
-
assert File.exist?(srvfile("yaml.Z"))
|
62
|
-
assert File.exist?(srvfile("quick"))
|
63
|
-
assert File.exist?(srvfile("quick/index"))
|
64
|
-
assert File.exist?(srvfile("quick/index.rz"))
|
65
|
-
assert File.exist?(srvfile("quick/one-0.0.1.gemspec.rz"))
|
66
|
-
assert ! File.exist?(srvfile("quick/one-0.0.1.gemspec"))
|
67
|
-
end
|
68
|
-
|
69
|
-
def initialize_server_directory
|
70
|
-
FileUtils.rm_r srvfile("quick") rescue nil
|
71
|
-
FileUtils.rm_r srvfile("yaml") rescue nil
|
72
|
-
FileUtils.rm_r srvfile("yaml.Z") rescue nil
|
73
|
-
unless File.exist?(srvfile("gems"))
|
74
|
-
FileUtils.mkdir_p(srvfile("gems"))
|
75
|
-
end
|
76
|
-
OneGem.make(self)
|
77
|
-
FileUtils.cp OneGem::ONEGEM, srvfile("gems")
|
78
|
-
end
|
79
|
-
|
80
|
-
# Run the generate_yaml_index command for the functional test.
|
81
|
-
def generate_yaml_index(options="")
|
82
|
-
shell = Session::Shell.new
|
83
|
-
command = "#{Gem.ruby} #{@ruby_options} #{@gyi_path} #{options}"
|
84
|
-
puts "\n\nCOMMAND: [#{command}]" if @verbose
|
85
|
-
@out, @err = shell.execute command
|
86
|
-
@status = shell.exit_status
|
87
|
-
puts "STATUS: [#{@status}]" if @verbose
|
88
|
-
puts "OUTPUT: [#{@out}]" if @verbose
|
89
|
-
puts "ERROR: [#{@err}]" if @verbose
|
90
|
-
puts "PWD: [#{Dir.pwd}]" if @verbose
|
91
|
-
shell.close
|
92
|
-
end
|
93
|
-
|
94
|
-
# Run a gem command for the functional test.
|
95
|
-
def gem(options="")
|
96
|
-
cmd = "#{Gem.ruby} #{@ruby_options} #{@gem_path} #{options}"
|
97
|
-
system cmd
|
98
|
-
end
|
99
|
-
|
100
|
-
def srvfile(name)
|
101
|
-
File.join(SERVER_DIR, name)
|
102
|
-
end
|
103
|
-
end
|
104
|
-
|