guard-rails_best_practices 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  require 'guard'
2
2
  require 'guard/guard'
3
- require File.join(File.dirname(__FILE__), "guard-rails_best_practices/version")
3
+ require File.join(File.dirname(__FILE__), "rails_best_practices/version")
4
4
 
5
5
  module Guard
6
6
  class Rails_best_practices < Guard
@@ -0,0 +1,32 @@
1
+ # encoding: utf-8
2
+ #
3
+ # Borrowed from guard-annotate
4
+ module Guard
5
+ class Rails_best_practices
6
+ class Notifier
7
+
8
+ class << self
9
+ def guard_message( result, duration )
10
+ case result
11
+ when true
12
+ "Rails Best Practices checklist has been run successfully\nin %0.2f seconds." % [duration]
13
+ else
14
+ "Rails Best Practices checklist run has failed!\nPlease check manually."
15
+ end
16
+ end
17
+
18
+ def guard_image( result )
19
+ result ? :success : :failed
20
+ end
21
+
22
+ def notify( result, duration )
23
+ message = guard_message( result, duration )
24
+ image = guard_image( result )
25
+
26
+ ::Guard::Notifier.notify( message, :title => 'Rails Best Practices checklist complete', :image => image )
27
+ end
28
+ end
29
+
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,5 @@
1
+ module Guard
2
+ module RailsBestPracticesVersion
3
+ VERSION = "0.1.1"
4
+ end
5
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard-rails_best_practices
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,31 +9,30 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-10-06 00:00:00.000000000 -04:00
13
- default_executable:
12
+ date: 2011-10-06 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
- name: rails_best_practices
17
- requirement: &14030460 !ruby/object:Gem::Requirement
15
+ name: guard
16
+ requirement: &13158520 !ruby/object:Gem::Requirement
18
17
  none: false
19
18
  requirements:
20
19
  - - ! '>='
21
20
  - !ruby/object:Gem::Version
22
- version: '0'
21
+ version: 0.8.4
23
22
  type: :runtime
24
23
  prerelease: false
25
- version_requirements: *14030460
24
+ version_requirements: *13158520
26
25
  - !ruby/object:Gem::Dependency
27
- name: guard
28
- requirement: &14029980 !ruby/object:Gem::Requirement
26
+ name: rails_best_practices
27
+ requirement: &13157500 !ruby/object:Gem::Requirement
29
28
  none: false
30
29
  requirements:
31
30
  - - ! '>='
32
31
  - !ruby/object:Gem::Version
33
- version: '0'
32
+ version: 1.1.0
34
33
  type: :runtime
35
34
  prerelease: false
36
- version_requirements: *14029980
35
+ version_requirements: *13157500
37
36
  description: Guard for rails_best_practices, a code metric tool to check the quality
38
37
  of rails code.
39
38
  email:
@@ -42,16 +41,12 @@ executables: []
42
41
  extensions: []
43
42
  extra_rdoc_files: []
44
43
  files:
45
- - .gitignore
46
- - Gemfile
47
- - README.md
48
- - Rakefile
49
- - guard-rails_best_practices.gemspec
50
- - lib/guard/guard-rails_best_practices/templates/Guardfile
51
- - lib/guard/guard-rails_best_practices/version.rb
52
44
  - lib/guard/rails_best_practices.rb
53
- has_rdoc: true
54
- homepage: ''
45
+ - lib/guard/rails_best_practices/templates/Guardfile
46
+ - lib/guard/rails_best_practices/notifier.rb
47
+ - lib/guard/rails_best_practices/version.rb
48
+ - README.md
49
+ homepage: http://rubygems.org/gems/guard-rails_best_practices
55
50
  licenses: []
56
51
  post_install_message:
57
52
  rdoc_options: []
@@ -71,7 +66,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
71
66
  version: '0'
72
67
  requirements: []
73
68
  rubyforge_project: guard-rails_best_practices
74
- rubygems_version: 1.6.2
69
+ rubygems_version: 1.8.6.1
75
70
  signing_key:
76
71
  specification_version: 3
77
72
  summary: Guard for rails_best_practices, a code metric tool to check the quality of
data/.gitignore DELETED
@@ -1,4 +0,0 @@
1
- *.gem
2
- .bundle
3
- Gemfile.lock
4
- pkg/*
data/Gemfile DELETED
@@ -1,7 +0,0 @@
1
- source "http://rubygems.org"
2
-
3
- gem 'guard', '>= 0.8.4'
4
- gem 'rails_best_practices', '>= 1.1.0'
5
-
6
- # Specify your gem's dependencies in guard-rails_best_practices.gemspec
7
- gemspec
data/Rakefile DELETED
@@ -1,3 +0,0 @@
1
- require "bundler/gem_tasks"
2
-
3
- task :default => :build
@@ -1,24 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
- $:.push File.expand_path("../lib", __FILE__)
3
- require "guard/guard-rails_best_practices/version"
4
-
5
- Gem::Specification.new do |s|
6
- s.name = "guard-rails_best_practices"
7
- s.version = Guard::Rails_best_practices::VERSION
8
- s.authors = ["Logan Koester"]
9
- s.email = ["lkoester@agoragames.com"]
10
- s.homepage = ""
11
- s.summary = %q{Guard for rails_best_practices, a code metric tool to check the quality of rails code.}
12
- s.description = %q{Guard for rails_best_practices, a code metric tool to check the quality of rails code.}
13
-
14
- s.rubyforge_project = "guard-rails_best_practices"
15
-
16
- s.files = `git ls-files`.split("\n")
17
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
- s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
- s.require_paths = ["lib"]
20
-
21
- # specify any dependencies here; for example:
22
- s.add_runtime_dependency "rails_best_practices"
23
- s.add_runtime_dependency "guard"
24
- end
@@ -1,5 +0,0 @@
1
- module Guard
2
- class Rails_best_practices
3
- VERSION = "0.1.0"
4
- end
5
- end