codeclimate 0.28.0 → 0.29.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d2383762ad9de2dfb5b6bad6152082075b9cdb4e
4
- data.tar.gz: 2553df0ff143a062ef3f87c4c79c96f37ff51882
3
+ metadata.gz: efa08f642f16f2216254aad188d1e577569710cd
4
+ data.tar.gz: cab24ce9e68f7cb1622d0549dc3608b8901b86c3
5
5
  SHA512:
6
- metadata.gz: c581b0595d8930894e7b5d5ebd90a157fa2d4ddb4484b2acc187324b6562523b14edfa16c82a4c248e74b0f9c02965cbf36eefb42a42ab219ac087baa93f6b62
7
- data.tar.gz: 9eac879bdbbe3ee3a08b1ff2ef6c664578b265dc2f8c9ee9c518c36d3e2a13fe3ced1bb0970fd43a0f2a0e3b757abdb35ad03ae649e7b5c302afa2eb026e3ada
6
+ metadata.gz: c8e00338ff2aed40e05240529f434a6a01f6c57a0bc2e4230079d34a653da771bf9cf3fd09abe6aec7115085da49304d813dd0460903a9141a1d1abbce21c81d
7
+ data.tar.gz: 9f91b473418c645f5bcf1c78cd6cfd2e8f1e603165b5d9d97dbab3d974880d423b6eec6b86b1e6f22a9792933d3f30ee3ee344cd05e9d104ee7f6e2ca168716e
@@ -21,6 +21,7 @@ module CC
21
21
  autoload :IssueLocationFormatValidation, "cc/analyzer/issue_location_format_validation"
22
22
  autoload :IssueOtherLocationsFormatValidation, "cc/analyzer/issue_other_locations_format_validation"
23
23
  autoload :IssuePathExistenceValidation, "cc/analyzer/issue_path_existence_validation"
24
+ autoload :IssuePathIsFileValidation, "cc/analyzer/issue_path_is_file_validation"
24
25
  autoload :IssuePathPresenceValidation, "cc/analyzer/issue_path_presence_validation"
25
26
  autoload :IssueRelativePathValidation, "cc/analyzer/issue_relative_path_validation"
26
27
  autoload :IssueSorter, "cc/analyzer/issue_sorter"
@@ -0,0 +1,19 @@
1
+ module CC
2
+ module Analyzer
3
+ class IssuePathIsFileValidation < Validation
4
+ def valid?
5
+ File.file?(path)
6
+ end
7
+
8
+ def message
9
+ "Path is not a file: '#{path}'"
10
+ end
11
+
12
+ private
13
+
14
+ def path
15
+ object.fetch("location", {}).fetch("path", "")
16
+ end
17
+ end
18
+ end
19
+ end
@@ -8,6 +8,7 @@ module CC
8
8
  IssueLocationFormatValidation,
9
9
  IssueOtherLocationsFormatValidation,
10
10
  IssuePathExistenceValidation,
11
+ IssuePathIsFileValidation,
11
12
  IssuePathPresenceValidation,
12
13
  IssueRelativePathValidation,
13
14
  IssueTypeValidation,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: codeclimate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.28.0
4
+ version: 0.29.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code Climate
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-11 00:00:00.000000000 Z
11
+ date: 2016-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -174,6 +174,7 @@ files:
174
174
  - lib/cc/analyzer/issue_location_format_validation.rb
175
175
  - lib/cc/analyzer/issue_other_locations_format_validation.rb
176
176
  - lib/cc/analyzer/issue_path_existence_validation.rb
177
+ - lib/cc/analyzer/issue_path_is_file_validation.rb
177
178
  - lib/cc/analyzer/issue_path_presence_validation.rb
178
179
  - lib/cc/analyzer/issue_relative_path_validation.rb
179
180
  - lib/cc/analyzer/issue_sorter.rb