vedeu 0.5.10 → 0.5.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/Dockerfile +2 -1
  3. data/bin/vedeu +1 -4
  4. data/lib/vedeu/all.rb +8 -12
  5. data/lib/vedeu/bindings/drb.rb +2 -2
  6. data/lib/vedeu/bindings/system.rb +11 -7
  7. data/lib/vedeu/{output/virtual_terminal.rb → buffers/virtual_buffer.rb} +15 -8
  8. data/lib/vedeu/{output/virtual_buffer.rb → buffers/virtual_buffers.rb} +4 -4
  9. data/lib/vedeu/cursor/cursor.rb +2 -6
  10. data/lib/vedeu/cursor/reposition.rb +11 -6
  11. data/lib/vedeu/esc/esc.rb +4 -0
  12. data/lib/vedeu/models/views/view.rb +1 -1
  13. data/lib/vedeu/output/output.rb +1 -1
  14. data/lib/vedeu/plugins.rb +7 -3
  15. data/lib/vedeu/plugins/plugin.rb +4 -4
  16. data/lib/vedeu/refresh/refresh.rb +31 -0
  17. data/lib/vedeu/refresh/refresh_buffer.rb +53 -0
  18. data/lib/vedeu/{cursor → refresh}/refresh_cursor.rb +4 -4
  19. data/lib/vedeu/refresh/refresh_group.rb +59 -0
  20. data/lib/vedeu/terminal.rb +2 -2
  21. data/lib/vedeu/version.rb +1 -1
  22. data/test/lib/vedeu/{output/virtual_terminal_test.rb → buffers/virtual_buffer_test.rb} +16 -12
  23. data/test/lib/vedeu/{output/virtual_buffer_test.rb → buffers/virtual_buffers_test.rb} +3 -3
  24. data/test/lib/vedeu/cursor/cursors_test.rb +2 -0
  25. data/test/lib/vedeu/distributed/client_test.rb +13 -9
  26. data/test/lib/vedeu/distributed/server_test.rb +5 -0
  27. data/test/lib/vedeu/distributed/subprocess_test.rb +12 -1
  28. data/test/lib/vedeu/models/views/view_test.rb +41 -0
  29. data/test/lib/vedeu/output/output_test.rb +1 -1
  30. data/test/lib/vedeu/output/renderers/html_test.rb +1 -1
  31. data/test/lib/vedeu/output/viewport_test.rb +15 -16
  32. data/test/lib/vedeu/plugins_test.rb +7 -0
  33. data/test/lib/vedeu/refresh/refresh_buffer_test.rb +50 -0
  34. data/test/lib/vedeu/{cursor → refresh}/refresh_cursor_test.rb +8 -6
  35. data/test/lib/vedeu/{output → refresh}/refresh_group_test.rb +4 -2
  36. data/test/lib/vedeu/refresh/refresh_test.rb +44 -0
  37. data/test/test_helper.rb +1 -1
  38. data/vedeu.gemspec +3 -3
  39. metadata +24 -55
  40. data/lib/vedeu/cli/generator/all.rb +0 -9
  41. data/lib/vedeu/cli/generator/application.rb +0 -133
  42. data/lib/vedeu/cli/generator/helpers.rb +0 -139
  43. data/lib/vedeu/cli/generator/templates/application/.gitignore +0 -1
  44. data/lib/vedeu/cli/generator/templates/application/.ruby-version +0 -1
  45. data/lib/vedeu/cli/generator/templates/application/Gemfile +0 -4
  46. data/lib/vedeu/cli/generator/templates/application/LICENSE.txt +0 -24
  47. data/lib/vedeu/cli/generator/templates/application/README.md +0 -18
  48. data/lib/vedeu/cli/generator/templates/application/app/controllers/application_controller.erb +0 -7
  49. data/lib/vedeu/cli/generator/templates/application/app/controllers/name.erb +0 -22
  50. data/lib/vedeu/cli/generator/templates/application/app/helpers/application_helper.erb +0 -9
  51. data/lib/vedeu/cli/generator/templates/application/app/helpers/name.erb +0 -11
  52. data/lib/vedeu/cli/generator/templates/application/app/models/keymaps/_global_.rb +0 -8
  53. data/lib/vedeu/cli/generator/templates/application/app/models/keymaps/name.erb +0 -3
  54. data/lib/vedeu/cli/generator/templates/application/app/views/interfaces/name.erb +0 -67
  55. data/lib/vedeu/cli/generator/templates/application/app/views/name.erb +0 -36
  56. data/lib/vedeu/cli/generator/templates/application/app/views/templates/name.erb +0 -0
  57. data/lib/vedeu/cli/generator/templates/application/application.erb +0 -22
  58. data/lib/vedeu/cli/generator/templates/application/bin/name +0 -9
  59. data/lib/vedeu/cli/generator/templates/application/config/app_name.erb +0 -1
  60. data/lib/vedeu/cli/generator/templates/application/config/configuration.erb +0 -33
  61. data/lib/vedeu/cli/generator/templates/application/lib/.gitkeep +0 -0
  62. data/lib/vedeu/cli/generator/templates/application/test/.gitkeep +0 -0
  63. data/lib/vedeu/cli/generator/templates/application/vendor/.gitkeep +0 -0
  64. data/lib/vedeu/cli/generator/view.rb +0 -86
  65. data/lib/vedeu/cli/main.rb +0 -39
  66. data/lib/vedeu/output/refresh.rb +0 -69
  67. data/lib/vedeu/output/refresh_group.rb +0 -41
  68. data/test/lib/vedeu/cli/generator/application_test.rb +0 -37
  69. data/test/lib/vedeu/cli/generator/helpers_test.rb +0 -197
  70. data/test/lib/vedeu/cli/generator/view_test.rb +0 -38
  71. data/test/lib/vedeu/cli/main_test.rb +0 -59
  72. data/test/lib/vedeu/output/refresh_test.rb +0 -63
@@ -1,38 +0,0 @@
1
- require 'test_helper'
2
-
3
- module Vedeu
4
-
5
- module Generator
6
-
7
- describe View do
8
-
9
- let(:described) { Vedeu::Generator::View }
10
- let(:instance) { described.new(_name) }
11
- let(:_name) { 'my_first_view' }
12
-
13
- describe '#initialize' do
14
- it { instance.must_be_instance_of(described) }
15
- it { instance.instance_variable_get('@name').must_equal(_name) }
16
- end
17
-
18
- describe '.generate' do
19
- # before do
20
- # FileUtils.stubs(:cp_r)
21
- # FileUtils.stubs(:mkdir)
22
- # end
23
-
24
- subject { described.generate(_name) }
25
-
26
- # @todo
27
- # it { skip }
28
- end
29
-
30
- describe '#generate' do
31
- it { described.must_respond_to(:generate) }
32
- end
33
-
34
- end # View
35
-
36
- end # Generator
37
-
38
- end # Vedeu
@@ -1,59 +0,0 @@
1
- require 'test_helper'
2
-
3
- module Vedeu
4
-
5
- module CLI
6
-
7
- describe Main do
8
-
9
- let(:described) { Vedeu::CLI::Main }
10
- let(:instance) { described.new }
11
-
12
- describe '#new' do
13
- let(:_name) { 'app_name' }
14
-
15
- before do
16
- instance.stubs(:say)
17
- Vedeu::Generator::Application.stubs(:generate).returns('')
18
- end
19
-
20
- subject { instance.new(_name) }
21
-
22
- it {
23
- Vedeu::Generator::Application.expects(:generate).with(_name)
24
- subject
25
- }
26
- end
27
-
28
- describe '#view' do
29
- let(:_name) { 'view_name' }
30
-
31
- before do
32
- instance.stubs(:say)
33
- Vedeu::Generator::View.stubs(:generate).returns('')
34
- end
35
-
36
- subject { instance.view(_name) }
37
-
38
- it {
39
- Vedeu::Generator::View.expects(:generate).with(_name)
40
- subject
41
- }
42
- end
43
-
44
- describe '#version' do
45
- before { instance.stubs(:say) }
46
-
47
- subject { instance.version }
48
-
49
- it {
50
- instance.expects(:say).with("vedeu #{Vedeu::VERSION}")
51
- subject
52
- }
53
- end
54
-
55
- end # Main
56
-
57
- end # CLI
58
-
59
- end # Vedeu
@@ -1,63 +0,0 @@
1
- require 'test_helper'
2
-
3
- module Vedeu
4
-
5
- describe Refresh do
6
-
7
- let(:described) { Vedeu::Refresh }
8
-
9
- describe '.all' do
10
- before { Vedeu.interfaces.reset }
11
-
12
- subject { described.all }
13
-
14
- it { subject.must_be_instance_of(Array) }
15
-
16
- context 'when there are no registered interfaces' do
17
- it { subject.must_equal([]) }
18
- end
19
- end
20
-
21
- describe '.by_focus' do
22
- subject { described.by_focus }
23
-
24
- context 'when there are no registered interfaces' do
25
- before { Vedeu.focusable.reset }
26
-
27
- it { subject.must_equal(nil) }
28
- end
29
-
30
- context 'when there are registered interfaces' do
31
- # @todo Add more tests.
32
- # it { skip }
33
- end
34
- end
35
-
36
- describe '.by_group' do
37
- let(:group_name) { 'elements' }
38
- let(:_name) { 'aluminium' }
39
-
40
- subject { described.by_group(group_name) }
41
-
42
- it {
43
- Vedeu::RefreshGroup.expects(:by_name).with(group_name)
44
- subject
45
- }
46
- end
47
-
48
- describe '.by_name' do
49
- let(:_name) { 'aluminium' }
50
- let(:buffer) { Vedeu::Null::Buffer.new(name: _name) }
51
-
52
- subject { described.by_name(_name) }
53
-
54
- it {
55
- Vedeu.buffers.expects(:by_name).with(_name).returns(buffer)
56
- buffer.expects(:render)
57
- subject
58
- }
59
- end
60
-
61
- end # Refresh
62
-
63
- end # Vedeu