win_gui 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +21 -0
- data/LICENSE +20 -0
- data/README.rdoc +43 -0
- data/Rakefile +58 -0
- data/VERSION +1 -0
- data/book_code/early_success/bundle.rb +34 -0
- data/book_code/early_success/english.txt +1 -0
- data/book_code/early_success/jruby_basics.rb +47 -0
- data/book_code/early_success/windows_basics.rb +97 -0
- data/book_code/guessing/locknote.rb +379 -0
- data/book_code/guessing/monkeyshines.rb +14 -0
- data/book_code/guessing/note.rb +120 -0
- data/book_code/guessing/note_spec.rb +175 -0
- data/book_code/guessing/replay.rb +21 -0
- data/book_code/guessing/seed.rb +9 -0
- data/book_code/guessing/spec_helper.rb +69 -0
- data/book_code/guessing/windows_gui.rb +247 -0
- data/book_code/home_stretch/junquenote.rb +151 -0
- data/book_code/home_stretch/locknote.rb +180 -0
- data/book_code/home_stretch/note.rb +144 -0
- data/book_code/home_stretch/note_spec.rb +191 -0
- data/book_code/home_stretch/spec_helper.rb +55 -0
- data/book_code/home_stretch/swing_gui.rb +50 -0
- data/book_code/home_stretch/windows_gui.rb +232 -0
- data/book_code/junquenote/exports.sh +10 -0
- data/book_code/junquenote/jruby_mac.sh +10 -0
- data/book_code/junquenote/junquenote_app.rb +262 -0
- data/book_code/novite/Rakefile +10 -0
- data/book_code/novite/app/controllers/application.rb +18 -0
- data/book_code/novite/app/controllers/guests_controller.rb +28 -0
- data/book_code/novite/app/controllers/parties_controller.rb +77 -0
- data/book_code/novite/app/helpers/application_helper.rb +11 -0
- data/book_code/novite/app/helpers/guests_helper.rb +10 -0
- data/book_code/novite/app/helpers/parties_helper.rb +10 -0
- data/book_code/novite/app/models/guest.rb +11 -0
- data/book_code/novite/app/models/party.rb +32 -0
- data/book_code/novite/app/models/party_mailer.rb +19 -0
- data/book_code/novite/app/views/layouts/application.rhtml +44 -0
- data/book_code/novite/app/views/parties/new.html.erb +42 -0
- data/book_code/novite/app/views/parties/show.html.erb +43 -0
- data/book_code/novite/app/views/party_mailer/invite.erb +17 -0
- data/book_code/novite/config/boot.rb +117 -0
- data/book_code/novite/config/database.yml +19 -0
- data/book_code/novite/config/environment.rb +67 -0
- data/book_code/novite/config/environments/development.rb +29 -0
- data/book_code/novite/config/environments/production.rb +27 -0
- data/book_code/novite/config/environments/test.rb +30 -0
- data/book_code/novite/config/initializers/inflections.rb +18 -0
- data/book_code/novite/config/initializers/mime_types.rb +13 -0
- data/book_code/novite/config/routes.rb +47 -0
- data/book_code/novite/db/migrate/001_create_parties.rb +26 -0
- data/book_code/novite/db/migrate/002_create_guests.rb +23 -0
- data/book_code/novite/db/schema.rb +41 -0
- data/book_code/novite/log/empty.txt +0 -0
- data/book_code/novite/public/.htaccess +40 -0
- data/book_code/novite/public/404.html +38 -0
- data/book_code/novite/public/422.html +38 -0
- data/book_code/novite/public/500.html +38 -0
- data/book_code/novite/public/dispatch.cgi +10 -0
- data/book_code/novite/public/dispatch.fcgi +24 -0
- data/book_code/novite/public/dispatch.rb +18 -0
- data/book_code/novite/public/favicon.ico +0 -0
- data/book_code/novite/public/images/rails.png +0 -0
- data/book_code/novite/public/index.html +285 -0
- data/book_code/novite/public/javascripts/application.js +10 -0
- data/book_code/novite/public/javascripts/controls.js +971 -0
- data/book_code/novite/public/javascripts/dragdrop.js +980 -0
- data/book_code/novite/public/javascripts/effects.js +1128 -0
- data/book_code/novite/public/javascripts/prototype.js +4233 -0
- data/book_code/novite/public/robots.txt +5 -0
- data/book_code/novite/script/about +3 -0
- data/book_code/novite/script/console +3 -0
- data/book_code/novite/script/destroy +3 -0
- data/book_code/novite/script/generate +3 -0
- data/book_code/novite/script/performance/benchmarker +3 -0
- data/book_code/novite/script/performance/profiler +3 -0
- data/book_code/novite/script/performance/request +3 -0
- data/book_code/novite/script/plugin +3 -0
- data/book_code/novite/script/process/inspector +3 -0
- data/book_code/novite/script/process/reaper +3 -0
- data/book_code/novite/script/process/spawner +3 -0
- data/book_code/novite/script/runner +3 -0
- data/book_code/novite/script/server +3 -0
- data/book_code/novite/test/test_helper.rb +46 -0
- data/book_code/one_more_thing/applescript.rb +68 -0
- data/book_code/one_more_thing/note_spec.rb +50 -0
- data/book_code/one_more_thing/spec_helper.rb +17 -0
- data/book_code/one_more_thing/textedit-pure.rb +28 -0
- data/book_code/one_more_thing/textedit.applescript +26 -0
- data/book_code/one_more_thing/textedit.rb +32 -0
- data/book_code/one_more_thing/textnote.rb +87 -0
- data/book_code/simplify/junquenote.rb +48 -0
- data/book_code/simplify/locknote.rb +46 -0
- data/book_code/simplify/note.rb +35 -0
- data/book_code/simplify/note_spec.rb +28 -0
- data/book_code/simplify/swing_gui.rb +45 -0
- data/book_code/simplify/windows_gui.rb +232 -0
- data/book_code/simplify/windows_gui_spec.rb +35 -0
- data/book_code/story/invite.story +19 -0
- data/book_code/story/journal.txt +29 -0
- data/book_code/story/novite_stories.rb +156 -0
- data/book_code/story/party.rb +149 -0
- data/book_code/story/password.rb +61 -0
- data/book_code/story/password.story +26 -0
- data/book_code/story/rsvp.story +29 -0
- data/book_code/tables/TestTime.html +93 -0
- data/book_code/tables/TestTimeSample.html +63 -0
- data/book_code/tables/calculate_time.rb +39 -0
- data/book_code/tables/calculator.rb +108 -0
- data/book_code/tables/calculator_actions.rb +27 -0
- data/book_code/tables/calculator_spec.rb +47 -0
- data/book_code/tables/fit.rb +32 -0
- data/book_code/tables/matrix.rb +109 -0
- data/book_code/tables/pseudocode.rb +17 -0
- data/book_code/tubes/book_selenium.rb +67 -0
- data/book_code/tubes/book_watir.rb +60 -0
- data/book_code/tubes/dragdrop.html +81 -0
- data/book_code/tubes/html_capture.rb +33 -0
- data/book_code/tubes/joke_list.rb +67 -0
- data/book_code/tubes/list_spec.rb +41 -0
- data/book_code/tubes/search_spec.rb +32 -0
- data/book_code/tubes/selenium_example.rb +66 -0
- data/book_code/tubes/selenium_link.rb +23 -0
- data/book_code/tubes/web_server.rb +14 -0
- data/book_code/windows/wgui.rb +29 -0
- data/book_code/windows/wobj.rb +25 -0
- data/book_code/windows/wsh.rb +25 -0
- data/book_code/with_rspec/empty_spec.rb +13 -0
- data/book_code/with_rspec/junquenote.rb +60 -0
- data/book_code/with_rspec/locknote.rb +129 -0
- data/book_code/with_rspec/note_spec.rb +32 -0
- data/book_code/with_rspec/should_examples.rb +18 -0
- data/exp/exp.rb +6 -0
- data/exp/exp_encodings.rb +40 -0
- data/exp/exp_enum_windows.rb +60 -0
- data/exp/exp_quik.rb +38 -0
- data/exp/exp_wsh.rb +115 -0
- data/exp/old/windows_basics.rb +80 -0
- data/exp/old/wnote.rb +80 -0
- data/exp/old/wnote_spec.rb +20 -0
- data/features/step_definitions/win_gui_steps.rb +0 -0
- data/features/support/env.rb +4 -0
- data/features/win_gui.feature +9 -0
- data/lib/note/java/jemmy.jar +0 -0
- data/lib/note/java/jnote.rb +48 -0
- data/lib/note/java/jruby_basics.rb +37 -0
- data/lib/note/java/junquenote_app.rb +262 -0
- data/lib/note/java/note_spec.rb +20 -0
- data/lib/note/win/locknote.rb +19 -0
- data/lib/note.rb +15 -0
- data/lib/win_gui/constants.rb +66 -0
- data/lib/win_gui/string_extensions.rb +24 -0
- data/lib/win_gui/win_gui.rb +274 -0
- data/lib/win_gui/window.rb +70 -0
- data/lib/win_gui.rb +3 -0
- data/spec/note/win/locknote_spec.rb +7 -0
- data/spec/spec.opts +2 -0
- data/spec/spec_helper.rb +100 -0
- data/spec/test_apps/locknote/LockNote.exe +0 -0
- data/spec/win_gui/string_extensions_spec.rb +61 -0
- data/spec/win_gui/win_gui_spec.rb +733 -0
- data/spec/win_gui/window_spec.rb +124 -0
- metadata +251 -0
@@ -0,0 +1,18 @@
|
|
1
|
+
#!/opt/local/bin/ruby
|
2
|
+
#---
|
3
|
+
# Excerpted from "Scripted GUI Testing With Ruby",
|
4
|
+
# published by The Pragmatic Bookshelf.
|
5
|
+
# Copyrights apply to this code. It may not be used to create training material,
|
6
|
+
# courses, books, articles, and the like. Contact us if you are in doubt.
|
7
|
+
# We make no guarantees that this code is fit for any purpose.
|
8
|
+
# Visit http://www.pragmaticprogrammer.com/titles/idgtr for more book information.
|
9
|
+
#---
|
10
|
+
|
11
|
+
require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT)
|
12
|
+
|
13
|
+
# If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like:
|
14
|
+
# "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impaired
|
15
|
+
require "dispatcher"
|
16
|
+
|
17
|
+
ADDITIONAL_LOAD_PATHS.reverse.each { |dir| $:.unshift(dir) if File.directory?(dir) } if defined?(Apache::RubyRun)
|
18
|
+
Dispatcher.dispatch
|
File without changes
|
Binary file
|
@@ -0,0 +1,285 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<!--
|
4
|
+
! Excerpted from "Scripted GUI Testing With Ruby",
|
5
|
+
! published by The Pragmatic Bookshelf.
|
6
|
+
! Copyrights apply to this code. It may not be used to create training material,
|
7
|
+
! courses, books, articles, and the like. Contact us if you are in doubt.
|
8
|
+
! We make no guarantees that this code is fit for any purpose.
|
9
|
+
! Visit http://www.pragmaticprogrammer.com/titles/idgtr for more book information.
|
10
|
+
-->
|
11
|
+
<html>
|
12
|
+
<head>
|
13
|
+
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
|
14
|
+
<title>Ruby on Rails: Welcome aboard</title>
|
15
|
+
<style type="text/css" media="screen">
|
16
|
+
body {
|
17
|
+
margin: 0;
|
18
|
+
margin-bottom: 25px;
|
19
|
+
padding: 0;
|
20
|
+
background-color: #f0f0f0;
|
21
|
+
font-family: "Lucida Grande", "Bitstream Vera Sans", "Verdana";
|
22
|
+
font-size: 13px;
|
23
|
+
color: #333;
|
24
|
+
}
|
25
|
+
|
26
|
+
h1 {
|
27
|
+
font-size: 28px;
|
28
|
+
color: #000;
|
29
|
+
}
|
30
|
+
|
31
|
+
a {color: #03c}
|
32
|
+
a:hover {
|
33
|
+
background-color: #03c;
|
34
|
+
color: white;
|
35
|
+
text-decoration: none;
|
36
|
+
}
|
37
|
+
|
38
|
+
|
39
|
+
#page {
|
40
|
+
background-color: #f0f0f0;
|
41
|
+
width: 750px;
|
42
|
+
margin: 0;
|
43
|
+
margin-left: auto;
|
44
|
+
margin-right: auto;
|
45
|
+
}
|
46
|
+
|
47
|
+
#content {
|
48
|
+
float: left;
|
49
|
+
background-color: white;
|
50
|
+
border: 3px solid #aaa;
|
51
|
+
border-top: none;
|
52
|
+
padding: 25px;
|
53
|
+
width: 500px;
|
54
|
+
}
|
55
|
+
|
56
|
+
#sidebar {
|
57
|
+
float: right;
|
58
|
+
width: 175px;
|
59
|
+
}
|
60
|
+
|
61
|
+
#footer {
|
62
|
+
clear: both;
|
63
|
+
}
|
64
|
+
|
65
|
+
|
66
|
+
#header, #about, #getting-started {
|
67
|
+
padding-left: 75px;
|
68
|
+
padding-right: 30px;
|
69
|
+
}
|
70
|
+
|
71
|
+
|
72
|
+
#header {
|
73
|
+
background-image: url("images/rails.png");
|
74
|
+
background-repeat: no-repeat;
|
75
|
+
background-position: top left;
|
76
|
+
height: 64px;
|
77
|
+
}
|
78
|
+
#header h1, #header h2 {margin: 0}
|
79
|
+
#header h2 {
|
80
|
+
color: #888;
|
81
|
+
font-weight: normal;
|
82
|
+
font-size: 16px;
|
83
|
+
}
|
84
|
+
|
85
|
+
|
86
|
+
#about h3 {
|
87
|
+
margin: 0;
|
88
|
+
margin-bottom: 10px;
|
89
|
+
font-size: 14px;
|
90
|
+
}
|
91
|
+
|
92
|
+
#about-content {
|
93
|
+
background-color: #ffd;
|
94
|
+
border: 1px solid #fc0;
|
95
|
+
margin-left: -11px;
|
96
|
+
}
|
97
|
+
#about-content table {
|
98
|
+
margin-top: 10px;
|
99
|
+
margin-bottom: 10px;
|
100
|
+
font-size: 11px;
|
101
|
+
border-collapse: collapse;
|
102
|
+
}
|
103
|
+
#about-content td {
|
104
|
+
padding: 10px;
|
105
|
+
padding-top: 3px;
|
106
|
+
padding-bottom: 3px;
|
107
|
+
}
|
108
|
+
#about-content td.name {color: #555}
|
109
|
+
#about-content td.value {color: #000}
|
110
|
+
|
111
|
+
#about-content.failure {
|
112
|
+
background-color: #fcc;
|
113
|
+
border: 1px solid #f00;
|
114
|
+
}
|
115
|
+
#about-content.failure p {
|
116
|
+
margin: 0;
|
117
|
+
padding: 10px;
|
118
|
+
}
|
119
|
+
|
120
|
+
|
121
|
+
#getting-started {
|
122
|
+
border-top: 1px solid #ccc;
|
123
|
+
margin-top: 25px;
|
124
|
+
padding-top: 15px;
|
125
|
+
}
|
126
|
+
#getting-started h1 {
|
127
|
+
margin: 0;
|
128
|
+
font-size: 20px;
|
129
|
+
}
|
130
|
+
#getting-started h2 {
|
131
|
+
margin: 0;
|
132
|
+
font-size: 14px;
|
133
|
+
font-weight: normal;
|
134
|
+
color: #333;
|
135
|
+
margin-bottom: 25px;
|
136
|
+
}
|
137
|
+
#getting-started ol {
|
138
|
+
margin-left: 0;
|
139
|
+
padding-left: 0;
|
140
|
+
}
|
141
|
+
#getting-started li {
|
142
|
+
font-size: 18px;
|
143
|
+
color: #888;
|
144
|
+
margin-bottom: 25px;
|
145
|
+
}
|
146
|
+
#getting-started li h2 {
|
147
|
+
margin: 0;
|
148
|
+
font-weight: normal;
|
149
|
+
font-size: 18px;
|
150
|
+
color: #333;
|
151
|
+
}
|
152
|
+
#getting-started li p {
|
153
|
+
color: #555;
|
154
|
+
font-size: 13px;
|
155
|
+
}
|
156
|
+
|
157
|
+
|
158
|
+
#search {
|
159
|
+
margin: 0;
|
160
|
+
padding-top: 10px;
|
161
|
+
padding-bottom: 10px;
|
162
|
+
font-size: 11px;
|
163
|
+
}
|
164
|
+
#search input {
|
165
|
+
font-size: 11px;
|
166
|
+
margin: 2px;
|
167
|
+
}
|
168
|
+
#search-text {width: 170px}
|
169
|
+
|
170
|
+
|
171
|
+
#sidebar ul {
|
172
|
+
margin-left: 0;
|
173
|
+
padding-left: 0;
|
174
|
+
}
|
175
|
+
#sidebar ul h3 {
|
176
|
+
margin-top: 25px;
|
177
|
+
font-size: 16px;
|
178
|
+
padding-bottom: 10px;
|
179
|
+
border-bottom: 1px solid #ccc;
|
180
|
+
}
|
181
|
+
#sidebar li {
|
182
|
+
list-style-type: none;
|
183
|
+
}
|
184
|
+
#sidebar ul.links li {
|
185
|
+
margin-bottom: 5px;
|
186
|
+
}
|
187
|
+
|
188
|
+
</style>
|
189
|
+
<script type="text/javascript" src="javascripts/prototype.js"></script>
|
190
|
+
<script type="text/javascript" src="javascripts/effects.js"></script>
|
191
|
+
<script type="text/javascript">
|
192
|
+
function about() {
|
193
|
+
if (Element.empty('about-content')) {
|
194
|
+
new Ajax.Updater('about-content', 'rails/info/properties', {
|
195
|
+
method: 'get',
|
196
|
+
onFailure: function() {Element.classNames('about-content').add('failure')},
|
197
|
+
onComplete: function() {new Effect.BlindDown('about-content', {duration: 0.25})}
|
198
|
+
});
|
199
|
+
} else {
|
200
|
+
new Effect[Element.visible('about-content') ?
|
201
|
+
'BlindUp' : 'BlindDown']('about-content', {duration: 0.25});
|
202
|
+
}
|
203
|
+
}
|
204
|
+
|
205
|
+
window.onload = function() {
|
206
|
+
$('search-text').value = '';
|
207
|
+
$('search').onsubmit = function() {
|
208
|
+
$('search-text').value = 'site:rubyonrails.org ' + $F('search-text');
|
209
|
+
}
|
210
|
+
}
|
211
|
+
</script>
|
212
|
+
</head>
|
213
|
+
<body>
|
214
|
+
<div id="page">
|
215
|
+
<div id="sidebar">
|
216
|
+
<ul id="sidebar-items">
|
217
|
+
<li>
|
218
|
+
<form id="search" action="http://www.google.com/search" method="get">
|
219
|
+
<input type="hidden" name="hl" value="en" />
|
220
|
+
<input type="text" id="search-text" name="q" value="site:rubyonrails.org " />
|
221
|
+
<input type="submit" value="Search" /> the Rails site
|
222
|
+
</form>
|
223
|
+
</li>
|
224
|
+
|
225
|
+
<li>
|
226
|
+
<h3>Join the community</h3>
|
227
|
+
<ul class="links">
|
228
|
+
<li><a href="http://www.rubyonrails.org/">Ruby on Rails</a></li>
|
229
|
+
<li><a href="http://weblog.rubyonrails.org/">Official weblog</a></li>
|
230
|
+
<li><a href="http://lists.rubyonrails.org/">Mailing lists</a></li>
|
231
|
+
<li><a href="http://wiki.rubyonrails.org/rails/pages/IRC">IRC channel</a></li>
|
232
|
+
<li><a href="http://wiki.rubyonrails.org/">Wiki</a></li>
|
233
|
+
<li><a href="http://dev.rubyonrails.org/">Bug tracker</a></li>
|
234
|
+
</ul>
|
235
|
+
</li>
|
236
|
+
|
237
|
+
<li>
|
238
|
+
<h3>Browse the documentation</h3>
|
239
|
+
<ul class="links">
|
240
|
+
<li><a href="http://api.rubyonrails.org/">Rails API</a></li>
|
241
|
+
<li><a href="http://stdlib.rubyonrails.org/">Ruby standard library</a></li>
|
242
|
+
<li><a href="http://corelib.rubyonrails.org/">Ruby core</a></li>
|
243
|
+
</ul>
|
244
|
+
</li>
|
245
|
+
</ul>
|
246
|
+
</div>
|
247
|
+
|
248
|
+
<div id="content">
|
249
|
+
<div id="header">
|
250
|
+
<h1>Welcome aboard</h1>
|
251
|
+
<h2>You’re riding Ruby on Rails!</h2>
|
252
|
+
</div>
|
253
|
+
|
254
|
+
<div id="about">
|
255
|
+
<h3><a href="rails/info/properties" onclick="about(); return false">About your application’s environment</a></h3>
|
256
|
+
<div id="about-content" style="display: none"></div>
|
257
|
+
</div>
|
258
|
+
|
259
|
+
<div id="getting-started">
|
260
|
+
<h1>Getting started</h1>
|
261
|
+
<h2>Here’s how to get rolling:</h2>
|
262
|
+
|
263
|
+
<ol>
|
264
|
+
<li>
|
265
|
+
<h2>Create your databases and edit <tt>config/database.yml</tt></h2>
|
266
|
+
<p>Rails needs to know your login and password.</p>
|
267
|
+
</li>
|
268
|
+
|
269
|
+
<li>
|
270
|
+
<h2>Use <tt>script/generate</tt> to create your models and controllers</h2>
|
271
|
+
<p>To see all available options, run it without parameters.</p>
|
272
|
+
</li>
|
273
|
+
|
274
|
+
<li>
|
275
|
+
<h2>Set up a default route and remove or rename this file</h2>
|
276
|
+
<p>Routes are set up in config/routes.rb.</p>
|
277
|
+
</li>
|
278
|
+
</ol>
|
279
|
+
</div>
|
280
|
+
</div>
|
281
|
+
|
282
|
+
<div id="footer"> </div>
|
283
|
+
</div>
|
284
|
+
</body>
|
285
|
+
</html>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
/***
|
2
|
+
* Excerpted from "Scripted GUI Testing With Ruby",
|
3
|
+
* published by The Pragmatic Bookshelf.
|
4
|
+
* Copyrights apply to this code. It may not be used to create training material,
|
5
|
+
* courses, books, articles, and the like. Contact us if you are in doubt.
|
6
|
+
* We make no guarantees that this code is fit for any purpose.
|
7
|
+
* Visit http://www.pragmaticprogrammer.com/titles/idgtr for more book information.
|
8
|
+
***/
|
9
|
+
// Place your application-specific JavaScript functions and classes here
|
10
|
+
// This file is automatically included by javascript_include_tag :defaults
|