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.
- data/lib/guard/rails_best_practices.rb +1 -1
- data/lib/guard/rails_best_practices/notifier.rb +32 -0
- data/lib/guard/{guard-rails_best_practices → rails_best_practices}/templates/Guardfile +0 -0
- data/lib/guard/rails_best_practices/version.rb +5 -0
- metadata +16 -21
- data/.gitignore +0 -4
- data/Gemfile +0 -7
- data/Rakefile +0 -3
- data/guard-rails_best_practices.gemspec +0 -24
- data/lib/guard/guard-rails_best_practices/version.rb +0 -5
@@ -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
|
File without changes
|
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.
|
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
|
13
|
-
default_executable:
|
12
|
+
date: 2011-10-06 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
|
-
name:
|
17
|
-
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:
|
21
|
+
version: 0.8.4
|
23
22
|
type: :runtime
|
24
23
|
prerelease: false
|
25
|
-
version_requirements: *
|
24
|
+
version_requirements: *13158520
|
26
25
|
- !ruby/object:Gem::Dependency
|
27
|
-
name:
|
28
|
-
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:
|
32
|
+
version: 1.1.0
|
34
33
|
type: :runtime
|
35
34
|
prerelease: false
|
36
|
-
version_requirements: *
|
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
|
-
|
54
|
-
|
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.
|
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
data/Gemfile
DELETED
data/Rakefile
DELETED
@@ -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
|