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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fff7e96284604fd307b0d23ba51cffcfc648a5c58a8476c82c1eeaaa963cded8
4
- data.tar.gz: 2614cccf266a28decaa5604014cb084fe61db038857ff650fd92d935ad928100
3
+ metadata.gz: f1385767c881e6ef34069a875ca988133b9904b28f1446ab14cf1104d928122a
4
+ data.tar.gz: 01f116af0dbd6ccfead4ccd2a5a02d8a059f2ae59702e370d88a2ca9ac635141
5
5
  SHA512:
6
- metadata.gz: fabadf49177012dc688a4163d7fb3a434c5c6a1c50f42d16251b0b9a1449d52914a7f08c516d5ad8c12bdeee45a259d78c6f7d70a6299dfe61e632f9ccd39862
7
- data.tar.gz: 33b369adbc905e3ca269c79eb2f8b6712f6f6627607d7c09bd6b8e1b3170d612ed72a6da847cf5b9daa42ac191436f9efce70dd3320449386baa1dc2733dbc8a
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
- build:
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.5.1
6
-
7
- working_directory: ~/repo
8
-
9
- steps:
10
- - checkout
11
-
12
- - restore_cache:
13
- keys:
14
- - v1-dependencies-{{ checksum "Gemfile.lock" }}
15
- - v1-dependencies-
16
-
17
- - run:
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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- zenaton (0.1.0)
4
+ zenaton (0.1.1)
5
5
  activesupport
6
6
  httparty
7
7
  tzinfo-data
data/README.md CHANGED
@@ -1,5 +1,6 @@
1
1
  # Zenaton library for Ruby
2
- [![CircleCI](https://circleci.com/gh/zenaton/zenaton-ruby/tree/master.svg?style=svg&circle-token=99da357820821f49236b1e2f20657100fb382bd8)](https://circleci.com/gh/zenaton/zenaton-ruby/tree/master)
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 or later.
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.transform_values { |value| encode_value(value) }
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.transform_values { |value| decode_element(value) }
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
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Zenaton
4
4
  # This gem's current version
5
- VERSION = '0.1.0'
5
+ VERSION = '0.1.1'
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zenaton
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zenaton