starting_blocks 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
data/bin/sb CHANGED
@@ -19,7 +19,7 @@ require 'starting_blocks-blinky' if arguments.include? '--blinky'
19
19
  require 'starting_blocks-growl' if arguments.include? '--growl'
20
20
  require 'starting_blocks-stopplicht' if arguments.include? '--stopplicht'
21
21
 
22
- options[:verbose] = arguments.include? '--verbose'
22
+ StartingBlocks.verbose = arguments.include? '--verbose'
23
23
  options[:no_vendor] = arguments.include?('--vendor') == false
24
24
  options[:use_bundler] = Dir['Gemfile'].count > 0
25
25
 
@@ -1,5 +1,4 @@
1
1
  require "starting_blocks/version"
2
- require_relative 'starting_blocks/displayable'
3
2
  require_relative 'starting_blocks/runner'
4
3
  require_relative 'starting_blocks/watcher'
5
4
  require_relative 'starting_blocks/result_parser'
@@ -8,6 +7,13 @@ require_relative 'starting_blocks/publisher'
8
7
  #require_relative 'extensions/blinky'
9
8
 
10
9
  module StartingBlocks
11
- # Your code goes here...
10
+
11
+ class << self
12
+ attr_accessor :verbose
13
+ end
14
+
15
+ def self.display message
16
+ puts message if @verbose
17
+ end
12
18
  end
13
19
  #StartingBlocks::Publisher.subscribers << StartingBlocks::Extensions::BlinkyLighting.new
@@ -1,8 +1,6 @@
1
1
  module StartingBlocks
2
2
  class Runner
3
3
 
4
- include Displayable
5
-
6
4
  def initialize options
7
5
  @use_bundler = options[:use_bundler]
8
6
  @include_vendor = options[:no_vendor] != true
@@ -10,7 +8,7 @@ module StartingBlocks
10
8
 
11
9
  def run_files files
12
10
  files = files.select { |x| @include_vendor || x.include?('/vendor/') == false }
13
- display "Files to run: #{files.inspect}"
11
+ StartingBlocks.display "Files to run: #{files.inspect}"
14
12
  StartingBlocks::Publisher.publish_files_to_run files
15
13
  results = execute_these_files files
16
14
  StartingBlocks::Publisher.publish_results results
@@ -1,3 +1,3 @@
1
1
  module StartingBlocks
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
  end
@@ -7,8 +7,6 @@ module StartingBlocks
7
7
 
8
8
  @last_failed_run = nil
9
9
 
10
- include Displayable
11
-
12
10
  class << self
13
11
  def start_watching(dir, options)
14
12
  set_up_the_runner options
@@ -19,6 +17,7 @@ module StartingBlocks
19
17
  puts "Listening to: #{location}"
20
18
 
21
19
  callback = Proc.new do |modified, added, removed|
20
+ StartingBlocks.display("File counts: #{[modified.count, added.count, removed.count].inspect}")
22
21
  StartingBlocks::Watcher.add_it(added[0]) if added.count > 0
23
22
  StartingBlocks::Watcher.delete_it(removed[0]) if removed.count > 0
24
23
  next if @running
@@ -30,14 +29,14 @@ module StartingBlocks
30
29
 
31
30
  def add_it(file_that_changed)
32
31
  return if not_concerned_about? file_that_changed
33
- display "Adding: #{file_that_changed}"
32
+ StartingBlocks.display "Adding: #{file_that_changed}"
34
33
  @all_files << file_that_changed
35
34
  end
36
35
 
37
36
  def run_it(file_that_changed)
38
37
  @running = true
39
38
  specs = get_the_specs_to_run file_that_changed
40
- display "Matches: #{specs.inspect}"
39
+ StartingBlocks.display "Matches: #{specs.inspect}"
41
40
  results = @runner.run_files specs
42
41
  store_the_specs_if_they_failed results, specs
43
42
  @running = false
@@ -45,7 +44,7 @@ module StartingBlocks
45
44
 
46
45
  def delete_it(file_that_changed)
47
46
  return if not_concerned_about? file_that_changed
48
- display "Deleting: #{file_that_changed}"
47
+ StartingBlocks.display "Deleting: #{file_that_changed}"
49
48
  @all_files.delete(file_that_changed)
50
49
  end
51
50
 
@@ -9,7 +9,7 @@ describe StartingBlocks::Runner do
9
9
  let(:results) { Object.new }
10
10
 
11
11
  before do
12
- runner.expects(:display).with('Files to run: ["test.rb"]')
12
+ StartingBlocks.expects(:display).with('Files to run: ["test.rb"]')
13
13
  runner.expects(:execute_these_files).with(files).returns results
14
14
  StartingBlocks::Publisher.expects(:publish_files_to_run).with files
15
15
  StartingBlocks::Publisher.expects(:publish_results).with results
@@ -44,7 +44,7 @@ describe StartingBlocks::Runner do
44
44
  let(:results) { Object.new }
45
45
 
46
46
  before do
47
- runner.expects(:display).with('Files to run: ["test1.rb", "test2.rb"]')
47
+ StartingBlocks.expects(:display).with('Files to run: ["test1.rb", "test2.rb"]')
48
48
  runner.expects(:execute_these_files).with(files).returns results
49
49
  StartingBlocks::Publisher.expects(:publish_files_to_run).with files
50
50
  StartingBlocks::Publisher.expects(:publish_results).with results
@@ -82,7 +82,7 @@ describe StartingBlocks::Runner do
82
82
  let(:files_without_vendor) { ['test1.rb', 'test2.rb'] }
83
83
 
84
84
  before do
85
- runner.expects(:display).with('Files to run: ["test1.rb", "test2.rb"]')
85
+ StartingBlocks.expects(:display).with('Files to run: ["test1.rb", "test2.rb"]')
86
86
  runner.expects(:execute_these_files).with(files_without_vendor).returns results
87
87
  StartingBlocks::Publisher.expects(:publish_files_to_run).with files_without_vendor
88
88
  StartingBlocks::Publisher.expects(:publish_results).with results
metadata CHANGED
@@ -1,18 +1,20 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: starting_blocks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Darren Cauthon
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2014-02-28 00:00:00.000000000 Z
12
+ date: 2014-03-03 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: bundler
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
19
  - - ~>
18
20
  - !ruby/object:Gem::Version
@@ -20,6 +22,7 @@ dependencies:
20
22
  type: :development
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
27
  - - ~>
25
28
  - !ruby/object:Gem::Version
@@ -27,71 +30,81 @@ dependencies:
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: rake
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
- - - '>='
35
+ - - ! '>='
32
36
  - !ruby/object:Gem::Version
33
37
  version: '0'
34
38
  type: :development
35
39
  prerelease: false
36
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
37
42
  requirements:
38
- - - '>='
43
+ - - ! '>='
39
44
  - !ruby/object:Gem::Version
40
45
  version: '0'
41
46
  - !ruby/object:Gem::Dependency
42
47
  name: contrast
43
48
  requirement: !ruby/object:Gem::Requirement
49
+ none: false
44
50
  requirements:
45
- - - '>='
51
+ - - ! '>='
46
52
  - !ruby/object:Gem::Version
47
53
  version: '0'
48
54
  type: :development
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
51
58
  requirements:
52
- - - '>='
59
+ - - ! '>='
53
60
  - !ruby/object:Gem::Version
54
61
  version: '0'
55
62
  - !ruby/object:Gem::Dependency
56
63
  name: subtle
57
64
  requirement: !ruby/object:Gem::Requirement
65
+ none: false
58
66
  requirements:
59
- - - '>='
67
+ - - ! '>='
60
68
  - !ruby/object:Gem::Version
61
69
  version: '0'
62
70
  type: :development
63
71
  prerelease: false
64
72
  version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
65
74
  requirements:
66
- - - '>='
75
+ - - ! '>='
67
76
  - !ruby/object:Gem::Version
68
77
  version: '0'
69
78
  - !ruby/object:Gem::Dependency
70
79
  name: mocha
71
80
  requirement: !ruby/object:Gem::Requirement
81
+ none: false
72
82
  requirements:
73
- - - '>='
83
+ - - ! '>='
74
84
  - !ruby/object:Gem::Version
75
85
  version: '0'
76
86
  type: :development
77
87
  prerelease: false
78
88
  version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
79
90
  requirements:
80
- - - '>='
91
+ - - ! '>='
81
92
  - !ruby/object:Gem::Version
82
93
  version: '0'
83
94
  - !ruby/object:Gem::Dependency
84
95
  name: listen
85
96
  requirement: !ruby/object:Gem::Requirement
97
+ none: false
86
98
  requirements:
87
- - - '>='
99
+ - - ! '>='
88
100
  - !ruby/object:Gem::Version
89
101
  version: '2.0'
90
102
  type: :runtime
91
103
  prerelease: false
92
104
  version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
93
106
  requirements:
94
- - - '>='
107
+ - - ! '>='
95
108
  - !ruby/object:Gem::Version
96
109
  version: '2.0'
97
110
  description: Faster minitest TDD.
@@ -110,7 +123,6 @@ files:
110
123
  - Rakefile
111
124
  - bin/sb
112
125
  - lib/starting_blocks.rb
113
- - lib/starting_blocks/displayable.rb
114
126
  - lib/starting_blocks/publisher.rb
115
127
  - lib/starting_blocks/result_parser.rb
116
128
  - lib/starting_blocks/result_text_parser.rb
@@ -126,26 +138,33 @@ files:
126
138
  homepage: http://www.github.com/darrencauthon/starting_blocks
127
139
  licenses:
128
140
  - MIT
129
- metadata: {}
130
141
  post_install_message:
131
142
  rdoc_options: []
132
143
  require_paths:
133
144
  - lib
134
145
  required_ruby_version: !ruby/object:Gem::Requirement
146
+ none: false
135
147
  requirements:
136
- - - '>='
148
+ - - ! '>='
137
149
  - !ruby/object:Gem::Version
138
150
  version: '0'
151
+ segments:
152
+ - 0
153
+ hash: -3150958472910428791
139
154
  required_rubygems_version: !ruby/object:Gem::Requirement
155
+ none: false
140
156
  requirements:
141
- - - '>='
157
+ - - ! '>='
142
158
  - !ruby/object:Gem::Version
143
159
  version: '0'
160
+ segments:
161
+ - 0
162
+ hash: -3150958472910428791
144
163
  requirements: []
145
164
  rubyforge_project:
146
- rubygems_version: 2.1.11
165
+ rubygems_version: 1.8.25
147
166
  signing_key:
148
- specification_version: 4
167
+ specification_version: 3
149
168
  summary: One command to run all tests, test watcher, etc.
150
169
  test_files:
151
170
  - spec/spec_helper.rb
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: 2a2778ab02a059443d58355da2c904575739f248
4
- data.tar.gz: f56b29341aca253e0f6122dc5d120280981684cf
5
- SHA512:
6
- metadata.gz: cf82de67e892e243bde77a85071e8c094fd1713756fe4fa982702c78a17ce2f23786d2eefd6eddd76f6f1843f697cd4a6343a315cd79988f677056f007b259ab
7
- data.tar.gz: 6e40472e47332b3254abf1f5d253c7114fa80c11aa5d262eb49621f8ad60bf2c1cde2301786c3655ac52c6a2ca136a1bdbe6b6141449b8d2e09ed5446acd0456
@@ -1,17 +0,0 @@
1
- module StartingBlocks
2
- module Displayable
3
- module ClassMethods
4
- def display message
5
- puts message if @verbose
6
- end
7
- end
8
-
9
- module InstanceMethods
10
- end
11
-
12
- def self.included(receiver)
13
- receiver.extend ClassMethods
14
- receiver.send :include, InstanceMethods
15
- end
16
- end
17
- end