setup 5.0.1 → 5.1.0

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.
Files changed (48) hide show
  1. data/Assembly +46 -0
  2. data/Gemfile +2 -0
  3. data/{HISTORY → HISTORY.rdoc} +21 -0
  4. data/LICENSE.txt +28 -0
  5. data/{COPYING → NOTICE.txt} +11 -4
  6. data/README.rdoc +28 -40
  7. data/SetupReceipt +405 -0
  8. data/bin/setup.rb +1302 -3
  9. data/lib/setup.rb +4 -3
  10. data/lib/setup/base.rb +1 -1
  11. data/lib/setup/command.rb +41 -18
  12. data/lib/setup/configuration.rb +21 -16
  13. data/lib/setup/constants.rb +4 -1
  14. data/lib/setup/documentor.rb +47 -41
  15. data/lib/setup/installer.rb +2 -2
  16. data/lib/setup/project.rb +85 -35
  17. data/lib/setup/session.rb +44 -31
  18. data/lib/setup/version.rb +4 -0
  19. data/meta/authors +4 -2
  20. data/meta/copyrights +4 -0
  21. data/meta/description +1 -1
  22. data/meta/organization +1 -0
  23. data/meta/repositories +2 -0
  24. data/meta/requirements +4 -0
  25. data/meta/resources +6 -0
  26. data/meta/version +1 -1
  27. data/script/{bstrap → bootstrap} +0 -0
  28. data/script/bundle +23 -6
  29. data/script/setup +122 -164
  30. data/test/features/{make.feature → compile.feature} +5 -6
  31. data/test/features/config.feature +1 -1
  32. data/test/features/install.feature +5 -5
  33. data/test/features/step_definitions/compile_steps.rb +26 -0
  34. data/test/features/step_definitions/config_steps.rb +2 -2
  35. data/test/features/step_definitions/install_steps.rb +11 -5
  36. data/test/features/uninstall.feature +1 -1
  37. data/test/fixtures/faux-project/.setup/metaconfig.rb +6 -0
  38. metadata +99 -60
  39. data/MANIFEST +0 -65
  40. data/Syckfile +0 -77
  41. data/meta/collection +0 -1
  42. data/meta/contact +0 -1
  43. data/meta/homepage +0 -1
  44. data/meta/released +0 -1
  45. data/meta/repository +0 -1
  46. data/meta/ruby +0 -3
  47. data/test/features/document.feature +0 -2
  48. data/test/features/step_definitions/setup_steps.rb +0 -30
@@ -1,18 +1,17 @@
1
1
  Feature: Setup/Compile Extensions
2
2
  In order to install a Ruby project with extensions
3
3
  As a Ruby Developer
4
- I must first use 'setup.rb make' to buld the extensions
4
+ I must first use 'setup.rb compile' to buld the extensions
5
5
 
6
6
  Scenario: Compile a new project
7
7
  Given a setup.rb compliant Ruby project
8
- And 'setup.rb config' has been run
9
- When I issue the command 'setup.rb make'
8
+ And 'setup.rb compile' has been run
10
9
  Then the extensions should be compiled
11
10
 
12
- Scenario: Fail to compile project without first running config
11
+ Scenario: Fail to install project without first running compile
13
12
  Given a setup.rb compliant Ruby project
14
- And 'setup.rb config' has NOT been run
15
- When I issue the command 'setup.rb make' unprepared
13
+ And 'setup.rb compile' has NOT been run
14
+ When I issue the command 'setup.rb install' unprepared
16
15
  Then I will be told that I must first run 'setup.rb config'
17
16
  And the extensions will not be compiled
18
17
 
@@ -1,4 +1,4 @@
1
- Feature: Configuration
1
+ Feature: Preconfiguration
2
2
  In order to install a Ruby project
3
3
  As a Ruby Developer
4
4
  I may first use 'setup.rb config' to generate a configuration file
@@ -6,7 +6,7 @@ Feature: Install
6
6
  Scenario: Install project to Ruby's site locations
7
7
  Given a setup.rb compliant Ruby project
8
8
  And 'setup.rb config --type=site' has been run
9
- And 'setup.rb make' has been run
9
+ And 'setup.rb compile' has been run
10
10
  When I issue the command 'setup.rb install'
11
11
  Then the project's exectuables should be installed to the site_ruby bin location
12
12
  And the project's libraries should be installed to the site_ruby lib location
@@ -15,7 +15,7 @@ Feature: Install
15
15
  Scenario: Install project to standard ruby locations
16
16
  Given a setup.rb compliant Ruby project
17
17
  And 'setup.rb config --type=std' has been run
18
- And 'setup.rb make' has been run
18
+ And 'setup.rb compile' has been run
19
19
  When I issue the command 'setup.rb install'
20
20
  Then the project's exectuables should be installed to the ruby bin location
21
21
  And the project's libraries should be installed to the ruby lib location
@@ -24,7 +24,7 @@ Feature: Install
24
24
  Scenario: Install project to XDG home locations
25
25
  Given a setup.rb compliant Ruby project
26
26
  And 'setup.rb config --type=home' has been run
27
- And 'setup.rb make' has been run
27
+ And 'setup.rb compile' has been run
28
28
  When I issue the command 'setup.rb install'
29
29
  Then the project's exectuables should be installed to the home bin location
30
30
  And the project's libraries should be installed to the home lib location
@@ -65,7 +65,7 @@ Feature: Install
65
65
  Scenario: Fail to install project with extensions without first running setup
66
66
  Given a setup.rb compliant Ruby project
67
67
  And 'setup.rb config' has been run
68
- But 'setup.rb make' has NOT been run
68
+ But 'setup.rb compile' has NOT been run
69
69
  When I issue the command 'setup.rb install' unprepared
70
- Then I will be told that I must first run 'setup.rb make'
70
+ Then I will be told that I must first run 'setup.rb compile'
71
71
 
@@ -0,0 +1,26 @@
1
+ Given /'setup.rb compile' has been run$/ do
2
+ Setup::Command.run("compile", "--quiet") #, "--trace")
3
+ end
4
+
5
+ When /^I issue the command 'setup\.rb compile'$/ do
6
+ Setup::Command.run("compile", "--quiet")
7
+ end
8
+
9
+ #When /^I issue the command 'setup\.rb install' unprepared$/ do
10
+ # begin
11
+ # Setup::Command.run("install", "--quiet")
12
+ # rescue SystemExit => error
13
+ # $setup_feature_error = error
14
+ # end
15
+ #end
16
+
17
+ Then /^the extensions should be compiled$/ do
18
+ exts = Dir['ext/faux/faux.so']
19
+ exts.assert!.empty?
20
+ end
21
+
22
+ Then /^the extensions will not be compiled$/ do
23
+ exts = Dir['ext/faux/faux.so']
24
+ exts.assert.empty?
25
+ end
26
+
@@ -15,10 +15,10 @@ When /^I issue the command 'setup.rb config'$/ do
15
15
  end
16
16
 
17
17
  Then /^a config file should be generated$/ do
18
- File.assert.exists?(Setup::Configuration::CONFIG_FILE)
18
+ File.assert.exists?(Setup::CONFIG_FILE)
19
19
  end
20
20
 
21
21
  Then /^the config file should be updated$/ do
22
- File.assert.exists?(Setup::Configuration::CONFIG_FILE)
22
+ File.assert.exists?(Setup::CONFIG_FILE)
23
23
  end
24
24
 
@@ -1,4 +1,4 @@
1
- Given /^'setup\.rb make' has NOT been run$/ do
1
+ Given /^'setup\.rb compile' has NOT been run$/ do
2
2
  # TODO: assert there are no compiled extensions
3
3
  end
4
4
 
@@ -18,15 +18,20 @@ When /I issue the command 'setup.rb install' unprepared$/ do
18
18
  end
19
19
  end
20
20
 
21
- Then /^I will be told that I must first run 'setup\.rb make'$/ do
22
- $setup_feature_error.to_s.assert =~ /setup\.rb make\'? first/
21
+ Then /^I will be told that I must first run 'setup\.rb compile'$/ do
22
+ $setup_feature_error.to_s.assert =~ /setup\.rb compile\'? first/
23
23
  end
24
24
 
25
+ #Then /^I will be told that I must first run 'setup\.rb compile'$/ do
26
+ # $setup_feature_error.message.assert == "must run \'setup compile\' first"
27
+ #end
28
+
25
29
  # Site Ruby Locations
26
30
 
27
31
  Then /the project's exectuables should be installed to the site_ruby bin location$/ do
28
32
  entries = installed_files
29
- entries.assert.include?('/usr/bin/faux')
33
+ #entries.assert.any? { |path| /bin\/faux$/ =~ path }
34
+ entries.assert.include?("#{Config::CONFIG['bindir']}/faux")
30
35
  end
31
36
 
32
37
  Then /the project's libraries should be installed to the site_ruby lib location$/ do
@@ -43,7 +48,8 @@ end
43
48
 
44
49
  Then /the project's exectuables should be installed to the ruby bin location$/ do
45
50
  entries = installed_files
46
- entries.assert.include?('/usr/bin/faux')
51
+ #entries.assert.include?('/usr/bin/faux')
52
+ entries.assert.include?("#{Config::CONFIG['bindir']}/faux")
47
53
  end
48
54
 
49
55
  Then /the project's libraries should be installed to the ruby lib location$/ do
@@ -6,7 +6,7 @@ Feature: Uninstall
6
6
  Scenario: Uninstall a package
7
7
  Given a setup.rb compliant Ruby project
8
8
  And 'setup.rb config' has been run
9
- And 'setup.rb make' has been run
9
+ And 'setup.rb compile' has been run
10
10
  And 'setup.rb install' has been run
11
11
  When I issue the command 'setup.rb uninstall'
12
12
  Then the package files should be removed
@@ -0,0 +1,6 @@
1
+ # This is simply here to test metaconfig loading.
2
+
3
+ option :dummy, :value, "ignore this option"
4
+
5
+ #add_config('dummyvar', nil, 'ignore this options')
6
+
metadata CHANGED
@@ -1,43 +1,78 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: setup
3
- version: !ruby/object:Gem::Version
4
- version: 5.0.1
3
+ version: !ruby/object:Gem::Version
4
+ version: 5.1.0
5
+ prerelease:
5
6
  platform: ruby
6
- authors:
7
- - Minero Aoki <aamine@loveruby.net>
8
- - 7rans <transfire@gmail.com>
7
+ authors:
8
+ - 7rans
9
+ - Minero Aoki
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
13
+ date: 2012-03-20 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: detroit
17
+ requirement: &24815740 !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ! '>='
21
+ - !ruby/object:Gem::Version
22
+ version: '0'
23
+ type: :development
24
+ prerelease: false
25
+ version_requirements: *24815740
26
+ - !ruby/object:Gem::Dependency
27
+ name: cucumber
28
+ requirement: &24815200 !ruby/object:Gem::Requirement
29
+ none: false
30
+ requirements:
31
+ - - ! '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: *24815200
37
+ - !ruby/object:Gem::Dependency
38
+ name: ae
39
+ requirement: &24814700 !ruby/object:Gem::Requirement
40
+ none: false
41
+ requirements:
42
+ - - ! '>='
43
+ - !ruby/object:Gem::Version
44
+ version: '0'
45
+ type: :development
46
+ prerelease: false
47
+ version_requirements: *24814700
48
+ description: ! 'Every Rubyist is aware of Minero Aoki''s ever useful
12
49
 
13
- date: 2010-02-07 00:00:00 -05:00
14
- default_executable:
15
- dependencies: []
50
+ setup.rb script. It''s how most of us used to install
51
+
52
+ our ruby programs before RubyGems came along. And it''s
16
53
 
17
- description: |-
18
- Every Rubyist is aware of Minero Aoki's ever useful
19
- setup.rb script. It's how most of us used to install
20
- our ruby programs before RubyGems came along.And it's
21
54
  still mighty useful in certain scenarios, not the least
55
+
22
56
  of which is the job of the distribution package managers.
57
+
23
58
  Setup converts setup.rb into a stand-alone application.
59
+
24
60
  No longer will you need distribute setup.rb with you
25
- Ruby packages. Just instruct your users to use Setup.
26
- email:
27
- executables:
61
+
62
+ Ruby packages. Just instruct your users to use Setup.'
63
+ email:
64
+ - transfire@gmail.com
65
+ - aamine@loveruby.net
66
+ executables:
28
67
  - setup.rb
29
68
  extensions: []
30
-
31
- extra_rdoc_files: []
32
-
33
- files:
34
- - COPYING
35
- - HISTORY
36
- - MANIFEST
69
+ extra_rdoc_files:
70
+ - LICENSE.txt
71
+ - NOTICE.txt
72
+ - HISTORY.rdoc
37
73
  - README.rdoc
38
- - Syckfile
74
+ files:
39
75
  - bin/setup.rb
40
- - lib/setup.rb
41
76
  - lib/setup/base.rb
42
77
  - lib/setup/command.rb
43
78
  - lib/setup/compiler.rb
@@ -51,68 +86,72 @@ files:
51
86
  - lib/setup/session.rb
52
87
  - lib/setup/tester.rb
53
88
  - lib/setup/uninstaller.rb
89
+ - lib/setup/version.rb
90
+ - lib/setup.rb
54
91
  - meta/active
55
92
  - meta/authors
56
- - meta/collection
57
- - meta/contact
93
+ - meta/copyrights
58
94
  - meta/created
59
95
  - meta/description
60
- - meta/homepage
61
96
  - meta/name
62
- - meta/released
63
- - meta/repository
64
- - meta/ruby
97
+ - meta/organization
98
+ - meta/repositories
99
+ - meta/requirements
100
+ - meta/resources
65
101
  - meta/summary
66
102
  - meta/version
67
- - script/bstrap
103
+ - script/bootstrap
68
104
  - script/bundle
69
105
  - script/setup
70
106
  - script/test
71
107
  - test/cases/installer.rb
108
+ - test/features/compile.feature
72
109
  - test/features/config.feature
73
- - test/features/document.feature
74
110
  - test/features/install.feature
75
- - test/features/make.feature
76
111
  - test/features/step_definitions/common_steps.rb
112
+ - test/features/step_definitions/compile_steps.rb
77
113
  - test/features/step_definitions/config_steps.rb
78
114
  - test/features/step_definitions/env.rb
79
115
  - test/features/step_definitions/install_steps.rb
80
- - test/features/step_definitions/setup_steps.rb
81
116
  - test/features/step_definitions/uninstall_steps.rb
82
117
  - test/features/test.feature
83
118
  - test/features/uninstall.feature
119
+ - test/fixtures/faux-project/.setup/metaconfig.rb
84
120
  - test/fixtures/faux-project/bin/faux
85
121
  - test/fixtures/faux-project/ext/faux/extconf.rb
86
122
  - test/fixtures/faux-project/ext/faux/faux.c
87
123
  - test/fixtures/faux-project/lib/faux.rb
88
- has_rdoc: true
89
- homepage: http://setup.rubyforge.org
90
- licenses: []
91
-
124
+ - HISTORY.rdoc
125
+ - LICENSE.txt
126
+ - README.rdoc
127
+ - Gemfile
128
+ - Assembly
129
+ - NOTICE.txt
130
+ - SetupReceipt
131
+ homepage: http://rubyworks.github.com/setup
132
+ licenses:
133
+ - BSD-2-Clause
134
+ - LGPL-2.0+
92
135
  post_install_message:
93
- rdoc_options:
94
- - --title
95
- - Setup API
96
- require_paths:
136
+ rdoc_options: []
137
+ require_paths:
97
138
  - lib
98
- required_ruby_version: !ruby/object:Gem::Requirement
99
- requirements:
100
- - - ">="
101
- - !ruby/object:Gem::Version
102
- version: "0"
103
- version:
104
- required_rubygems_version: !ruby/object:Gem::Requirement
105
- requirements:
106
- - - ">="
107
- - !ruby/object:Gem::Version
108
- version: "0"
109
- version:
139
+ required_ruby_version: !ruby/object:Gem::Requirement
140
+ none: false
141
+ requirements:
142
+ - - ! '>='
143
+ - !ruby/object:Gem::Version
144
+ version: '0'
145
+ required_rubygems_version: !ruby/object:Gem::Requirement
146
+ none: false
147
+ requirements:
148
+ - - ! '>='
149
+ - !ruby/object:Gem::Version
150
+ version: '0'
110
151
  requirements: []
111
-
112
- rubyforge_project: setup
113
- rubygems_version: 1.3.5
152
+ rubyforge_project:
153
+ rubygems_version: 1.8.11
114
154
  signing_key:
115
155
  specification_version: 3
116
156
  summary: Setup.rb as a stand-alone application.
117
- test_files:
118
- - lib/setup/tester.rb
157
+ test_files: []
data/MANIFEST DELETED
@@ -1,65 +0,0 @@
1
- COPYING
2
- HISTORY
3
- MANIFEST
4
- README.rdoc
5
- Syckfile
6
- bin/setup.rb
7
- lib/setup
8
- lib/setup.rb
9
- lib/setup/base.rb
10
- lib/setup/command.rb
11
- lib/setup/compiler.rb
12
- lib/setup/configuration.rb
13
- lib/setup/constants.rb
14
- lib/setup/core_ext.rb
15
- lib/setup/documentor.rb
16
- lib/setup/installer.rb
17
- lib/setup/project.rb
18
- lib/setup/rake.rb
19
- lib/setup/session.rb
20
- lib/setup/tester.rb
21
- lib/setup/uninstaller.rb
22
- meta/active
23
- meta/authors
24
- meta/collection
25
- meta/contact
26
- meta/created
27
- meta/description
28
- meta/homepage
29
- meta/name
30
- meta/released
31
- meta/repository
32
- meta/ruby
33
- meta/summary
34
- meta/version
35
- script/bstrap
36
- script/bundle
37
- script/setup
38
- script/test
39
- test/cases
40
- test/cases/installer.rb
41
- test/features
42
- test/features/config.feature
43
- test/features/document.feature
44
- test/features/install.feature
45
- test/features/make.feature
46
- test/features/step_definitions
47
- test/features/step_definitions/common_steps.rb
48
- test/features/step_definitions/config_steps.rb
49
- test/features/step_definitions/env.rb
50
- test/features/step_definitions/install_steps.rb
51
- test/features/step_definitions/setup_steps.rb
52
- test/features/step_definitions/uninstall_steps.rb
53
- test/features/test.feature
54
- test/features/uninstall.feature
55
- test/fixtures
56
- test/fixtures/faux-project
57
- test/fixtures/faux-project/bin
58
- test/fixtures/faux-project/bin/faux
59
- test/fixtures/faux-project/ext
60
- test/fixtures/faux-project/ext/faux
61
- test/fixtures/faux-project/ext/faux/extconf.rb
62
- test/fixtures/faux-project/ext/faux/faux.c
63
- test/fixtures/faux-project/lib
64
- test/fixtures/faux-project/lib/faux.rb
65
- test/fixtures/faux-project/script
data/Syckfile DELETED
@@ -1,77 +0,0 @@
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
-