codeclimate-yaml 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cc/yaml/nodes.rb +3 -2
- data/lib/cc/yaml/nodes/glob.rb +11 -0
- data/lib/cc/yaml/nodes/glob_list.rb +13 -0
- data/lib/cc/yaml/nodes/ratings.rb +13 -0
- data/lib/cc/yaml/nodes/root.rb +13 -1
- data/lib/cc/yaml/version.rb +1 -1
- metadata +19 -4
- data/lib/cc/yaml/nodes/exclude_path.rb +0 -8
- data/lib/cc/yaml/nodes/exclude_path_list.rb +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2e53c3cfeac47e6e8e5ee14f71e1a07f8cbed24c
|
4
|
+
data.tar.gz: f6c1730f9692f01d37def2b7a6b1783179498d1a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5f55e36440282ca832b6170d1e06b78c404e951c5f24469626abe653ec2c3bfbbc47f91edcf38678080c35d99479487eb69ded3c4908d2d042f85395d9cfbca
|
7
|
+
data.tar.gz: cd21c9de593060ac4d33667a86ddb8a51aee385adcdd1374747d5368e2168341e3d1ef9a8d04c978860ae3574b300da0fc10130bf34e2bee736164b6f1f98bb3
|
data/lib/cc/yaml/nodes.rb
CHANGED
@@ -3,11 +3,12 @@ module CC
|
|
3
3
|
module Nodes
|
4
4
|
autoload :Engine, "cc/yaml/nodes/engine"
|
5
5
|
autoload :EngineList, "cc/yaml/nodes/engine_list"
|
6
|
-
autoload :
|
7
|
-
autoload :
|
6
|
+
autoload :Glob, "cc/yaml/nodes/glob"
|
7
|
+
autoload :GlobList, "cc/yaml/nodes/glob_list"
|
8
8
|
autoload :Mapping, "cc/yaml/nodes/mapping"
|
9
9
|
autoload :Node, "cc/yaml/nodes/node"
|
10
10
|
autoload :OpenMapping, "cc/yaml/nodes/open_mapping"
|
11
|
+
autoload :Ratings, "cc/yaml/nodes/ratings"
|
11
12
|
autoload :Root, "cc/yaml/nodes/root"
|
12
13
|
autoload :Scalar, "cc/yaml/nodes/scalar"
|
13
14
|
autoload :Sequence, "cc/yaml/nodes/sequence"
|
data/lib/cc/yaml/nodes/root.rb
CHANGED
@@ -1,9 +1,13 @@
|
|
1
|
+
require "active_support"
|
2
|
+
require "active_support/core_ext"
|
3
|
+
|
1
4
|
module CC
|
2
5
|
module Yaml
|
3
6
|
module Nodes
|
4
7
|
class Root < Mapping
|
5
|
-
map :exclude_paths, to: ExcludePathList
|
6
8
|
map :engines, to: EngineList
|
9
|
+
map :exclude_paths, to: GlobList
|
10
|
+
map :ratings, to: Ratings
|
7
11
|
|
8
12
|
def initialize
|
9
13
|
super(nil)
|
@@ -16,6 +20,14 @@ module CC
|
|
16
20
|
def inspect
|
17
21
|
"#<#{self.class.name}:#{super}>"
|
18
22
|
end
|
23
|
+
|
24
|
+
def exclude?(path)
|
25
|
+
exclude_paths.present? && exclude_paths.match_any?(path)
|
26
|
+
end
|
27
|
+
|
28
|
+
def rate?(path)
|
29
|
+
ratings.present? && ratings.rate?(path)
|
30
|
+
end
|
19
31
|
end
|
20
32
|
end
|
21
33
|
end
|
data/lib/cc/yaml/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: codeclimate-yaml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code Climate
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: secure_string
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: activesupport
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
description: Code Climate YAML parser
|
28
42
|
email: hello@codeclimate.com
|
29
43
|
executables: []
|
@@ -34,11 +48,12 @@ files:
|
|
34
48
|
- lib/cc/yaml/nodes.rb
|
35
49
|
- lib/cc/yaml/nodes/engine.rb
|
36
50
|
- lib/cc/yaml/nodes/engine_list.rb
|
37
|
-
- lib/cc/yaml/nodes/
|
38
|
-
- lib/cc/yaml/nodes/
|
51
|
+
- lib/cc/yaml/nodes/glob.rb
|
52
|
+
- lib/cc/yaml/nodes/glob_list.rb
|
39
53
|
- lib/cc/yaml/nodes/mapping.rb
|
40
54
|
- lib/cc/yaml/nodes/node.rb
|
41
55
|
- lib/cc/yaml/nodes/open_mapping.rb
|
56
|
+
- lib/cc/yaml/nodes/ratings.rb
|
42
57
|
- lib/cc/yaml/nodes/root.rb
|
43
58
|
- lib/cc/yaml/nodes/scalar.rb
|
44
59
|
- lib/cc/yaml/nodes/sequence.rb
|