doing 1.0.58 → 1.0.59
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/doing/version.rb +1 -1
- data/lib/doing/wwid.rb +2 -21
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6829ecedb3ba583fcd4abde952d884e27ec239d2fe39a65e93ed19540b69fd21
|
4
|
+
data.tar.gz: 9ae0b29ce7e6cc99f9efdbb17f5dfb4165543aa7da32a0a28c617c2b48bba682
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc0e8e23b484e76f23394c6cab610d483afb137f642d34cc6471071e69684c62f6c72e1e4eb7fda1370e6b85d57dcc03b2ec42cdd74c2593741e8d1e74a4932b
|
7
|
+
data.tar.gz: 11417b5f85b9b0909686c3e778fa81018feeccd0fd49eef1f9f47f6e835fee7c6d510427c9edfef7066d1785128f3145fc475e66a39d3075051045eec33e13ff
|
data/README.md
CHANGED
@@ -29,7 +29,7 @@ _Side note:_ I actually use the library behind this utility as part of another s
|
|
29
29
|
|
30
30
|
## Installation
|
31
31
|
|
32
|
-
The current version of `doing` is <!--VER-->1.0.
|
32
|
+
The current version of `doing` is <!--VER-->1.0.58<!--END VER-->.
|
33
33
|
|
34
34
|
$ [sudo] gem install doing
|
35
35
|
|
data/lib/doing/version.rb
CHANGED
data/lib/doing/wwid.rb
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require 'deep_merge'
|
4
4
|
require 'open3'
|
5
|
+
require 'pp'
|
5
6
|
|
6
7
|
##
|
7
8
|
## @brief Hash helpers
|
@@ -890,26 +891,7 @@ class WWID
|
|
890
891
|
end
|
891
892
|
|
892
893
|
def update_item(old_item, new_item)
|
893
|
-
|
894
|
-
@content.each do |_k, v|
|
895
|
-
items.concat(v['items'])
|
896
|
-
end
|
897
|
-
|
898
|
-
idx = nil
|
899
|
-
|
900
|
-
items.each_with_index do |item, i|
|
901
|
-
if old_item == item
|
902
|
-
idx = i
|
903
|
-
break
|
904
|
-
end
|
905
|
-
end
|
906
|
-
|
907
|
-
if idx.nil?
|
908
|
-
@results.push('No entries found')
|
909
|
-
return
|
910
|
-
end
|
911
|
-
|
912
|
-
section = items[idx]['section']
|
894
|
+
section = old_item['section']
|
913
895
|
|
914
896
|
section_items = @content[section]['items']
|
915
897
|
s_idx = section_items.index(old_item)
|
@@ -917,7 +899,6 @@ class WWID
|
|
917
899
|
section_items[s_idx] = new_item
|
918
900
|
@results.push("Entry updated: #{section_items[s_idx]['title']}")
|
919
901
|
@content[section]['items'] = section_items
|
920
|
-
write(@doing_file)
|
921
902
|
end
|
922
903
|
|
923
904
|
##
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: doing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.59
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brett Terpstra
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-07-
|
11
|
+
date: 2021-07-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|