kinit 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/bin/run_kinit CHANGED
@@ -5,4 +5,6 @@ require 'kinit'
5
5
  puts "Running Kinit..."
6
6
  puts "Performing required checks for your application. Please wait..."
7
7
 
8
+ exec 'rake do_kinit_enforce'
9
+
8
10
  puts "Finished running required checks."
data/lib/kinit.rb CHANGED
@@ -1,22 +1,22 @@
1
+ Dir["tasks/*.rake"].each { |ext| load ext } if defined?(Rake)
2
+
1
3
  require "kinit/version"
2
4
 
3
5
 
4
6
  module Kinit
7
+ require 'kinit/railtie' if defined?(Rails)
5
8
 
6
9
  class GemsEnforcer
7
10
 
8
11
  #class GemNotPresent < Exception; end
12
+ #attr_reader :error, :message
9
13
  GemError = Class.new(ArgumentError)
10
- MinLengthError = Class.new(ArgumentError)
11
- AlphabetError = Class.new(ArgumentError)
12
-
13
- attr_reader :error, :message
14
-
14
+
15
15
  #def initialize (app, options={})
16
16
  #end
17
17
 
18
- def initialize
19
- end
18
+ #def initialize
19
+ #end
20
20
 
21
21
  def CheckIsGemPresent
22
22
  #return true if Gem::Specification.find_by_name(gemName)
@@ -0,0 +1,11 @@
1
+ require 'kinit'
2
+ require 'rails'
3
+ module Kinit
4
+ class Railtie < Rails::Railtie
5
+ railtie_name :kinit_enforcer
6
+
7
+ rake_tasks do
8
+ load "tasks/kinit_enforcer.rake"
9
+ end
10
+ end
11
+ end
data/lib/kinit/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Kinit
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -0,0 +1,6 @@
1
+ desc 'my plugins rake task'
2
+ task :do_kinit_enforce do
3
+ puts "Enforcing best practices."
4
+ @gen = Kinit::GemsEnforcer.new
5
+ @gen.CheckIsGemPresent
6
+ end
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
4
+ version: 0.0.5
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-28 00:00:00.000000000 Z
12
+ date: 2013-05-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -59,9 +59,9 @@ dependencies:
59
59
  - - ! '>='
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
- description: This gem is used to enforce gems and best practices in the project eg.
63
- whether cane, rails_best_practices gems are included or not etc. and other stuff.
64
- You may also configure what all you would like to enforce.
62
+ description: A gem enforcer tool to check and enforce important gems and best practices
63
+ for code quality in ruby and rails code. Its configurable to enable disable what
64
+ all to enforce.
65
65
  email:
66
66
  - rohan_daxini@yahoo.com
67
67
  executables:
@@ -70,9 +70,11 @@ extensions:
70
70
  - ext/kinit/extconf.rb
71
71
  extra_rdoc_files: []
72
72
  files:
73
+ - lib/kinit/railtie.rb
73
74
  - lib/kinit/version.rb
74
75
  - lib/kinit.rb
75
76
  - bin/run_kinit
77
+ - lib/tasks/kinit_enforcer.rake
76
78
  - ext/kinit/extconf.rb
77
79
  homepage: https://github.com/rohandaxini/kinit
78
80
  licenses:
@@ -99,6 +101,7 @@ rubyforge_project:
99
101
  rubygems_version: 1.8.25
100
102
  signing_key:
101
103
  specification_version: 3
102
- summary: This gem is used to enforce gems and best practices in the project eg. whether
103
- cane, rails_best_practices gems are included or not etc.
104
+ summary: A gem enforcer tool to check and enforce important gems and best practices
105
+ for code quality in ruby and rails code. Its configurable to enable disable what
106
+ all to enforce.
104
107
  test_files: []