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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4d3ed6c4088db72ad7e50b5add522ca21e0e047da90c19805fd0e644b37ed174
4
- data.tar.gz: de565273eae1360e53eeca61cf61821f3dfb353e863a5b6551c3522ccde3b041
3
+ metadata.gz: 9398c3450c5aac178102ba61fd6908bfa1cc9b1e514090af69450850c9d3baa0
4
+ data.tar.gz: e5b9fde8a63e5fac2ae2400ae52cfcb88da49500af4bf53827794111a8438dc5
5
5
  SHA512:
6
- metadata.gz: b09ae0bb806790c3090f495fa66502ee80cf9505b68379caaed1d52418a3a5016ac1074cda88b5ac5fa3006c469158e6ecff42c34d465e9b35df88d82b4e1677
7
- data.tar.gz: 1597e47aecfab3de8c46deb32bc0bf1800ae8cb0cada1a1ffdc3928cd7bede4743fc80ed395cc6ebccbe51016b823f2f09e8f0b6908e46190929b3401a65c4f3
6
+ metadata.gz: dfbce06e7c6564c011375a3d48b7be585cb659edd3b6928bcdc8e463694b51b6728c301ea95462ac2e30f4bf6701228ffd0ef7c6beedfbb28ecbe49ec4cc4343
7
+ data.tar.gz: 9b75c0daa7d629f422aa91a53272993822bdef0d2e47f9f62700687c2fd77debee06139147d484ded93268dbac7ab6fad9b8fc9ba7b2bd913c268352ecf84346
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- superbara (0.5.0)
4
+ superbara (0.5.1)
5
5
  binding_of_caller (~> 0.8, >= 0.8.0)
6
6
  capybara (~> 3.1, >= 3.1.0)
7
7
  chromedriver-helper (~> 1.2.0, >= 1.2.0)
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Web app test scripting that does not hurt.
4
4
 
5
- - Based on Capybara: everything is just better and more natural
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
- case main_command
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 "run"
70
+ when "web"
71
+ webapp = Superbara::Web.new
72
+ webapp.run!
103
73
  exit 0
104
- when "start"
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
@@ -1,3 +1,3 @@
1
1
  module Superbara
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: superbara
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matti Paksula