fasterer 0.1.4 → 0.1.5

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: a4baba5745fb89f47a8a47f7c12d5c1820e035ae
4
- data.tar.gz: a73fc9a451fd619b03c5039ec0928f26bf7581cd
3
+ metadata.gz: d9a60bfaadb97d52f9e2a7569a9eb689711e3c2a
4
+ data.tar.gz: 16b63850424fe2df8b7619e1557a77fce37a7b5a
5
5
  SHA512:
6
- metadata.gz: c969b46664f28cf44bc186248a8777608264bb2057255d5292af214f80b491b1cf008de7935cfecb10455d7811622197a3f82ff639c736239cf82bcdd891c764
7
- data.tar.gz: d056ed54596318c96acb00c15f71b0ea3484f38fb08c7ad96fd5117e8860dcdee23c36f0f315ae821d96e7bda6fca8dc6d9dc937c39212de5c74451950a80e31
6
+ metadata.gz: 183a28079f52476cda7cc3d114c785a3e79c8ec6787af3e7ac9b36c6ab3a91b5d472e7be91364f3e25adfe3e0a6d34731beca50a4dd527e487e8b5cf90ad3142
7
+ data.tar.gz: 770fb8c56a693144a95c8a69feec8e7a3bbc41195d09040bc48918458d80c507507344309e96940792a4b24f2911399d6b16901351433f7ccdf7b359867a2b12
@@ -43,7 +43,12 @@ module Fasterer
43
43
  end
44
44
 
45
45
  def check_module_eval_offense
46
- add_offense(:module_eval)
46
+ first_argument = method_call.arguments.first
47
+ return unless first_argument && first_argument.value.is_a?(String)
48
+
49
+ if first_argument.value.include?("def")
50
+ add_offense(:module_eval)
51
+ end
47
52
  end
48
53
 
49
54
  def check_gsub_offense
@@ -1,3 +1,3 @@
1
1
  module Fasterer
2
- VERSION = '0.1.4'
2
+ VERSION = '0.1.5'
3
3
  end
@@ -9,3 +9,7 @@ module Hihi
9
9
  end
10
10
 
11
11
  Hihi.hello
12
+
13
+ Hihi.module_eval %{
14
+ puts @foo
15
+ }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fasterer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Damir Svrtan