guard-phpcs 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.
Files changed (3) hide show
  1. data/README.md +4 -0
  2. data/lib/guard/phpcs.rb +3 -2
  3. metadata +34 -52
data/README.md CHANGED
@@ -20,6 +20,10 @@ And then add a basic setup to your Guardfile:
20
20
 
21
21
  ## Options
22
22
 
23
+ * `:executable # default => "phpcs"`
24
+
25
+ Specify alternative path to the jshint command.
26
+
23
27
  * `:standard # default => "Zend"`
24
28
 
25
29
  The name or path of the coding standard to use.
data/lib/guard/phpcs.rb CHANGED
@@ -4,10 +4,11 @@ require 'guard/guard'
4
4
  module Guard
5
5
  class PHPCS < Guard
6
6
 
7
- VERSION = '0.0.4'
7
+ VERSION = '0.0.5'
8
8
 
9
9
  DEFAULT_OPTIONS = {
10
10
  :standard => 'Zend',
11
+ :executable => 'phpcs',
11
12
  }
12
13
 
13
14
  def initialize(watchers = [], options = {})
@@ -19,7 +20,7 @@ module Guard
19
20
 
20
21
  def run_on_changes(paths)
21
22
  paths.each do |path|
22
- results = `phpcs --report=full#{@tabs}--standard=#{@options[:standard]} #{path}`
23
+ results = `#{@options[:executable]} --report=full#{@tabs}--standard=#{@options[:standard]} #{path}`
23
24
  if $?.to_i > 0 then
24
25
  ::Guard::Notifier.notify(results.gsub(/^-+\n/, '').gsub(/^FILE:.*\n/, '').gsub(/^Time:.*\n/, ''), :title => 'PHP Codesniffer', :image => :failed)
25
26
  puts results
metadata CHANGED
@@ -1,48 +1,40 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: guard-phpcs
3
- version: !ruby/object:Gem::Version
4
- hash: 23
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.5
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 0
9
- - 4
10
- version: 0.0.4
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Patrik Henningsson
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2012-10-04 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
12
+ date: 2013-09-04 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
21
15
  name: guard
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
24
17
  none: false
25
- requirements:
26
- - - ">="
27
- - !ruby/object:Gem::Version
28
- hash: 47
29
- segments:
30
- - 0
31
- - 8
32
- - 8
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
33
21
  version: 0.8.8
34
22
  type: :runtime
35
- version_requirements: *id001
36
- description: Guard::PHPCS automatically runs PHP Code Sniffer when watched files are modified.
37
- email:
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: 0.8.8
30
+ description: Guard::PHPCS automatically runs PHP Code Sniffer when watched files are
31
+ modified.
32
+ email:
38
33
  - patrik.henningsson@gmail.com
39
34
  executables: []
40
-
41
35
  extensions: []
42
-
43
36
  extra_rdoc_files: []
44
-
45
- files:
37
+ files:
46
38
  - .gitignore
47
39
  - Gemfile
48
40
  - LICENSE
@@ -53,36 +45,26 @@ files:
53
45
  - lib/guard/phpcs/templates/Guardfile
54
46
  homepage: http://github.com/pahen/guard-phpcs
55
47
  licenses: []
56
-
57
48
  post_install_message:
58
49
  rdoc_options: []
59
-
60
- require_paths:
50
+ require_paths:
61
51
  - lib
62
- required_ruby_version: !ruby/object:Gem::Requirement
52
+ required_ruby_version: !ruby/object:Gem::Requirement
63
53
  none: false
64
- requirements:
65
- - - ">="
66
- - !ruby/object:Gem::Version
67
- hash: 3
68
- segments:
69
- - 0
70
- version: "0"
71
- required_rubygems_version: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - ! '>='
56
+ - !ruby/object:Gem::Version
57
+ version: '0'
58
+ required_rubygems_version: !ruby/object:Gem::Requirement
72
59
  none: false
73
- requirements:
74
- - - ">="
75
- - !ruby/object:Gem::Version
76
- hash: 3
77
- segments:
78
- - 0
79
- version: "0"
60
+ requirements:
61
+ - - ! '>='
62
+ - !ruby/object:Gem::Version
63
+ version: '0'
80
64
  requirements: []
81
-
82
65
  rubyforge_project: guard-phpcs
83
- rubygems_version: 1.8.17
66
+ rubygems_version: 1.8.24
84
67
  signing_key:
85
68
  specification_version: 3
86
69
  summary: Guard gem for running PHPCS
87
70
  test_files: []
88
-