impostor 1.3.1 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +5 -0
- data/README.txt +39 -0
- data/lib/impostor.rb +1 -1
- data/lib/impostor/config.rb +1 -0
- metadata +3 -3
data/History.txt
CHANGED
data/README.txt
CHANGED
@@ -32,6 +32,42 @@ impostor.post(forum=5,topic=10,message)
|
|
32
32
|
subject = "about programmers..."
|
33
33
|
impostor.new_topic(forum=7,subject,message)
|
34
34
|
|
35
|
+
|
36
|
+
== CONFIGURATION
|
37
|
+
|
38
|
+
Configurable options:
|
39
|
+
|
40
|
+
* :app_root
|
41
|
+
* :cookie_jar
|
42
|
+
* :follow_meta_refresh
|
43
|
+
* :forum_posts_page
|
44
|
+
* :logger
|
45
|
+
* :login_page
|
46
|
+
* :new_reply_page
|
47
|
+
* :new_topic_page
|
48
|
+
* :password
|
49
|
+
* :post_message_page
|
50
|
+
* :posting_page
|
51
|
+
* :sleep_before_post
|
52
|
+
* :topics_cache
|
53
|
+
* :type
|
54
|
+
* :user_agent
|
55
|
+
* :username
|
56
|
+
|
57
|
+
Example
|
58
|
+
|
59
|
+
config = {
|
60
|
+
:app_root=>"http://example.com/phpBB/",
|
61
|
+
:login_page=>"login.php",
|
62
|
+
:password=>"pass",
|
63
|
+
:posting_page=>"posting.php",
|
64
|
+
:sleep_before_post=>2,
|
65
|
+
:type=>:phpbb2,
|
66
|
+
:user_agent=>"Windows IE 7",
|
67
|
+
:username=>"user",
|
68
|
+
}
|
69
|
+
impostor = Impostor.new(config)
|
70
|
+
|
35
71
|
== REQUIREMENTS:
|
36
72
|
|
37
73
|
* hoe
|
@@ -70,3 +106,6 @@ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
70
106
|
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
71
107
|
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
72
108
|
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
109
|
+
|
110
|
+
|
111
|
+
|
data/lib/impostor.rb
CHANGED
data/lib/impostor/config.rb
CHANGED
@@ -33,6 +33,7 @@ class Impostor::Config
|
|
33
33
|
|
34
34
|
def setup_agent
|
35
35
|
@agent = Mechanize.new do |mechanize|
|
36
|
+
mechanize.follow_meta_refresh = !!self.config(:follow_meta_refresh)
|
36
37
|
if logger = self.config(:logger)
|
37
38
|
if File.exist?(logger.to_s)
|
38
39
|
mechanize.log = Logger.new(logger.to_s)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: impostor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-01-
|
12
|
+
date: 2013-01-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nokogiri
|
@@ -210,7 +210,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
210
210
|
version: '0'
|
211
211
|
segments:
|
212
212
|
- 0
|
213
|
-
hash: -
|
213
|
+
hash: -1813028475704299749
|
214
214
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
215
215
|
none: false
|
216
216
|
requirements:
|