blade 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/blade +1 -1
- data/lib/blade/cli.rb +4 -4
- data/lib/blade/interface/{console.rb → runner.rb} +5 -5
- data/lib/blade/interface/{console → runner}/tab.rb +11 -11
- data/lib/blade/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e7bb7f80fe929f752ce8fc4123466464fd832ab
|
4
|
+
data.tar.gz: dd13a3365981759f52cdebec0742f1605662cea1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ff02f3a5d8f2b816514ad47ba39d35ad52c3456b5ec65d96bfddd52ebff142539d0d3585dd311ae26b958fac6ba865b7c3db0d6f69c703f1a83410d02e06f89
|
7
|
+
data.tar.gz: 301fd0c12026cd5a6d599f0734877b700d7fb25659f694910ec1d13004b767c9af61d9c2a01c8dd2b1ef7ea4ec5e83d944571cbcaed2272b5d1803a2f9b45e08
|
data/exe/blade
CHANGED
data/lib/blade/cli.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
require "thor"
|
2
2
|
|
3
3
|
class Blade::CLI < Thor
|
4
|
-
desc "
|
5
|
-
def
|
6
|
-
Blade.start(interface: :
|
4
|
+
desc "runner", "Start test runner in console mode"
|
5
|
+
def runner
|
6
|
+
Blade.start(interface: :runner)
|
7
7
|
end
|
8
8
|
|
9
|
-
desc "ci", "Start in CI mode"
|
9
|
+
desc "ci", "Start test runner in CI mode"
|
10
10
|
def ci
|
11
11
|
Blade.start(interface: :ci)
|
12
12
|
end
|
@@ -1,13 +1,13 @@
|
|
1
1
|
require "curses"
|
2
2
|
|
3
|
-
module Blade::
|
3
|
+
module Blade::Runner
|
4
4
|
extend self
|
5
5
|
include Blade::Component
|
6
6
|
|
7
|
-
autoload :Tab, "blade/interface/
|
7
|
+
autoload :Tab, "blade/interface/runner/tab"
|
8
8
|
|
9
9
|
extend Forwardable
|
10
|
-
def_delegators "Blade::
|
10
|
+
def_delegators "Blade::Runner", :create_window
|
11
11
|
|
12
12
|
COLOR_NAMES = %w( white yellow green red )
|
13
13
|
PADDING = 1
|
@@ -92,10 +92,10 @@ module Blade::Console
|
|
92
92
|
while ch = Curses.getch
|
93
93
|
case ch
|
94
94
|
when Curses::KEY_LEFT
|
95
|
-
Tab.active.activate_previous
|
95
|
+
Tab.active.try(:activate_previous)
|
96
96
|
Curses.doupdate
|
97
97
|
when Curses::KEY_RIGHT
|
98
|
-
Tab.active.activate_next
|
98
|
+
Tab.active.try(:activate_next)
|
99
99
|
Curses.doupdate
|
100
100
|
when "q"
|
101
101
|
Blade.stop
|
@@ -1,10 +1,10 @@
|
|
1
|
-
class Blade::
|
1
|
+
class Blade::Runner::Tab < Blade::Model
|
2
2
|
extend Forwardable
|
3
|
-
def_delegators "Blade::
|
3
|
+
def_delegators "Blade::Runner", :colors, :create_window
|
4
4
|
|
5
5
|
class << self
|
6
6
|
extend Forwardable
|
7
|
-
def_delegators "Blade::
|
7
|
+
def_delegators "Blade::Runner", :create_window
|
8
8
|
|
9
9
|
attr_reader :window, :status_window, :content_window
|
10
10
|
|
@@ -143,21 +143,21 @@ class Blade::Console::Tab < Blade::Model
|
|
143
143
|
end
|
144
144
|
|
145
145
|
def activate_next
|
146
|
-
|
146
|
+
all = tabs.all
|
147
147
|
|
148
|
-
if
|
149
|
-
|
150
|
-
elsif tab =
|
148
|
+
if all.last == self
|
149
|
+
all.first.activate
|
150
|
+
elsif tab = all[index + 1]
|
151
151
|
tab.activate
|
152
152
|
end
|
153
153
|
end
|
154
154
|
|
155
155
|
def activate_previous
|
156
|
-
|
156
|
+
all = tabs.all
|
157
157
|
|
158
|
-
if
|
159
|
-
|
160
|
-
elsif tab =
|
158
|
+
if all.first == self
|
159
|
+
all.last.activate
|
160
|
+
elsif tab = all[index - 1]
|
161
161
|
tab.activate
|
162
162
|
end
|
163
163
|
end
|
data/lib/blade/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blade
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Javan Makhmali
|
@@ -217,8 +217,8 @@ files:
|
|
217
217
|
- lib/blade/combined_test_results.rb
|
218
218
|
- lib/blade/component.rb
|
219
219
|
- lib/blade/interface/ci.rb
|
220
|
-
- lib/blade/interface/
|
221
|
-
- lib/blade/interface/
|
220
|
+
- lib/blade/interface/runner.rb
|
221
|
+
- lib/blade/interface/runner/tab.rb
|
222
222
|
- lib/blade/model.rb
|
223
223
|
- lib/blade/rack_adapter.rb
|
224
224
|
- lib/blade/server.rb
|