superbara 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/superbara/cli.rb +41 -40
- data/lib/superbara/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9398c3450c5aac178102ba61fd6908bfa1cc9b1e514090af69450850c9d3baa0
|
4
|
+
data.tar.gz: e5b9fde8a63e5fac2ae2400ae52cfcb88da49500af4bf53827794111a8438dc5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dfbce06e7c6564c011375a3d48b7be585cb659edd3b6928bcdc8e463694b51b6728c301ea95462ac2e30f4bf6701228ffd0ef7c6beedfbb28ecbe49ec4cc4343
|
7
|
+
data.tar.gz: 9b75c0daa7d629f422aa91a53272993822bdef0d2e47f9f62700687c2fd77debee06139147d484ded93268dbac7ab6fad9b8fc9ba7b2bd913c268352ecf84346
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Web app test scripting that does not hurt.
|
4
4
|
|
5
|
-
-
|
5
|
+
- Stands on the shoulders of [Capybara](https://github.com/teamcapybara/capybara/)
|
6
6
|
- All batteries included: just start scripting, nothing extra required
|
7
7
|
- A powerful command line interface with interactive debugger
|
8
8
|
- The most natural test language that is still programming, see:
|
data/lib/superbara/cli.rb
CHANGED
@@ -65,50 +65,50 @@ scroll 50
|
|
65
65
|
loop do
|
66
66
|
Superbara.current_context = Superbara::Context.new(shell: (main_command == "shell"))
|
67
67
|
|
68
|
-
|
69
|
-
when "web"
|
70
|
-
webapp = Superbara::Web.new
|
71
|
-
webapp.run!
|
72
|
-
exit 0
|
73
|
-
when "shell"
|
74
|
-
Superbara.visual_enable!
|
75
|
-
Superbara.shell_enable!
|
76
|
-
Superbara::Chrome.page_load_strategy = "none"
|
77
|
-
|
78
|
-
unless webapp_thread
|
79
|
-
webapp_thread = Thread.new do
|
80
|
-
webapp = Superbara::Web.new access_log: false
|
81
|
-
webapp.run!
|
82
|
-
end
|
83
|
-
end
|
84
|
-
|
85
|
-
Superbara.current_context.__superbara_eval "visit 'localhost:4567'"
|
86
|
-
Superbara.current_context.__superbara_debug
|
87
|
-
when "run", "start"
|
88
|
-
puts "project: #{Superbara.project_name}"
|
89
|
-
puts ""
|
90
|
-
puts "t action".colorize(:light_black)
|
91
|
-
Superbara.start!
|
92
|
-
Superbara.visual_disable!
|
93
|
-
Superbara.current_context.__superbara_eval "visit 'about:blank'"
|
94
|
-
Superbara.visual_enable!
|
95
|
-
|
96
|
-
Superbara.current_context.__superbara_load(File.join(Superbara.project_path, "main.rb"))
|
97
|
-
|
98
|
-
puts """
|
99
|
-
🏁 🏁 🏁 done."""
|
100
|
-
|
68
|
+
begin
|
101
69
|
case main_command
|
102
|
-
when "
|
70
|
+
when "web"
|
71
|
+
webapp = Superbara::Web.new
|
72
|
+
webapp.run!
|
103
73
|
exit 0
|
104
|
-
when "
|
74
|
+
when "shell"
|
75
|
+
Superbara.visual_enable!
|
76
|
+
Superbara.shell_enable!
|
77
|
+
Superbara::Chrome.page_load_strategy = "none"
|
78
|
+
|
79
|
+
unless webapp_thread
|
80
|
+
webapp_thread = Thread.new do
|
81
|
+
webapp = Superbara::Web.new access_log: false
|
82
|
+
webapp.run!
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
Superbara.current_context.__superbara_eval "visit 'localhost:4567'"
|
105
87
|
Superbara.current_context.__superbara_debug
|
88
|
+
when "run", "start"
|
89
|
+
puts "project: #{Superbara.project_name}"
|
90
|
+
puts ""
|
91
|
+
puts "t action".colorize(:light_black)
|
92
|
+
Superbara.start!
|
93
|
+
Superbara.visual_disable!
|
94
|
+
Superbara.current_context.__superbara_eval "visit 'about:blank'"
|
95
|
+
Superbara.visual_enable!
|
96
|
+
|
97
|
+
Superbara.current_context.__superbara_load(File.join(Superbara.project_path, "main.rb"))
|
98
|
+
|
99
|
+
puts """
|
100
|
+
🏁 🏁 🏁 done."""
|
101
|
+
|
102
|
+
case main_command
|
103
|
+
when "run"
|
104
|
+
exit 0
|
105
|
+
when "start"
|
106
|
+
Superbara.current_context.__superbara_debug
|
107
|
+
end
|
108
|
+
else
|
109
|
+
puts "Unknown command: #{main_command}"
|
110
|
+
exit 1
|
106
111
|
end
|
107
|
-
else
|
108
|
-
puts "Unknown command: #{main_command}"
|
109
|
-
exit 1
|
110
|
-
end
|
111
|
-
|
112
112
|
rescue Exception => ex
|
113
113
|
return if ex.class == SystemExit
|
114
114
|
|
@@ -127,6 +127,7 @@ in #{offending_file_path}:#{offending_line}
|
|
127
127
|
#{offending_line}: #{offending_code}""".colorize(:light_black)
|
128
128
|
|
129
129
|
Superbara.current_context.__superbara_debug
|
130
|
+
end
|
130
131
|
end
|
131
132
|
end
|
132
133
|
end; end
|
data/lib/superbara/version.rb
CHANGED