guard-phpmd 0.0.4 → 0.0.5
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.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/guard-phpmd.gemspec +3 -3
- data/lib/guard/phpmd.rb +7 -8
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b45810678707e4aebf5fed1eafa8a831531f6129
|
4
|
+
data.tar.gz: 6d08b86bb0303eb983cd0c191690f3ffe4c03e98
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd0beb983f3b9a5916e02c3abc7405b255378b3584e54af5620f1c38229f183681489f8d4c3835396ad282d7338e9c0853f95fd6a4dcfdcd3ba73908caa192f4
|
7
|
+
data.tar.gz: ed4ee1816872ea1ceda4ba24a0542476cef9f1789693c9bb2a5aeca3271b94dfd1e59a33e9958962118f8656f1ea6aea7abb293f4a8b067965667607e60795c1
|
data/README.md
CHANGED
@@ -28,12 +28,12 @@ Set the working directory (useful when using relative paths used in the rules fi
|
|
28
28
|
|
29
29
|
Path to the rules file.
|
30
30
|
|
31
|
-
* `:
|
31
|
+
* `:executable # default => "phpmd"`
|
32
32
|
|
33
33
|
Specify the path to the phpmd executable. Useful when installing phpmd with Composer.
|
34
34
|
|
35
35
|
### Example
|
36
36
|
|
37
|
-
guard 'phpmd', :
|
37
|
+
guard 'phpmd', :executable => 'path/to/PHPMD', :rules => 'path/to/pmd-rules.xml' do
|
38
38
|
watch(%r{.*\.php$})
|
39
39
|
end
|
data/guard-phpmd.gemspec
CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
|
|
7
7
|
s.version = Guard::PHPMD::VERSION
|
8
8
|
s.authors = ["Patrik Henningsson"]
|
9
9
|
s.email = ["patrik.henningsson@gmail.com"]
|
10
|
-
s.homepage = "http://github.com/
|
10
|
+
s.homepage = "http://github.com/EricHogue/guard-phpmd"
|
11
11
|
s.summary = "Guard gem for running PHPMD"
|
12
12
|
s.description = "Guard::PHPMD automatically runs PHP Mess Detector when watched files are modified."
|
13
13
|
|
@@ -18,5 +18,5 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
19
19
|
s.require_paths = ["lib"]
|
20
20
|
|
21
|
-
s.add_dependency 'guard', '
|
22
|
-
end
|
21
|
+
s.add_dependency 'guard', '~> 2.0'
|
22
|
+
end
|
data/lib/guard/phpmd.rb
CHANGED
@@ -1,21 +1,20 @@
|
|
1
1
|
require 'guard'
|
2
|
-
require 'guard/guard'
|
3
2
|
|
4
3
|
module Guard
|
5
|
-
class PHPMD < Guard
|
4
|
+
class PHPMD < ::Guard::Plugin
|
6
5
|
|
7
|
-
VERSION = '0.0.
|
6
|
+
VERSION = '0.0.5'
|
8
7
|
|
9
8
|
DEFAULT_OPTIONS = {
|
10
|
-
|
11
|
-
|
12
|
-
|
9
|
+
:path => '.',
|
10
|
+
:rules => 'pmd-rules.xml',
|
11
|
+
:executable => 'phpmd',
|
13
12
|
}
|
14
13
|
|
15
|
-
def initialize(
|
14
|
+
def initialize(options = {})
|
16
15
|
defaults = DEFAULT_OPTIONS.clone
|
17
16
|
@options = defaults.merge(options)
|
18
|
-
super(
|
17
|
+
super(@options)
|
19
18
|
end
|
20
19
|
|
21
20
|
def run_on_modifications(paths)
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: guard-phpmd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Patrik Henningsson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-11-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: guard
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0
|
19
|
+
version: '2.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0
|
26
|
+
version: '2.0'
|
27
27
|
description: Guard::PHPMD automatically runs PHP Mess Detector when watched files
|
28
28
|
are modified.
|
29
29
|
email:
|
@@ -40,7 +40,7 @@ files:
|
|
40
40
|
- guard-phpmd.gemspec
|
41
41
|
- lib/guard/phpmd.rb
|
42
42
|
- lib/guard/phpmd/templates/Guardfile
|
43
|
-
homepage: http://github.com/
|
43
|
+
homepage: http://github.com/EricHogue/guard-phpmd
|
44
44
|
licenses: []
|
45
45
|
metadata: {}
|
46
46
|
post_install_message:
|