chekku 0.0.2 → 0.0.3
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/lib/chekku/dsl.rb +1 -1
- data/lib/chekku/generic_checker.rb +2 -2
- data/lib/chekku/version.rb +1 -1
- data/spec/generic_checker_spec.rb +21 -0
- data/spec/spec_helper.rb +8 -0
- metadata +6 -2
data/lib/chekku/dsl.rb
CHANGED
@@ -8,9 +8,9 @@ class Chekku::GenericChecker < Thor::Shell::Basic
|
|
8
8
|
|
9
9
|
def chekku!
|
10
10
|
if which_exists?
|
11
|
-
|
11
|
+
"\e[32m#{@name} exists!\e[0m"
|
12
12
|
else
|
13
|
-
|
13
|
+
"\e[31mI think you must install #{@name}\e[0m"
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
data/lib/chekku/version.rb
CHANGED
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'thor'
|
2
|
+
require 'chekku/generic_checker'
|
3
|
+
|
4
|
+
describe Chekku::GenericChecker do
|
5
|
+
|
6
|
+
context "The command exists" do
|
7
|
+
let(:valid_checker) { Chekku::GenericChecker.new('ls', nil, nil) }
|
8
|
+
it "should return a green string" do
|
9
|
+
valid_checker.chekku!.should == "\e[32mls exists!\e[0m"
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
context "The command does not exist" do
|
14
|
+
let(:invalid_checker) { Chekku::GenericChecker.new('lsdahpdahiofaiofhaoigfhoaugzza', nil, nil) }
|
15
|
+
it "should return a green string" do
|
16
|
+
invalid_checker.chekku!.should == "\e[31mI think you must install lsdahpdahiofaiofhaoigfhoaugzza\e[0m"
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
|
21
|
+
end
|
data/spec/spec_helper.rb
ADDED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chekku
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -64,6 +64,8 @@ files:
|
|
64
64
|
- lib/chekku/dsl.rb
|
65
65
|
- lib/chekku/generic_checker.rb
|
66
66
|
- lib/chekku/version.rb
|
67
|
+
- spec/generic_checker_spec.rb
|
68
|
+
- spec/spec_helper.rb
|
67
69
|
homepage: http://ys.github.com/chekku
|
68
70
|
licenses: []
|
69
71
|
post_install_message:
|
@@ -88,4 +90,6 @@ rubygems_version: 1.8.23
|
|
88
90
|
signing_key:
|
89
91
|
specification_version: 3
|
90
92
|
summary: ! 'Chekku: software dependencies checker'
|
91
|
-
test_files:
|
93
|
+
test_files:
|
94
|
+
- spec/generic_checker_spec.rb
|
95
|
+
- spec/spec_helper.rb
|