bauxite 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (124) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +21 -0
  3. data/Rakefile +69 -0
  4. data/bin/bauxite +27 -0
  5. data/doc/Bauxite/Action.html +1463 -0
  6. data/doc/Bauxite/ActionModule.html +342 -0
  7. data/doc/Bauxite/Context.html +1439 -0
  8. data/doc/Bauxite/Errors/AssertionError.html +107 -0
  9. data/doc/Bauxite/Errors/FileNotFoundError.html +107 -0
  10. data/doc/Bauxite/Errors.html +100 -0
  11. data/doc/Bauxite/Loggers/CompositeLogger.html +325 -0
  12. data/doc/Bauxite/Loggers/EchoLogger.html +164 -0
  13. data/doc/Bauxite/Loggers/FileLogger.html +215 -0
  14. data/doc/Bauxite/Loggers/NullLogger.html +334 -0
  15. data/doc/Bauxite/Loggers/TerminalLogger.html +586 -0
  16. data/doc/Bauxite/Loggers/XtermLogger.html +287 -0
  17. data/doc/Bauxite/Loggers.html +103 -0
  18. data/doc/Bauxite/Selector.html +422 -0
  19. data/doc/Bauxite/SelectorModule.html +283 -0
  20. data/doc/Bauxite.html +98 -0
  21. data/doc/created.rid +37 -0
  22. data/doc/fonts/Lato-Light.ttf +0 -0
  23. data/doc/fonts/Lato-LightItalic.ttf +0 -0
  24. data/doc/fonts/Lato-Regular.ttf +0 -0
  25. data/doc/fonts/Lato-RegularItalic.ttf +0 -0
  26. data/doc/fonts/SourceCodePro-Bold.ttf +0 -0
  27. data/doc/fonts/SourceCodePro-Regular.ttf +0 -0
  28. data/doc/fonts.css +167 -0
  29. data/doc/images/add.png +0 -0
  30. data/doc/images/arrow_up.png +0 -0
  31. data/doc/images/brick.png +0 -0
  32. data/doc/images/brick_link.png +0 -0
  33. data/doc/images/bug.png +0 -0
  34. data/doc/images/bullet_black.png +0 -0
  35. data/doc/images/bullet_toggle_minus.png +0 -0
  36. data/doc/images/bullet_toggle_plus.png +0 -0
  37. data/doc/images/date.png +0 -0
  38. data/doc/images/delete.png +0 -0
  39. data/doc/images/find.png +0 -0
  40. data/doc/images/loadingAnimation.gif +0 -0
  41. data/doc/images/macFFBgHack.png +0 -0
  42. data/doc/images/package.png +0 -0
  43. data/doc/images/page_green.png +0 -0
  44. data/doc/images/page_white_text.png +0 -0
  45. data/doc/images/page_white_width.png +0 -0
  46. data/doc/images/plugin.png +0 -0
  47. data/doc/images/ruby.png +0 -0
  48. data/doc/images/tag_blue.png +0 -0
  49. data/doc/images/tag_green.png +0 -0
  50. data/doc/images/transparent.png +0 -0
  51. data/doc/images/wrench.png +0 -0
  52. data/doc/images/wrench_orange.png +0 -0
  53. data/doc/images/zoom.png +0 -0
  54. data/doc/index.html +111 -0
  55. data/doc/js/darkfish.js +140 -0
  56. data/doc/js/jquery.js +18 -0
  57. data/doc/js/navigation.js +142 -0
  58. data/doc/js/search.js +109 -0
  59. data/doc/js/search_index.js +1 -0
  60. data/doc/js/searcher.js +228 -0
  61. data/doc/rdoc.css +580 -0
  62. data/doc/table_of_contents.html +510 -0
  63. data/lib/bauxite/actions/alias.rb +51 -0
  64. data/lib/bauxite/actions/assert.rb +49 -0
  65. data/lib/bauxite/actions/assertv.rb +40 -0
  66. data/lib/bauxite/actions/break.rb +39 -0
  67. data/lib/bauxite/actions/click.rb +35 -0
  68. data/lib/bauxite/actions/debug.rb +99 -0
  69. data/lib/bauxite/actions/echo.rb +36 -0
  70. data/lib/bauxite/actions/exec.rb +46 -0
  71. data/lib/bauxite/actions/js.rb +41 -0
  72. data/lib/bauxite/actions/load.rb +49 -0
  73. data/lib/bauxite/actions/open.rb +34 -0
  74. data/lib/bauxite/actions/params.rb +40 -0
  75. data/lib/bauxite/actions/replace.rb +37 -0
  76. data/lib/bauxite/actions/reset.rb +37 -0
  77. data/lib/bauxite/actions/return.rb +62 -0
  78. data/lib/bauxite/actions/ruby.rb +58 -0
  79. data/lib/bauxite/actions/set.rb +39 -0
  80. data/lib/bauxite/actions/source.rb +44 -0
  81. data/lib/bauxite/actions/store.rb +38 -0
  82. data/lib/bauxite/actions/test.rb +61 -0
  83. data/lib/bauxite/actions/tryload.rb +79 -0
  84. data/lib/bauxite/actions/wait.rb +38 -0
  85. data/lib/bauxite/actions/write.rb +40 -0
  86. data/lib/bauxite/application.rb +150 -0
  87. data/lib/bauxite/core/Action.rb +205 -0
  88. data/lib/bauxite/core/Context.rb +575 -0
  89. data/lib/bauxite/core/Errors.rb +36 -0
  90. data/lib/bauxite/core/Logger.rb +86 -0
  91. data/lib/bauxite/core/Selector.rb +156 -0
  92. data/lib/bauxite/loggers/composite.rb +70 -0
  93. data/lib/bauxite/loggers/echo.rb +36 -0
  94. data/lib/bauxite/loggers/file.rb +45 -0
  95. data/lib/bauxite/loggers/terminal.rb +130 -0
  96. data/lib/bauxite/loggers/xterm.rb +79 -0
  97. data/lib/bauxite/selectors/attr.rb +39 -0
  98. data/lib/bauxite/selectors/default.rb +38 -0
  99. data/lib/bauxite/selectors/frame.rb +60 -0
  100. data/lib/bauxite.rb +29 -0
  101. data/test/alias.bxt +6 -0
  102. data/test/assertv.bxt +2 -0
  103. data/test/delay/page.html +5 -0
  104. data/test/delay.bxt +2 -0
  105. data/test/exec.bxt +6 -0
  106. data/test/format/page.html +7 -0
  107. data/test/format.bxt +17 -0
  108. data/test/frame/child_frame.html +7 -0
  109. data/test/frame/grandchild_frame.html +5 -0
  110. data/test/frame/page.html +5 -0
  111. data/test/frame.bxt +6 -0
  112. data/test/js.bxt +5 -0
  113. data/test/load/child.bxt +13 -0
  114. data/test/load.bxt +17 -0
  115. data/test/ruby/custom.rb +5 -0
  116. data/test/ruby.bxt +2 -0
  117. data/test/selectors/page.html +7 -0
  118. data/test/selectors.bxt +7 -0
  119. data/test/stdin.bxt +1 -0
  120. data/test/test/test1.bxt +2 -0
  121. data/test/test/test2.bxt +3 -0
  122. data/test/test/test3.bxt +2 -0
  123. data/test/test.bxt.manual +4 -0
  124. metadata +194 -0
data/test/alias.bxt ADDED
@@ -0,0 +1,6 @@
1
+ alias hey echo "${1}, nice to see you!"
2
+ hey john
3
+
4
+ alias set_hi set hi "hi ${1}"
5
+ set_hi dude!
6
+ assertv "^hi dude!$" "${hi}"
data/test/assertv.bxt ADDED
@@ -0,0 +1,2 @@
1
+ set myvar myvalue1234
2
+ assertv "^myvalue\d+$" "${myvar}"
@@ -0,0 +1,5 @@
1
+ <html>
2
+ <body onload="setTimeout(function() { document.getElementById('label').innerHTML = 'done!'; }, 3000);">
3
+ <div id="label">not yet!</div>
4
+ </body>
5
+ </html>
data/test/delay.bxt ADDED
@@ -0,0 +1,2 @@
1
+ open "file://${__DIR__}/delay/page.html"
2
+ assert label "done!"
data/test/exec.bxt ADDED
@@ -0,0 +1,6 @@
1
+ exec today=date "--date='2001-01-01' | cut -f 1 -d ' '"
2
+ assertv "^Mon$" "${today}"
3
+
4
+ alias get_date exec ${2}=date "--date='${1}' | cut -f 1 -d ' '"
5
+ get_date 2001-01-02 tomorrow
6
+ assertv "^Tue$" "${tomorrow}"
@@ -0,0 +1,7 @@
1
+ <html>
2
+ <body>
3
+ <div class="parent">
4
+ <input id="random_prefix_by_id" class="by_class" by_attr="attr_value">
5
+ </div>
6
+ </body>
7
+ </html>
data/test/format.bxt ADDED
@@ -0,0 +1,17 @@
1
+ open "file://${__DIR__}/format/page.html"
2
+
3
+ # action arg1 arg2
4
+ write by_id hello
5
+ echo "hello world!"
6
+ assert by_id hello
7
+
8
+
9
+
10
+
11
+ #
12
+
13
+
14
+ # indented comment
15
+
16
+ set my_var "stuff with whitespace and tabs embedded "
17
+ assertv "^stuff with whitespace and tabs embedded $" "${my_var}"
@@ -0,0 +1,7 @@
1
+ <html>
2
+ <body>
3
+ <input id="search_text" class="input_box"/>
4
+ <span id="label">Hello</span>
5
+ <iframe id="grandchild" src="grandchild_frame.html"></iframe>
6
+ </body>
7
+ </html>
@@ -0,0 +1,5 @@
1
+ <html>
2
+ <body>
3
+ <span id="label">Hello boy!</span>
4
+ </body>
5
+ </html>
@@ -0,0 +1,5 @@
1
+ <html>
2
+ <body>
3
+ <iframe id="child" src="child_frame.html"></iframe>
4
+ </body>
5
+ </html>
data/test/frame.bxt ADDED
@@ -0,0 +1,6 @@
1
+ open "file://${__DIR__}/frame/page.html"
2
+ write "frame=|child|search_text" "World"
3
+ assert "frame=|child|label" "Hello"
4
+ assert "frame=|child|css=.input_box" "World"
5
+ assert "frame=|child|frame=|grandchild|label" "Hello boy!"
6
+
data/test/js.bxt ADDED
@@ -0,0 +1,5 @@
1
+ set title "test title"
2
+ js "document.title = '${title}'"
3
+ js "return document.title" current_title
4
+ echo "Title is: ${current_title}"
5
+ assertv "^${title}$" "${current_title}"
@@ -0,0 +1,13 @@
1
+ echo "Welcome to child!"
2
+ set child_only "this is local"
3
+ echo "In here var is ${var}"
4
+ echo "... and __FILE__ is ${__FILE__}"
5
+ echo "... and other is ${other}"
6
+ echo "... and child_only is ${child_only}"
7
+ echo "Bye bye!"
8
+ assertv "child.bxt$" "${__FILE__}"
9
+ assertv "^this shouldn't change$" "${other}"
10
+ assertv "^overriden$" "${var}"
11
+ assertv "^this is local$" "${child_only}"
12
+ set retval "child"
13
+ return retval
data/test/load.bxt ADDED
@@ -0,0 +1,17 @@
1
+ set var "in main!"
2
+ set other "this shouldn't change"
3
+ echo "So far var is ${var}"
4
+ echo "... and __FILE__ is ${__FILE__}"
5
+ echo "... and other is ${other}"
6
+ echo "... and child_only is ${child_only}"
7
+ echo "About to load child.bxt..."
8
+ load load/child.bxt "var=overriden"
9
+ echo "Back in main var is ${var}"
10
+ echo "... and __FILE__ is ${__FILE__}"
11
+ echo "... and other is ${other}"
12
+ echo "... and child_only is ${child_only}"
13
+ assertv "load.bxt$" "${__FILE__}"
14
+ assertv "^this shouldn't change$" "${other}"
15
+ assertv "^in main!$" "${var}"
16
+ assertv "^\$\{child_only\}$" "${child_only}"
17
+ assertv "^child$" "${retval}"
@@ -0,0 +1,5 @@
1
+ lambda do |ctx|
2
+ raise "Failed" if ctx.variables['message'] != "a message to ruby!"
3
+ ctx.exec_action 'set response "response from ruby!"'
4
+ ctx.exec_action 'return response'
5
+ end
data/test/ruby.bxt ADDED
@@ -0,0 +1,2 @@
1
+ ruby ruby/custom.rb "message=a message to ruby!"
2
+ assertv "^response from ruby!$" "${response}"
@@ -0,0 +1,7 @@
1
+ <html>
2
+ <body>
3
+ <div class="parent">
4
+ <input id="random_prefix_by_id" class="by_class" by_attr="attr_value">
5
+ </div>
6
+ </body>
7
+ </html>
@@ -0,0 +1,7 @@
1
+ open "file://${__DIR__}/selectors/page.html"
2
+ write by_id hello
3
+ assert "css=.parent input" hello
4
+ assert "attr=by_attr:attr_value" hello
5
+ assert "class=by_class" hello
6
+ assert "tag_name=input" hello
7
+
data/test/stdin.bxt ADDED
@@ -0,0 +1 @@
1
+ echo "hello world!"
@@ -0,0 +1,2 @@
1
+ echo "test1"
2
+ assertv true true
@@ -0,0 +1,3 @@
1
+ echo "test2"
2
+ assertv true false
3
+
@@ -0,0 +1,2 @@
1
+ echo "test3"
2
+ assertv true true
@@ -0,0 +1,4 @@
1
+ test test/test1.bxt
2
+ test test/test2.bxt "broken test"
3
+ test test/test1.bxt "final test"
4
+
metadata ADDED
@@ -0,0 +1,194 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: bauxite
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Patricio Zavolinsky
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-01-25 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: selenium-webdriver
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '2.39'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '2.39'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.1'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.1'
41
+ description:
42
+ email: pzavolinsky at yahoo dot com dot ar
43
+ executables:
44
+ - bauxite
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - LICENSE
49
+ - Rakefile
50
+ - bin/bauxite
51
+ - doc/Bauxite.html
52
+ - doc/Bauxite/Action.html
53
+ - doc/Bauxite/ActionModule.html
54
+ - doc/Bauxite/Context.html
55
+ - doc/Bauxite/Errors.html
56
+ - doc/Bauxite/Errors/AssertionError.html
57
+ - doc/Bauxite/Errors/FileNotFoundError.html
58
+ - doc/Bauxite/Loggers.html
59
+ - doc/Bauxite/Loggers/CompositeLogger.html
60
+ - doc/Bauxite/Loggers/EchoLogger.html
61
+ - doc/Bauxite/Loggers/FileLogger.html
62
+ - doc/Bauxite/Loggers/NullLogger.html
63
+ - doc/Bauxite/Loggers/TerminalLogger.html
64
+ - doc/Bauxite/Loggers/XtermLogger.html
65
+ - doc/Bauxite/Selector.html
66
+ - doc/Bauxite/SelectorModule.html
67
+ - doc/created.rid
68
+ - doc/fonts.css
69
+ - doc/fonts/Lato-Light.ttf
70
+ - doc/fonts/Lato-LightItalic.ttf
71
+ - doc/fonts/Lato-Regular.ttf
72
+ - doc/fonts/Lato-RegularItalic.ttf
73
+ - doc/fonts/SourceCodePro-Bold.ttf
74
+ - doc/fonts/SourceCodePro-Regular.ttf
75
+ - doc/images/add.png
76
+ - doc/images/arrow_up.png
77
+ - doc/images/brick.png
78
+ - doc/images/brick_link.png
79
+ - doc/images/bug.png
80
+ - doc/images/bullet_black.png
81
+ - doc/images/bullet_toggle_minus.png
82
+ - doc/images/bullet_toggle_plus.png
83
+ - doc/images/date.png
84
+ - doc/images/delete.png
85
+ - doc/images/find.png
86
+ - doc/images/loadingAnimation.gif
87
+ - doc/images/macFFBgHack.png
88
+ - doc/images/package.png
89
+ - doc/images/page_green.png
90
+ - doc/images/page_white_text.png
91
+ - doc/images/page_white_width.png
92
+ - doc/images/plugin.png
93
+ - doc/images/ruby.png
94
+ - doc/images/tag_blue.png
95
+ - doc/images/tag_green.png
96
+ - doc/images/transparent.png
97
+ - doc/images/wrench.png
98
+ - doc/images/wrench_orange.png
99
+ - doc/images/zoom.png
100
+ - doc/index.html
101
+ - doc/js/darkfish.js
102
+ - doc/js/jquery.js
103
+ - doc/js/navigation.js
104
+ - doc/js/search.js
105
+ - doc/js/search_index.js
106
+ - doc/js/searcher.js
107
+ - doc/rdoc.css
108
+ - doc/table_of_contents.html
109
+ - lib/bauxite.rb
110
+ - lib/bauxite/actions/alias.rb
111
+ - lib/bauxite/actions/assert.rb
112
+ - lib/bauxite/actions/assertv.rb
113
+ - lib/bauxite/actions/break.rb
114
+ - lib/bauxite/actions/click.rb
115
+ - lib/bauxite/actions/debug.rb
116
+ - lib/bauxite/actions/echo.rb
117
+ - lib/bauxite/actions/exec.rb
118
+ - lib/bauxite/actions/js.rb
119
+ - lib/bauxite/actions/load.rb
120
+ - lib/bauxite/actions/open.rb
121
+ - lib/bauxite/actions/params.rb
122
+ - lib/bauxite/actions/replace.rb
123
+ - lib/bauxite/actions/reset.rb
124
+ - lib/bauxite/actions/return.rb
125
+ - lib/bauxite/actions/ruby.rb
126
+ - lib/bauxite/actions/set.rb
127
+ - lib/bauxite/actions/source.rb
128
+ - lib/bauxite/actions/store.rb
129
+ - lib/bauxite/actions/test.rb
130
+ - lib/bauxite/actions/tryload.rb
131
+ - lib/bauxite/actions/wait.rb
132
+ - lib/bauxite/actions/write.rb
133
+ - lib/bauxite/application.rb
134
+ - lib/bauxite/core/Action.rb
135
+ - lib/bauxite/core/Context.rb
136
+ - lib/bauxite/core/Errors.rb
137
+ - lib/bauxite/core/Logger.rb
138
+ - lib/bauxite/core/Selector.rb
139
+ - lib/bauxite/loggers/composite.rb
140
+ - lib/bauxite/loggers/echo.rb
141
+ - lib/bauxite/loggers/file.rb
142
+ - lib/bauxite/loggers/terminal.rb
143
+ - lib/bauxite/loggers/xterm.rb
144
+ - lib/bauxite/selectors/attr.rb
145
+ - lib/bauxite/selectors/default.rb
146
+ - lib/bauxite/selectors/frame.rb
147
+ - test/alias.bxt
148
+ - test/assertv.bxt
149
+ - test/delay.bxt
150
+ - test/delay/page.html
151
+ - test/exec.bxt
152
+ - test/format.bxt
153
+ - test/format/page.html
154
+ - test/frame.bxt
155
+ - test/frame/child_frame.html
156
+ - test/frame/grandchild_frame.html
157
+ - test/frame/page.html
158
+ - test/js.bxt
159
+ - test/load.bxt
160
+ - test/load/child.bxt
161
+ - test/ruby.bxt
162
+ - test/ruby/custom.rb
163
+ - test/selectors.bxt
164
+ - test/selectors/page.html
165
+ - test/stdin.bxt
166
+ - test/test.bxt.manual
167
+ - test/test/test1.bxt
168
+ - test/test/test2.bxt
169
+ - test/test/test3.bxt
170
+ homepage: http://rubygems.org/gems/bauxite
171
+ licenses:
172
+ - MIT
173
+ metadata: {}
174
+ post_install_message:
175
+ rdoc_options: []
176
+ require_paths:
177
+ - lib
178
+ required_ruby_version: !ruby/object:Gem::Requirement
179
+ requirements:
180
+ - - ">="
181
+ - !ruby/object:Gem::Version
182
+ version: '0'
183
+ required_rubygems_version: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - ">="
186
+ - !ruby/object:Gem::Version
187
+ version: '0'
188
+ requirements: []
189
+ rubyforge_project:
190
+ rubygems_version: 2.2.1
191
+ signing_key:
192
+ specification_version: 4
193
+ summary: Bauxite is a facade over Selenium intended for non-developers
194
+ test_files: []