workmesh 1.0.2 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/workmesh.rb +6 -2
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ee3f20e4b481d2e2fc30fc910f779a7d814126cbfbda63f8fa3d183bf2d61a39
4
- data.tar.gz: 8c4c4ee4cb1960fd50952665d1e6d4569fe3ad35337d003c2cc25da11f59ee68
3
+ metadata.gz: 41375949fd691423ac3b677de62b756450c29f1992fdf032667de7d10beaf092
4
+ data.tar.gz: 32c1dbeef3502c7a4fe23dfc555adaa507a48a3e8b14e26cf849215a2e6a964a
5
5
  SHA512:
6
- metadata.gz: a0bbefe43127da3537b45f65df0c9e0b142a5371c28ab884fc0555e6ca2bf2f86e051f4b99c4bc8ac420753ae6c0893cba7235a327a9b5da27867d465d2ecc91
7
- data.tar.gz: 56de7f81fcfd2fb1dec459d4c4ebe3c42c4a7bf41da2539c31dd946da562d0f83fac9b97ea88661861dfff471f06d84df9747e7bb1efdac3da34657cce6c8c5e
6
+ metadata.gz: d2c231f9d54f104e16a11308e4060c805763973d5d188f58dba6b5d6af87e5db3206e0bb21d105518f2627bef7227d155e1036623a99246deeed4716636b8152
7
+ data.tar.gz: 2bda3a87ccab98c3d6df49b6ec578c40d69f29bb25b8a4cf2910cd9fb38a00b24cc73d987bf374c0fe81ab3e00d0144f0aa3d6a4ef764fabb8034d6ca129a9d9
data/lib/workmesh.rb CHANGED
@@ -356,8 +356,12 @@ module BlackStack
356
356
  raise "The object o is not an instance of :entity_table (#{s.entity_table.to_s})" unless o.is_a?(Sequel::Model) && o.class.table_name.to_s == s.entity_table.to_s
357
357
  # if the object has not a node assigned, then return nil.
358
358
  return nil if o[s.entity_field_assignation].nil?
359
- # return the node
360
- @@nodes.select { |n| n.name.to_s == o[s.entity_field_assignation].to_s }.first
359
+ # find the node
360
+ ret = @@nodes.select { |n| n.name.to_s == o[s.entity_field_assignation].to_s }.first
361
+ # validate: the node exists
362
+ raise "The node #{o[s.entity_field_assignation]} does not exists in configuration file" if ret.nil?
363
+ # return
364
+ ret
361
365
  end
362
366
 
363
367
  # assign object to a node
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: workmesh
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leandro Daniel Sardi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-18 00:00:00.000000000 Z
11
+ date: 2023-06-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sequel