setup 5.0.0 → 5.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/HISTORY +16 -0
- data/MANIFEST +1 -0
- data/Syckfile +77 -0
- data/lib/setup.rb +1 -1
- data/lib/setup/command.rb +3 -3
- data/lib/setup/configuration.rb +8 -3
- data/lib/setup/installer.rb +1 -1
- data/lib/setup/session.rb +2 -2
- data/meta/version +1 -1
- data/script/setup +17 -11
- data/test/features/install.feature +0 -1
- data/test/features/step_definitions/install_steps.rb +1 -1
- data/test/features/step_definitions/setup_steps.rb +1 -1
- metadata +7 -7
data/HISTORY
CHANGED
@@ -1,5 +1,21 @@
|
|
1
1
|
= RELEASE HISTORY
|
2
2
|
|
3
|
+
== 5.0.1 / 2010-02-07
|
4
|
+
|
5
|
+
Version 5.0.1 fixes a bug reading configuration options,
|
6
|
+
and makes some minor adjusemnt to exit error messages.
|
7
|
+
|
8
|
+
Changes:
|
9
|
+
|
10
|
+
* 1 Bug Fix
|
11
|
+
|
12
|
+
* Fixed parsing of ruby install parameters on systems with custom configurations.
|
13
|
+
|
14
|
+
* 1 Minor Enhancement
|
15
|
+
|
16
|
+
* Use 'abort $!.message' instead of 'exit 1' when exiting on error.
|
17
|
+
|
18
|
+
|
3
19
|
== 5.0.0 / 2010-01-12
|
4
20
|
|
5
21
|
Version 5 represents a major milestone in Setup.rb's development.
|
data/MANIFEST
CHANGED
data/Syckfile
ADDED
@@ -0,0 +1,77 @@
|
|
1
|
+
---
|
2
|
+
email:
|
3
|
+
service : Email
|
4
|
+
file : ~
|
5
|
+
subject : ~
|
6
|
+
mailto : ruby-talk@ruby-lang.org
|
7
|
+
from : <%= ENV['EMAIL_ACCOUNT'] %>
|
8
|
+
server : <%= ENV['EMAIL_SERVER'] %>
|
9
|
+
port : <%= ENV['EMAIL_PORT'] %>
|
10
|
+
account : <%= ENV['EMAIL_ACCOUNT'] %>
|
11
|
+
domain : <%= ENV['EMAIL_DOMAIN'] %>
|
12
|
+
login : <%= ENV['EMAIL_LOGIN'] %>
|
13
|
+
secure : <%= ENV['EMAIL_SECURE'] %>
|
14
|
+
active : true
|
15
|
+
|
16
|
+
gemcutter:
|
17
|
+
service: GemCutter
|
18
|
+
active : true
|
19
|
+
|
20
|
+
box:
|
21
|
+
service: Box
|
22
|
+
active : true
|
23
|
+
types : [gem, gz]
|
24
|
+
include: [bin, lib, meta, script, test, "[A-Z]*"]
|
25
|
+
exclude: [InstalledFiles, SetupConfig]
|
26
|
+
master : true
|
27
|
+
|
28
|
+
ridoc:
|
29
|
+
service: RIDoc
|
30
|
+
include: ~
|
31
|
+
exclude: ~
|
32
|
+
active : true
|
33
|
+
|
34
|
+
rdoc:
|
35
|
+
service: RDoc
|
36
|
+
include: ~
|
37
|
+
exclude: ~
|
38
|
+
active : true
|
39
|
+
|
40
|
+
syntax:
|
41
|
+
service : Syntax
|
42
|
+
loadpath : ~
|
43
|
+
exclude : ~
|
44
|
+
active : false
|
45
|
+
|
46
|
+
testrb:
|
47
|
+
service : Testrb
|
48
|
+
tests : ~
|
49
|
+
exclude : ~
|
50
|
+
loadpath : ~
|
51
|
+
requires : ~
|
52
|
+
live : false
|
53
|
+
active : false
|
54
|
+
|
55
|
+
dnote:
|
56
|
+
service : DNote
|
57
|
+
loadpath : ~
|
58
|
+
labels : ~
|
59
|
+
output : ~
|
60
|
+
active : false
|
61
|
+
|
62
|
+
vclog:
|
63
|
+
service : VClog
|
64
|
+
format : html # xml, txt
|
65
|
+
layout : rel # gnu
|
66
|
+
typed : false
|
67
|
+
output : ~
|
68
|
+
active : false
|
69
|
+
|
70
|
+
stats:
|
71
|
+
service : Stats
|
72
|
+
title : ~
|
73
|
+
loadpath : ~
|
74
|
+
exclude : ~
|
75
|
+
output : ~
|
76
|
+
active : true
|
77
|
+
|
data/lib/setup.rb
CHANGED
data/lib/setup/command.rb
CHANGED
@@ -89,11 +89,11 @@ module Setup
|
|
89
89
|
|
90
90
|
begin
|
91
91
|
session.__send__(task)
|
92
|
-
rescue Error
|
93
|
-
raise if $DEBUG
|
92
|
+
rescue Error => err
|
93
|
+
raise err if $DEBUG
|
94
94
|
$stderr.puts $!.message
|
95
95
|
$stderr.puts "Try 'setup.rb --help' for detailed usage."
|
96
|
-
exit 1
|
96
|
+
abort $!.message #exit 1
|
97
97
|
end
|
98
98
|
|
99
99
|
puts unless session.quiet?
|
data/lib/setup/configuration.rb
CHANGED
@@ -2,6 +2,7 @@ require 'rbconfig'
|
|
2
2
|
require 'fileutils'
|
3
3
|
require 'erb'
|
4
4
|
require 'yaml'
|
5
|
+
require 'shellwords'
|
5
6
|
require 'setup/core_ext'
|
6
7
|
require 'setup/constants'
|
7
8
|
|
@@ -83,9 +84,13 @@ module Setup
|
|
83
84
|
end
|
84
85
|
|
85
86
|
# Turn all of CONFIG["configure_args"] into methods.
|
86
|
-
|
87
|
-
|
88
|
-
|
87
|
+
config_args = Shellwords.shellwords(::Config::CONFIG["configure_args"])
|
88
|
+
config_args.each do |ent|
|
89
|
+
if ent.index("=")
|
90
|
+
key, val = *ent.split("=")
|
91
|
+
else
|
92
|
+
key, val = ent, true
|
93
|
+
end
|
89
94
|
name = key.downcase
|
90
95
|
name = name.sub(/^--/,'')
|
91
96
|
name = name.gsub(/-/,'_')
|
data/lib/setup/installer.rb
CHANGED
@@ -136,7 +136,7 @@ module Setup
|
|
136
136
|
File.extname(file) == ".#{dllext}"
|
137
137
|
end
|
138
138
|
if ents.empty? && !files.empty?
|
139
|
-
raise Error, "ruby extention not compiled: 'setup.rb
|
139
|
+
raise Error, "ruby extention not compiled: 'setup.rb make' first"
|
140
140
|
end
|
141
141
|
ents
|
142
142
|
end
|
data/lib/setup/session.rb
CHANGED
@@ -114,7 +114,7 @@ module Setup
|
|
114
114
|
|
115
115
|
#
|
116
116
|
def make
|
117
|
-
abort "must setup config first" unless configuration.exist?
|
117
|
+
abort "must run 'setup config' first" unless configuration.exist?
|
118
118
|
log_header('Compile')
|
119
119
|
compiler.compile
|
120
120
|
end
|
@@ -124,7 +124,7 @@ module Setup
|
|
124
124
|
|
125
125
|
#
|
126
126
|
def install
|
127
|
-
abort "must setup config first" unless configuration.exist?
|
127
|
+
abort "must run 'setup config' first" unless configuration.exist?
|
128
128
|
log_header('Install')
|
129
129
|
installer.install
|
130
130
|
end
|
data/meta/version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
5.0.
|
1
|
+
5.0.1
|
data/script/setup
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
#
|
3
|
-
# Setup.rb, 2010-
|
3
|
+
# Setup.rb, 2010-02-07 08:33:15
|
4
4
|
#
|
5
5
|
# This is a stand-alone bundle of the setup.rb application.
|
6
6
|
# You can place it in your projects script/ directory, or
|
@@ -8,7 +8,7 @@
|
|
8
8
|
# root directory (just like old times).
|
9
9
|
#
|
10
10
|
module Setup
|
11
|
-
VERSION = '5.0.
|
11
|
+
VERSION = '5.0.1'
|
12
12
|
end
|
13
13
|
class << File #:nodoc: all
|
14
14
|
unless respond_to?(:read) # Ruby 1.6 and less
|
@@ -133,13 +133,13 @@ module Setup
|
|
133
133
|
compiler.configure if compile? #compiler.compiles?
|
134
134
|
end
|
135
135
|
def make
|
136
|
-
abort "must setup config first" unless configuration.exist?
|
136
|
+
abort "must run 'setup config' first" unless configuration.exist?
|
137
137
|
log_header('Compile')
|
138
138
|
compiler.compile
|
139
139
|
end
|
140
140
|
alias_method :setup, :make
|
141
141
|
def install
|
142
|
-
abort "must setup config first" unless configuration.exist?
|
142
|
+
abort "must run 'setup config' first" unless configuration.exist?
|
143
143
|
log_header('Install')
|
144
144
|
installer.install
|
145
145
|
end
|
@@ -327,6 +327,7 @@ require 'rbconfig'
|
|
327
327
|
require 'fileutils'
|
328
328
|
require 'erb'
|
329
329
|
require 'yaml'
|
330
|
+
require 'shellwords'
|
330
331
|
module Setup
|
331
332
|
class Configuration
|
332
333
|
RBCONFIG = ::Config::CONFIG
|
@@ -362,7 +363,7 @@ module Setup
|
|
362
363
|
option :shebang , :pick, 'shebang line (#!) editing mode (all,ruby,never)'
|
363
364
|
option :no_test, :t , :bool, 'run pre-installation tests'
|
364
365
|
option :no_ri, :d , :bool, 'generate ri documentation'
|
365
|
-
option :no_doc,
|
366
|
+
option :no_doc , :bool, 'install doc/ directory'
|
366
367
|
option :no_ext , :bool, 'compile/install ruby extentions'
|
367
368
|
option :install_prefix , :path, 'install to alternate root location'
|
368
369
|
option :root , :path, 'install to alternate root location'
|
@@ -373,8 +374,13 @@ module Setup
|
|
373
374
|
name = key.to_s.downcase
|
374
375
|
define_method(name){ val }
|
375
376
|
end
|
376
|
-
::Config::CONFIG["configure_args"]
|
377
|
-
|
377
|
+
config_args = Shellwords.shellwords(::Config::CONFIG["configure_args"])
|
378
|
+
config_args.each do |ent|
|
379
|
+
if ent.index("=")
|
380
|
+
key, val = *ent.split("=")
|
381
|
+
else
|
382
|
+
key, val = ent, true
|
383
|
+
end
|
378
384
|
name = key.downcase
|
379
385
|
name = name.sub(/^--/,'')
|
380
386
|
name = name.gsub(/-/,'_')
|
@@ -948,7 +954,7 @@ module Setup
|
|
948
954
|
File.extname(file) == ".#{dllext}"
|
949
955
|
end
|
950
956
|
if ents.empty? && !files.empty?
|
951
|
-
raise Error, "ruby extention not compiled: 'setup.rb
|
957
|
+
raise Error, "ruby extention not compiled: 'setup.rb make' first"
|
952
958
|
end
|
953
959
|
ents
|
954
960
|
end
|
@@ -1236,11 +1242,11 @@ module Setup
|
|
1236
1242
|
print_header
|
1237
1243
|
begin
|
1238
1244
|
session.__send__(task)
|
1239
|
-
rescue Error
|
1240
|
-
raise if $DEBUG
|
1245
|
+
rescue Error => err
|
1246
|
+
raise err if $DEBUG
|
1241
1247
|
$stderr.puts $!.message
|
1242
1248
|
$stderr.puts "Try 'setup.rb --help' for detailed usage."
|
1243
|
-
exit 1
|
1249
|
+
abort $!.message #exit 1
|
1244
1250
|
end
|
1245
1251
|
puts unless session.quiet?
|
1246
1252
|
end
|
@@ -19,7 +19,7 @@ When /I issue the command 'setup.rb install' unprepared$/ do
|
|
19
19
|
end
|
20
20
|
|
21
21
|
Then /^I will be told that I must first run 'setup\.rb make'$/ do
|
22
|
-
$setup_feature_error.
|
22
|
+
$setup_feature_error.to_s.assert =~ /setup\.rb make\'? first/
|
23
23
|
end
|
24
24
|
|
25
25
|
# Site Ruby Locations
|
@@ -20,7 +20,7 @@ Then /^the extensions should be compiled$/ do
|
|
20
20
|
end
|
21
21
|
|
22
22
|
Then /^I will be told that I must first run 'setup\.rb config'$/ do
|
23
|
-
$setup_feature_error.message.assert == "must setup config first"
|
23
|
+
$setup_feature_error.message.assert == "must run \'setup config\' first"
|
24
24
|
end
|
25
25
|
|
26
26
|
Then /^the extensions will not be compiled$/ do
|
metadata
CHANGED
@@ -1,17 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: setup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
8
|
-
|
9
|
-
7rans <transfire@gmail.com>
|
7
|
+
- Minero Aoki <aamine@loveruby.net>
|
8
|
+
- 7rans <transfire@gmail.com>
|
10
9
|
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
12
|
|
14
|
-
date: 2010-
|
13
|
+
date: 2010-02-07 00:00:00 -05:00
|
15
14
|
default_executable:
|
16
15
|
dependencies: []
|
17
16
|
|
@@ -24,7 +23,7 @@ description: |-
|
|
24
23
|
Setup converts setup.rb into a stand-alone application.
|
25
24
|
No longer will you need distribute setup.rb with you
|
26
25
|
Ruby packages. Just instruct your users to use Setup.
|
27
|
-
email:
|
26
|
+
email:
|
28
27
|
executables:
|
29
28
|
- setup.rb
|
30
29
|
extensions: []
|
@@ -36,6 +35,7 @@ files:
|
|
36
35
|
- HISTORY
|
37
36
|
- MANIFEST
|
38
37
|
- README.rdoc
|
38
|
+
- Syckfile
|
39
39
|
- bin/setup.rb
|
40
40
|
- lib/setup.rb
|
41
41
|
- lib/setup/base.rb
|
@@ -113,6 +113,6 @@ rubyforge_project: setup
|
|
113
113
|
rubygems_version: 1.3.5
|
114
114
|
signing_key:
|
115
115
|
specification_version: 3
|
116
|
-
summary:
|
116
|
+
summary: Setup.rb as a stand-alone application.
|
117
117
|
test_files:
|
118
118
|
- lib/setup/tester.rb
|