starting_blocks 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/bin/sb +13 -1
  2. data/lib/starting_blocks/version.rb +1 -1
  3. metadata +3 -3
data/bin/sb CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  require 'fssm'
4
4
 
5
+ def display value
6
+ end
7
+
8
+ if ARGV.include? '--verbose'
9
+ def display value
10
+ puts value
11
+ end
12
+ end
13
+
5
14
  def run_all_specs
6
15
  specs = Dir['**/*_spec*'].select { |f| File.file?(f) }.map do |x|
7
16
  File.expand_path(x)
@@ -12,6 +21,7 @@ end
12
21
 
13
22
  def run_these_specs specs
14
23
  requires = specs.map { |x| "require '#{x}'" }.join("\n")
24
+ display specs.inspect
15
25
  puts `ruby -e "#{requires}"`
16
26
  end
17
27
 
@@ -23,10 +33,12 @@ end
23
33
 
24
34
  def run_it(file, files)
25
35
  filename = file.downcase.split('/')[-1].gsub('_spec', '')
36
+ display file.inspect
37
+ display filename.inspect
26
38
  matches = files.select { |x| x.gsub('_spec', '').include?(filename) && x != file }
27
39
  matches << file
28
40
  specs = matches.select! { |x| x.include?('_spec') }.map { |x| File.expand_path x }
29
- puts specs.inspect
41
+ display specs.inspect
30
42
  run_these_specs specs
31
43
  end
32
44
 
@@ -1,3 +1,3 @@
1
1
  module StartingBlocks
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: starting_blocks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -91,7 +91,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
91
91
  version: '0'
92
92
  segments:
93
93
  - 0
94
- hash: 4219236856497015898
94
+ hash: -4543985825431956199
95
95
  required_rubygems_version: !ruby/object:Gem::Requirement
96
96
  none: false
97
97
  requirements:
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
100
  version: '0'
101
101
  segments:
102
102
  - 0
103
- hash: 4219236856497015898
103
+ hash: -4543985825431956199
104
104
  requirements: []
105
105
  rubyforge_project:
106
106
  rubygems_version: 1.8.24