cane 2.2.1 → 2.2.2

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.
data/HISTORY.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Cane History
2
2
 
3
+ ## 2.2.2 - 29 August 2012 (3a9be454)
4
+
5
+ * Bugfix: Stricter magic comment regex to avoid false positives (#31)
6
+
3
7
  ## 2.2.1 - 26 August 2012 (b5e5a362)
4
8
 
5
9
  * Bugfix: parallel option can be set in rake tasks
@@ -18,8 +18,10 @@ module Cane
18
18
  }
19
19
  end
20
20
 
21
- # Stolen from ERB source.
22
- MAGIC_COMMENT_REGEX = %r"coding\s*[=:]\s*([[:alnum:]\-_]+)"
21
+ # Stolen from ERB source, amended to be slightly stricter to work around
22
+ # some known false positives.
23
+ MAGIC_COMMENT_REGEX =
24
+ %r"#(\s+-\*-)?\s+(en)?coding\s*[=:]\s*([[:alnum:]\-_]+)"
23
25
 
24
26
  def violations
25
27
  return [] if opts[:no_doc]
@@ -1,3 +1,3 @@
1
1
  module Cane
2
- VERSION = '2.2.1'
2
+ VERSION = '2.2.2'
3
3
  end
@@ -38,6 +38,8 @@ end
38
38
  class NoDoc; end
39
39
  # -*- encoding : utf-8 -*-
40
40
  class AlsoNoDoc; end
41
+ # Parse a Transfer-Encoding: Chunked response
42
+ class Doc; end
41
43
  RUBY
42
44
 
43
45
  violations = check(file_name).violations
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cane
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.1
4
+ version: 2.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-27 00:00:00.000000000 Z
12
+ date: 2012-08-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: parallel
@@ -150,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
150
150
  version: '0'
151
151
  requirements: []
152
152
  rubyforge_project:
153
- rubygems_version: 1.8.23
153
+ rubygems_version: 1.8.24
154
154
  signing_key:
155
155
  specification_version: 3
156
156
  summary: Fails your build if code quality thresholds are not met. Provides complexity