Narnach-minitest 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,6 +4,20 @@ It can be used with 'plain' Ruby projects and Ruby on Rails.
4
4
 
5
5
  == Recent changes
6
6
 
7
+ === Version 0.3.3
8
+ * Ruby 1.9 compatibility
9
+ * Changed Set#join to use #to_a instead of #map.
10
+ * Added workaround for gem not building on ruby 1.9.1p129
11
+ * Tools
12
+ * Added rake task to detect files not added to the gemspec
13
+ * Refactorings
14
+ * RspecMixin#rspec is now a public method with no default parameter
15
+ * Moved rspec functionality to RspecMixin
16
+ * Moved Rcov functionality into RcovMixin
17
+ * Define default specs to ignore in a constant instead of burying it in the code
18
+ * Moved trap_int_for_rcov back into Minitest
19
+ * Refactored rcov command to take the specs to check as its parameter
20
+
7
21
  === Version 0.3.2
8
22
  * Bugfixes:
9
23
  * Minitest will not run non-existent specs
data/Rakefile CHANGED
@@ -12,7 +12,9 @@ begin
12
12
  file = Dir['*.gemspec'].first
13
13
  data = File.read(file)
14
14
  spec = nil
15
- Thread.new { spec = eval("$SAFE = 3\n%s" % data)}.join
15
+ # FIXME: Lowered SAFE from 3 to 2 to work with Ruby 1.9 due to rubygems
16
+ # performing a require internally
17
+ Thread.new { spec = eval("$SAFE = 2\n%s" % data)}.join
16
18
 
17
19
  # Create the gem tasks
18
20
  Rake::GemPackageTask.new(spec) do |package|
@@ -26,3 +28,22 @@ desc 'Package and install the gem for the current version'
26
28
  task :install => :gem do
27
29
  system "sudo gem install -l pkg/%s-%s.gem" % [spec.name, spec.version]
28
30
  end
31
+
32
+ desc 'Show files missing from gemspec'
33
+ task :diff do
34
+ files = %w[
35
+ Rakefile
36
+ *README*
37
+ *LICENSE*
38
+ *.gemspec
39
+ bin/*
40
+ lib/**/*
41
+ spec/**/*
42
+ ].map {|pattern| Dir.glob(pattern)}.flatten.select{|f| File.file?(f)}
43
+ missing_files = files - spec.files
44
+ extra_files = spec.files - files
45
+ puts "Missing files:"
46
+ puts missing_files.join(" ")
47
+ puts "Extra files:"
48
+ puts extra_files.join(" ")
49
+ end
@@ -10,17 +10,17 @@ module RspecMixin
10
10
  @specs_to_ignore ||= Set.new(DEFAULT_SPECS_TO_IGNORE)
11
11
  end
12
12
 
13
+ # Command line string to run rspec for an array of specs. Defaults to all specs.
14
+ def rspec(specs)
15
+ "#{spec_cmd} #{specs.join(" ")} #{spec_opts}"
16
+ end
17
+
13
18
  private
14
19
 
15
20
  def find_spec_cmd
16
21
  `which spec`.strip
17
22
  end
18
23
 
19
- # Command line string to run rspec for an array of specs. Defaults to all specs.
20
- def rspec(specs=known_specs)
21
- "#{spec_cmd} #{specs.join(" ")} #{spec_opts}"
22
- end
23
-
24
24
  # The command to use to run specs.
25
25
  def spec_cmd
26
26
  @spec_cmd ||= ( File.exist?('script/spec') ? 'script/spec' : find_spec_cmd )
@@ -2,7 +2,7 @@ require 'set'
2
2
 
3
3
  module SetExt
4
4
  def join(*args,&block)
5
- map.join(*args,&block)
5
+ to_a.join(*args,&block)
6
6
  end
7
7
  end
8
8
 
@@ -3,8 +3,8 @@ Gem::Specification.new do |s|
3
3
  s.name = 'minitest'
4
4
  s.summary = "Minitest is a simple autotester tool."
5
5
  s.description = "Minitest is a simple autotester tool, which uses rSpec and rCov to test ruby and rails projects."
6
- s.version = '0.3.2'
7
- s.date = '2008-08-14'
6
+ s.version = '0.3.3'
7
+ s.date = '2009-06-11'
8
8
  s.platform = Gem::Platform::RUBY
9
9
  s.authors = ["Wes Oldenbeuving"]
10
10
  s.email = "narnach@gmail.com"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: Narnach-minitest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wes Oldenbeuving
@@ -9,11 +9,12 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-08-14 00:00:00 -07:00
12
+ date: 2009-06-11 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rspec
17
+ type: :runtime
17
18
  version_requirement:
18
19
  version_requirements: !ruby/object:Gem::Requirement
19
20
  requirements:
@@ -23,6 +24,7 @@ dependencies:
23
24
  version:
24
25
  - !ruby/object:Gem::Dependency
25
26
  name: rcov
27
+ type: :runtime
26
28
  version_requirement:
27
29
  version_requirements: !ruby/object:Gem::Requirement
28
30
  requirements: