zenaton 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -1
- data/Gemfile.lock +4 -2
- data/lib/zenaton/client.rb +1 -0
- data/lib/zenaton/refinements/big_decimal.rb +2 -0
- data/lib/zenaton/refinements/class.rb +2 -0
- data/lib/zenaton/refinements/complex.rb +2 -0
- data/lib/zenaton/refinements/date.rb +2 -0
- data/lib/zenaton/refinements/date_time.rb +2 -0
- data/lib/zenaton/refinements/exception.rb +2 -0
- data/lib/zenaton/refinements/object.rb +1 -0
- data/lib/zenaton/refinements/open_struct.rb +2 -0
- data/lib/zenaton/refinements/range.rb +2 -0
- data/lib/zenaton/refinements/rational.rb +2 -0
- data/lib/zenaton/refinements/regexp.rb +2 -0
- data/lib/zenaton/refinements/struct.rb +2 -0
- data/lib/zenaton/refinements/symbol.rb +2 -0
- data/lib/zenaton/refinements/time.rb +2 -0
- data/lib/zenaton/refinements.rb +6 -0
- data/lib/zenaton/traits/with_timestamp.rb +1 -1
- data/lib/zenaton/version.rb +1 -1
- 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: bb9ef09f9315adb9ec1cf8e3f7f5911211b6f76f2e2d15e7eab58da614d51432
|
4
|
+
data.tar.gz: 11e1db84bbc2ea13f23f1f4a51c2025ac38f1e55b486f7aa70efc3675a91c005
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 05c36ae6d37a80f6684efa1627e8ec0cda9adc43d07d66de438d2535ce0fd67d9117cdf2de97d759ddf1c852a5806c5f7f6734f684677d53efa0166c323b99e0
|
7
|
+
data.tar.gz: c3ea805cbbc2b2532bb61f4f4f8042182da6c024bbe97214720e1347f7a2b1f6f85363b5dca9b7c0d2a99c2a3f7957289fc9e9a796615804aa820e69da161628
|
data/CHANGELOG.md
CHANGED
@@ -11,6 +11,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
11
11
|
|
12
12
|
### Fixed
|
13
13
|
|
14
|
+
## [0.5.1] - 2019-09-18
|
15
|
+
### Added
|
16
|
+
|
17
|
+
- Added missing documentation for serialization.
|
18
|
+
- Added `custom_id` argument for workflow schedule.
|
19
|
+
|
14
20
|
## [0.5.0] - 2019-08-27
|
15
21
|
### Changes
|
16
22
|
- No longer load JSON core extensions. Use our own refinements to avoid clashes
|
@@ -111,7 +117,8 @@ available.
|
|
111
117
|
### Added
|
112
118
|
- Initial release.
|
113
119
|
|
114
|
-
[Unreleased]: https://github.com/zenaton/zenaton-ruby/compare/v0.5.
|
120
|
+
[Unreleased]: https://github.com/zenaton/zenaton-ruby/compare/v0.5.1...HEAD
|
121
|
+
[0.5.1]: https://github.com/zenaton/zenaton-ruby/compare/v0.5.0...v0.5.1
|
115
122
|
[0.5.0]: https://github.com/zenaton/zenaton-ruby/compare/v0.4.2...v0.5.0
|
116
123
|
[0.4.2]: https://github.com/zenaton/zenaton-ruby/compare/v0.4.1...v0.4.2
|
117
124
|
[0.4.1]: https://github.com/zenaton/zenaton-ruby/compare/v0.4.0...v0.4.1
|
data/Gemfile.lock
CHANGED
@@ -1,18 +1,19 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
zenaton (0.5.
|
4
|
+
zenaton (0.5.1)
|
5
5
|
activesupport
|
6
6
|
tzinfo-data
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
activesupport (
|
11
|
+
activesupport (6.0.0)
|
12
12
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
13
13
|
i18n (>= 0.7, < 2)
|
14
14
|
minitest (~> 5.1)
|
15
15
|
tzinfo (~> 1.1)
|
16
|
+
zeitwerk (~> 2.1, >= 2.1.8)
|
16
17
|
addressable (2.6.0)
|
17
18
|
public_suffix (>= 2.0.2, < 4.0)
|
18
19
|
appraisal (2.2.0)
|
@@ -88,6 +89,7 @@ GEM
|
|
88
89
|
addressable (>= 2.3.6)
|
89
90
|
crack (>= 0.3.2)
|
90
91
|
hashdiff (>= 0.4.0, < 2.0.0)
|
92
|
+
zeitwerk (2.1.9)
|
91
93
|
|
92
94
|
PLATFORMS
|
93
95
|
ruby
|
data/lib/zenaton/client.rb
CHANGED
@@ -166,6 +166,7 @@ module Zenaton
|
|
166
166
|
'intentId' => SecureRandom.uuid,
|
167
167
|
'environmentName' => @app_env,
|
168
168
|
'cron' => cron,
|
169
|
+
'customId' => parse_custom_id_from(flow),
|
169
170
|
'workflowName' => class_name(flow),
|
170
171
|
'canonicalName' => canonical_name(flow) || class_name(flow),
|
171
172
|
'programmingLanguage' => PROG.upcase,
|
@@ -8,6 +8,7 @@ module Zenaton
|
|
8
8
|
# :nodoc
|
9
9
|
module Refinements
|
10
10
|
refine BigDecimal do
|
11
|
+
# Convert to a simple hash
|
11
12
|
def to_zenaton
|
12
13
|
{
|
13
14
|
'b' => _dump
|
@@ -19,6 +20,7 @@ end
|
|
19
20
|
|
20
21
|
# Reimplements `json/add/bigdecimal`
|
21
22
|
class BigDecimal
|
23
|
+
# Parse from simple hash
|
22
24
|
def self.from_zenaton(props)
|
23
25
|
BigDecimal._load props['b']
|
24
26
|
end
|
@@ -4,6 +4,7 @@ module Zenaton
|
|
4
4
|
# :nodoc
|
5
5
|
module Refinements
|
6
6
|
refine Class do
|
7
|
+
# Convert to a simple hash
|
7
8
|
def to_zenaton
|
8
9
|
{
|
9
10
|
'n' => name
|
@@ -15,6 +16,7 @@ end
|
|
15
16
|
|
16
17
|
# Load an instance of class from zenaton properties
|
17
18
|
class Class
|
19
|
+
# Parse from simple hash
|
18
20
|
def self.from_zenaton(props)
|
19
21
|
Object.const_get(props['n'])
|
20
22
|
end
|
@@ -4,6 +4,7 @@ module Zenaton
|
|
4
4
|
# :nodoc
|
5
5
|
module Refinements
|
6
6
|
refine Complex do
|
7
|
+
# Convert to a simple hash
|
7
8
|
def to_zenaton
|
8
9
|
{
|
9
10
|
'r' => real,
|
@@ -16,6 +17,7 @@ end
|
|
16
17
|
|
17
18
|
# Reimplements `json/add/complex`
|
18
19
|
class Complex
|
20
|
+
# Parse from simple hash
|
19
21
|
def self.from_zenaton(props)
|
20
22
|
Complex(props['r'], props['i'])
|
21
23
|
end
|
@@ -6,6 +6,7 @@ module Zenaton
|
|
6
6
|
# :nodoc
|
7
7
|
module Refinements
|
8
8
|
refine Date do
|
9
|
+
# Convert to a simple hash
|
9
10
|
def to_zenaton
|
10
11
|
{
|
11
12
|
'y' => year,
|
@@ -20,6 +21,7 @@ end
|
|
20
21
|
|
21
22
|
# Reimplements `json/add/date`
|
22
23
|
class Date
|
24
|
+
# Parse from simple hash
|
23
25
|
def self.from_zenaton(props)
|
24
26
|
civil(*props.values_at('y', 'm', 'd', 'sg'))
|
25
27
|
end
|
@@ -6,6 +6,7 @@ module Zenaton
|
|
6
6
|
# :nodoc
|
7
7
|
module Refinements
|
8
8
|
refine DateTime do
|
9
|
+
# Convert to a simple hash
|
9
10
|
def to_zenaton
|
10
11
|
{
|
11
12
|
'y' => year,
|
@@ -24,6 +25,7 @@ end
|
|
24
25
|
|
25
26
|
# Reimplements `json/add/date_time`
|
26
27
|
class DateTime
|
28
|
+
# Parse from simple hash
|
27
29
|
def self.from_zenaton(props)
|
28
30
|
args = props.values_at('y', 'm', 'd', 'H', 'M', 'S')
|
29
31
|
of_a, of_b = props['of'].split('/')
|
@@ -4,6 +4,7 @@ module Zenaton
|
|
4
4
|
# :nodoc
|
5
5
|
module Refinements
|
6
6
|
refine Exception do
|
7
|
+
# Convert to a simple hash
|
7
8
|
def to_zenaton
|
8
9
|
{
|
9
10
|
'm' => message,
|
@@ -16,6 +17,7 @@ end
|
|
16
17
|
|
17
18
|
# Reimplements `json/add/exception`
|
18
19
|
class Exception
|
20
|
+
# Parse from simple hash
|
19
21
|
def self.from_zenaton(props)
|
20
22
|
result = new(props['m'])
|
21
23
|
result.set_backtrace props['b']
|
@@ -6,6 +6,7 @@ module Zenaton
|
|
6
6
|
# :nodoc
|
7
7
|
module Refinements
|
8
8
|
refine OpenStruct do
|
9
|
+
# Convert to a simple hash
|
9
10
|
def to_zenaton
|
10
11
|
class_name = self.class.name.to_s
|
11
12
|
error_message = 'Only named structs are supported'
|
@@ -20,6 +21,7 @@ end
|
|
20
21
|
|
21
22
|
# Reimplements `json/add/ostruct`
|
22
23
|
class OpenStruct
|
24
|
+
# Parse from simple hash
|
23
25
|
def self.from_zenaton(props)
|
24
26
|
new(props['t'] || props[:t])
|
25
27
|
end
|
@@ -4,6 +4,7 @@ module Zenaton
|
|
4
4
|
# :nodoc
|
5
5
|
module Refinements
|
6
6
|
refine Range do
|
7
|
+
# Convert to a simple hash
|
7
8
|
def to_zenaton
|
8
9
|
{
|
9
10
|
'a' => [first, last, exclude_end?]
|
@@ -15,6 +16,7 @@ end
|
|
15
16
|
|
16
17
|
# Reimplements `json/add/range`
|
17
18
|
class Range
|
19
|
+
# Parse from simple hash
|
18
20
|
def self.from_zenaton(props)
|
19
21
|
new(*props['a'])
|
20
22
|
end
|
@@ -4,6 +4,7 @@ module Zenaton
|
|
4
4
|
# :nodoc
|
5
5
|
module Refinements
|
6
6
|
refine Rational do
|
7
|
+
# Convert to a simple hash
|
7
8
|
def to_zenaton
|
8
9
|
{
|
9
10
|
'n' => numerator,
|
@@ -16,6 +17,7 @@ end
|
|
16
17
|
|
17
18
|
# Reimplements `json/add/rational`
|
18
19
|
class Rational
|
20
|
+
# Parse from simple hash
|
19
21
|
def self.from_zenaton(props)
|
20
22
|
Rational(props['n'], props['d'])
|
21
23
|
end
|
@@ -4,6 +4,7 @@ module Zenaton
|
|
4
4
|
# :nodoc
|
5
5
|
module Refinements
|
6
6
|
refine Regexp do
|
7
|
+
# Convert to a simple hash
|
7
8
|
def to_zenaton
|
8
9
|
{
|
9
10
|
'o' => options,
|
@@ -16,6 +17,7 @@ end
|
|
16
17
|
|
17
18
|
# Reimplements `json/add/regexp`
|
18
19
|
class Regexp
|
20
|
+
# Parse from simple hash
|
19
21
|
def self.from_zenaton(props)
|
20
22
|
new(props['s'], props['o'])
|
21
23
|
end
|
@@ -4,6 +4,7 @@ module Zenaton
|
|
4
4
|
# :nodoc
|
5
5
|
module Refinements
|
6
6
|
refine Struct do
|
7
|
+
# Convert to a simple hash
|
7
8
|
def to_zenaton
|
8
9
|
class_name = self.class.name.to_s
|
9
10
|
error_message = 'Only named structs are supported'
|
@@ -18,6 +19,7 @@ end
|
|
18
19
|
|
19
20
|
# Reimplements `json/add/struct`
|
20
21
|
class Struct
|
22
|
+
# Parse from simple hash
|
21
23
|
def self.from_zenaton(props)
|
22
24
|
new(*props['v'])
|
23
25
|
end
|
@@ -4,6 +4,7 @@ module Zenaton
|
|
4
4
|
# :nodoc
|
5
5
|
module Refinements
|
6
6
|
refine Symbol do
|
7
|
+
# Convert to a simple hash
|
7
8
|
def to_zenaton
|
8
9
|
{
|
9
10
|
's' => to_s
|
@@ -15,6 +16,7 @@ end
|
|
15
16
|
|
16
17
|
# Reimplements `json/add/symbol`
|
17
18
|
class Symbol
|
19
|
+
# Parse from simple hash
|
18
20
|
def self.from_zenaton(props)
|
19
21
|
props['s'].to_sym
|
20
22
|
end
|
@@ -4,6 +4,7 @@ module Zenaton
|
|
4
4
|
# :nodoc
|
5
5
|
module Refinements
|
6
6
|
refine Time do
|
7
|
+
# Convert to a simple hash
|
7
8
|
def to_zenaton
|
8
9
|
nanoseconds = [tv_usec * 1000]
|
9
10
|
respond_to?(:tv_nsec) && nanoseconds << tv_nsec
|
@@ -19,6 +20,7 @@ end
|
|
19
20
|
|
20
21
|
# Reimplements `json/add/time`
|
21
22
|
class Time
|
23
|
+
# Parse from simple hash
|
22
24
|
def self.from_zenaton(props)
|
23
25
|
if (usec = props.delete('u')) # used to be tv_usec -> tv_nsec
|
24
26
|
props['n'] = usec * 1000
|
data/lib/zenaton/refinements.rb
CHANGED
@@ -14,3 +14,9 @@ require 'zenaton/refinements/regexp'
|
|
14
14
|
require 'zenaton/refinements/struct'
|
15
15
|
require 'zenaton/refinements/symbol'
|
16
16
|
require 'zenaton/refinements/time'
|
17
|
+
|
18
|
+
module Zenaton
|
19
|
+
# Reimplements json encoding from `json/add` as refinements
|
20
|
+
module Refinements
|
21
|
+
end
|
22
|
+
end
|
data/lib/zenaton/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zenaton
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zenaton
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|