easy-resources-adam 0.2.1 → 0.2.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f7d2a00168224a0d87bcd15b6daedf5ca3a4902eb7965ba9aad101fab1984257
4
- data.tar.gz: eb6bd8f146d28be42a0546fabb29863719a43a5823a393ad01a25605e308e766
3
+ metadata.gz: 96c0fec3708641ad2ebe86063e704af3ca6fab5d62bfb8eda19c62b188d94286
4
+ data.tar.gz: aaa19f0915034a556aaa12bbe9be05720495b106fb4ac52525e81c61d96cb488
5
5
  SHA512:
6
- metadata.gz: 31cb04c1ba6d560095352c620f01b21478c3b3811de52dddf05f96ae3f6de8347c2d60c83bec87c12ad162699f44fcba96801f7f1b4361712647616c687829a5
7
- data.tar.gz: 8f5677e7ba677d4bf8856f930639d654850da9f13f7085ac74223f65579959619c8146b2602fea38f20094ba8d9125be0678ffebd7459b226541328e5d62c5e2
6
+ metadata.gz: cc9e6cbc1143adad349c44c57fccdb56ff2904d76030fb6e902e774ea9f5d27222da20b971ed5a87b3dfdb78cbcddcc8c29776531eabd29bc6c4f03864ffa837
7
+ data.tar.gz: 324fb2221edbf1ff4498365cf7a326935ca656ac692449b77f9d202500166fb34aabc78d8e87ad39c714a349cf58fc57ca23152272c7ceaa48d1428885a905d9
@@ -8,6 +8,32 @@ module Easy
8
8
  self.element_name = "task_execution"
9
9
  self.include_root_in_json = true
10
10
 
11
+ def error?
12
+ error.present?
13
+ end
14
+
15
+ def error
16
+ return nil if !self.output_params || self.output_params.attributes["error"].blank?
17
+
18
+ "#{self.output_params.attributes["error"]["class"]}: #{self.output_params.attributes["error"]["message"]}"
19
+ end
20
+
21
+ def status_scheduled?
22
+ self.status == "scheduled"
23
+ end
24
+
25
+ def status_running?
26
+ self.status == "running"
27
+ end
28
+
29
+ def status_failed?
30
+ self.status == "failed"
31
+ end
32
+
33
+ def status_ok?
34
+ self.status == "ok"
35
+ end
36
+
11
37
  end
12
38
  end
13
39
  end
@@ -8,6 +8,32 @@ module Easy
8
8
  self.element_name = "task_execution_command"
9
9
  self.include_root_in_json = true
10
10
 
11
+ def error?
12
+ error.present?
13
+ end
14
+
15
+ def error
16
+ return nil if !self.output_params || self.output_params["error"].blank?
17
+
18
+ "#{self.output_params["error"]["class"]}: #{self.output_params["error"]["message"]}"
19
+ end
20
+
21
+ def status_scheduled?
22
+ self.status == "scheduled"
23
+ end
24
+
25
+ def status_running?
26
+ self.status == "running"
27
+ end
28
+
29
+ def status_failed?
30
+ self.status == "failed"
31
+ end
32
+
33
+ def status_ok?
34
+ self.status == "ok"
35
+ end
36
+
11
37
  end
12
38
  end
13
39
  end
@@ -1,7 +1,7 @@
1
1
  module Easy
2
2
  module Resources
3
3
  module Adam
4
- VERSION = '0.2.1'
4
+ VERSION = '0.2.2'
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easy-resources-adam
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - petr