rubytest 0.5.2 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
data/.index ADDED
@@ -0,0 +1,52 @@
1
+ ---
2
+ type: ruby
3
+ revision: 2013
4
+ sources:
5
+ - var
6
+ authors:
7
+ - name: trans
8
+ email: transfire@gmail.com
9
+ organizations: []
10
+ requirements:
11
+ - name: ansi
12
+ - groups:
13
+ - build
14
+ development: true
15
+ name: detroit
16
+ - groups:
17
+ - test
18
+ development: true
19
+ name: qed
20
+ conflicts: []
21
+ alternatives: []
22
+ resources:
23
+ - type: home
24
+ uri: http://rubyworks.github.com/rubytest
25
+ label: Homepage
26
+ - type: code
27
+ uri: http://github.com/rubyworks/rubytest
28
+ label: Source Code
29
+ - type: mail
30
+ uri: http://groups.google.com/group/rubyworks-mailinglist
31
+ label: Mailing List
32
+ repositories:
33
+ - name: upstream
34
+ scm: git
35
+ uri: git@github.com:rubyworks/ruby-test.git
36
+ categories: []
37
+ paths:
38
+ load:
39
+ - lib
40
+ copyrights:
41
+ - holder: RubyWorks
42
+ year: '2011'
43
+ license: BSD-2-Clause
44
+ created: '2011-07-23'
45
+ summary: Ruby Universal Test Harness
46
+ title: Ruby Test
47
+ version: 0.5.3
48
+ name: rubytest
49
+ description: ! "Ruby Test is a universal test harness for Ruby. It can handle any
50
+ compliant \ntest framework, even running tests from multiple frameworks in a single
51
+ pass."
52
+ date: '2013-01-07'
data/.ruby CHANGED
@@ -1,50 +0,0 @@
1
- ---
2
- source:
3
- - var
4
- authors:
5
- - name: trans
6
- email: transfire@gmail.com
7
- copyrights:
8
- - holder: RubyWorks
9
- year: '2011'
10
- license: BSD-2-Clause
11
- requirements:
12
- - name: ansi
13
- - name: detroit
14
- groups:
15
- - build
16
- development: true
17
- - name: qed
18
- groups:
19
- - test
20
- development: true
21
- dependencies: []
22
- alternatives: []
23
- conflicts: []
24
- repositories:
25
- - uri: git@github.com:rubyworks/ruby-test.git
26
- scm: git
27
- name: upstream
28
- resources:
29
- - uri: http://rubyworks.github.com/rubytest
30
- name: home
31
- type: home
32
- - uri: http://github.com/rubyworks/rubytest
33
- name: code
34
- type: code
35
- - uri: http://groups.google.com/group/rubyworks-mailinglist
36
- name: mail
37
- type: mail
38
- extra: {}
39
- load_path:
40
- - lib
41
- revision: 0
42
- created: '2011-07-23'
43
- summary: Ruby Universal Test Harness
44
- title: Ruby Test
45
- version: 0.5.2
46
- name: rubytest
47
- description: ! "Ruby Test is a universal test harness for Ruby. It can handle any
48
- compliant \ntest framework, even running tests from multiple frameworks in a single
49
- pass."
50
- date: '2012-04-30'
data/HISTORY.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # RELEASE HISTORY
2
2
 
3
+ ## 0.5.3 / 2013-01-07
4
+
5
+ Adjust Config to look for a project's `.index` file for load path, instead of
6
+ a `.ruby` file. Also, this will only happen now if configured to do so,
7
+ i.e. via the `-a/--autopath` option on the command line.
8
+
9
+ Changes:
10
+
11
+ * Fix config.rb to use .index file, instead of .ruby file.
12
+ * Automtically prepend $LOAD_PATH only if asked to do so.
13
+
14
+
3
15
  ## 0.5.2 / 2012-07-20
4
16
 
5
17
  Courtier was renamed to RC. And the previous release overlooked the requirement
data/lib/rubytest/cli.rb CHANGED
@@ -47,7 +47,8 @@ module Test
47
47
 
48
48
  runner.files.replace(argv) unless argv.empty?
49
49
 
50
- Test::Config.load_path_setup #unless runner.autopath == false
50
+ # TODO: this should probably be invoked via runner.run instead
51
+ Test::Config.load_path_setup if runner.autopath?
51
52
 
52
53
  begin
53
54
  success = runner.run
@@ -65,7 +66,7 @@ module Test
65
66
  def run_profile
66
67
  raise "no such profile -- #{profile}" unless config[profile] or profile == 'default'
67
68
 
68
- common = config['common']
69
+ common = config['common']
69
70
  common.call(runner) if common
70
71
 
71
72
  profig = config[profile]
@@ -116,7 +117,10 @@ module Test
116
117
  runner.match << text
117
118
  end
118
119
 
119
- opt.on '-I', '--loadpath PATH', 'add to $LOAD_PATH' do |paths|
120
+ opt.on '-a', '--autopath', 'automatically add to $LOAD_PATH' do |paths|
121
+ runner.autopath = true
122
+ end
123
+ opt.on '-I', '--loadpath PATH', 'add to $LOAD_PATH' do |paths|
120
124
  paths.split(/[:;]/).reverse_each do |path|
121
125
  $LOAD_PATH.unshift path
122
126
  end
@@ -84,25 +84,24 @@ module Test
84
84
  )
85
85
  end
86
86
 
87
- # Load and cache a project's `.ruby` file.
87
+ # Load and cache a project's `.index` file.
88
88
  #
89
- # @return [Hash] Project's loaded `.ruby` file, if it has one.
90
- def self.dotruby
91
- @dotruby ||= (
92
- drfile = File.join(root, '.ruby')
93
- if File.exist?(drfile)
94
- YAML.load_file(drfile)
89
+ # @return [Hash] Project's loaded `.index` file, if it has one.
90
+ def self.dotindex
91
+ @dotindex ||= (
92
+ file = File.join(root, '.index')
93
+ if File.exist?(file)
94
+ YAML.load_file(file) rescue {}
95
95
  else
96
96
  {}
97
97
  end
98
98
  )
99
99
  end
100
100
 
101
- # Setup $LOAD_PATH based on .ruby file.
101
+ # Setup $LOAD_PATH based on .index file.
102
102
  #
103
- # @todo Maybe we should not fallback to typical load path?
104
103
  def self.load_path_setup
105
- if load_paths = dotruby['load_path']
104
+ if load_paths = (dotindex['paths'] || {})['load']
106
105
  load_paths.each do |path|
107
106
  $LOAD_PATH.unshift(File.join(root, path))
108
107
  end
@@ -67,6 +67,16 @@ module Test
67
67
  @hard = !!boolean
68
68
  end
69
69
 
70
+ #
71
+ def self.autopath
72
+ @autopath
73
+ end
74
+
75
+ #
76
+ def self.autopath=(boolean)
77
+ @autopath = !!boolean
78
+ end
79
+
70
80
  # / / / A T T R I B U T E S / / /
71
81
 
72
82
  # Test suite to run. This is a list of compliant test units and test cases.
@@ -113,6 +123,16 @@ module Test
113
123
  @hard = !!boolean
114
124
  end
115
125
 
126
+ # Automatically assume local loadpaths?
127
+ def autopath?
128
+ @autopath
129
+ end
130
+
131
+ #
132
+ def autopath=(boolean)
133
+ @autopath = !!boolean
134
+ end
135
+
116
136
  # Instance of Advice is a special customizable observer.
117
137
  def advice
118
138
  @advice
@@ -142,14 +162,15 @@ module Test
142
162
  # A list of compliant tests/testcases.
143
163
  #
144
164
  def initialize(options={}, &block)
145
- @suite = options[:suite] || self.class.suite
146
- @files = options[:files] || self.class.files
147
- @format = options[:format] || self.class.format
148
- @tags = options[:tags] || self.class.tags
149
- @units = options[:units] || self.class.units
150
- @match = options[:match] || self.class.match
151
- @verbose = options[:verbose] || self.class.verbose
152
- @hard = options[:hard] || self.class.hard
165
+ @suite = options[:suite] || self.class.suite
166
+ @files = options[:files] || self.class.files
167
+ @format = options[:format] || self.class.format
168
+ @tags = options[:tags] || self.class.tags
169
+ @units = options[:units] || self.class.units
170
+ @match = options[:match] || self.class.match
171
+ @verbose = options[:verbose] || self.class.verbose
172
+ @hard = options[:hard] || self.class.hard
173
+ @autopath = options[:autopath] || self.class.autopath
153
174
 
154
175
  @advice = Advice.new
155
176
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubytest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-20 00:00:00.000000000 Z
12
+ date: 2013-01-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ansi
16
- requirement: &16249520 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,15 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *16249520
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: detroit
27
- requirement: &16248800 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
35
  - - ! '>='
@@ -32,10 +37,15 @@ dependencies:
32
37
  version: '0'
33
38
  type: :development
34
39
  prerelease: false
35
- version_requirements: *16248800
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
36
46
  - !ruby/object:Gem::Dependency
37
47
  name: qed
38
- requirement: &16248080 !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
39
49
  none: false
40
50
  requirements:
41
51
  - - ! '>='
@@ -43,7 +53,12 @@ dependencies:
43
53
  version: '0'
44
54
  type: :development
45
55
  prerelease: false
46
- version_requirements: *16248080
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
47
62
  description: ! "Ruby Test is a universal test harness for Ruby. It can handle any
48
63
  compliant \ntest framework, even running tests from multiple frameworks in a single
49
64
  pass."
@@ -58,6 +73,7 @@ extra_rdoc_files:
58
73
  - HISTORY.md
59
74
  - README.md
60
75
  files:
76
+ - .index
61
77
  - .ruby
62
78
  - bin/ruby-test
63
79
  - bin/rubytest
@@ -93,9 +109,9 @@ files:
93
109
  - lib/rubytest.rb
94
110
  - lib/test.rb
95
111
  - test/basic_case.rb
96
- - LICENSE.txt
97
112
  - HISTORY.md
98
113
  - README.md
114
+ - LICENSE.txt
99
115
  homepage: http://rubyworks.github.com/rubytest
100
116
  licenses:
101
117
  - BSD-2-Clause
@@ -117,8 +133,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
117
133
  version: '0'
118
134
  requirements: []
119
135
  rubyforge_project:
120
- rubygems_version: 1.8.11
136
+ rubygems_version: 1.8.23
121
137
  signing_key:
122
138
  specification_version: 3
123
139
  summary: Ruby Universal Test Harness
124
- test_files: []
140
+ test_files:
141
+ - test/basic_case.rb