struggle 1.5.6 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/struggle/concerns/string_extend.rb +5 -0
- data/lib/struggle.rb +2 -3
- data/struggle.gemspec +3 -3
- metadata +11 -11
- data/lib/struggle/html_extend.rb +0 -35
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f2c49188e67e6a0fc4175d8b84e0146d0110e92f
|
4
|
+
data.tar.gz: 9120205f88375a50882ac5378fd76ea21bc8965f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 09f33bea4800221b29fb18fb453e299af1efb0cf4cfbc088de1000cfe8ed761fcf4193eb2f5f245e8477dd94df6fcbd32f620036ccc80b7100fbf0f4f00af3f4
|
7
|
+
data.tar.gz: d16353ea833ed39f5fb0663921c34510c7403545ee9a2e03e606393e1db9c6001db48fee7761a5350e4f391985d6069fa1fe9fc72029cb475b55c5e19444c1b9
|
data/lib/struggle.rb
CHANGED
@@ -13,6 +13,5 @@ require 'struggle/pay_gateway'
|
|
13
13
|
require 'struggle/sms'
|
14
14
|
require 'struggle/tmagick'
|
15
15
|
require 'struggle/vcode'
|
16
|
-
require 'struggle/
|
17
|
-
|
18
|
-
ActiveRecord::Base.send :include, HtmlExtend::Model
|
16
|
+
require 'struggle/concerns/string_extend'
|
17
|
+
String.send :include, StringExtend
|
data/struggle.gemspec
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'struggle'
|
3
|
-
s.version = '1.
|
4
|
-
s.date = '2015-08-
|
3
|
+
s.version = '1.6.0'
|
4
|
+
s.date = '2015-08-21'
|
5
5
|
s.summary = "struggle!"
|
6
|
-
s.description = "vcode,tfile,pager,func,logistic,pay_gateway,tmagick,
|
6
|
+
s.description = "vcode,tfile,pager,func,logistic,pay_gateway,tmagick,class_extend;"
|
7
7
|
s.authors = ["lean"]
|
8
8
|
s.email = '54850915@qq.com'
|
9
9
|
s.files = `git ls-files`.split("\n")
|
metadata
CHANGED
@@ -1,44 +1,44 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: struggle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- lean
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: iconv
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rmagick
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
-
description: vcode,tfile,pager,func,logistic,pay_gateway,tmagick,
|
41
|
+
description: vcode,tfile,pager,func,logistic,pay_gateway,tmagick,class_extend;
|
42
42
|
email: 54850915@qq.com
|
43
43
|
executables: []
|
44
44
|
extensions: []
|
@@ -47,8 +47,8 @@ extra_rdoc_files:
|
|
47
47
|
files:
|
48
48
|
- README.md
|
49
49
|
- lib/struggle.rb
|
50
|
+
- lib/struggle/concerns/string_extend.rb
|
50
51
|
- lib/struggle/func.rb
|
51
|
-
- lib/struggle/html_extend.rb
|
52
52
|
- lib/struggle/logistic.rb
|
53
53
|
- lib/struggle/pager.rb
|
54
54
|
- lib/struggle/pay_gateway.rb
|
@@ -67,17 +67,17 @@ require_paths:
|
|
67
67
|
- lib
|
68
68
|
required_ruby_version: !ruby/object:Gem::Requirement
|
69
69
|
requirements:
|
70
|
-
- -
|
70
|
+
- - ">="
|
71
71
|
- !ruby/object:Gem::Version
|
72
72
|
version: '0'
|
73
73
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
74
74
|
requirements:
|
75
|
-
- -
|
75
|
+
- - ">="
|
76
76
|
- !ruby/object:Gem::Version
|
77
77
|
version: '0'
|
78
78
|
requirements: []
|
79
79
|
rubyforge_project:
|
80
|
-
rubygems_version: 2.4.
|
80
|
+
rubygems_version: 2.4.3
|
81
81
|
signing_key:
|
82
82
|
specification_version: 4
|
83
83
|
summary: struggle!
|
data/lib/struggle/html_extend.rb
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
module HtmlExtend
|
2
|
-
def self.set_eval_str(evalStr)
|
3
|
-
@evalStr = evalStr
|
4
|
-
end
|
5
|
-
|
6
|
-
def self.get_eval_str
|
7
|
-
@evalStr
|
8
|
-
end
|
9
|
-
module Help
|
10
|
-
def html_clear_extend(attr)
|
11
|
-
HtmlExtend.set_eval_str "self.#{attr}=html_clear(self.#{attr})"
|
12
|
-
before_save :save_extend
|
13
|
-
end
|
14
|
-
end
|
15
|
-
module Model
|
16
|
-
def save_extend
|
17
|
-
eval HtmlExtend.get_eval_str
|
18
|
-
end
|
19
|
-
|
20
|
-
#删除script标签
|
21
|
-
def script_clear(html)
|
22
|
-
html.gsub(/<script.*?<\/script>/, "")
|
23
|
-
end
|
24
|
-
|
25
|
-
#删除iframe标签
|
26
|
-
def iframe_clear(html)
|
27
|
-
html.gsub(/<iframe.*?<\/iframe>/, "")
|
28
|
-
end
|
29
|
-
|
30
|
-
#删除script标签,删除iframe标签
|
31
|
-
def html_clear(html)
|
32
|
-
html.gsub(/<script.*?<\/script>/, "").gsub(/<iframe.*?<\/iframe>/, "")
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|