contentbofu 1.1 → 1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/contentbofu.rb +126 -35
- metadata +2 -2
data/lib/contentbofu.rb
CHANGED
@@ -37,49 +37,106 @@ class ContentBofu
|
|
37
37
|
|
38
38
|
|
39
39
|
# TBS User Definition & Setting
|
40
|
-
|
41
|
-
|
42
|
-
|
40
|
+
def tbs_user
|
41
|
+
return @tbs_user
|
42
|
+
end
|
43
43
|
|
44
|
-
|
45
|
-
|
46
|
-
|
44
|
+
def tbs_user=(value)
|
45
|
+
@tbs_user = value
|
46
|
+
end
|
47
47
|
|
48
48
|
|
49
49
|
# TBS Password Definition & Setting
|
50
|
-
|
51
|
-
|
52
|
-
|
50
|
+
def tbs_pass
|
51
|
+
return @tbs_pass
|
52
|
+
end
|
53
53
|
|
54
|
-
|
55
|
-
|
56
|
-
|
54
|
+
def tbs_pass=(value)
|
55
|
+
@tbs_pass = value
|
56
|
+
end
|
57
57
|
|
58
58
|
|
59
59
|
# TBS Method Definition & Setting
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
60
|
+
def tbs_method
|
61
|
+
return @tbs_method
|
62
|
+
end
|
63
|
+
|
64
|
+
def tbs_method=(value)
|
65
|
+
@tbs_method = value
|
66
|
+
end
|
67
|
+
|
68
|
+
# TBS Quality Definition & Setting - Quality only applies for the method replaceEveryonesFavorites
|
69
|
+
def tbs_quality
|
70
|
+
return @tbs_quality
|
71
|
+
end
|
72
|
+
|
73
|
+
def tbs_quality=(value)
|
74
|
+
@tbs_quality = value
|
75
|
+
end
|
76
|
+
|
77
|
+
# TBS Maxsyns (Max Synonyms) Definition & Setting - Quality only applies for the method replaceEveryonesFavorites
|
78
|
+
def tbs_maxsyns
|
79
|
+
return @tbs_maxsyns
|
80
|
+
end
|
81
|
+
|
82
|
+
def tbs_maxsyns=(value)
|
83
|
+
@tbs_maxsyns = value
|
84
|
+
end
|
85
|
+
|
86
|
+
# TBS User Definition & Setting
|
87
|
+
def wai_user
|
88
|
+
return @wai_user
|
89
|
+
end
|
90
|
+
|
91
|
+
def wai_user=(value)
|
92
|
+
@wai_user = value
|
93
|
+
end
|
94
|
+
|
95
|
+
|
96
|
+
# WordAI Password Definition & Setting
|
97
|
+
def wai_pass
|
98
|
+
return @wai_pass
|
99
|
+
end
|
100
|
+
|
101
|
+
def wai_pass=(value)
|
102
|
+
@wai_pass = value
|
103
|
+
end
|
104
|
+
|
105
|
+
# WordAI Slider Value
|
106
|
+
def wai_slider
|
107
|
+
return @wai_slider
|
108
|
+
end
|
109
|
+
|
110
|
+
def wai_slider=(value)
|
111
|
+
@wai_slider = value
|
112
|
+
end
|
113
|
+
|
114
|
+
# WordAI Protected Words (no spaces, separated by commas)
|
115
|
+
def wai_protected
|
116
|
+
return @wai_protected
|
117
|
+
end
|
118
|
+
|
119
|
+
def wai_protected=(value)
|
120
|
+
@wai_protected = value
|
121
|
+
end
|
122
|
+
|
123
|
+
# WordAI Speed Value (on = no nested)
|
124
|
+
def wai_speed
|
125
|
+
return @wai_speed
|
126
|
+
end
|
127
|
+
|
128
|
+
def wai_speed=(value)
|
129
|
+
@wai_speed = value
|
130
|
+
end
|
131
|
+
|
132
|
+
# WordAI No Original Setting - on = Do NOT return original word back.
|
133
|
+
def wai_nooriginal
|
134
|
+
return @wai_nooriginal
|
135
|
+
end
|
136
|
+
|
137
|
+
def wai_nooriginal=(value)
|
138
|
+
@wai_nooriginal = value
|
139
|
+
end
|
83
140
|
|
84
141
|
# TBS Spin
|
85
142
|
def tbs_spin(body)
|
@@ -128,4 +185,38 @@ class ContentBofu
|
|
128
185
|
|
129
186
|
end
|
130
187
|
|
188
|
+
def wai_spin(body)
|
189
|
+
|
190
|
+
require 'rubygems'
|
191
|
+
require 'mechanize'
|
192
|
+
require 'php_serialize'
|
193
|
+
|
194
|
+
if (@wai_user == nil) || (@wai_pass == nil) || (@wai_slider == nil) || (body == nil)
|
195
|
+
raise "You have not set your username (@wai_user), password (@wai_pass), slider value (@wai_slider) or Body."
|
196
|
+
end
|
197
|
+
|
198
|
+
agent = Mechanize.new
|
199
|
+
|
200
|
+
api_url = "http://beta.wordai.com/spinit.php"
|
201
|
+
|
202
|
+
data = Hash.new
|
203
|
+
data['s'] = body
|
204
|
+
data['slider'] = @wai_slider
|
205
|
+
data['api'] = "true"
|
206
|
+
data['email'] = @wai_user
|
207
|
+
data['pass'] = @wai_pass
|
208
|
+
data['speed'] = @wai_speed if @wai_speed != nil
|
209
|
+
data['protected'] = @wai_protected if @wai_protected != nil
|
210
|
+
data['nooriginal'] = @wai_nooriginal if @wai_nooriginal != nil
|
211
|
+
|
212
|
+
|
213
|
+
# Post & Get Result
|
214
|
+
spin_return = agent.post(api_url,data).content
|
215
|
+
|
216
|
+
# Return (still in spintax, NOT evaluated)
|
217
|
+
return spin_return
|
218
|
+
|
219
|
+
|
220
|
+
end
|
221
|
+
|
131
222
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: contentbofu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '1.
|
4
|
+
version: '1.2'
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,7 +11,7 @@ bindir: bin
|
|
11
11
|
cert_chain: []
|
12
12
|
date: 2012-02-21 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
|
-
description:
|
14
|
+
description: TheBestSpinner, WordAI, integration with nested spinning
|
15
15
|
email: radler@thelinkbuilders.com
|
16
16
|
executables: []
|
17
17
|
extensions: []
|