zenaton 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +61 -42
- data/Gemfile.lock +1 -1
- data/README.md +5 -4
- data/lib/zenaton/services/serializer.rb +8 -2
- data/lib/zenaton/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1385767c881e6ef34069a875ca988133b9904b28f1446ab14cf1104d928122a
|
4
|
+
data.tar.gz: 01f116af0dbd6ccfead4ccd2a5a02d8a059f2ae59702e370d88a2ca9ac635141
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8510ccddad7b89fc23ffd13de253f1b40a1ba07b435adba23e3805f90518b42787bb73e832c34d449d43b81b92448c2c92ba48aaae766dec3f0997dffd60a9b
|
7
|
+
data.tar.gz: 759d4c154c3362e981f9665aa65da1d350bcea2d82742e0624d5180abd5d66ef876ec134c78fac9cca2b3c3ea6af34ac2714e39c31822b0f4e22f94fe203b39a
|
data/.circleci/config.yml
CHANGED
@@ -1,45 +1,64 @@
|
|
1
1
|
version: 2
|
2
|
+
|
3
|
+
shared: &shared
|
4
|
+
working_directory: ~/repo
|
5
|
+
|
6
|
+
steps:
|
7
|
+
- checkout
|
8
|
+
|
9
|
+
- restore_cache:
|
10
|
+
keys:
|
11
|
+
- v1-dependencies-{{ checksum "Gemfile.lock" }}
|
12
|
+
- v1-dependencies-
|
13
|
+
|
14
|
+
- run:
|
15
|
+
name: install dependencies
|
16
|
+
command: |
|
17
|
+
bundle install --jobs=4 --retry=3 --path vendor/bundle
|
18
|
+
|
19
|
+
- save_cache:
|
20
|
+
paths:
|
21
|
+
- ./vendor/bundle
|
22
|
+
key: v1-dependencies-{{ checksum "Gemfile.lock" }}
|
23
|
+
|
24
|
+
- run:
|
25
|
+
name: run code linter
|
26
|
+
command: |
|
27
|
+
bundle exec rubocop
|
28
|
+
|
29
|
+
- run:
|
30
|
+
name: run tests
|
31
|
+
command: |
|
32
|
+
bundle exec rake
|
33
|
+
|
34
|
+
- run:
|
35
|
+
name: audit dependencies for known CVEs
|
36
|
+
command: |
|
37
|
+
gem install bundler-audit
|
38
|
+
bundle audit check --update
|
39
|
+
|
40
|
+
- store_artifacts:
|
41
|
+
path: ./coverage
|
42
|
+
destination: coverage
|
43
|
+
|
2
44
|
jobs:
|
3
|
-
|
45
|
+
"ruby-2.3":
|
46
|
+
<<: *shared
|
47
|
+
docker:
|
48
|
+
- image: circleci/ruby:2.3
|
49
|
+
"ruby-2.4":
|
50
|
+
<<: *shared
|
4
51
|
docker:
|
5
|
-
- image: circleci/ruby:2.
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
-
|
18
|
-
name: install dependencies
|
19
|
-
command: |
|
20
|
-
bundle install --jobs=4 --retry=3 --path vendor/bundle
|
21
|
-
|
22
|
-
- save_cache:
|
23
|
-
paths:
|
24
|
-
- ./vendor/bundle
|
25
|
-
key: v1-dependencies-{{ checksum "Gemfile.lock" }}
|
26
|
-
|
27
|
-
- run:
|
28
|
-
name: run code linter
|
29
|
-
command: |
|
30
|
-
bundle exec rubocop
|
31
|
-
|
32
|
-
- run:
|
33
|
-
name: run tests
|
34
|
-
command: |
|
35
|
-
bundle exec rake
|
36
|
-
|
37
|
-
- run:
|
38
|
-
name: audit dependencies for known CVEs
|
39
|
-
command: |
|
40
|
-
gem install bundler-audit
|
41
|
-
bundle audit check --update
|
42
|
-
|
43
|
-
- store_artifacts:
|
44
|
-
path: ./coverage
|
45
|
-
destination: coverage
|
52
|
+
- image: circleci/ruby:2.4
|
53
|
+
"ruby-2.5":
|
54
|
+
<<: *shared
|
55
|
+
docker:
|
56
|
+
- image: circleci/ruby:2.5
|
57
|
+
|
58
|
+
workflows:
|
59
|
+
version: 2
|
60
|
+
build:
|
61
|
+
jobs:
|
62
|
+
- "ruby-2.3"
|
63
|
+
- "ruby-2.4"
|
64
|
+
- "ruby-2.5"
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# Zenaton library for Ruby
|
2
|
-
[![
|
2
|
+
[![Gem Version](https://badge.fury.io/rb/zenaton.svg)](https://badge.fury.io/rb/zenaton)
|
3
|
+
[![CircleCI](https://circleci.com/gh/zenaton/zenaton-ruby/tree/master.svg?style=shield&circle-token=99da357820821f49236b1e2f20657100fb382bd8)](https://circleci.com/gh/zenaton/zenaton-ruby/tree/master)
|
3
4
|
|
4
5
|
This Zenaton library for Ruby lets you code and launch workflows using Zenaton platform. You can sign up for an account at [https://zenaton/com](http://zenaton.com)
|
5
6
|
|
@@ -8,7 +9,7 @@ issue if you find any bugs.
|
|
8
9
|
|
9
10
|
## Requirements
|
10
11
|
|
11
|
-
This gem has been tested with Ruby 2.3
|
12
|
+
This gem has been tested with Ruby 2.3 and later.
|
12
13
|
|
13
14
|
## Installation
|
14
15
|
|
@@ -86,9 +87,9 @@ Your workflow's tasks will be executed on your worker servers. Please install a
|
|
86
87
|
|
87
88
|
$ curl https://install.zenaton.com | sh
|
88
89
|
|
89
|
-
that you configure with
|
90
|
+
that you can start and configure with
|
90
91
|
|
91
|
-
$ zenaton listen --env=.env --boot=boot.rb
|
92
|
+
$ zenaton start && zenaton listen --env=.env --boot=boot.rb
|
92
93
|
|
93
94
|
where `.env` is the env file containing your credentials, and `boot.rb` is a file that will be included before each task execution - this file should load all workflow classes.
|
94
95
|
|
@@ -78,7 +78,7 @@ module Zenaton
|
|
78
78
|
end
|
79
79
|
|
80
80
|
def encode_hash(hash)
|
81
|
-
hash
|
81
|
+
transform_values(hash) { |value| encode_value(value) }
|
82
82
|
end
|
83
83
|
|
84
84
|
def encode_value(value)
|
@@ -124,7 +124,7 @@ module Zenaton
|
|
124
124
|
end
|
125
125
|
|
126
126
|
def decode_hash(hash)
|
127
|
-
hash
|
127
|
+
transform_values(hash) { |value| decode_element(value) }
|
128
128
|
end
|
129
129
|
|
130
130
|
# rubocop:disable Metrics/MethodLength
|
@@ -151,6 +151,12 @@ module Zenaton
|
|
151
151
|
properties = decode_hash(encoded_object[KEY_OBJECT_PROPERTIES])
|
152
152
|
@properties.set(object, properties)
|
153
153
|
end
|
154
|
+
|
155
|
+
def transform_values(hash)
|
156
|
+
hash.each_with_object({}) do |(k, v), acc|
|
157
|
+
acc[k] = yield(v)
|
158
|
+
end
|
159
|
+
end
|
154
160
|
end
|
155
161
|
end
|
156
162
|
end
|
data/lib/zenaton/version.rb
CHANGED