vedeu 0.0.31 → 0.0.32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -4
- data/lib/vedeu.rb +1 -0
- data/lib/vedeu/models/collection.rb +17 -0
- data/lib/vedeu/models/colour.rb +27 -5
- data/lib/vedeu/models/line_collection.rb +4 -9
- data/lib/vedeu/models/stream.rb +1 -1
- data/lib/vedeu/models/stream_collection.rb +4 -9
- data/lib/vedeu/support/coordinate.rb +149 -0
- data/lib/vedeu/support/esc.rb +4 -0
- data/lib/vedeu/support/menu.rb +103 -0
- data/lib/vedeu/support/terminal.rb +4 -0
- data/test/example_app/lib/app.rb +25 -6
- data/test/lib/vedeu/models/collection_test.rb +50 -0
- data/test/lib/vedeu/models/colour_test.rb +58 -1
- data/test/lib/vedeu/models/command_test.rb +2 -1
- data/test/lib/vedeu/models/interface_collection_test.rb +4 -3
- data/test/lib/vedeu/models/line_test.rb +3 -1
- data/test/lib/vedeu/models/stream_test.rb +6 -3
- data/test/lib/vedeu/output/text_adaptor_test.rb +1 -1
- data/test/lib/vedeu/repository/command_repository_test.rb +2 -1
- data/test/lib/vedeu/repository/interface_repository_test.rb +2 -1
- data/test/lib/vedeu/repository/repository_test.rb +2 -1
- data/test/lib/vedeu/repository/storage_test.rb +6 -3
- data/test/lib/vedeu/support/coordinate_test.rb +363 -0
- data/test/lib/vedeu/support/esc_test.rb +8 -0
- data/test/lib/vedeu/support/menu_test.rb +202 -0
- data/test/lib/vedeu/support/parser_test.rb +2 -1
- data/test/lib/vedeu/support/parsing/hash_parser_test.rb +6 -3
- data/test/lib/vedeu/support/parsing/json_parser_test.rb +2 -1
- data/test/lib/vedeu/support/terminal_test.rb +9 -0
- data/test/lib/vedeu/support/translator_test.rb +2 -1
- data/test/test_helper.rb +12 -0
- data/vedeu.gemspec +1 -1
- metadata +11 -8
- data/lib/vedeu/models/background.rb +0 -13
- data/lib/vedeu/models/foreground.rb +0 -13
- data/test/lib/vedeu/models/background_test.rb +0 -19
- data/test/lib/vedeu/models/foreground_test.rb +0 -18
@@ -1,19 +0,0 @@
|
|
1
|
-
require_relative '../../../test_helper'
|
2
|
-
require_relative '../../../../lib/vedeu/models/background'
|
3
|
-
require_relative '../../../../lib/vedeu/models/colour'
|
4
|
-
|
5
|
-
module Vedeu
|
6
|
-
describe Background do
|
7
|
-
describe '#background' do
|
8
|
-
it 'returns an escape sequence' do
|
9
|
-
Colour.new({
|
10
|
-
background: '#00ff00'
|
11
|
-
}).background.must_equal("\e[48;5;46m")
|
12
|
-
end
|
13
|
-
|
14
|
-
it 'returns an empty string when the foreground is missing' do
|
15
|
-
Colour.new.background.must_equal('')
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
require_relative '../../../test_helper'
|
2
|
-
require_relative '../../../../lib/vedeu/models/foreground'
|
3
|
-
require_relative '../../../../lib/vedeu/models/colour'
|
4
|
-
|
5
|
-
module Vedeu
|
6
|
-
describe Foreground do
|
7
|
-
describe '#foreground' do
|
8
|
-
it 'returns an escape sequence' do
|
9
|
-
Colour.new({ foreground: '#ff0000' }).foreground
|
10
|
-
.must_equal("\e[38;5;196m")
|
11
|
-
end
|
12
|
-
|
13
|
-
it 'returns an empty string when the foreground is missing' do
|
14
|
-
Colour.new.foreground.must_equal('')
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|