djin 0.6.0 → 0.6.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: 35900c4ab60e94710d24194ea2192edbf4e806527af87fe9d53e693bcec03704
4
- data.tar.gz: 53a1b1caabf4ff2e7a708fa1e31ccd7b552514cc6eb882d7152ba015bb58db01
3
+ metadata.gz: d0028b9bfea1674c6a94725803f76d2b694645ec62fd8a68c424ad183037da08
4
+ data.tar.gz: 6b4e80ac7476ac419cbf318bf5b26a9404c49372198a25c4200d415eb621a053
5
5
  SHA512:
6
- metadata.gz: 3cb346575e3426446ad0c2ea2043d386a6112b9414d84927b24a5f0e3dec6062c361a9a6f0910c34fb13819d978d1721d882f53fe36fcf4a5aa5231eac4b6cc3
7
- data.tar.gz: 34888b78f7f7af5792fc75f373870792d41986f818bfef643ad8d27f954b9f5e92791226c282933e0f3d7fa57acc42a0f71838df45acff47d48b424d53c24051
6
+ metadata.gz: 0b299ccb19e33149105892253eb204e677ec3b1e0ac1302a2fec351d4f94e332a1da1632bf4de156cf5e6d0421bdbb8c920b8d4f3343d8b771002d0656667a99
7
+ data.tar.gz: a757ee67e3603e53d53c72b033a18b468a11c5eadc9def8bd826cb4147ef18b9194a0e23b79e76ee9a051f535a2e02bb720321fa1f01e48fce466d774aff3a83
@@ -1,3 +1,6 @@
1
+ ## 0.6.1 - 11/08/2020
2
+ * [TECH] Better Error Handling
3
+
1
4
  ## 0.6.0 - 22/07/2020
2
5
  * [FEATURE] Djin Variables
3
6
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- djin (0.6.0)
4
+ djin (0.6.1)
5
5
  dry-cli (~> 0.6.0)
6
6
  dry-struct (~> 1.3.0)
7
7
  dry-validation (~> 1.5.1)
@@ -13,7 +13,7 @@ GEM
13
13
  specs:
14
14
  ast (2.4.1)
15
15
  byebug (11.1.1)
16
- concurrent-ruby (1.1.6)
16
+ concurrent-ruby (1.1.7)
17
17
  diff-lcs (1.3)
18
18
  dry-cli (0.6.0)
19
19
  concurrent-ruby (~> 1.0)
@@ -53,7 +53,7 @@ GEM
53
53
  dry-equalizer (~> 0.3)
54
54
  dry-inflector (~> 0.1, >= 0.1.2)
55
55
  dry-logic (~> 1.0, >= 1.0.2)
56
- dry-validation (1.5.2)
56
+ dry-validation (1.5.3)
57
57
  concurrent-ruby (~> 1.0)
58
58
  dry-container (~> 0.7, >= 0.7.1)
59
59
  dry-core (~> 0.4)
data/README.md CHANGED
@@ -26,7 +26,7 @@ If you use Rbenv you can install djin only once and create a alias in your .basr
26
26
  To use djin first you need to create a djin.yml file:
27
27
 
28
28
  ```yaml
29
- djin_version: '0.6.0'
29
+ djin_version: '0.6.1'
30
30
 
31
31
  tasks:
32
32
  # With a docker image
@@ -51,7 +51,7 @@ You can also set task dependencies with depends_on option:
51
51
 
52
52
 
53
53
  ```yaml
54
- djin_version: '0.6.0'
54
+ djin_version: '0.6.1'
55
55
 
56
56
  _default_run_options: &default_run_options
57
57
  options: "--rm"
@@ -80,7 +80,7 @@ tasks:
80
80
  Or mix local commands and docker/docker-compose commands:
81
81
 
82
82
  ```yaml
83
- djin_version: '0.6.0'
83
+ djin_version: '0.6.1'
84
84
 
85
85
  _default_run_options: &default_run_options
86
86
  options: "--rm"
@@ -119,7 +119,7 @@ After that you can run `djin {{task_name}}`, like `djin script` or `djin test`
119
119
  You can also use environment variables using the '{{YOUR_ENV_HERE}}' syntax, like so:
120
120
 
121
121
  ```yaml
122
- djin_version: '0.6.0'
122
+ djin_version: '0.6.1'
123
123
 
124
124
  _default_run_options: &default_run_options
125
125
  options: "--rm"
@@ -136,7 +136,7 @@ tasks:
136
136
 
137
137
  Or define some variables to use in multiple locations
138
138
  ```yaml
139
- djin_version: '0.6.0'
139
+ djin_version: '0.6.1'
140
140
 
141
141
  _default_run_options: &default_run_options
142
142
  options: "--rm"
@@ -160,7 +160,7 @@ tasks:
160
160
  It's also possible to pass custom arguments to the command, which means is possible to make a djin task act like the command itself:
161
161
 
162
162
  ```yaml
163
- djin_version: '0.6.0'
163
+ djin_version: '0.6.1'
164
164
 
165
165
  _default_run_options: &default_run_options
166
166
  options: "--rm"
data/djin.yml CHANGED
@@ -1,4 +1,4 @@
1
- djin_version: '0.6.0'
1
+ djin_version: '0.6.1'
2
2
 
3
3
  _default_run_options: &default_run_options
4
4
  options: "--rm --entrypoint=''"
@@ -1,5 +1,5 @@
1
1
  ---
2
- djin_version: '0.6.0'
2
+ djin_version: '0.6.1'
3
3
 
4
4
  tasks:
5
5
  default:
@@ -36,7 +36,8 @@ module Djin
36
36
  @task_repository = TaskRepository.new(tasks)
37
37
  CLI.load_tasks!(tasks)
38
38
  rescue Djin::Interpreter::InvalidConfigurationError => e
39
- abort(e.message)
39
+ error_name = e.class.name.split('::').last
40
+ abort("[#{error_name}] #{e.message}")
40
41
  end
41
42
 
42
43
  def self.tasks
@@ -27,6 +27,8 @@ module Djin
27
27
 
28
28
  def raw_djin_config
29
29
  @raw_djin_config ||= yaml_load(@template_file)
30
+ rescue Psych::SyntaxError => e
31
+ raise Interpreter::InvalidConfigFileError, e.message
30
32
  end
31
33
 
32
34
  def rendered_djin_config
@@ -6,6 +6,7 @@ module Djin
6
6
 
7
7
  # TODO: Move Errors to ConfigLoader
8
8
  InvalidConfigurationError = Class.new(StandardError)
9
+ InvalidConfigFileError = Class.new(InvalidConfigurationError)
9
10
  MissingVersionError = Class.new(InvalidConfigurationError)
10
11
  VersionNotSupportedError = Class.new(InvalidConfigurationError)
11
12
  InvalidSyntaxError = Class.new(InvalidConfigurationError)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Djin
4
- VERSION = '0.6.0'
4
+ VERSION = '0.6.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: djin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carlos Atkinson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-07-23 00:00:00.000000000 Z
11
+ date: 2020-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-cli
@@ -213,7 +213,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
213
213
  - !ruby/object:Gem::Version
214
214
  version: '0'
215
215
  requirements: []
216
- rubygems_version: 3.0.3
216
+ rubyforge_project:
217
+ rubygems_version: 2.7.6
217
218
  signing_key:
218
219
  specification_version: 4
219
220
  summary: djin is a make-like utility for docker containers