jsobfu 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/jsobfu.rb +1 -1
- data/lib/jsobfu/disable.rb +3 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YmUxZDBhNjdkODI2MTY1N2QxMjQzNmNiOGExYTBlODA0NzEwZmNhMQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
OGNlMzY5NGRhOTJlYmY0NTMzNTg4MzI4NzhlMjg4OGQ4MmVlODRkOQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NDI1ODA1ODRhOWY3ZTNiZjU0MDc4ZDkyY2VlZmM3ZWM2MmQ3YTUwMmM4MmQz
|
10
|
+
ZjM5NDc3ODc2MTJmZDRjZTQzN2Q5NmQ3ZDZhMTc4ZGJlOGQ3NTQzM2JmNzUz
|
11
|
+
Y2M3NDkyZDI5M2I5OGRkYjMzZGVhZTlhODg5ODIwYzhmZTZkMDU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YjJmMzA2ODMzMWI0YTYzMTNmMmVlMmZlNTNjY2E1YTE3YWQxZDYwMDM3MjQy
|
14
|
+
NWYxZjNkYjFhYTBhZmNlMzE0YjAxMTQ5ZTliNzQ1NTRlODYxNGRlNzliMWJh
|
15
|
+
YzY1YjdmOTE1NTJiNTBhMjlmZTI3ODYwNTVhOTMyYzVhYTU4ZGU=
|
data/lib/jsobfu.rb
CHANGED
@@ -88,7 +88,7 @@ class JSObfu
|
|
88
88
|
# @param [String] sym the name of the variable or function
|
89
89
|
# @return [String] the obfuscated name
|
90
90
|
def sym(sym)
|
91
|
-
|
91
|
+
return sym.to_s if @renames.nil?
|
92
92
|
@renames[sym.to_s]
|
93
93
|
end
|
94
94
|
|
data/lib/jsobfu/disable.rb
CHANGED
@@ -8,12 +8,13 @@ module JSObfu::Disable
|
|
8
8
|
@@lock = Mutex.new
|
9
9
|
@@disabled = false
|
10
10
|
|
11
|
-
#
|
11
|
+
# Globally enable or disable obfuscation, useful for unit tests etc
|
12
|
+
# @param val [Boolean] the global obfuscation state to set
|
12
13
|
def disabled=(val)
|
13
14
|
@@lock.synchronize { @@disabled = val }
|
14
15
|
end
|
15
16
|
|
16
|
-
#
|
17
|
+
# @return [Boolean] obfuscation is globally disabled
|
17
18
|
def disabled?
|
18
19
|
@@disabled
|
19
20
|
end
|