rookout 0.1.28 → 0.1.29

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: 3056007f4e19ad4f973d551922cc733ceb394515a2cebad17f8e6d1186b3ec79
4
- data.tar.gz: ee4920718d14a9ac843134a6fe37afa3b5292274924a6ded0c76247d9605f695
3
+ metadata.gz: 49682fe35cb88044623330221963d1796926bd4d43274e52c6f5d2b9798939da
4
+ data.tar.gz: '08146067813084fe74e9c89b8cf4a242b2932a9c2c057144de1cf3a6893fa5a8'
5
5
  SHA512:
6
- metadata.gz: a7a7ae5c046fa155ba5146ef30a2e381abb439ddd0936f56f3302258f72d7ae499bc18359cd8d5156434e809fc9704b93250e383c98ed3f09f89a80b56877c71
7
- data.tar.gz: c71d7b41cb93686cae932edab6ce62c21d79e56b1368befe548db2046a5cf366c64d48112b07d6c09b49fdb0cb05949f3ffcfe15df90f763bb75e537aef886eb
6
+ metadata.gz: 02ca398a95c761881102ef4d1bf8e3dcc71b38ef65379651e2687dd583ea06bd5bd7fd7843745de1a4568055158cc10d021d9e510134d9d93d63c35578b09818
7
+ data.tar.gz: 55f7755051f8d26c407f4b0076975c20782d49b5427a8b55b7dad5e96f576e03519964a967665dd750e551765fc510551739a1a82b2a7582a308044f5fbb2cfd
@@ -1,3 +1,3 @@
1
1
  module Rookout
2
- COMMIT = "ad844d5f1e4bb119998eaedc927902a531b95b1f".freeze
2
+ COMMIT = "7d24d368fe1a95d7c6b7e51a2f4ea2e143792b97".freeze
3
3
  end
@@ -62,20 +62,20 @@ module Rookout
62
62
  end
63
63
 
64
64
  def read_key key
65
- if @obj.is_a? Array
65
+ if @obj.is_a?(Array) || @obj.is_a?(String)
66
66
  key_int = key.to_i
67
67
  return RubyObjectNamespace.new @obj[key_int] if key_int >= 0 && key_int < @obj.length
68
68
  raise Exceptions::RookKeyNotFound, key
69
69
 
70
70
  elsif @obj.is_a? Hash
71
71
  return RubyObjectNamespace.new @obj[key] if @obj.key? key
72
- return RubyObjectNamespace.new @obj[key.to_sym] if key.is_a?(String) && @obj.key?(key.to_sym)
72
+ return RubyObjectNamespace.new @obj[key.to_sym] if @obj.key? key.to_s.to_sym
73
73
 
74
74
  @obj.each { |it, value| return RubyObjectNamespace.new value if it.to_s == key }
75
75
 
76
76
  raise Exceptions::RookKeyNotFound, key
77
77
  else
78
- raise Exceptions::RookInvalidObjectForAccess.new(obj.class.to_s, "ReadKey")
78
+ raise Exceptions::RookInvalidObjectForAccess.new(@obj.class.to_s, "ReadKey")
79
79
  end
80
80
  end
81
81
 
@@ -104,7 +104,7 @@ module Rookout
104
104
  PositionMarker.new lineno, iseq
105
105
  elsif suggested_match? location, filename
106
106
  warning = Exceptions::RookSourceFilePathSuggestion.new location.filename, filename
107
- location.notify_warning warning
107
+ location.notify_warning Processor::RookError.new warning
108
108
  # Must return nil in order to skip this script
109
109
  nil
110
110
  end
@@ -1,3 +1,3 @@
1
1
  module Rookout
2
- VERSION = "0.1.28".freeze
2
+ VERSION = "0.1.29".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rookout
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.28
4
+ version: 0.1.29
5
5
  platform: ruby
6
6
  authors:
7
7
  - Liran Haimovitch
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-15 00:00:00.000000000 Z
11
+ date: 2022-01-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: binding_of_caller