RubyPackager 0.1.1.20091105 → 0.2.1.20101110
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +28 -0
- data/LICENSE +1 -1
- data/ReleaseInfo +3 -3
- data/TODO +2 -0
- data/bin/Release.rb +4 -2
- data/lib/RubyPackager/Distributors/SourceForge.rb +5 -6
- data/lib/RubyPackager/Installers/Gem.rb +98 -64
- data/lib/RubyPackager/ReleaseInfo.rb +10 -8
- data/lib/RubyPackager/Releaser.rb +18 -17
- data/lib/RubyPackager/Tools.rb +1 -1
- data/lib/RubyPackager/i386-cygwin/PlatformReleaser.rb +112 -0
- data/lib/RubyPackager/i386-linux/PlatformReleaser.rb +15 -20
- data/lib/RubyPackager/i386-mswin32/Installers/NSIS.rb +1 -1
- data/lib/RubyPackager/i386-mswin32/PlatformReleaser.rb +23 -25
- metadata +34 -56
- data/test/Common.rb +0 -346
- data/test/PlatformIndependent/CommandLine.rb +0 -156
- data/test/PlatformIndependent/Executable.rb +0 -31
- data/test/PlatformIndependent/Library.rb +0 -31
- data/test/PlatformIndependent/Misc.rb +0 -62
- data/test/PlatformIndependent/Plugins/Distributors/SourceForge.rb +0 -81
- data/test/PlatformIndependent/Plugins/Installers/Gem.rb +0 -142
- data/test/Repository/Applications/Basic/Distribution/ReleaseInfo.rb +0 -27
- data/test/Repository/Applications/Basic/Distribution/ReleaseInfo_Exe.rb +0 -33
- data/test/Repository/Applications/Basic/Distribution/ReleaseInfo_ExeTerm.rb +0 -33
- data/test/Repository/Applications/Basic/Distribution/ReleaseInfo_Gem.rb +0 -32
- data/test/Repository/Applications/Basic/Distribution/i386-mswin32/Icon.ico +0 -0
- data/test/Repository/Applications/Basic/Distribution/i386-mswin32/Installer/Icon.ico +0 -0
- data/test/Repository/Applications/Basic/Distribution/i386-mswin32/Installer/InstallLicense.txt +0 -31
- data/test/Repository/Applications/Basic/Distribution/i386-mswin32/Installer/install.nsi +0 -51
- data/test/Repository/Applications/Basic/Main.rb +0 -8
- data/test/Repository/Libraries/Basic/Add.rb +0 -6
- data/test/Repository/Libraries/Basic/Distribution/Icon.ico +0 -0
- data/test/Repository/Libraries/Basic/Distribution/InstallLicense.txt +0 -31
- data/test/Repository/Libraries/Basic/Distribution/ReleaseInfo.rb +0 -24
- data/test/Repository/Libraries/Basic/Distribution/ReleaseInfo_Additional.rb +0 -27
- data/test/Repository/Libraries/Basic/Distribution/ReleaseInfo_Gem.rb +0 -29
- data/test/Repository/Libraries/Basic/Distribution/ReleaseInfo_GemDep.rb +0 -32
- data/test/Repository/Libraries/Basic/Distribution/ReleaseInfo_NSIS.rb +0 -28
- data/test/Repository/Libraries/Basic/Distribution/ReleaseInfo_SF.rb +0 -28
- data/test/Repository/Libraries/Basic/Distribution/ReleaseInfo_Test.rb +0 -27
- data/test/Repository/Libraries/Basic/Distribution/ReleaseInfo_TestGem.rb +0 -33
- data/test/Repository/Libraries/Basic/Distribution/install.nsi +0 -53
- data/test/Repository/Libraries/Basic/MainLib.rb +0 -6
- data/test/Repository/Libraries/Basic/Test.rb +0 -6
- data/test/i386-linux/Executable.rb +0 -86
- data/test/i386-mswin32/Executable.rb +0 -90
- data/test/i386-mswin32/Plugins/Installers/NSIS.rb +0 -39
- data/test/run.rb +0 -23
@@ -1,156 +0,0 @@
|
|
1
|
-
#--
|
2
|
-
# Copyright (c) 2009 Muriel Salvan (murielsalvan@users.sourceforge.net)
|
3
|
-
# Licensed under the terms specified in LICENSE file. No warranty is provided.
|
4
|
-
#++
|
5
|
-
|
6
|
-
module RubyPackager
|
7
|
-
|
8
|
-
module Test
|
9
|
-
|
10
|
-
module PlatformIndependent
|
11
|
-
|
12
|
-
class CommandLine < ::Test::Unit::TestCase
|
13
|
-
|
14
|
-
include RubyPackager::Test::Common
|
15
|
-
|
16
|
-
# Test release a specific version
|
17
|
-
def testVersion
|
18
|
-
execTest('Libraries/Basic', [ '-v', '0.0.1.20091030' ], 'ReleaseInfo.rb') do |iReleaseDir, iReleaseInfo|
|
19
|
-
checkReleaseInfo(iReleaseDir, iReleaseInfo, :Version => '0.0.1.20091030')
|
20
|
-
checkReleaseNotes(iReleaseDir, iReleaseInfo)
|
21
|
-
assert(File.exists?("#{iReleaseDir}/Release/MainLib.rb"))
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
# Test release a specific version (long version)
|
26
|
-
def testVersionLong
|
27
|
-
execTest('Libraries/Basic', [ '--version=0.0.1.20091030' ], 'ReleaseInfo.rb') do |iReleaseDir, iReleaseInfo|
|
28
|
-
checkReleaseInfo(iReleaseDir, iReleaseInfo, :Version => '0.0.1.20091030')
|
29
|
-
checkReleaseNotes(iReleaseDir, iReleaseInfo)
|
30
|
-
assert(File.exists?("#{iReleaseDir}/Release/MainLib.rb"))
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
# Test release with Tags
|
35
|
-
def testTags
|
36
|
-
execTest('Libraries/Basic', [ '-t', 'Tag1', '-t', 'Tag2' ], 'ReleaseInfo.rb') do |iReleaseDir, iReleaseInfo|
|
37
|
-
checkReleaseInfo(iReleaseDir, iReleaseInfo, :Tags => ['Tag1', 'Tag2'] )
|
38
|
-
checkReleaseNotes(iReleaseDir, iReleaseInfo)
|
39
|
-
assert(File.exists?("#{iReleaseDir}/Release/MainLib.rb"))
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
|
-
# Test release with Tags (long version)
|
44
|
-
def testTagsLong
|
45
|
-
execTest('Libraries/Basic', [ '--tag=Tag1', '--tag=Tag2' ], 'ReleaseInfo.rb') do |iReleaseDir, iReleaseInfo|
|
46
|
-
checkReleaseInfo(iReleaseDir, iReleaseInfo, :Tags => ['Tag1', 'Tag2'] )
|
47
|
-
checkReleaseNotes(iReleaseDir, iReleaseInfo)
|
48
|
-
assert(File.exists?("#{iReleaseDir}/Release/MainLib.rb"))
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|
52
|
-
# Test release with Comments
|
53
|
-
def testComment
|
54
|
-
execTest('Libraries/Basic', [ '-c', 'Comment' ], 'ReleaseInfo.rb') do |iReleaseDir, iReleaseInfo|
|
55
|
-
checkReleaseInfo(iReleaseDir, iReleaseInfo)
|
56
|
-
checkReleaseNotes(iReleaseDir, iReleaseInfo)
|
57
|
-
assert(File.exists?("#{iReleaseDir}/Release/MainLib.rb"))
|
58
|
-
end
|
59
|
-
end
|
60
|
-
|
61
|
-
# Test release with Comments (long version)
|
62
|
-
def testCommentLong
|
63
|
-
execTest('Libraries/Basic', [ '--comment=Comment' ], 'ReleaseInfo.rb') do |iReleaseDir, iReleaseInfo|
|
64
|
-
checkReleaseInfo(iReleaseDir, iReleaseInfo)
|
65
|
-
checkReleaseNotes(iReleaseDir, iReleaseInfo)
|
66
|
-
assert(File.exists?("#{iReleaseDir}/Release/MainLib.rb"))
|
67
|
-
end
|
68
|
-
end
|
69
|
-
|
70
|
-
# Test release with Test files
|
71
|
-
def testTest
|
72
|
-
execTest('Libraries/Basic', [ '-n' ], 'ReleaseInfo_Test.rb') do |iReleaseDir, iReleaseInfo|
|
73
|
-
checkReleaseInfo(iReleaseDir, iReleaseInfo)
|
74
|
-
checkReleaseNotes(iReleaseDir, iReleaseInfo)
|
75
|
-
assert(File.exists?("#{iReleaseDir}/Release/MainLib.rb"))
|
76
|
-
assert(File.exists?("#{iReleaseDir}/Release/Test.rb"))
|
77
|
-
end
|
78
|
-
end
|
79
|
-
|
80
|
-
# Test release with Test files (long version)
|
81
|
-
def testTestLong
|
82
|
-
execTest('Libraries/Basic', [ '--includeTest' ], 'ReleaseInfo_Test.rb') do |iReleaseDir, iReleaseInfo|
|
83
|
-
checkReleaseInfo(iReleaseDir, iReleaseInfo)
|
84
|
-
checkReleaseNotes(iReleaseDir, iReleaseInfo)
|
85
|
-
assert(File.exists?("#{iReleaseDir}/Release/MainLib.rb"))
|
86
|
-
assert(File.exists?("#{iReleaseDir}/Release/Test.rb"))
|
87
|
-
end
|
88
|
-
end
|
89
|
-
|
90
|
-
# Test release with Installers
|
91
|
-
def testInstallers
|
92
|
-
execTest('Libraries/Basic', [ '-i', 'DummyInstaller1', '-i', 'DummyInstaller2' ], 'ReleaseInfo.rb') do |iReleaseDir, iReleaseInfo|
|
93
|
-
checkReleaseInfo(iReleaseDir, iReleaseInfo)
|
94
|
-
checkReleaseNotes(iReleaseDir, iReleaseInfo)
|
95
|
-
assert(File.exists?("#{iReleaseDir}/Release/MainLib.rb"))
|
96
|
-
assert(File.exists?("#{iReleaseDir}/Installer/MainLib.rb.Installer1"))
|
97
|
-
assert(File.exists?("#{iReleaseDir}/Installer/MainLib.rb.Installer2"))
|
98
|
-
end
|
99
|
-
end
|
100
|
-
|
101
|
-
# Test release with Installers (long version)
|
102
|
-
def testInstallersLong
|
103
|
-
execTest('Libraries/Basic', [ '--installer=DummyInstaller1', '--installer=DummyInstaller2' ], 'ReleaseInfo.rb') do |iReleaseDir, iReleaseInfo|
|
104
|
-
checkReleaseInfo(iReleaseDir, iReleaseInfo)
|
105
|
-
checkReleaseNotes(iReleaseDir, iReleaseInfo)
|
106
|
-
assert(File.exists?("#{iReleaseDir}/Release/MainLib.rb"))
|
107
|
-
assert(File.exists?("#{iReleaseDir}/Installer/MainLib.rb.Installer1"))
|
108
|
-
assert(File.exists?("#{iReleaseDir}/Installer/MainLib.rb.Installer2"))
|
109
|
-
end
|
110
|
-
end
|
111
|
-
|
112
|
-
# Test release with Distributors
|
113
|
-
def testDistributors
|
114
|
-
execTest('Libraries/Basic', [ '-i', 'DummyInstaller1', '-i', 'DummyInstaller2', '-d', 'DummyDistributor1', '-d', 'DummyDistributor2' ], 'ReleaseInfo.rb') do |iReleaseDir, iReleaseInfo|
|
115
|
-
checkReleaseInfo(iReleaseDir, iReleaseInfo)
|
116
|
-
checkReleaseNotes(iReleaseDir, iReleaseInfo)
|
117
|
-
assert(File.exists?("#{iReleaseDir}/Release/MainLib.rb"))
|
118
|
-
assert(File.exists?("#{iReleaseDir}/Installer/MainLib.rb.Installer1"))
|
119
|
-
assert(File.exists?("#{iReleaseDir}/Installer/MainLib.rb.Installer2"))
|
120
|
-
assert($Distributed1 != nil)
|
121
|
-
assert_equal(2, $Distributed1.size)
|
122
|
-
assert($Distributed1.has_key?('MainLib.rb.Installer1'))
|
123
|
-
assert($Distributed1.has_key?('MainLib.rb.Installer2'))
|
124
|
-
assert($Distributed2 != nil)
|
125
|
-
assert_equal(2, $Distributed2.size)
|
126
|
-
assert($Distributed2.has_key?('MainLib.rb.Installer1'))
|
127
|
-
assert($Distributed2.has_key?('MainLib.rb.Installer2'))
|
128
|
-
end
|
129
|
-
end
|
130
|
-
|
131
|
-
# Test release with Distributors (long version)
|
132
|
-
def testDistributorsLong
|
133
|
-
execTest('Libraries/Basic', [ '-i', 'DummyInstaller1', '-i', 'DummyInstaller2', '--distributor=DummyDistributor1', '--distributor=DummyDistributor2' ], 'ReleaseInfo.rb') do |iReleaseDir, iReleaseInfo|
|
134
|
-
checkReleaseInfo(iReleaseDir, iReleaseInfo)
|
135
|
-
checkReleaseNotes(iReleaseDir, iReleaseInfo)
|
136
|
-
assert(File.exists?("#{iReleaseDir}/Release/MainLib.rb"))
|
137
|
-
assert(File.exists?("#{iReleaseDir}/Installer/MainLib.rb.Installer1"))
|
138
|
-
assert(File.exists?("#{iReleaseDir}/Installer/MainLib.rb.Installer2"))
|
139
|
-
assert($Distributed1 != nil)
|
140
|
-
assert_equal(2, $Distributed1.size)
|
141
|
-
assert($Distributed1.has_key?('MainLib.rb.Installer1'))
|
142
|
-
assert($Distributed1.has_key?('MainLib.rb.Installer2'))
|
143
|
-
assert($Distributed2 != nil)
|
144
|
-
assert_equal(2, $Distributed2.size)
|
145
|
-
assert($Distributed2.has_key?('MainLib.rb.Installer1'))
|
146
|
-
assert($Distributed2.has_key?('MainLib.rb.Installer2'))
|
147
|
-
end
|
148
|
-
end
|
149
|
-
|
150
|
-
end
|
151
|
-
|
152
|
-
end
|
153
|
-
|
154
|
-
end
|
155
|
-
|
156
|
-
end
|
@@ -1,31 +0,0 @@
|
|
1
|
-
#--
|
2
|
-
# Copyright (c) 2009 Muriel Salvan (murielsalvan@users.sourceforge.net)
|
3
|
-
# Licensed under the terms specified in LICENSE file. No warranty is provided.
|
4
|
-
#++
|
5
|
-
|
6
|
-
module RubyPackager
|
7
|
-
|
8
|
-
module Test
|
9
|
-
|
10
|
-
module PlatformIndependent
|
11
|
-
|
12
|
-
class Executable < ::Test::Unit::TestCase
|
13
|
-
|
14
|
-
include RubyPackager::Test::Common
|
15
|
-
|
16
|
-
# Test the basic usage
|
17
|
-
def testBasicExecutable
|
18
|
-
execTest('Applications/Basic', [], 'ReleaseInfo.rb') do |iReleaseDir, iReleaseInfo|
|
19
|
-
checkReleaseInfo(iReleaseDir, iReleaseInfo)
|
20
|
-
checkReleaseNotes(iReleaseDir, iReleaseInfo)
|
21
|
-
assert(File.exists?("#{iReleaseDir}/Release/Main.rb"))
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
end
|
26
|
-
|
27
|
-
end
|
28
|
-
|
29
|
-
end
|
30
|
-
|
31
|
-
end
|
@@ -1,31 +0,0 @@
|
|
1
|
-
#--
|
2
|
-
# Copyright (c) 2009 Muriel Salvan (murielsalvan@users.sourceforge.net)
|
3
|
-
# Licensed under the terms specified in LICENSE file. No warranty is provided.
|
4
|
-
#++
|
5
|
-
|
6
|
-
module RubyPackager
|
7
|
-
|
8
|
-
module Test
|
9
|
-
|
10
|
-
module PlatformIndependent
|
11
|
-
|
12
|
-
class Library < ::Test::Unit::TestCase
|
13
|
-
|
14
|
-
include RubyPackager::Test::Common
|
15
|
-
|
16
|
-
# Test the basic usage
|
17
|
-
def testBasicLib
|
18
|
-
execTest('Libraries/Basic', [], 'ReleaseInfo.rb') do |iReleaseDir, iReleaseInfo|
|
19
|
-
checkReleaseInfo(iReleaseDir, iReleaseInfo)
|
20
|
-
checkReleaseNotes(iReleaseDir, iReleaseInfo)
|
21
|
-
assert(File.exists?("#{iReleaseDir}/Release/MainLib.rb"))
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
end
|
26
|
-
|
27
|
-
end
|
28
|
-
|
29
|
-
end
|
30
|
-
|
31
|
-
end
|
@@ -1,62 +0,0 @@
|
|
1
|
-
#--
|
2
|
-
# Copyright (c) 2009 Muriel Salvan (murielsalvan@users.sourceforge.net)
|
3
|
-
# Licensed under the terms specified in LICENSE file. No warranty is provided.
|
4
|
-
#++
|
5
|
-
|
6
|
-
module RubyPackager
|
7
|
-
|
8
|
-
module Test
|
9
|
-
|
10
|
-
module PlatformIndependent
|
11
|
-
|
12
|
-
class Misc < ::Test::Unit::TestCase
|
13
|
-
|
14
|
-
include RubyPackager::Test::Common
|
15
|
-
|
16
|
-
# Test release without Test files
|
17
|
-
def testWithoutTest
|
18
|
-
execTest('Libraries/Basic', [], 'ReleaseInfo_Test.rb') do |iReleaseDir, iReleaseInfo|
|
19
|
-
checkReleaseInfo(iReleaseDir, iReleaseInfo)
|
20
|
-
checkReleaseNotes(iReleaseDir, iReleaseInfo)
|
21
|
-
assert(File.exists?("#{iReleaseDir}/Release/MainLib.rb"))
|
22
|
-
assert(!File.exists?("#{iReleaseDir}/Release/Test.rb"))
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
# Test release with Test files
|
27
|
-
def testWithTest
|
28
|
-
execTest('Libraries/Basic', [ '-n' ], 'ReleaseInfo_Test.rb') do |iReleaseDir, iReleaseInfo|
|
29
|
-
checkReleaseInfo(iReleaseDir, iReleaseInfo)
|
30
|
-
checkReleaseNotes(iReleaseDir, iReleaseInfo)
|
31
|
-
assert(File.exists?("#{iReleaseDir}/Release/MainLib.rb"))
|
32
|
-
assert(File.exists?("#{iReleaseDir}/Release/Test.rb"))
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
# Test release with Additional files
|
37
|
-
def testWithAdditional
|
38
|
-
execTest('Libraries/Basic', [], 'ReleaseInfo_Additional.rb') do |iReleaseDir, iReleaseInfo|
|
39
|
-
checkReleaseInfo(iReleaseDir, iReleaseInfo)
|
40
|
-
checkReleaseNotes(iReleaseDir, iReleaseInfo)
|
41
|
-
assert(File.exists?("#{iReleaseDir}/Release/MainLib.rb"))
|
42
|
-
assert(File.exists?("#{iReleaseDir}/Release/Add.rb"))
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
# Test release with RDoc
|
47
|
-
def testWithRDoc
|
48
|
-
execTest('Libraries/Basic', [], 'ReleaseInfo.rb', :IncludeRDoc => true) do |iReleaseDir, iReleaseInfo|
|
49
|
-
checkReleaseInfo(iReleaseDir, iReleaseInfo)
|
50
|
-
checkReleaseNotes(iReleaseDir, iReleaseInfo)
|
51
|
-
checkRDoc(iReleaseDir, iReleaseInfo)
|
52
|
-
assert(File.exists?("#{iReleaseDir}/Release/MainLib.rb"))
|
53
|
-
end
|
54
|
-
end
|
55
|
-
|
56
|
-
end
|
57
|
-
|
58
|
-
end
|
59
|
-
|
60
|
-
end
|
61
|
-
|
62
|
-
end
|
@@ -1,81 +0,0 @@
|
|
1
|
-
#--
|
2
|
-
# Copyright (c) 2009 Muriel Salvan (murielsalvan@users.sourceforge.net)
|
3
|
-
# Licensed under the terms specified in LICENSE file. No warranty is provided.
|
4
|
-
#++
|
5
|
-
|
6
|
-
module RubyPackager
|
7
|
-
|
8
|
-
module Test
|
9
|
-
|
10
|
-
module PlatformIndependent
|
11
|
-
|
12
|
-
module Plugins
|
13
|
-
|
14
|
-
module Distributors
|
15
|
-
|
16
|
-
class SourceForge < ::Test::Unit::TestCase
|
17
|
-
|
18
|
-
include RubyPackager::Test::Common
|
19
|
-
|
20
|
-
def testBasicSend
|
21
|
-
execTest('Libraries/Basic', [ '-i', 'DummyInstaller1', '-d', 'SourceForge' ], 'ReleaseInfo_SF.rb') do |iReleaseDir, iReleaseInfo|
|
22
|
-
checkReleaseInfo(iReleaseDir, iReleaseInfo)
|
23
|
-
checkReleaseNotes(iReleaseDir, iReleaseInfo)
|
24
|
-
assert(File.exists?("#{iReleaseDir}/Release/MainLib.rb"))
|
25
|
-
assert(File.exists?("#{iReleaseDir}/Installer/MainLib.rb.Installer1"))
|
26
|
-
assert_equal( [
|
27
|
-
[ 'SSH', { :Host => 'shell.sourceforge.net', :Login => 'login,unixname',
|
28
|
-
:Cmd => 'create' } ],
|
29
|
-
[ 'SSH', { :Host => 'shell.sourceforge.net', :Login => 'login,unixname',
|
30
|
-
:Cmd => 'mkdir -p /home/frs/project/u/un/unixname/UnnamedVersion' } ],
|
31
|
-
[ 'SCP', { :Host => 'shell.sourceforge.net', :Login => 'login,unixname',
|
32
|
-
:FileSrc => "#{iReleaseDir}/Documentation/ReleaseNote.html",
|
33
|
-
:FileDst => '/home/frs/project/u/un/unixname/UnnamedVersion/ReleaseNote.html' } ],
|
34
|
-
[ 'SCP', { :Host => 'shell.sourceforge.net', :Login => 'login,unixname',
|
35
|
-
:FileSrc => "#{iReleaseDir}/Installer/MainLib.rb.Installer1",
|
36
|
-
:FileDst => '/home/frs/project/u/un/unixname/UnnamedVersion/MainLib.rb.Installer1' } ]
|
37
|
-
], $SSHCommands)
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
def testBasicSendWithRDoc
|
42
|
-
execTest('Libraries/Basic', [ '-i', 'DummyInstaller1', '-d', 'SourceForge' ], 'ReleaseInfo_SF.rb', :IncludeRDoc => true) do |iReleaseDir, iReleaseInfo|
|
43
|
-
checkReleaseInfo(iReleaseDir, iReleaseInfo)
|
44
|
-
checkReleaseNotes(iReleaseDir, iReleaseInfo)
|
45
|
-
checkRDoc(iReleaseDir, iReleaseInfo)
|
46
|
-
assert(File.exists?("#{iReleaseDir}/Release/MainLib.rb"))
|
47
|
-
assert(File.exists?("#{iReleaseDir}/Installer/MainLib.rb.Installer1"))
|
48
|
-
lRDocBaseDir = '/home/groups/u/un/unixname/htdocs/rdoc'
|
49
|
-
assert_equal( [
|
50
|
-
[ 'SSH', { :Host => 'shell.sourceforge.net', :Login => 'login,unixname',
|
51
|
-
:Cmd => 'create' } ],
|
52
|
-
[ 'SSH', { :Host => 'shell.sourceforge.net', :Login => 'login,unixname',
|
53
|
-
:Cmd => 'mkdir -p /home/frs/project/u/un/unixname/UnnamedVersion' } ],
|
54
|
-
[ 'SSH', { :Host => 'shell.sourceforge.net', :Login => 'login,unixname',
|
55
|
-
:Cmd => "mkdir -p #{lRDocBaseDir}" } ],
|
56
|
-
[ 'SCP', { :Host => 'shell.sourceforge.net', :Login => 'login,unixname',
|
57
|
-
:FileSrc => "#{iReleaseDir}/Documentation/rdoc.zip",
|
58
|
-
:FileDst => "#{lRDocBaseDir}/rdoc-UnnamedVersion.zip" } ],
|
59
|
-
[ 'SSH', { :Host => 'shell.sourceforge.net', :Login => 'login,unixname',
|
60
|
-
:Cmd => "unzip -o -d #{lRDocBaseDir} #{lRDocBaseDir}/rdoc-UnnamedVersion.zip ; mv #{lRDocBaseDir}/rdoc #{lRDocBaseDir}/UnnamedVersion ; rm #{lRDocBaseDir}/latest ; ln -s #{lRDocBaseDir}/UnnamedVersion #{lRDocBaseDir}/latest ; rm #{lRDocBaseDir}/rdoc-UnnamedVersion.zip" } ],
|
61
|
-
[ 'SCP', { :Host => 'shell.sourceforge.net', :Login => 'login,unixname',
|
62
|
-
:FileSrc => "#{iReleaseDir}/Documentation/ReleaseNote.html",
|
63
|
-
:FileDst => '/home/frs/project/u/un/unixname/UnnamedVersion/ReleaseNote.html' } ],
|
64
|
-
[ 'SCP', { :Host => 'shell.sourceforge.net', :Login => 'login,unixname',
|
65
|
-
:FileSrc => "#{iReleaseDir}/Installer/MainLib.rb.Installer1",
|
66
|
-
:FileDst => '/home/frs/project/u/un/unixname/UnnamedVersion/MainLib.rb.Installer1' } ]
|
67
|
-
], $SSHCommands)
|
68
|
-
end
|
69
|
-
end
|
70
|
-
|
71
|
-
end
|
72
|
-
|
73
|
-
end
|
74
|
-
|
75
|
-
end
|
76
|
-
|
77
|
-
end
|
78
|
-
|
79
|
-
end
|
80
|
-
|
81
|
-
end
|
@@ -1,142 +0,0 @@
|
|
1
|
-
#--
|
2
|
-
# Copyright (c) 2009 Muriel Salvan (murielsalvan@users.sourceforge.net)
|
3
|
-
# Licensed under the terms specified in LICENSE file. No warranty is provided.
|
4
|
-
#++
|
5
|
-
|
6
|
-
module RubyPackager
|
7
|
-
|
8
|
-
module Test
|
9
|
-
|
10
|
-
module PlatformIndependent
|
11
|
-
|
12
|
-
module Plugins
|
13
|
-
|
14
|
-
module Installers
|
15
|
-
|
16
|
-
class Gem < ::Test::Unit::TestCase
|
17
|
-
|
18
|
-
include RubyPackager::Test::Common
|
19
|
-
|
20
|
-
def testGemLibrary
|
21
|
-
execTest('Libraries/Basic', [ '-v', '0.0.1.20091030', '-i', 'Gem' ], 'ReleaseInfo_Gem.rb') do |iReleaseDir, iReleaseInfo|
|
22
|
-
checkReleaseInfo(iReleaseDir, iReleaseInfo, :Version => '0.0.1.20091030' )
|
23
|
-
checkReleaseNotes(iReleaseDir, iReleaseInfo)
|
24
|
-
assert(File.exists?("#{iReleaseDir}/Release/MainLib.rb"))
|
25
|
-
lGemName = "#{iReleaseDir}/Installer/GemName-0.0.1.20091030.gem"
|
26
|
-
assert(File.exists?(lGemName))
|
27
|
-
# Get back the specification to check it
|
28
|
-
lGemSpec = getGemSpec(lGemName)
|
29
|
-
assert_equal('GemName', lGemSpec.name)
|
30
|
-
assert_equal(::Gem::Version.new('0.0.1.20091030'), lGemSpec.version)
|
31
|
-
assert_equal(['Author:Name'], lGemSpec.authors)
|
32
|
-
assert_equal('Project:Description', lGemSpec.description)
|
33
|
-
assert_equal('Author:EMail', lGemSpec.email)
|
34
|
-
assert_equal(2, lGemSpec.files.size)
|
35
|
-
assert(lGemSpec.files.include?('MainLib.rb'))
|
36
|
-
assert(lGemSpec.files.include?('ReleaseInfo'))
|
37
|
-
assert_equal(true, lGemSpec.has_rdoc)
|
38
|
-
assert_equal('Project:WebPageURL', lGemSpec.homepage)
|
39
|
-
assert_equal('Project:Summary', lGemSpec.summary)
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
|
-
def testGemLibraryWithTest
|
44
|
-
execTest('Libraries/Basic', [ '-v', '0.0.1.20091030', '-n', '-i', 'Gem' ], 'ReleaseInfo_TestGem.rb') do |iReleaseDir, iReleaseInfo|
|
45
|
-
checkReleaseInfo(iReleaseDir, iReleaseInfo, :Version => '0.0.1.20091030' )
|
46
|
-
checkReleaseNotes(iReleaseDir, iReleaseInfo)
|
47
|
-
assert(File.exists?("#{iReleaseDir}/Release/MainLib.rb"))
|
48
|
-
assert(File.exists?("#{iReleaseDir}/Release/Test.rb"))
|
49
|
-
lGemName = "#{iReleaseDir}/Installer/GemName-0.0.1.20091030.gem"
|
50
|
-
assert(File.exists?(lGemName))
|
51
|
-
# Get back the specification to check it
|
52
|
-
lOldDir = Dir.getwd
|
53
|
-
Dir.chdir(File.dirname(lGemName))
|
54
|
-
require 'rubygems'
|
55
|
-
# TODO: Bug (Ruby): gem.bat instead of gem for Windows only. Make .bat files calleable without their extension.
|
56
|
-
if (RUBY_PLATFORM == 'i386-mswin32')
|
57
|
-
lGemSpec = eval(`gem.bat specification #{File.basename(lGemName)} --ruby`.gsub(/Gem::/,'::Gem::'))
|
58
|
-
else
|
59
|
-
lGemSpec = eval(`gem specification #{File.basename(lGemName)} --ruby`.gsub(/Gem::/,'::Gem::'))
|
60
|
-
end
|
61
|
-
Dir.chdir(lOldDir)
|
62
|
-
assert_equal('GemName', lGemSpec.name)
|
63
|
-
assert_equal(::Gem::Version.new('0.0.1.20091030'), lGemSpec.version)
|
64
|
-
assert_equal(['Author:Name'], lGemSpec.authors)
|
65
|
-
assert_equal('Project:Description', lGemSpec.description)
|
66
|
-
assert_equal('Author:EMail', lGemSpec.email)
|
67
|
-
assert_equal('Test.rb', lGemSpec.test_file)
|
68
|
-
assert_equal(3, lGemSpec.files.size)
|
69
|
-
assert(lGemSpec.files.include?('MainLib.rb'))
|
70
|
-
assert(lGemSpec.files.include?('Test.rb'))
|
71
|
-
assert(lGemSpec.files.include?('ReleaseInfo'))
|
72
|
-
assert_equal(true, lGemSpec.has_rdoc)
|
73
|
-
assert_equal('Project:WebPageURL', lGemSpec.homepage)
|
74
|
-
assert_equal('Project:Summary', lGemSpec.summary)
|
75
|
-
end
|
76
|
-
end
|
77
|
-
|
78
|
-
def testGemExecutable
|
79
|
-
execTest('Applications/Basic', [ '-v', '0.0.1.20091030', '-i', 'Gem' ], 'ReleaseInfo_Gem.rb') do |iReleaseDir, iReleaseInfo|
|
80
|
-
checkReleaseInfo(iReleaseDir, iReleaseInfo, :Version => '0.0.1.20091030' )
|
81
|
-
checkReleaseNotes(iReleaseDir, iReleaseInfo)
|
82
|
-
assert(File.exists?("#{iReleaseDir}/Release/Main.rb"))
|
83
|
-
lGemName = "#{iReleaseDir}/Installer/GemName-0.0.1.20091030.gem"
|
84
|
-
assert(File.exists?(lGemName))
|
85
|
-
# Get back the specification to check it
|
86
|
-
lGemSpec = getGemSpec(lGemName)
|
87
|
-
assert_equal('GemName', lGemSpec.name)
|
88
|
-
assert_equal(::Gem::Version.new('0.0.1.20091030'), lGemSpec.version)
|
89
|
-
assert_equal(['Author:Name'], lGemSpec.authors)
|
90
|
-
assert_equal('.', lGemSpec.bindir)
|
91
|
-
assert_equal('Main.rb', lGemSpec.default_executable)
|
92
|
-
assert_equal(['Main.rb'], lGemSpec.executables)
|
93
|
-
assert_equal('Project:Description', lGemSpec.description)
|
94
|
-
assert_equal('Author:EMail', lGemSpec.email)
|
95
|
-
assert_equal(3, lGemSpec.files.size)
|
96
|
-
assert(lGemSpec.files.include?('Main.rb'))
|
97
|
-
assert(lGemSpec.files.include?('ReleaseInfo'))
|
98
|
-
# This one is added by RubyGems itself because of the binary
|
99
|
-
assert(lGemSpec.files.include?('./Main.rb'))
|
100
|
-
assert_equal(true, lGemSpec.has_rdoc)
|
101
|
-
assert_equal('Project:WebPageURL', lGemSpec.homepage)
|
102
|
-
assert_equal('Project:Summary', lGemSpec.summary)
|
103
|
-
end
|
104
|
-
end
|
105
|
-
|
106
|
-
def testGemDependency
|
107
|
-
execTest('Libraries/Basic', [ '-v', '0.0.1.20091030', '-i', 'Gem' ], 'ReleaseInfo_GemDep.rb') do |iReleaseDir, iReleaseInfo|
|
108
|
-
checkReleaseInfo(iReleaseDir, iReleaseInfo, :Version => '0.0.1.20091030' )
|
109
|
-
checkReleaseNotes(iReleaseDir, iReleaseInfo)
|
110
|
-
assert(File.exists?("#{iReleaseDir}/Release/MainLib.rb"))
|
111
|
-
lGemName = "#{iReleaseDir}/Installer/GemName-0.0.1.20091030.gem"
|
112
|
-
assert(File.exists?(lGemName))
|
113
|
-
# Get back the specification to check it
|
114
|
-
lGemSpec = getGemSpec(lGemName)
|
115
|
-
assert_equal('GemName', lGemSpec.name)
|
116
|
-
assert_equal(::Gem::Version.new('0.0.1.20091030'), lGemSpec.version)
|
117
|
-
assert_equal(['Author:Name'], lGemSpec.authors)
|
118
|
-
assert_equal('Project:Description', lGemSpec.description)
|
119
|
-
assert_equal('Author:EMail', lGemSpec.email)
|
120
|
-
assert_equal(2, lGemSpec.files.size)
|
121
|
-
assert(lGemSpec.files.include?('MainLib.rb'))
|
122
|
-
assert(lGemSpec.files.include?('ReleaseInfo'))
|
123
|
-
assert_equal(true, lGemSpec.has_rdoc)
|
124
|
-
assert_equal('Project:WebPageURL', lGemSpec.homepage)
|
125
|
-
assert_equal('Project:Summary', lGemSpec.summary)
|
126
|
-
assert_equal(1, lGemSpec.dependencies.size)
|
127
|
-
assert_equal('GemDepName', lGemSpec.dependencies[0].name)
|
128
|
-
assert_equal([ [ '>=', ::Gem::Version.new('0.1') ] ], lGemSpec.dependencies[0].version_requirements.requirements)
|
129
|
-
end
|
130
|
-
end
|
131
|
-
|
132
|
-
end
|
133
|
-
|
134
|
-
end
|
135
|
-
|
136
|
-
end
|
137
|
-
|
138
|
-
end
|
139
|
-
|
140
|
-
end
|
141
|
-
|
142
|
-
end
|
@@ -1,27 +0,0 @@
|
|
1
|
-
#--
|
2
|
-
# Copyright (c) 2009 Muriel Salvan (murielsalvan@users.sourceforge.net)
|
3
|
-
# Licensed under the terms specified in LICENSE file. No warranty is provided.
|
4
|
-
#++
|
5
|
-
|
6
|
-
RubyPackager::ReleaseInfo.new.
|
7
|
-
author(
|
8
|
-
:Name => 'Author:Name',
|
9
|
-
:EMail => 'Author:EMail',
|
10
|
-
:WebPageURL => 'Author:WebPageURL'
|
11
|
-
).
|
12
|
-
project(
|
13
|
-
:Name => 'Project:Name',
|
14
|
-
:WebPageURL => 'Project:WebPageURL',
|
15
|
-
:Summary => 'Project:Summary',
|
16
|
-
:Description => 'Project:Description',
|
17
|
-
:ImageURL => 'Project:ImageURL',
|
18
|
-
:FaviconURL => 'Project:FaviconURL',
|
19
|
-
:SVNBrowseURL => 'Project:SVNBrowseURL',
|
20
|
-
:DevStatus => 'Project:DevStatus'
|
21
|
-
).
|
22
|
-
addCoreFiles( [
|
23
|
-
'*'
|
24
|
-
] ).
|
25
|
-
executable(
|
26
|
-
:StartupRBFile => 'Main.rb'
|
27
|
-
)
|
@@ -1,33 +0,0 @@
|
|
1
|
-
#--
|
2
|
-
# Copyright (c) 2009 Muriel Salvan (murielsalvan@users.sourceforge.net)
|
3
|
-
# Licensed under the terms specified in LICENSE file. No warranty is provided.
|
4
|
-
#++
|
5
|
-
|
6
|
-
RubyPackager::ReleaseInfo.new.
|
7
|
-
author(
|
8
|
-
:Name => 'Author:Name',
|
9
|
-
:EMail => 'Author:EMail',
|
10
|
-
:WebPageURL => 'Author:WebPageURL'
|
11
|
-
).
|
12
|
-
project(
|
13
|
-
:Name => 'Project:Name',
|
14
|
-
:WebPageURL => 'Project:WebPageURL',
|
15
|
-
:Summary => 'Project:Summary',
|
16
|
-
:Description => 'Project:Description',
|
17
|
-
:ImageURL => 'Project:ImageURL',
|
18
|
-
:FaviconURL => 'Project:FaviconURL',
|
19
|
-
:SVNBrowseURL => 'Project:SVNBrowseURL',
|
20
|
-
:DevStatus => 'Project:DevStatus'
|
21
|
-
).
|
22
|
-
addCoreFiles( [
|
23
|
-
'*'
|
24
|
-
] ).
|
25
|
-
executable(
|
26
|
-
:StartupRBFile => 'Main.rb',
|
27
|
-
:ExeName => 'ExeName',
|
28
|
-
:IconName => "Distribution/#{RUBY_PLATFORM}/Icon.ico",
|
29
|
-
:TerminalApplication => false
|
30
|
-
).
|
31
|
-
install(
|
32
|
-
:NSISFileName => "Distribution/#{RUBY_PLATFORM}/Installer/install.nsi"
|
33
|
-
)
|
@@ -1,33 +0,0 @@
|
|
1
|
-
#--
|
2
|
-
# Copyright (c) 2009 Muriel Salvan (murielsalvan@users.sourceforge.net)
|
3
|
-
# Licensed under the terms specified in LICENSE file. No warranty is provided.
|
4
|
-
#++
|
5
|
-
|
6
|
-
RubyPackager::ReleaseInfo.new.
|
7
|
-
author(
|
8
|
-
:Name => 'Author:Name',
|
9
|
-
:EMail => 'Author:EMail',
|
10
|
-
:WebPageURL => 'Author:WebPageURL'
|
11
|
-
).
|
12
|
-
project(
|
13
|
-
:Name => 'Project:Name',
|
14
|
-
:WebPageURL => 'Project:WebPageURL',
|
15
|
-
:Summary => 'Project:Summary',
|
16
|
-
:Description => 'Project:Description',
|
17
|
-
:ImageURL => 'Project:ImageURL',
|
18
|
-
:FaviconURL => 'Project:FaviconURL',
|
19
|
-
:SVNBrowseURL => 'Project:SVNBrowseURL',
|
20
|
-
:DevStatus => 'Project:DevStatus'
|
21
|
-
).
|
22
|
-
addCoreFiles( [
|
23
|
-
'*'
|
24
|
-
] ).
|
25
|
-
executable(
|
26
|
-
:StartupRBFile => 'Main.rb',
|
27
|
-
:ExeName => 'ExeName',
|
28
|
-
:IconName => "Distribution/#{RUBY_PLATFORM}/Icon.ico",
|
29
|
-
:TerminalApplication => true
|
30
|
-
).
|
31
|
-
install(
|
32
|
-
:NSISFileName => "Distribution/#{RUBY_PLATFORM}/Installer/install.nsi"
|
33
|
-
)
|
@@ -1,32 +0,0 @@
|
|
1
|
-
#--
|
2
|
-
# Copyright (c) 2009 Muriel Salvan (murielsalvan@users.sourceforge.net)
|
3
|
-
# Licensed under the terms specified in LICENSE file. No warranty is provided.
|
4
|
-
#++
|
5
|
-
|
6
|
-
RubyPackager::ReleaseInfo.new.
|
7
|
-
author(
|
8
|
-
:Name => 'Author:Name',
|
9
|
-
:EMail => 'Author:EMail',
|
10
|
-
:WebPageURL => 'Author:WebPageURL'
|
11
|
-
).
|
12
|
-
project(
|
13
|
-
:Name => 'Project:Name',
|
14
|
-
:WebPageURL => 'Project:WebPageURL',
|
15
|
-
:Summary => 'Project:Summary',
|
16
|
-
:Description => 'Project:Description',
|
17
|
-
:ImageURL => 'Project:ImageURL',
|
18
|
-
:FaviconURL => 'Project:FaviconURL',
|
19
|
-
:SVNBrowseURL => 'Project:SVNBrowseURL',
|
20
|
-
:DevStatus => 'Project:DevStatus'
|
21
|
-
).
|
22
|
-
addCoreFiles( [
|
23
|
-
'*'
|
24
|
-
] ).
|
25
|
-
executable(
|
26
|
-
:StartupRBFile => 'Main.rb'
|
27
|
-
).
|
28
|
-
gem(
|
29
|
-
:GemName => 'GemName',
|
30
|
-
:GemPlatformClassName => 'Gem::Platform::RUBY',
|
31
|
-
:HasRDoc => true
|
32
|
-
)
|
Binary file
|