-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathUserGUI.rb
More file actions
41 lines (36 loc) · 712 Bytes
/
UserGUI.rb
File metadata and controls
41 lines (36 loc) · 712 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
Shoes.setup do
$:.unshift "C:/Ruby/ForumThreadChecker"
gem 'nokogiri'
gem 'RestClient'
end
require 'Ticker.rb'
require 'nokogiri'
require 'rest_client'
Shoes.app do
class Actions
@myApp
def initialize(myApp)
@myApp = myApp
end
def startChecker(url)
@myApp.app do
alert "Parsing..."
check_url = url.scan(/forum.bodybuilding.com/)
if check_url != []
alert "Starting Checker"
Ticker.new(1, url)
Ticker.startTicker
else
alert "Cannot use Checker for that page"
end
end
end
end
stack do
@myActions = Actions.new(self)
thread_url = edit_line
button "Start ThreadChecker" do
@myActions.startChecker(thread_url.text)
end
end
end