vedeu 0.6.5 → 0.6.6

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: fcd82ad8c943b3b1555c4b4019b6945bea88b4fd
4
- data.tar.gz: efe4918ea1f85cca3528dae2098c1bc108786638
3
+ metadata.gz: 6715eeab8888f23894a0f912e36418930d4bcb10
4
+ data.tar.gz: eff8b0d4c7eac80db7a17f1760f52bcd9df6dc7d
5
5
  SHA512:
6
- metadata.gz: aea1f3d343da09c7250f6b7e879e046ff05f1ac3be9a8f0afc4f18b15ccf49f296de0530e697a4a03cbbfad33085d55853fd19b2df397bf8a749cc12b8aea89d
7
- data.tar.gz: 1cffa670f4d1c02ccc95ab5784653d22aaad3135f94b5ad9dd54123d6e515bbd34aeb826f3681b060e33bef39768caac6884449700cb8a68a3fd7c98ea203277
6
+ metadata.gz: 62af5ad1afd927b7afb3ca81826a50dec90008f015bc86b5d885ad5bd411bde8caff604383a174f7b8e712746cadd382b645fdfd2e5aab4e7d7c74db771ea2b7
7
+ data.tar.gz: e456f90b8acc575aa181e33c4787d38d3a7b87d0245ad9aa4fcf47bc7af6148f994ff59e99ca843e3c6bfae19e8070af5fff911ec7a49629c1c6144a5bc77c2c
data/.codeclimate.yml CHANGED
@@ -29,12 +29,12 @@ engines:
29
29
 
30
30
  ratings:
31
31
  paths:
32
- - lib/**
32
+ - lib/**
33
33
 
34
34
  # You can globally exclude files from being analyzed by any engine using the
35
35
  # exclude_paths key.
36
36
 
37
37
  exclude_paths:
38
- - examples/**/*
39
- - test/**/*
40
- - vendor/**/*
38
+ - examples/**/*
39
+ - test/**/*
40
+ - vendor/**/*
data/Guardfile CHANGED
@@ -1,3 +1,8 @@
1
+ guard :rubocop do
2
+ watch(/.+\.rb$/)
3
+ watch(%r{(?:.+/)?\.rubocop\.yml$}) { |m| File.dirname(m[0]) }
4
+ end
5
+
1
6
  guard :minitest, all_after_pass: true,
2
7
  focus_on_failed: true,
3
8
  env: { 'NO_SIMPLECOV' => true } do
@@ -96,7 +96,7 @@ module Vedeu
96
96
  # @see Vedeu::Move
97
97
  def cursor_origin!
98
98
  Vedeu.bind(:_cursor_origin_) do |name|
99
- Vedeu::Move.origin(Vedeu::Cursors::Cursor, name)
99
+ Vedeu.cursors.by_name(name).move_origin
100
100
  end
101
101
 
102
102
  Vedeu.bind_alias(:_cursor_reset_, :_cursor_origin_)
@@ -70,7 +70,7 @@ module Vedeu
70
70
  #
71
71
  # @return [Vedeu::Cursors::Cursor]
72
72
  def move_down
73
- @oy = @oy + 1
73
+ @oy += 1
74
74
 
75
75
  @attributes = attributes.merge!(x: x,
76
76
  y: coordinate.y_position,
@@ -84,7 +84,7 @@ module Vedeu
84
84
  #
85
85
  # @return [Vedeu::Cursors::Cursor]
86
86
  def move_left
87
- @ox = @ox - 1
87
+ @ox -= 1
88
88
 
89
89
  @attributes = attributes.merge!(x: coordinate.x_position,
90
90
  y: y,
@@ -107,7 +107,7 @@ module Vedeu
107
107
  #
108
108
  # @return [Vedeu::Cursors::Cursor]
109
109
  def move_right
110
- @ox = @ox + 1
110
+ @ox += 1
111
111
 
112
112
  @attributes = attributes.merge!(x: coordinate.x_position,
113
113
  y: y,
@@ -121,7 +121,7 @@ module Vedeu
121
121
  #
122
122
  # @return [Vedeu::Cursors::Cursor]
123
123
  def move_up
124
- @oy = @oy - 1
124
+ @oy -= 1
125
125
 
126
126
  @attributes = attributes.merge!(x: x,
127
127
  y: coordinate.y_position,
@@ -119,8 +119,13 @@ module Vedeu
119
119
  # TODO: Move cursor also.
120
120
  # @return [Vedeu::Geometry::Geometry]
121
121
  def move_down
122
- dy = (yn + 1 > Vedeu.height) ? y : y + 1
123
- dyn = (yn + 1 > Vedeu.height) ? yn : yn + 1
122
+ if yn + 1 > Vedeu.height
123
+ dy = y
124
+ dyn = yn
125
+ else
126
+ dy = y + 1
127
+ dyn = yn + 1
128
+ end
124
129
 
125
130
  @attributes = attributes.merge(
126
131
  centred: false,
@@ -138,8 +143,13 @@ module Vedeu
138
143
  # TODO: Move cursor also.
139
144
  # @return [Vedeu::Geometry::Geometry]
140
145
  def move_left
141
- dx = (x - 1 < 1) ? x : x - 1
142
- dxn = (x - 1 < 1) ? xn : xn - 1
146
+ if x - 1 < 1
147
+ dx = x
148
+ dxn = xn
149
+ else
150
+ dx = x - 1
151
+ dxn = xn - 1
152
+ end
143
153
 
144
154
  @attributes = attributes.merge(
145
155
  centred: false,
@@ -173,8 +183,13 @@ module Vedeu
173
183
  # TODO: Move cursor also.
174
184
  # @return [Vedeu::Geometry::Geometry]
175
185
  def move_right
176
- dx = (xn + 1 > Vedeu.width) ? x : x + 1
177
- dxn = (xn + 1 > Vedeu.width) ? xn : xn + 1
186
+ if xn + 1 > Vedeu.width
187
+ dx = x
188
+ dxn = xn
189
+ else
190
+ dx = x + 1
191
+ dxn = xn + 1
192
+ end
178
193
 
179
194
  @attributes = attributes.merge(
180
195
  centred: false,
@@ -192,8 +207,13 @@ module Vedeu
192
207
  # TODO: Move cursor also.
193
208
  # @return [Vedeu::Geometry::Geometry]
194
209
  def move_up
195
- dy = (y - 1 < 1) ? y : y - 1
196
- dyn = (y - 1 < 1) ? yn : yn - 1
210
+ if y - 1 < 1
211
+ dy = y
212
+ dyn = yn
213
+ else
214
+ dy = y - 1
215
+ dyn = yn - 1
216
+ end
197
217
 
198
218
  @attributes = attributes.merge(
199
219
  centred: false,
data/lib/vedeu/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module Vedeu
2
2
 
3
3
  # The current version of Vedeu.
4
- VERSION = '0.6.5'
4
+ VERSION = '0.6.6'
5
5
 
6
6
  end
data/vedeu.gemspec CHANGED
@@ -22,11 +22,13 @@ Gem::Specification.new do |spec|
22
22
 
23
23
  spec.add_development_dependency 'guard', '2.13.0'
24
24
  spec.add_development_dependency 'guard-minitest', '2.4.4'
25
+ spec.add_development_dependency 'guard-rubocop', '1.2.0'
25
26
  spec.add_development_dependency 'minitest', '5.8.0'
26
27
  # spec.add_development_dependency 'minitest-reporters', '1.1.0'
27
28
  spec.add_development_dependency 'mocha', '1.1.0'
28
29
  spec.add_development_dependency 'pry', '0.10.1'
29
30
  spec.add_development_dependency 'rubocop', '0.34.1'
31
+
30
32
  spec.add_development_dependency 'ruby-prof', '0.15.8'
31
33
  spec.add_development_dependency 'simplecov', '0.10.0'
32
34
  spec.add_development_dependency 'simplecov-console', '0.2.0'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vedeu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.5
4
+ version: 0.6.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gavin Laking
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-13 00:00:00.000000000 Z
11
+ date: 2015-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: guard
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
40
  version: 2.4.4
41
+ - !ruby/object:Gem::Dependency
42
+ name: guard-rubocop
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '='
46
+ - !ruby/object:Gem::Version
47
+ version: 1.2.0
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '='
53
+ - !ruby/object:Gem::Version
54
+ version: 1.2.0
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: minitest
43
57
  requirement: !ruby/object:Gem::Requirement