ffast 0.1.5 → 0.1.6

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
  SHA256:
3
- metadata.gz: 97309977be2dabc51b9113ee555aa7fe94d21a52426bb7386bf1133696fc4b81
4
- data.tar.gz: 5851dd6da013f0561803b73d7c44a96b35960a8323399d012718eb712cf42b43
3
+ metadata.gz: c664b4d8bafbac99cd9814bcdf77e730184c6e9a38a01ab52d21369bc9c52f8d
4
+ data.tar.gz: 3f761262fc7db1a9ab856fcdab4bfe1580187d882f253f03cd82138b745a43d9
5
5
  SHA512:
6
- metadata.gz: 192e53811678fac65eb03d87145be85971079b832f0675c80d0644e1686765995aa591e955adcb7fad31f28b0a8a2cdea0cfeaee7db9fee9067f19a36f65fd5b
7
- data.tar.gz: 024c2b9a6db910e16516bf54b71f9857af40edec50c180488c312e82b177968f13e9b11d795036ffdc0541e2413b55e2efd016f0a383b06265fc7d28f99dc01f
6
+ metadata.gz: 742d1f586ede35f47ecdcd27013d9e2082641a7809edc6ea43e1538954a805d9d8aadd2f3c6772161bcad2df6223ba2920a71d745a067e3a6ca91c8ef220c2f4
7
+ data.tar.gz: 7cb8e4d954d2ecea9e8a5d3f6f94a7b08ecaed80df1b6ee72bcb8e2b0ca58ce1fd20a84166f884fe8d38f4c692ae1da129ec3276a46d3f6a820efde903e830fd
@@ -14,5 +14,5 @@ before_script:
14
14
  after_script:
15
15
  - ./cc-test-reporter after-build -t simplecov --exit-code $TRAVIS_TEST_RESULT
16
16
  script:
17
- - bundle exec rubocop
17
+ - bundle exec rubocop --fail-level warning --display-only-fail-level-offenses
18
18
  - bundle exec rspec
@@ -99,7 +99,8 @@ module Fast
99
99
  # @return [Array<Astrolabe::Node>] that matches the pattern
100
100
  def search_file(pattern, file)
101
101
  node = ast_from_file(file)
102
- return [] if node.nil?
102
+ return [] unless node
103
+
103
104
  search pattern, node
104
105
  end
105
106
 
@@ -132,7 +133,10 @@ module Fast
132
133
  # in the pattern to make it work.
133
134
  # @return [Array<Object>] captured from the pattern matched in the file
134
135
  def capture_file(pattern, file)
135
- capture pattern, ast_from_file(file)
136
+ node = ast_from_file(file)
137
+ return [] unless node
138
+
139
+ capture pattern, node
136
140
  end
137
141
 
138
142
  # Search recursively into a node and its children.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Fast
4
- VERSION = '0.1.5'
4
+ VERSION = '0.1.6'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ffast
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jônatas Davi Paganini