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 +4 -4
- data/.codeclimate.yml +4 -4
- data/Guardfile +5 -0
- data/lib/vedeu/bindings/movement.rb +1 -1
- data/lib/vedeu/cursors/cursor.rb +4 -4
- data/lib/vedeu/geometry/geometry.rb +28 -8
- data/lib/vedeu/version.rb +1 -1
- data/vedeu.gemspec +2 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6715eeab8888f23894a0f912e36418930d4bcb10
|
4
|
+
data.tar.gz: eff8b0d4c7eac80db7a17f1760f52bcd9df6dc7d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
@@ -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
|
99
|
+
Vedeu.cursors.by_name(name).move_origin
|
100
100
|
end
|
101
101
|
|
102
102
|
Vedeu.bind_alias(:_cursor_reset_, :_cursor_origin_)
|
data/lib/vedeu/cursors/cursor.rb
CHANGED
@@ -70,7 +70,7 @@ module Vedeu
|
|
70
70
|
#
|
71
71
|
# @return [Vedeu::Cursors::Cursor]
|
72
72
|
def move_down
|
73
|
-
@oy
|
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
|
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
|
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
|
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
|
-
|
123
|
-
|
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
|
-
|
142
|
-
|
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
|
-
|
177
|
-
|
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
|
-
|
196
|
-
|
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
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.
|
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-
|
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
|