foodcritic 0.8.0 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -85,10 +85,11 @@ module FoodCritic
85
85
  def attribute_access(ast, accessed_via, exclude_with_dots)
86
86
  %w{node default override set normal}.map do |att_type|
87
87
  if accessed_via == :vivified
88
- call = ast.xpath(%Q{//*[self::call or self::field][descendant::ident/@value='#{att_type}']
89
- [@value='.']/descendant::ident})
90
- (call.size > 1 and call.first['value'] == 'node' and
91
- Chef::Node.public_instance_methods.include?(call[1]['value'].to_sym)) ? [] : call
88
+ call = ast.xpath(%Q{//*[self::call or self::field][vcall/ident/@value='#{att_type}' or
89
+ var_ref/ident/@value='#{att_type}'][@value='.']})
90
+ call.xpath("aref/args_add_block").size == 0 and (call.xpath("descendant::ident").size > 1 and
91
+ call.xpath("descendant::ident").first['value'] == 'node' and
92
+ ! Chef::Node.public_instance_methods.include?(call.xpath("ident/@value").to_s.to_sym)) ? call : []
92
93
  else
93
94
  accessed_via = 'tstring_content' if accessed_via == :string
94
95
  expr = '//*[self::aref_field or self::aref][descendant::ident'
@@ -1,4 +1,4 @@
1
1
  module FoodCritic
2
2
  # The current version of foodcritic
3
- VERSION = '0.8.0'
3
+ VERSION = '0.8.1'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foodcritic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-19 00:00:00.000000000 Z
12
+ date: 2012-01-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: chef
16
- requirement: &2152976460 !ruby/object:Gem::Requirement
16
+ requirement: &2152165640 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.10.4
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2152976460
24
+ version_requirements: *2152165640
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: json
27
- requirement: &2152975660 !ruby/object:Gem::Requirement
27
+ requirement: &2152164620 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -35,10 +35,10 @@ dependencies:
35
35
  version: 1.6.1
36
36
  type: :runtime
37
37
  prerelease: false
38
- version_requirements: *2152975660
38
+ version_requirements: *2152164620
39
39
  - !ruby/object:Gem::Dependency
40
40
  name: gherkin
41
- requirement: &2152974740 !ruby/object:Gem::Requirement
41
+ requirement: &2152022200 !ruby/object:Gem::Requirement
42
42
  none: false
43
43
  requirements:
44
44
  - - ~>
@@ -46,10 +46,10 @@ dependencies:
46
46
  version: 2.7.1
47
47
  type: :runtime
48
48
  prerelease: false
49
- version_requirements: *2152974740
49
+ version_requirements: *2152022200
50
50
  - !ruby/object:Gem::Dependency
51
51
  name: gist
52
- requirement: &2152974160 !ruby/object:Gem::Requirement
52
+ requirement: &2152020740 !ruby/object:Gem::Requirement
53
53
  none: false
54
54
  requirements:
55
55
  - - ~>
@@ -57,10 +57,10 @@ dependencies:
57
57
  version: 2.0.4
58
58
  type: :runtime
59
59
  prerelease: false
60
- version_requirements: *2152974160
60
+ version_requirements: *2152020740
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: nokogiri
63
- requirement: &2152966880 !ruby/object:Gem::Requirement
63
+ requirement: &2152019320 !ruby/object:Gem::Requirement
64
64
  none: false
65
65
  requirements:
66
66
  - - ~>
@@ -68,10 +68,10 @@ dependencies:
68
68
  version: 1.5.0
69
69
  type: :runtime
70
70
  prerelease: false
71
- version_requirements: *2152966880
71
+ version_requirements: *2152019320
72
72
  - !ruby/object:Gem::Dependency
73
73
  name: pry
74
- requirement: &2152966140 !ruby/object:Gem::Requirement
74
+ requirement: &2152016360 !ruby/object:Gem::Requirement
75
75
  none: false
76
76
  requirements:
77
77
  - - ~>
@@ -79,10 +79,10 @@ dependencies:
79
79
  version: 0.9.7.4
80
80
  type: :runtime
81
81
  prerelease: false
82
- version_requirements: *2152966140
82
+ version_requirements: *2152016360
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: pry-doc
85
- requirement: &2152965480 !ruby/object:Gem::Requirement
85
+ requirement: &2152015400 !ruby/object:Gem::Requirement
86
86
  none: false
87
87
  requirements:
88
88
  - - ~>
@@ -90,7 +90,7 @@ dependencies:
90
90
  version: 0.3.0
91
91
  type: :runtime
92
92
  prerelease: false
93
- version_requirements: *2152965480
93
+ version_requirements: *2152015400
94
94
  description: Lint tool for Opscode Chef cookbooks.
95
95
  email:
96
96
  executables:
@@ -128,12 +128,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
128
128
  version: '0'
129
129
  segments:
130
130
  - 0
131
- hash: -3790252679895367977
131
+ hash: -295625784771858454
132
132
  requirements: []
133
133
  rubyforge_project:
134
134
  rubygems_version: 1.8.10
135
135
  signing_key:
136
136
  specification_version: 3
137
- summary: foodcritic-0.8.0
137
+ summary: foodcritic-0.8.1
138
138
  test_files: []
139
139
  has_rdoc: