marcinbunsch-bolt 0.1.9 → 0.1.10

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/Rakefile CHANGED
@@ -1,74 +1,54 @@
1
- # This Rakefile has been copied from mislav/rspactor
2
- # Mislav, you rock, did I tell you this already? :)
1
+ require 'rubygems'
2
+ require 'rake'
3
3
 
4
- task :default => :spec
5
-
6
- desc "starts Bolt"
7
- task :spec do
8
- system "ruby -Ilib bin/bolt"
9
- end
10
-
11
- desc "generates .gemspec file"
12
- task :gemspec => "version:read" do
13
- spec = Gem::Specification.new do |gem|
4
+ begin
5
+ require 'jeweler'
6
+ Jeweler::Tasks.new do |gem|
14
7
  gem.name = "bolt"
15
- gem.summary = "Bolt is a merge of autotest and mislav/rspactor to produce a lightning fast, configurable and simple to set up autotest clone"
8
+ gem.summary = %q{Bolt is a merge of autotest, mislav/rspactor and rails_server_testing to produce a lightning fast, configurable and simple to set up autotest clone}
9
+ gem.authors = ["Marcin Bunsch"]
16
10
  gem.email = "marcin@applicake.com"
17
11
  gem.homepage = "http://github.com/marcinbunsch/bolt"
18
- gem.authors = ["Marcin Bunsch", "Mislav Marohnić"]
19
- gem.has_rdoc = false
20
-
21
- gem.version = GEM_VERSION
22
- gem.files = FileList['.bolt.sample', 'Rakefile', '{bin,lib,images,spec}/**/*', 'README*', 'LICENSE*']
23
12
  gem.executables = Dir['bin/*'].map { |f| File.basename(f) }
13
+ gem.files = FileList['.bolt.sample', 'Rakefile', '{bin,lib,images,spec}/**/*', 'README*', 'LICENSE*']
14
+ # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
24
15
  end
25
-
26
- spec_string = spec.to_ruby
27
-
28
- begin
29
- Thread.new { eval("$SAFE = 3\n#{spec_string}", binding) }.join
30
- rescue
31
- abort "unsafe gemspec: #{$!}"
32
- else
33
- File.open("#{spec.name}.gemspec", 'w') { |file| file.write spec_string }
34
- end
16
+
17
+ rescue LoadError
18
+ puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
35
19
  end
36
20
 
37
- desc "bump the version up"
38
- task :bump => ["version:bump", :gemspec]
21
+ require 'spec/rake/spectask'
22
+ Spec::Rake::SpecTask.new(:spec) do |spec|
23
+ spec.libs << 'lib' << 'spec'
24
+ spec.spec_files = FileList['spec/**/*_spec.rb']
25
+ end
39
26
 
40
- desc "reinstall the gem locally"
41
- task :reinstall do
42
- GEM_VERSION = File.read("VERSION")
43
- system('sudo gem uninstall bolt')
44
- system("gem build bolt.gemspec")
45
- system("sudo gem install bolt-#{GEM_VERSION}.gem")
27
+ Spec::Rake::SpecTask.new(:rcov) do |spec|
28
+ spec.libs << 'lib' << 'spec'
29
+ spec.pattern = 'spec/**/*_spec.rb'
30
+ spec.rcov = true
46
31
  end
47
32
 
48
- namespace :version do
49
- task :read do
50
- unless defined? GEM_VERSION
51
- if File.exists?('VERSION')
52
- GEM_VERSION = File.read("VERSION")
53
- else
54
- GEM_VERSION = '0.0.1'
55
- end
56
- end
57
- end
58
-
59
- desc "bump the version up"
60
- task :bump => :read do
61
- if ENV['VERSION']
62
- GEM_VERSION.replace ENV['VERSION']
63
- else
64
- GEM_VERSION.sub!(/\d+$/) { |num| num.to_i + 1 }
65
- end
66
-
67
- File.open("VERSION", 'w') { |v| v.write GEM_VERSION }
68
- end
33
+ desc 'Run the gem locally'
34
+ task :run do
35
+ system('ruby -I lib bin/bolt')
69
36
  end
70
37
 
71
- task :release => :bump do
72
- system %(git commit VERSION *.gemspec -m "release v#{GEM_VERSION}")
73
- system %(git tag -am "release v#{GEM_VERSION}" v#{GEM_VERSION})
38
+ task :default => :run
39
+
40
+ require 'rake/rdoctask'
41
+ Rake::RDocTask.new do |rdoc|
42
+ if File.exist?('VERSION.yml')
43
+ config = YAML.load(File.read('VERSION.yml'))
44
+ version = "#{config[:major]}.#{config[:minor]}.#{config[:patch]}"
45
+ else
46
+ version = ""
47
+ end
48
+
49
+ rdoc.rdoc_dir = 'rdoc'
50
+ rdoc.title = "bolt #{version}"
51
+ rdoc.rdoc_files.include('README*')
52
+ rdoc.rdoc_files.include('lib/**/*.rb')
74
53
  end
54
+
@@ -17,7 +17,7 @@ module Bolt
17
17
  def runner
18
18
  return selected if selected
19
19
 
20
- if Bolt['runner']
20
+ if Bolt['runner'] and ['test_unit', 'rspec'].include?(Bolt['runner'])
21
21
  self.selected= Bolt::Runners::TestUnit.new if Bolt['runner'] == 'test_unit'
22
22
  self.selected= Bolt::Runners::RSpec.new if Bolt['runner'] == 'rspec'
23
23
  $stdout.puts "** Using #{selected.class} based on 'runner' setting in .bolt file \n"
@@ -40,8 +40,11 @@ describe Bolt::Runners::RSpec do
40
40
  end
41
41
 
42
42
  it 'should return no results if file is not present' do
43
+ b = StringIO.new
44
+ $stdout, old = b, $stdout
43
45
  @runner.stub('file_verified?').and_return(false)
44
46
  @runner.translate('lib/testing/test.rb').should == []
47
+ $stdout = old
45
48
  end
46
49
 
47
50
  end
@@ -40,8 +40,11 @@ describe Bolt::Runners::TestUnit do
40
40
  end
41
41
 
42
42
  it 'should return no results if file is not present' do
43
+ b = StringIO.new
44
+ $stdout, old = b, $stdout
43
45
  @runner.stub('file_verified?').and_return(false)
44
46
  @runner.translate('lib/testing/test.rb').should == []
47
+ $stdout = old
45
48
  end
46
49
 
47
50
  end
metadata CHANGED
@@ -1,11 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: marcinbunsch-bolt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcin Bunsch
8
- - "Mislav Marohni\xC4\x87"
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
@@ -20,43 +19,37 @@ executables:
20
19
  - bolt
21
20
  extensions: []
22
21
 
23
- extra_rdoc_files: []
24
-
22
+ extra_rdoc_files:
23
+ - LICENSE
24
+ - README.textile
25
25
  files:
26
26
  - .bolt.sample
27
+ - LICENSE
28
+ - README.textile
27
29
  - Rakefile
28
30
  - bin/bolt
29
- - lib/bolt
30
- - lib/bolt/adapters
31
+ - images/LICENSE
32
+ - images/failed.png
33
+ - images/pending.png
34
+ - images/success.png
35
+ - lib/bolt.rb
31
36
  - lib/bolt/adapters/rails.rb
32
37
  - lib/bolt/listener.rb
33
- - lib/bolt/listeners
34
38
  - lib/bolt/listeners/generic.rb
35
39
  - lib/bolt/listeners/osx.rb
36
40
  - lib/bolt/notifier.rb
37
- - lib/bolt/notifiers
38
41
  - lib/bolt/notifiers/generic.rb
39
42
  - lib/bolt/notifiers/growl.rb
40
43
  - lib/bolt/runner.rb
41
- - lib/bolt/runners
42
44
  - lib/bolt/runners/rspec.rb
43
45
  - lib/bolt/runners/test_unit.rb
44
- - lib/bolt.rb
45
- - images/failed.png
46
- - images/LICENSE
47
- - images/pending.png
48
- - images/success.png
49
- - spec/bolt
50
- - spec/bolt/runners
51
46
  - spec/bolt/runners/rspec_spec.rb
52
47
  - spec/bolt/runners/test_unit_spec.rb
53
- - README.textile
54
- - LICENSE
55
48
  has_rdoc: false
56
49
  homepage: http://github.com/marcinbunsch/bolt
57
50
  post_install_message:
58
- rdoc_options: []
59
-
51
+ rdoc_options:
52
+ - --charset=UTF-8
60
53
  require_paths:
61
54
  - lib
62
55
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -77,6 +70,7 @@ rubyforge_project:
77
70
  rubygems_version: 1.2.0
78
71
  signing_key:
79
72
  specification_version: 3
80
- summary: Bolt is a merge of autotest and mislav/rspactor to produce a lightning fast, configurable and simple to set up autotest clone
81
- test_files: []
82
-
73
+ summary: Bolt is a merge of autotest, mislav/rspactor and rails_server_testing to produce a lightning fast, configurable and simple to set up autotest clone
74
+ test_files:
75
+ - spec/bolt/runners/rspec_spec.rb
76
+ - spec/bolt/runners/test_unit_spec.rb