guard-phpmd 0.0.3 → 0.0.4

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -0
  3. data/lib/guard/phpmd.rb +4 -3
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 47927fbfeb36590205c7ceef240f7bfaaca636d9
4
- data.tar.gz: c8553c916869a57c9812ecf79c250e05d727a7fa
3
+ metadata.gz: 59cfda2a630bba62369c1e018fffb1496aa93d10
4
+ data.tar.gz: ba55da409f019501abf60ed4a2df4de7c57c8aca
5
5
  SHA512:
6
- metadata.gz: b3950e5d77d56240f8d824eeefb5f6a38ed8afcca2ac48d8e5c3977560b50fce4dc6803eb673e9c2cb85b32dc8899708e63301277b5321ce5f9af666e347de56
7
- data.tar.gz: 813340c527bd7f4f99fb0b45edd51e945c5d3e5a73ba104dab9bb336c09e25597982ff276211f9bb8410c77109d2f364f1e9b32a17029cdf38de401877eb130d
6
+ metadata.gz: 756424f7e5b7bcaff2936f6ce86b6738678ed9b42214c874d5339057912c91173d262900f81d2ab7292067ef2897725ee91a20c312262331f58f0f306400563f
7
+ data.tar.gz: 590a1374a6062203c84075a315b781b416bec9b6e1f3e51b1776010000b46093f69180938cbc61a00a2eec5a85eba2fba6e416a5aef52544ce7cdfa1004dc874
data/README.md CHANGED
@@ -28,6 +28,10 @@ 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
+ * `:excutable # default => "phpmd"`
32
+
33
+ Specify the path to the phpmd executable. Useful when installing phpmd with Composer.
34
+
31
35
  ### Example
32
36
 
33
37
  guard 'phpmd', :path => 'path/to/PHPMD', :rules => 'path/to/pmd-rules.xml' do
data/lib/guard/phpmd.rb CHANGED
@@ -4,11 +4,12 @@ require 'guard/guard'
4
4
  module Guard
5
5
  class PHPMD < Guard
6
6
 
7
- VERSION = '0.0.3'
7
+ VERSION = '0.0.4'
8
8
 
9
9
  DEFAULT_OPTIONS = {
10
10
  :path => '.',
11
- :rules => 'pmd-rules.xml'
11
+ :rules => 'pmd-rules.xml',
12
+ :executable => 'phpmd',
12
13
  }
13
14
 
14
15
  def initialize(watchers = [], options = {})
@@ -22,7 +23,7 @@ module Guard
22
23
  paths.each do |path|
23
24
  path = File.expand_path path
24
25
  Dir.chdir(@options[:path]) do
25
- results = `phpmd #{path} text #{@options[:rules]}`
26
+ results = `#{@options[:executable]} #{path} text #{@options[:rules]}`
26
27
  if $?.to_i > 0 then
27
28
  ::Guard::Notifier.notify(results, :title => 'PHP Mess Detector', :image => :failed)
28
29
  puts results
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard-phpmd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
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-04-21 00:00:00.000000000 Z
11
+ date: 2014-10-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: guard