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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 60c8ada090cd8f294eede5b5e0548cec699d2ad2
4
- data.tar.gz: 505f81d5665a3251e61e48d725c5d14bd928aa31
3
+ metadata.gz: 3e7bb7f80fe929f752ce8fc4123466464fd832ab
4
+ data.tar.gz: dd13a3365981759f52cdebec0742f1605662cea1
5
5
  SHA512:
6
- metadata.gz: 5e9c1e879d5ed25c254ac83aeaf2855b3c36e68482555a4d54b3525f7d33f80191ba4d60993b80d09a0a4e1b2af2d0c70c6f31c611b088465b1107a103607c51
7
- data.tar.gz: 8e37d85509f77ca11fb6eb859e01ba420541d00ce079114c3ef369c715f2568c6048fb1a0f7cb8cf8b79f0ff749d6a0863baad48857fe258e8b296c6761c65b7
6
+ metadata.gz: 4ff02f3a5d8f2b816514ad47ba39d35ad52c3456b5ec65d96bfddd52ebff142539d0d3585dd311ae26b958fac6ba865b7c3db0d6f69c703f1a83410d02e06f89
7
+ data.tar.gz: 301fd0c12026cd5a6d599f0734877b700d7fb25659f694910ec1d13004b767c9af61d9c2a01c8dd2b1ef7ea4ec5e83d944571cbcaed2272b5d1803a2f9b45e08
data/exe/blade CHANGED
@@ -3,7 +3,7 @@
3
3
  require "blade"
4
4
 
5
5
  if ARGV.empty?
6
- Blade::CLI.new.console
6
+ Blade::CLI.new.runner
7
7
  else
8
8
  Blade.initialize!
9
9
  Blade::CLI.start(ARGV)
@@ -1,12 +1,12 @@
1
1
  require "thor"
2
2
 
3
3
  class Blade::CLI < Thor
4
- desc "console", "Start in console mode"
5
- def console
6
- Blade.start(interface: :console)
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::Console
3
+ module Blade::Runner
4
4
  extend self
5
5
  include Blade::Component
6
6
 
7
- autoload :Tab, "blade/interface/console/tab"
7
+ autoload :Tab, "blade/interface/runner/tab"
8
8
 
9
9
  extend Forwardable
10
- def_delegators "Blade::Console", :create_window
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::Console::Tab < Blade::Model
1
+ class Blade::Runner::Tab < Blade::Model
2
2
  extend Forwardable
3
- def_delegators "Blade::Console", :colors, :create_window
3
+ def_delegators "Blade::Runner", :colors, :create_window
4
4
 
5
5
  class << self
6
6
  extend Forwardable
7
- def_delegators "Blade::Console", :create_window
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
- tabs = tabs.all
146
+ all = tabs.all
147
147
 
148
- if tabs.last == self
149
- tabs.first.activate
150
- elsif tab = tabs[index + 1]
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
- tabs = tabs.all
156
+ all = tabs.all
157
157
 
158
- if tabs.first == self
159
- tabs.last.activate
160
- elsif tab = tabs[index - 1]
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
@@ -1,3 +1,3 @@
1
1
  module Blade
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
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.1.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/console.rb
221
- - lib/blade/interface/console/tab.rb
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