parliament-ntriple 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 43a7eab037f65c3db4a11c35dee38f651dd18fdf
4
- data.tar.gz: 1d71cbf8018f521d50f5630ef92c4d73c2d10aa7
3
+ metadata.gz: b8024f00f6563094b308db99e82840ebf5c85ea9
4
+ data.tar.gz: dd98aa9b8bcb5e545a8823195fdf9e33e797199c
5
5
  SHA512:
6
- metadata.gz: 3fa07af6936420b5c1f9cca4395e67f9eab589fe65e3d67f093c2d4bc816308211729f821835784b6681b88431aa4f990c1ea817046153b33d7a64013efe80f6
7
- data.tar.gz: ab039099cbe009ad2cb147b368d253b3da3279290f62ec7461ba129e481d50f613cf7529b6937de48280b331b0c15fa4fdeb51816f91917e4cb15e646675974d
6
+ metadata.gz: 79c99234bdf184d69550c44917722a63d5495da193e8a698c0c46062feed6daaf5a1f770acb3a04f419293c33a8e72c358d25d16fa964d293a036bd0b93095e6
7
+ data.tar.gz: e28e92ab5119d351cd8730c190a32eabdae9d6e5759495f153576818a1844c7d078402a4c8eb3ca4c2d41e85ed09fccefe2af65c3f08eaeba98e30916a2bcb47
data/.rubocop.yml CHANGED
@@ -3,22 +3,25 @@ Metrics/LineLength:
3
3
  Max: 120
4
4
  IgnoredPatterns: ['\A#', '\A([ ]{2}|[ ]{4})#']
5
5
 
6
- Style/SpaceBeforeFirstArg:
6
+ Style/EachWithObject:
7
+ Enabled: false
8
+
9
+ Layout/SpaceBeforeFirstArg:
7
10
  Enabled: false
8
11
 
9
12
  Style/BracesAroundHashParameters:
10
13
  Enabled: false
11
14
 
12
- Style/IndentHash:
15
+ Layout/IndentHash:
13
16
  EnforcedStyle: consistent
14
17
 
15
- Style/AlignHash:
18
+ Layout/AlignHash:
16
19
  Severity: fatal
17
20
  Enabled: true
18
21
  EnforcedHashRocketStyle: table
19
22
  EnforcedColonStyle: table
20
23
 
21
- Style/AlignParameters:
24
+ Layout/AlignParameters:
22
25
  EnforcedStyle: with_fixed_indentation
23
26
 
24
27
  Style/StringLiterals:
@@ -32,13 +35,13 @@ Style/CollectionMethods:
32
35
  detect: 'find'
33
36
  find_all: 'select'
34
37
 
35
- Style/DotPosition:
38
+ Layout/DotPosition:
36
39
  EnforcedStyle: leading
37
40
 
38
41
  Style/DoubleNegation:
39
42
  Enabled: false
40
43
 
41
- Style/SpaceAroundOperators:
44
+ Layout/SpaceAroundOperators:
42
45
  # When true, allows most uses of extra spacing if the intent is to align
43
46
  # with an operator on the previous or next line, not counting empty lines
44
47
  # or comment lines.
@@ -1,5 +1,5 @@
1
1
  module Parliament
2
2
  module NTriple
3
- VERSION = '0.2.1'.freeze
3
+ VERSION = '0.3.0'.freeze
4
4
  end
5
5
  end
@@ -79,9 +79,16 @@ module Parliament
79
79
 
80
80
  unless types.empty?
81
81
  @nodes.each do |node|
82
- type_index = node.blank? ? types.index(::Grom::Node::BLANK) : types.index(node.type)
82
+ node_types = node.blank? ? Array(::Grom::Node::BLANK) : Array(node.type)
83
83
 
84
- filtered_objects[type_index] << node unless type_index.nil?
84
+ indexes = node_types.reduce([]) do |memo, type|
85
+ index = types.index(type)
86
+ memo << index if index
87
+
88
+ memo
89
+ end
90
+
91
+ indexes.each { |index| filtered_objects[index] << node }
85
92
  end
86
93
  end
87
94
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parliament-ntriple
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rebecca Appleyard
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-12-11 00:00:00.000000000 Z
11
+ date: 2018-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: grom