nvim 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/INFO.yaml +1 -1
- data/lib/neovim/info.rb +2 -2
- data/lib/neovim/tools/calculator.rb +10 -8
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f5191debebad5c3b62e615186a5d01bd768a0b1b5779e56a2f52e01f0c421773
|
4
|
+
data.tar.gz: 264e879be038d63211c76b1ad2bcffcf8cb28796212010850b6e733a5ad702f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0696bf812f39ad42982db2cb61242ba325dae1f94405c1ca537058617cac648a2e601215a8c2f02c40e27e238efc28a681a6a19e4abd55b9c11865318e77ecfc'
|
7
|
+
data.tar.gz: 9ead8707a4fc45cf519a92f7ad03bc78acac2a3b2e8a532e3f3a02e06cfe5963d69bb82817cf098f40293ce03f7384a3102d844d1becc1f252067301132b7601
|
data/INFO.yaml
CHANGED
data/lib/neovim/info.rb
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
require "neovim/meta.rb"
|
2
2
|
Neovim::INFO = Neovim::Meta.new "nvim",
|
3
|
-
version: "1.
|
3
|
+
version: "1.3.0",
|
4
4
|
license: "BSD-2-Clause+",
|
5
5
|
authors: ["Bertram Scharpf"],
|
6
6
|
email: "software@bertram-scharpf.de",
|
7
7
|
summary: "Yet another Ruby client for Neovim",
|
8
8
|
description: "A simple Ruby client for Neovim.\nClean code, minimal dependecies, no frills, no wokeness.",
|
9
9
|
homepage: "https://github.com/BertramScharpf/ruby-nvim",
|
10
|
-
commit: "
|
10
|
+
commit: "7dc787c"
|
@@ -11,6 +11,7 @@ module Neovim
|
|
11
11
|
class Calculator
|
12
12
|
|
13
13
|
def result
|
14
|
+
@result or return
|
14
15
|
r = @result.round @decs
|
15
16
|
case r
|
16
17
|
when BigDecimal then
|
@@ -30,10 +31,11 @@ module Neovim
|
|
30
31
|
|
31
32
|
def decs= d ; @decs = Integer d ; end
|
32
33
|
|
33
|
-
def dot! ; @sep
|
34
|
-
def comma! ; @sep, @grp = ",", "." ; end
|
34
|
+
def dot! ; @sep = "." ; end
|
35
35
|
def dot? ; @sep == "." ; end
|
36
|
+
def comma! ; @sep = "," ; end
|
36
37
|
def comma? ; @sep == "," ; end
|
38
|
+
def auto! ; @sep = nil ; end
|
37
39
|
|
38
40
|
def add line
|
39
41
|
line = line.chomp
|
@@ -42,6 +44,7 @@ module Neovim
|
|
42
44
|
case $1
|
43
45
|
when "c", "comma", "k", "komma" then comma!
|
44
46
|
when "d", "dot", "p", "point" then dot!
|
47
|
+
when "a", "auto" then auto!
|
45
48
|
when /\A\d+\z/ then @decs = $1.to_i
|
46
49
|
end
|
47
50
|
end
|
@@ -50,8 +53,8 @@ module Neovim
|
|
50
53
|
line.notempty? or return
|
51
54
|
|
52
55
|
products = []
|
53
|
-
line.split /(
|
54
|
-
products.push [ (split_products p), $&
|
56
|
+
line.split /(?:[;|&]|\s+[,+-]\s+)/ do |p|
|
57
|
+
products.push [ (split_products p), $& =~ /-/]
|
55
58
|
end
|
56
59
|
|
57
60
|
minus = false
|
@@ -90,10 +93,9 @@ module Neovim
|
|
90
93
|
if n =~ %r/ *%\z/ then
|
91
94
|
@prev * (BigDecimal $`) / 100
|
92
95
|
else
|
93
|
-
comma! if not @sep and n =~ /\d
|
94
|
-
|
95
|
-
|
96
|
-
when "." then n.gsub! @grp, "_"
|
96
|
+
comma! if not @sep and n =~ /\d,(?:-|\d+\b(?:[^.]|$))/
|
97
|
+
if @sep == "," then n.gsub! ".", "_" ; n.sub! @sep, "."
|
98
|
+
else n.gsub! ",", "_"
|
97
99
|
end
|
98
100
|
if n =~ /\.-/ then
|
99
101
|
n = $`
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nvim
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bertram Scharpf
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-10-04 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email: software@bertram-scharpf.de
|
@@ -61,7 +61,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: '0'
|
63
63
|
requirements: []
|
64
|
-
rubygems_version: 3.5.
|
64
|
+
rubygems_version: 3.5.19
|
65
65
|
signing_key:
|
66
66
|
specification_version: 4
|
67
67
|
summary: Yet another Ruby client for Neovim
|