Skip to content

Instantly share code, notes, and snippets.

View rubemz's full-sized avatar
🏠
Working from home

Rubem Nakamura rubemz

🏠
Working from home
View GitHub Profile
@rubemz
rubemz / gist:885a021a1476341f507a
Last active August 29, 2015 14:13
keybase.md

Keybase proof

I hereby claim:

  • I am rubemz on github.
  • I am rubemnakamura (https://keybase.io/rubemnakamura) on keybase.
  • I have a public key whose fingerprint is AC89 05BA B905 ECC2 7103 3A98 E09A 3707 08E8 1D95

To claim this, I am signing this object:

Given /^I am at the reader view$/ do
visit '/#reader/1'
wait_until { page.evaluate_script('reader.reader.properties.initialized') == true }
#to avoid bootstrap modal animation
page.execute_script("document.addEventListener('DOMNodeInserted', function (ev) {
$('.modal').removeClass('fade');
});")
end
worker_processes 8
stderr_path "log/unicorn.stderr.log"
stdout_path "log/unicorn.stdout.log"
@rubemz
rubemz / 500.rb
Created June 1, 2012 19:15
first 500s
[1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 28, 29, 30, 31, 33, 34, 37, 53, 56, 57, 69, 71, 77, 92, 98, 102, 106, 112, 117, 118, 119, 120, 122, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 141, 144, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 165, 166, 168, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 214, 215, 216, 218, 219, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 237, 238, 239, 240, 242, 243, 245, 246, 247, 248, 250, 251, 252, 253, 255, 256, 257, 258, 259, 260, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 294, 295, 296, 297, 298, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 3
@rubemz
rubemz / second_fetch.rb
Created June 1, 2012 19:14
The second fetch
[102813, 102814, 102815, 102816, 102817, 102818, 102819, 102820, 102821, 102822, 102823, 102824, 102825, 102826, 102827, 102828, 102829, 102830, 102831, 102832, 102833, 102834, 102835, 102836, 102837, 102838, 102839, 102840, 102841, 102842, 102843, 102844, 102845, 102846, 102847, 102848, 102849, 102850, 102851, 102852, 102853, 102854, 102855, 102856, 102857, 102858, 102859, 102860, 102861, 102862, 102863, 102864, 102865, 102866, 102867, 102868, 102869, 102871, 102872, 102873, 102874, 102875, 102876, 102877, 102878, 102879, 102880, 102881, 102882, 102883, 102884, 102885, 102886, 102887, 102888, 102889, 102890, 102891, 102892, 102893, 102894, 102895, 102902, 102903, 102904, 102905, 102908, 102909, 102910, 102916, 102920, 102921, 102922, 102923, 102924, 102925, 102926, 102927, 102928, 102929, 102930, 102931, 102932, 102933, 102934, 102935, 102936, 102937, 102938, 102939, 102940, 102941, 102942, 102943, 102944, 102945, 102946, 102947, 102948, 102949, 102950, 102951, 102952, 102953, 102954, 102955, 102956, 102957,
class Page
include CapybaraPageObject::Page
element(:send) { find_button('Send') }
# would be the same as
def send
find_button('Send')
end
@rubemz
rubemz / graph.rb
Created September 9, 2011 03:19
Graph
class Home < Page
element :login_button, {'...'}
link :login_button,:to => LoginPage #click as default action or you can specify :action => :mouseover
def login
login_button.click
end
end
class Login < Page
@rubemz
rubemz / page.rb
Created September 9, 2011 02:50
Pages and transictions
class LoginPage < Page
partial :top_menu #something new - hammernight
#defining element on a page - existent on taza
element :username {text_field :id, 'username'}
#filter, so that we can wait for something before access an element - existent on taza
filter :username, :wait_until_something
def wait_until_something
@rubemz
rubemz / example.rb
Created September 9, 2011 01:15 — forked from lucastorri/example.rb
thinking about page object tester
#apps/orkut:D/pages/login.rb
class LoginPage < Page
@username_field = ...
@password_field = ...
@submit_button = ...
end
#apps/orkut:D/flows/home.rb
class LoginPage < Flow
def name
p @name
end