kinit 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/kinit.rb +25 -18
- data/lib/kinit/version.rb +1 -1
- metadata +2 -2
data/lib/kinit.rb
CHANGED
@@ -8,31 +8,38 @@ module Kinit
|
|
8
8
|
|
9
9
|
class GemsEnforcer
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
#class GemNotPresent < Exception; end
|
12
|
+
#attr_reader :error, :message
|
13
|
+
GemError = Class.new(ArgumentError)
|
14
14
|
|
15
|
-
|
15
|
+
#def initialize (app, options={})
|
16
16
|
#end
|
17
17
|
|
18
18
|
#def initialize
|
19
19
|
#end
|
20
20
|
|
21
|
-
def CheckIsGemPresent
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
21
|
+
def CheckIsGemPresent
|
22
|
+
gemList = ["cane","rails_best_practices", "rcov", "reek"]
|
23
|
+
|
24
|
+
gemList.each do |gemname|
|
25
|
+
puts "Checking if Gem '#{gemname}' present."
|
26
|
+
|
27
|
+
#if Gem::Specification.find_by_name(gem)
|
28
|
+
if Gem.available?(gemname)
|
29
|
+
puts "Gem '#{gemname}' is present in your project. Pretty Good."
|
30
|
+
else
|
31
|
+
# raise GemsEnforcer::GemError, "Please include gem 'cane' to the project."
|
32
|
+
puts "Gem '#{gemname}' is not present in your project. Not Good."
|
33
|
+
end
|
28
34
|
end
|
29
|
-
end
|
30
35
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
36
|
+
puts "Suggestion - You should use tools like 'CodeClimate' for your project."
|
37
|
+
|
38
|
+
return true
|
39
|
+
#puts "All good. Your project passes Kinit checks."
|
40
|
+
|
41
|
+
end # method ends here
|
35
42
|
|
36
|
-
end
|
43
|
+
end # Class ends here
|
37
44
|
|
38
|
-
end
|
45
|
+
end #module ends here
|
data/lib/kinit/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kinit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-05-
|
12
|
+
date: 2013-05-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|