lucaterm 0.2.1 → 0.3.0
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/luca_term/book.rb +20 -2
- data/lib/luca_term/version.rb +1 -1
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8db2cbe8f9fcab98b6d6cd77e1c2949bc0dff1f3ef5b164bf43e03c27b735048
|
4
|
+
data.tar.gz: 9c4e0df8cf90e9af93d16391498ad35013435d0b70eb5d78dfbb8af24cfdc301
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f9d780234ef4af22676e041b97146632f87302522b8387a025fb3859c3759fb7b08d9bc6949487c89d93a74b50c360ab6b739e267b084f7b98644dc8798299f
|
7
|
+
data.tar.gz: e08947c3c436d4dd3ccfaa64d5932f557f908c2358f79d8566e9b4b986f43b1424e7a246f28d1d0f4d86bf64aa356dd8c043a5b26dabdf0cc7b5e789407efda9
|
data/CHANGELOG.md
CHANGED
data/lib/luca_term/book.rb
CHANGED
@@ -190,6 +190,11 @@ module LucaTerm
|
|
190
190
|
record[position] << { code: new_code, amount: new_amount }
|
191
191
|
debit_length = Array(record[:debit]).length
|
192
192
|
credit_length = Array(record[:credit]).length
|
193
|
+
when 'c'
|
194
|
+
new_note = edit_note(record[:note])
|
195
|
+
next if new_note.nil?
|
196
|
+
|
197
|
+
record[:note] = new_note
|
193
198
|
when KEY_CTRL_J
|
194
199
|
position, counter = [0,1].include?(@d_h) ? [:debit, :credit] : [:credit, :debit]
|
195
200
|
if [0, 2].include? @d_h
|
@@ -211,7 +216,7 @@ module LucaTerm
|
|
211
216
|
LucaBook::Journal.create record
|
212
217
|
end
|
213
218
|
break
|
214
|
-
when 'q'
|
219
|
+
when 'q', 27
|
215
220
|
break
|
216
221
|
end
|
217
222
|
end
|
@@ -231,6 +236,19 @@ module LucaTerm
|
|
231
236
|
end
|
232
237
|
end
|
233
238
|
|
239
|
+
# returns note after edit
|
240
|
+
#
|
241
|
+
def edit_note(current = nil)
|
242
|
+
msg = ''
|
243
|
+
begin
|
244
|
+
scmd = edit_dialog "Current: #{current&.to_s}", msg, title: 'Edit Note'
|
245
|
+
return nil if scmd.length == 0
|
246
|
+
return scmd
|
247
|
+
rescue
|
248
|
+
return nil
|
249
|
+
end
|
250
|
+
end
|
251
|
+
|
234
252
|
def edit_dialog(message = '', submessage = '', title: '')
|
235
253
|
sub = window.subwin(5, 30, (window.maxy-5)/2, (window.maxx - 30)/2)
|
236
254
|
sub.setpos(1, 1)
|
@@ -322,7 +340,7 @@ module LucaTerm
|
|
322
340
|
@active = active_dup
|
323
341
|
sub.close
|
324
342
|
return selected
|
325
|
-
when 'q'
|
343
|
+
when 'q', 27
|
326
344
|
@visible = visible_dup
|
327
345
|
@index = index_dup
|
328
346
|
@active = active_dup
|
data/lib/luca_term/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lucaterm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chuma Takahiro
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: curses
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0.
|
61
|
+
version: '0.6'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '0.
|
68
|
+
version: '0.6'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: bundler
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -131,7 +131,7 @@ metadata:
|
|
131
131
|
homepage_uri: https://github.com/chumaltd/luca/tree/master/lucaterm
|
132
132
|
source_code_uri: https://github.com/chumaltd/luca/tree/master/lucaterm
|
133
133
|
changelog_uri: https://github.com/chumaltd/luca/tree/master/lucaterm/CHANGELOG.md
|
134
|
-
post_install_message:
|
134
|
+
post_install_message:
|
135
135
|
rdoc_options: []
|
136
136
|
require_paths:
|
137
137
|
- lib
|
@@ -139,15 +139,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
139
139
|
requirements:
|
140
140
|
- - ">="
|
141
141
|
- !ruby/object:Gem::Version
|
142
|
-
version:
|
142
|
+
version: 3.0.0
|
143
143
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
144
144
|
requirements:
|
145
145
|
- - ">="
|
146
146
|
- !ruby/object:Gem::Version
|
147
147
|
version: '0'
|
148
148
|
requirements: []
|
149
|
-
rubygems_version: 3.
|
150
|
-
signing_key:
|
149
|
+
rubygems_version: 3.4.10
|
150
|
+
signing_key:
|
151
151
|
specification_version: 4
|
152
152
|
summary: Terminal frontend for Luca Suite
|
153
153
|
test_files: []
|