vedeu 0.4.11 → 0.4.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +736 -0
  3. data/Rakefile +7 -0
  4. data/bin/vedeu_drb_server +1 -1
  5. data/config/rubocop_disabled.yml +50 -0
  6. data/config/rubocop_enabled.yml +1044 -0
  7. data/examples/borders_app.rb +3 -1
  8. data/examples/colours_app.rb +3 -1
  9. data/examples/configuration_app.rb +1 -1
  10. data/examples/cursor_app.rb +4 -1
  11. data/examples/drb_app.rb +3 -1
  12. data/examples/focus_app.rb +1 -1
  13. data/examples/geometry_app.rb +3 -1
  14. data/examples/hello_world.rb +3 -1
  15. data/examples/lines_app.rb +3 -1
  16. data/examples/typed_commands/typed_commands_app.rb +1 -1
  17. data/examples/view_templates_app/view_templates_app.rb +3 -1
  18. data/lib/vedeu/api.rb +4 -3
  19. data/lib/vedeu/bindings.rb +1 -1
  20. data/lib/vedeu/configuration/api.rb +1 -1
  21. data/lib/vedeu/configuration/cli.rb +3 -2
  22. data/lib/vedeu/configuration/configuration.rb +1 -1
  23. data/lib/vedeu/cursor/cursor.rb +2 -2
  24. data/lib/vedeu/cursor/refresh_cursor.rb +3 -1
  25. data/lib/vedeu/distributed/templates/default_configuration.vedeu +1 -1
  26. data/lib/vedeu/events/event.rb +3 -5
  27. data/lib/vedeu/geometry/position.rb +1 -1
  28. data/lib/vedeu/input/all.rb +1 -1
  29. data/lib/vedeu/input/key.rb +5 -8
  30. data/lib/vedeu/models/all.rb +9 -12
  31. data/lib/vedeu/models/interface.rb +1 -1
  32. data/lib/vedeu/models/menu.rb +1 -1
  33. data/lib/vedeu/output/border.rb +18 -14
  34. data/lib/vedeu/output/clear.rb +10 -3
  35. data/lib/vedeu/output/esc.rb +4 -14
  36. data/lib/vedeu/output/html_char.rb +11 -7
  37. data/lib/vedeu/output/null_border.rb +10 -0
  38. data/lib/vedeu/output/presentation.rb +6 -22
  39. data/lib/vedeu/output/refresh.rb +0 -11
  40. data/lib/vedeu/output/renderers/terminal_renderer.rb +1 -1
  41. data/lib/vedeu/output/translator.rb +5 -5
  42. data/lib/vedeu/output/viewport.rb +12 -9
  43. data/lib/vedeu/repositories/collections.rb +6 -0
  44. data/lib/vedeu/support/visible.rb +17 -12
  45. data/lib/vedeu/traps.rb +3 -3
  46. data/test/lib/vedeu/configuration/cli_test.rb +1 -1
  47. data/test/lib/vedeu/output/null_border_test.rb +14 -0
  48. data/test/lib/vedeu/output/refresh_test.rb +0 -21
  49. data/test/lib/vedeu/support/coercions_test.rb +5 -5
  50. data/test/lib/vedeu/support/common_test.rb +1 -1
  51. data/test/lib/vedeu/support/visible_test.rb +10 -5
  52. data/test/test_helper.rb +2 -2
  53. data/vedeu.gemspec +3 -2
  54. metadata +22 -5
data/Rakefile CHANGED
@@ -4,6 +4,7 @@ require 'cucumber'
4
4
  require 'cucumber/rake/task'
5
5
  require 'inch/rake'
6
6
  require 'yard'
7
+ require 'rubocop/rake_task'
7
8
 
8
9
  Cucumber::Rake::Task.new(:cucumber) do |t|
9
10
  t.cucumber_opts = "features --format progress"
@@ -31,4 +32,10 @@ Inch::Rake::Suggest.new(:inch) do |suggest|
31
32
  suggest.args << "--all"
32
33
  end
33
34
 
35
+ RuboCop::RakeTask.new(:rubocop) do |task|
36
+ task.patterns = ['lib/**/*.rb']
37
+ task.formatters = ['progress']
38
+ task.fail_on_error = false
39
+ end
40
+
34
41
  task :default => :test
data/bin/vedeu_drb_server CHANGED
@@ -9,7 +9,7 @@ class VedeuTestApplication
9
9
  # include Vedeu
10
10
 
11
11
  Vedeu.configure do
12
- colour_mode 16777216
12
+ colour_mode 16_777_216
13
13
  log '/tmp/vedeu_test_helper.log'
14
14
  debug!
15
15
  drb!
@@ -0,0 +1,50 @@
1
+ # These are all the cops that are disabled in the default configuration.
2
+
3
+ Style/AutoResourceCleanup:
4
+ Description: 'Suggests the usage of an auto resource cleanup version of a method (if available).'
5
+ Enabled: false
6
+
7
+ Style/CollectionMethods:
8
+ Description: 'Preferred collection methods.'
9
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size'
10
+ Enabled: false
11
+
12
+ Style/Encoding:
13
+ Description: 'Use UTF-8 as the source file encoding.'
14
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#utf-8'
15
+ Enabled: false
16
+
17
+ Style/InlineComment:
18
+ Description: 'Avoid inline comments.'
19
+ Enabled: false
20
+
21
+ Style/MethodCalledOnDoEndBlock:
22
+ Description: 'Avoid chaining a method call on a do...end block.'
23
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
24
+ Enabled: false
25
+
26
+ Style/MissingElse:
27
+ Description: >-
28
+ Require if/case expressions to have an else branches.
29
+ If enabled, it is recommended that
30
+ Style/UnlessElse and Style/EmptyElse be enabled.
31
+ This will conflict with Style/EmptyElse if
32
+ Style/EmptyElse is configured to style "both"
33
+ Enabled: false
34
+ EnforcedStyle: both
35
+ SupportedStyles:
36
+ # if - warn when an if expression is missing an else branch
37
+ # case - warn when a case expression is misisng an else branch
38
+ # both - warn when an if or case expression is missing an else branch
39
+ - if
40
+ - case
41
+ - both
42
+
43
+ Style/SymbolArray:
44
+ Description: 'Use %i or %I for arrays of symbols.'
45
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-i'
46
+ Enabled: false
47
+
48
+ Style/ExtraSpacing:
49
+ Description: 'Do not use unnecessary spacing.'
50
+ Enabled: false