Everyday Scripting with Ruby: For Teams, Testers, and You

Free Download

Authors:

Edition: 1

ISBN: 9780977616619, 0977616614

Size: 2 MB (2158212 bytes)

Pages: 297/297

File format:

Language:

Publishing Year:

Category:

Brian Marick9780977616619, 0977616614

Are you a tester who spends more time manually creating complex test data than using it? A business analyst who seemingly went to college all those years so you can spend your days copying data from reports into spreadsheets? A programmer who can

Table of contents :
Contents……Page 8
Introduction……Page 13
An Outline of the Book……Page 15
Service After the Sale……Page 17
Acknowledgments……Page 18
Download the Practice Files……Page 19
In the Beginning Was the Command Line……Page 20
Installing Ruby……Page 22
Your Two Basic Tools……Page 23
Prompts, Command Lines, Prompts, and irb……Page 24
It’s Time to Make Mistakes……Page 25
The Basics……Page 29
A Script in Action……Page 30
Objects Send and Receive Messages……Page 31
Variables Name Objects……Page 33
Comparing Arrays……Page 34
Printing to the Screen……Page 35
Making a Script……Page 36
Where Do We Stand?……Page 37
Exercises……Page 38
Ruby Facts: Arrays……Page 39
Command-line Arguments……Page 43
Ignoring Case……Page 45
Methods……Page 49
Dissecting Strings……Page 51
Fixing a Bug……Page 53
Where Do We Stand?……Page 55
Prelude to the Exercises……Page 56
Exercises……Page 58
if …elsif …else……Page 61
A Shorthand Version of if……Page 63
The Question Mark Operator……Page 64
Growing a Script……Page 66
The Project……Page 67
Building a Solution……Page 69
Exercises……Page 91
Precedence……Page 94
Boolean Expressions Can Select Objects……Page 96
Regular Expressions Match Strings……Page 98
Dissecting Strings with Regular Expressions……Page 101
Reordering an Array……Page 102
Exercises……Page 104
Special Characters……Page 106
Taking Strings Apart……Page 108
Regular Expression Options……Page 109
Exercises……Page 110
Classes Bundle Data and Methods……Page 112
Objects Contain Data……Page 115
Exercises……Page 120
Defining Accessors……Page 126
Self……Page 129
Class Methods……Page 133
Exercises……Page 136
Working in a World Full of People……Page 138
Scraping Web Pages with Regular Expressions……Page 139
Treating Web Pages Like Files……Page 140
Restricting Attention to Part of the Page……Page 142
Plucking Out the Title and Authors……Page 144
Hashes Store Named Data……Page 146
Taking the Trip……Page 147
Exercise Yourself……Page 149
Handling XHTML……Page 152
Driving the Browser……Page 154
Direct Access to Underlying Protocols……Page 155
Working with Comma-Separated Values……Page 158
Using Blocks for Automatic Cleanup……Page 159
Applying It All to affinity-trip.rb……Page 160
Discovering and Understanding Classes in the Standard Library……Page 161
Replacing Code with Data……Page 163
Ruby Facts: Hashes……Page 166
Optional Arguments……Page 169
Rest Arguments……Page 170
Keyword Arguments……Page 171
Finding Packages……Page 174
Using setup.rb……Page 175
Using RubyGems……Page 176
Understanding What You’ve Downloaded……Page 178
The Load Path……Page 180
Avoiding Filename Clashes……Page 181
Avoiding Class Name Clashes Using Modules……Page 182
A Script to Do the Work for You……Page 184
Working Without Stepping on Yourself……Page 187
The rakefile……Page 188
Location-independent Tests……Page 191
Exercises……Page 193
Ruby Facts: Modules……Page 195
Nested Modules……Page 196
Including Modules……Page 197
Classes Are Modules……Page 199
When Scripts Run into Problems……Page 201
An Error-handling Strategy……Page 202
Your Exception-handling Options……Page 204
Methods That Use Blocks……Page 208
Exercises……Page 210
The Accomplished Scripter……Page 212
Frameworks: Scripting by Filling in Blanks……Page 213
Using the watchdog Script……Page 214
Inheritance……Page 217
Gathering User Choices……Page 223
The Story of Barker……Page 230
What Happens Where?……Page 234
Modules Instead of Superclasses……Page 239
Final Thoughts……Page 241
The Back of the Book……Page 243
Glossary……Page 244
Solutions for Chapter 3……Page 256
Solutions for Chapter 5……Page 258
Solutions for Chapter 7……Page 261
Solutions for Chapter 9……Page 265
Solutions for Chapter 10……Page 269
Solutions for Chapter 11……Page 270
Solutions for Chapter 12……Page 281
Solutions for Chapter 21……Page 286
Bibliography……Page 288
A……Page 289
D……Page 290
I……Page 291
N……Page 292
R……Page 293
S……Page 294
W……Page 296
Z……Page 297

Reviews

There are no reviews yet.

Be the first to review “Everyday Scripting with Ruby: For Teams, Testers, and You”
Shopping Cart
Scroll to Top