rubytest 0.5.0 → 0.5.1

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.
data/.ruby CHANGED
@@ -26,9 +26,15 @@ repositories:
26
26
  scm: git
27
27
  name: upstream
28
28
  resources:
29
- home: http://rubyworks.github.com/rubytest
30
- code: http://github.com/rubyworks/rubytest
31
- mail: http://groups.google.com/group/rubyworks-mailinglist
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
32
38
  extra: {}
33
39
  load_path:
34
40
  - lib
@@ -36,9 +42,9 @@ revision: 0
36
42
  created: '2011-07-23'
37
43
  summary: Ruby Universal Test Harness
38
44
  title: Ruby Test
39
- version: 0.5.0
45
+ version: 0.5.1
40
46
  name: rubytest
41
47
  description: ! "Ruby Test is a universal test harness for Ruby. It can handle any
42
48
  compliant \ntest framework, even running tests from multiple frameworks in a single
43
49
  pass."
44
- date: '2012-02-25'
50
+ date: '2012-04-30'
data/HISTORY.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # RELEASE HISTORY
2
2
 
3
+ ## 0.5.1 / 2012-04-30
4
+
5
+ This release adds support for Courtier-based confgiration.
6
+ You can now add `config 'rubytest'` entries into a project's
7
+ Config.rb file, instead of creating a separate stand-alone
8
+ config file just for test configuration.
9
+
10
+ Changes:
11
+
12
+ * Adds support for Courtier-based configuration.
13
+
14
+
3
15
  ## 0.5.0 / 2012-03-22
4
16
 
5
17
  This release improves the command line interface, the handling of
data/lib/rubytest/cli.rb CHANGED
@@ -19,7 +19,7 @@ module Test
19
19
 
20
20
  Test::Config.load
21
21
 
22
- @profile = 'default'
22
+ @profile = ENV['profile'] || ENV['p'] || 'default'
23
23
  @config = Test.config
24
24
  @runner = Runner.new
25
25
  end
@@ -24,10 +24,6 @@ module Test
24
24
  # Either can have an optional `.rb` extension.
25
25
  GLOB_RC = '{testfile.rb,testfile,.test.rb,.test}'
26
26
 
27
- # If a root level test file can't be found, then use this
28
- # glob to search the task directory for `*.rubytest` files.
29
- GLOB_TASK = 'task/*.rubytest'
30
-
31
27
  # Glob used to find project root directory.
32
28
  GLOB_ROOT = '{.ruby,.git,.hg,_darcs,lib/}'
33
29
 
@@ -40,67 +36,37 @@ module Test
40
36
  # run.files << 'test/case_*.rb'
41
37
  # end
42
38
  #
43
- # Use `:default` for name for non-specific profile and `:common` for code that
39
+ # Use `default` for name for non-specific profile and `common` for code that
44
40
  # should apply to all configurations.
45
41
  #
46
42
  # Failing any traditional configuration files, the Confection system will
47
- # be used. An example entry in a projects `Confile` is:
43
+ # be used. An example entry in a projects `Config.rb` is:
48
44
  #
49
- # config :test, :name do |run|
45
+ # config 'rubytest', profile: 'name' do |run|
50
46
  # run.files << 'test/case_*.rb'
51
47
  # end
52
48
  #
53
49
  # You can leave the `:name` parameter out for `:default`.
54
50
  #
55
51
  def self.load
56
- if rc_files.empty?
57
- if confection_file
58
- require 'confection'
59
- confection('test', '*').each do |c|
60
- name = c.profile ? c.profile : :default
61
- Test.run(name, &c)
62
- end
63
- end
64
- else
65
- rc_files.each do |file|
66
- super(file)
67
- end
52
+ if rc_file
53
+ super(rc_file)
54
+ #else
55
+ # if config = Test.rc_config
56
+ # config.each do |c|
57
+ # Test.run(c.profile, &c)
58
+ # end
59
+ # end
68
60
  end
69
61
  end
70
62
 
71
- #
72
- def self.confection_file
73
- @confection_file ||= (
74
- Dir.glob(File.join(root, '{,.}confile{,.rb}'), File::FNM_CASEFOLD).first
63
+ # Find traditional rc file.
64
+ def self.rc_file
65
+ @rc_file ||= (
66
+ Dir.glob(File.join(root, GLOB_RC), File::FNM_CASEFOLD).first
75
67
  )
76
68
  end
77
69
 
78
- # Find rc file.
79
- def self.rc_files
80
- @rc_files ||= (
81
- if file = Dir.glob(File.join(root, GLOB_RC), File::FNM_CASEFOLD).first
82
- [file]
83
- else
84
- Dir.glob(File.join(root, GLOB_TASK))
85
- end
86
- )
87
-
88
- # glob = GLOB_RC
89
- # stop = root
90
- # default = nil
91
- # dir = Dir.pwd
92
- # file = nil
93
- # loop do
94
- # files = Dir.glob(File.join(dir, glob), File::FNM_CASEFOLD)
95
- # file = files.find{ |f| File.file?(f) }
96
- # break file if file
97
- # break if dir == stop
98
- # dir = File.dirname(dir)
99
- # break if dir == '/'
100
- # end
101
- # file ? file : default
102
- end
103
-
104
70
  # Find and cache project root directory.
105
71
  #
106
72
  # @return [String] Project's root path.
@@ -0,0 +1,6 @@
1
+ require 'rc'
2
+
3
+ configure('rubytest') do |config|
4
+ Test.run(config.profile, &config)
5
+ end
6
+
data/lib/rubytest.rb CHANGED
@@ -10,6 +10,7 @@ if RUBY_VERSION < '1.9'
10
10
  require 'rubytest/core_ext'
11
11
  require 'rubytest/code_snippet'
12
12
  require 'rubytest/config'
13
+ require 'rubytest/rc'
13
14
  require 'rubytest/recorder'
14
15
  require 'rubytest/advice'
15
16
  require 'rubytest/runner'
@@ -20,6 +21,7 @@ else
20
21
  require_relative 'rubytest/core_ext'
21
22
  require_relative 'rubytest/code_snippet'
22
23
  require_relative 'rubytest/config'
24
+ require_relative 'rubytest/rc'
23
25
  require_relative 'rubytest/recorder'
24
26
  require_relative 'rubytest/advice'
25
27
  require_relative 'rubytest/runner'
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.0
4
+ version: 0.5.1
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-03-22 00:00:00.000000000 Z
12
+ date: 2012-05-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ansi
16
- requirement: &14620080 !ruby/object:Gem::Requirement
16
+ requirement: &22651080 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *14620080
24
+ version_requirements: *22651080
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: detroit
27
- requirement: &14639980 !ruby/object:Gem::Requirement
27
+ requirement: &22650340 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *14639980
35
+ version_requirements: *22650340
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: qed
38
- requirement: &14638520 !ruby/object:Gem::Requirement
38
+ requirement: &22649800 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *14638520
46
+ version_requirements: *22649800
47
47
  description: ! "Ruby Test is a universal test harness for Ruby. It can handle any
48
48
  compliant \ntest framework, even running tests from multiple frameworks in a single
49
49
  pass."
@@ -76,6 +76,7 @@ files:
76
76
  - lib/rubytest/core_ext/string.rb
77
77
  - lib/rubytest/core_ext.rb
78
78
  - lib/rubytest/rake.rb
79
+ - lib/rubytest/rc.rb
79
80
  - lib/rubytest/recorder.rb
80
81
  - lib/rubytest/reporters/abstract.rb
81
82
  - lib/rubytest/reporters/abstract_hash.rb