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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 27d29fb84f196b9219119d876aad52a8d4569b12324ece7617b74636d4245885
4
- data.tar.gz: 40ed7d9d336b757d777dfa7014e754f115d732835a0a62c4e6a72ce9102c4a7f
3
+ metadata.gz: 6829ecedb3ba583fcd4abde952d884e27ec239d2fe39a65e93ed19540b69fd21
4
+ data.tar.gz: 9ae0b29ce7e6cc99f9efdbb17f5dfb4165543aa7da32a0a28c617c2b48bba682
5
5
  SHA512:
6
- metadata.gz: de8702acf70b5ea8382cf848b65b5164c2230e7f19b893032d4216fc225d596290146a8f461aae4d215a5021f1a0a4129b12750b119f324032f4e206819bfd3d
7
- data.tar.gz: a52d1d2f07988441a14f5451206bfb9add306a9cf3b7bd0908b493c5076b5c720d8d26285bc5634f6e23db9ff81e670cd56c20e514bd5163ce82cab950a659dd
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.57<!--END VER-->.
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
@@ -1,3 +1,3 @@
1
1
  module Doing
2
- VERSION = '1.0.58'
2
+ VERSION = '1.0.59'
3
3
  end
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
- items = []
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.58
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-06 00:00:00.000000000 Z
11
+ date: 2021-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake