doo 0.6.2 → 0.6.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,6 +4,14 @@ require 'colorize'
4
4
  Doo::Base.class_eval do
5
5
  SEPARATORS = %w( / @ : | _ - # ^ ? )
6
6
 
7
+ def message(str)
8
+ puts <<-EOF
9
+ #{"*" * 78}
10
+ #{str}
11
+ #{"*" * 78}
12
+ EOF
13
+ end
14
+
7
15
  def replace(file, src, replace, opts = {})
8
16
  sep = SEPARATORS.detect { |x| !src.include?(x) && !replace.include?(x) }
9
17
  run "sed -i -e 's#{sep}#{src.escape_for_shell}#{sep}#{replace.escape_for_shell}#{sep}g' #{file}", opts
@@ -1,9 +1,9 @@
1
1
  Doo::Base.class_eval do
2
2
  def if_passes(test, &block)
3
- yield unless run "#{test}", :return_on_failure => true
3
+ yield unless run("#{test}", :return_on_failure => true) != 0
4
4
  end
5
5
 
6
6
  def if_fails(test, &block)
7
- yield if run "#{test}", :return_on_failure => true
7
+ yield if run("#{test}", :return_on_failure => true) != 0
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: doo
3
3
  version: !ruby/object:Gem::Version
4
- hash: 3
5
4
  prerelease: false
6
5
  segments:
7
6
  - 0
8
7
  - 6
9
- - 2
10
- version: 0.6.2
8
+ - 3
9
+ version: 0.6.3
11
10
  platform: ruby
12
11
  authors:
13
12
  - Mat Trudel
@@ -15,7 +14,7 @@ autorequire:
15
14
  bindir: bin
16
15
  cert_chain: []
17
16
 
18
- date: 2010-12-30 00:00:00 -05:00
17
+ date: 2011-03-23 00:00:00 -04:00
19
18
  default_executable: doo
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
@@ -26,7 +25,6 @@ dependencies:
26
25
  requirements:
27
26
  - - ">="
28
27
  - !ruby/object:Gem::Version
29
- hash: 3
30
28
  segments:
31
29
  - 0
32
30
  version: "0"
@@ -40,7 +38,6 @@ dependencies:
40
38
  requirements:
41
39
  - - ">="
42
40
  - !ruby/object:Gem::Version
43
- hash: 3
44
41
  segments:
45
42
  - 0
46
43
  version: "0"
@@ -84,7 +81,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
84
81
  requirements:
85
82
  - - ">="
86
83
  - !ruby/object:Gem::Version
87
- hash: 3
88
84
  segments:
89
85
  - 0
90
86
  version: "0"
@@ -93,7 +89,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
93
89
  requirements:
94
90
  - - ">="
95
91
  - !ruby/object:Gem::Version
96
- hash: 3
97
92
  segments:
98
93
  - 0
99
94
  version: "0"