djin 0.7.0 → 0.8.0

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: 2c1694ef43737efb232e0ec9ae802c573fd1b76262a77c4d729c3abb26b2fa14
4
- data.tar.gz: a2c322c54fd3cfee6dcb3e238bb0c97f2f84ce69a55e0697da38497123840072
3
+ metadata.gz: 558aca989aad2d1cfd7b19768a7a5d6fd2f660afb5135fb9ca3ae03eacb233b4
4
+ data.tar.gz: f2e5c3861c6db601b77bc04321386cb2c22ec049d315781966830ba8a5f6e8af
5
5
  SHA512:
6
- metadata.gz: 1951778dbcd47e2f15c2f5cf5300e746b5550f6f1d9284277df61ec567c94f46283673e78b9c7253fa8fe6770ae5ded21b5cec64cf4bff40ad47873fed1a3929
7
- data.tar.gz: 1dcb9d493713d32acd50c9c3238723a4a5b3c179383dcaea3b30ae80a6727f32466b296d6866e7a611ad2fa634328a1c26f3219702738fd7491fb36bc5f2074f
6
+ metadata.gz: a898ea486006d81980a4e963a1e7b2d31f40c5bec00d9b5948f4b32d0be5c222b61525c90fd214523cd482aadeab88e3927cb3a3697f7fc86b8180901e015543
7
+ data.tar.gz: 3d6b0a29b1faa6a3bffb0fa5076ee88083229cbb36f77f2166e44bc19ddd84b73bd6b254578da2c721e1c08ffc7e9583f1325bdd73acc87511ceec47b3f0e512
@@ -1,3 +1,6 @@
1
+ ## 0.8.0 - 31/08/2020
2
+ * [FEATURE] Adds aliases option
3
+
1
4
  ## 0.7.0 - 20/08/2020
2
5
  * [FEATURE] Adds description option
3
6
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- djin (0.7.0)
4
+ djin (0.8.0)
5
5
  dry-cli (~> 0.6.0)
6
6
  dry-equalizer (~> 0.3.0)
7
7
  dry-struct (~> 1.3.0)
@@ -34,7 +34,7 @@ GEM
34
34
  concurrent-ruby (~> 1.0)
35
35
  dry-core (~> 0.2)
36
36
  dry-equalizer (~> 0.2)
37
- dry-schema (1.5.2)
37
+ dry-schema (1.5.3)
38
38
  concurrent-ruby (~> 1.0)
39
39
  dry-configurable (~> 0.8, >= 0.8.3)
40
40
  dry-core (~> 0.4)
@@ -54,7 +54,7 @@ GEM
54
54
  dry-equalizer (~> 0.3)
55
55
  dry-inflector (~> 0.1, >= 0.1.2)
56
56
  dry-logic (~> 1.0, >= 1.0.2)
57
- dry-validation (1.5.3)
57
+ dry-validation (1.5.4)
58
58
  concurrent-ruby (~> 1.0)
59
59
  dry-container (~> 0.7, >= 0.7.1)
60
60
  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.7.0'
29
+ djin_version: '0.8.0'
30
30
 
31
31
  tasks:
32
32
  # With a docker image
@@ -40,18 +40,20 @@ tasks:
40
40
 
41
41
  # Using a docker-compose service
42
42
  test:
43
- docker-compose:
44
- service: app
45
- run:
46
- commands: rspec
47
- options: "--rm"
43
+ docker-compose:
44
+ service: app
45
+ run:
46
+ commands: rspec
47
+ options: "--rm"
48
+ aliases: # Optional Array of strings
49
+ - rspec
48
50
  ```
49
51
 
50
52
  You can also set task dependencies with depends_on option:
51
53
 
52
54
 
53
55
  ```yaml
54
- djin_version: '0.7.0'
56
+ djin_version: '0.8.0'
55
57
 
56
58
  _default_run_options: &default_run_options
57
59
  options: "--rm"
@@ -80,7 +82,7 @@ tasks:
80
82
  Or mix local commands and docker/docker-compose commands:
81
83
 
82
84
  ```yaml
83
- djin_version: '0.7.0'
85
+ djin_version: '0.8.0'
84
86
 
85
87
  _default_run_options: &default_run_options
86
88
  options: "--rm"
@@ -119,7 +121,7 @@ After that you can run `djin {{task_name}}`, like `djin script` or `djin test`
119
121
  You can also use environment variables using the '{{YOUR_ENV_HERE}}' syntax, like so:
120
122
 
121
123
  ```yaml
122
- djin_version: '0.7.0'
124
+ djin_version: '0.8.0'
123
125
 
124
126
  _default_run_options: &default_run_options
125
127
  options: "--rm"
@@ -136,7 +138,7 @@ tasks:
136
138
 
137
139
  Or define some variables to use in multiple locations
138
140
  ```yaml
139
- djin_version: '0.7.0'
141
+ djin_version: '0.8.0'
140
142
 
141
143
  _default_run_options: &default_run_options
142
144
  options: "--rm"
@@ -160,7 +162,7 @@ tasks:
160
162
  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
163
 
162
164
  ```yaml
163
- djin_version: '0.7.0'
165
+ djin_version: '0.8.0'
164
166
 
165
167
  _default_run_options: &default_run_options
166
168
  options: "--rm"
@@ -172,6 +174,8 @@ tasks:
172
174
  run:
173
175
  commands: rubocop {{args}}
174
176
  <<: *default_run_options
177
+ aliases:
178
+ - lint
175
179
 
176
180
  ```
177
181
 
data/djin.yml CHANGED
@@ -1,4 +1,4 @@
1
- djin_version: '0.7.0'
1
+ djin_version: '0.8.0'
2
2
 
3
3
  _default_run_options: &default_run_options
4
4
  options: "--rm --entrypoint=''"
@@ -11,6 +11,8 @@ tasks:
11
11
  run:
12
12
  commands: "cd /usr/src/djin && rspec {{args}}"
13
13
  <<: *default_run_options
14
+ aliases:
15
+ - rspec
14
16
 
15
17
  sh:
16
18
  description: Enter app service shell
@@ -1,5 +1,5 @@
1
1
  ---
2
- djin_version: '0.7.0'
2
+ djin_version: '0.8.0'
3
3
 
4
4
  tasks:
5
5
  default:
@@ -16,7 +16,7 @@ module Djin
16
16
  end
17
17
  end
18
18
 
19
- register task.name, command
19
+ register(task.name, command, aliases: task.aliases)
20
20
  end
21
21
  end
22
22
 
@@ -7,6 +7,7 @@ module Djin
7
7
  attribute :build_command, Types::String.optional.default(nil)
8
8
  attribute :command, Types::String.optional.default(nil)
9
9
  attribute :raw_command, Types::String.optional.default(nil)
10
+ attribute :aliases, Types::Array.of(Types::String).optional.default([].freeze)
10
11
  attribute :depends_on, Types::Array.of(Types::String).optional.default([].freeze)
11
12
 
12
13
  include Dry::Equalizer(:name, :command, :build_command)
@@ -30,6 +30,7 @@ module Djin
30
30
  description: options['description'] || "Runs: #{raw_command}",
31
31
  command: command,
32
32
  raw_command: raw_command,
33
+ aliases: options['aliases'],
33
34
  depends_on: options['depends_on']
34
35
  }.compact
35
36
 
@@ -49,6 +49,7 @@ module Djin
49
49
  hash(LocalSchema)
50
50
  end
51
51
 
52
+ optional(:aliases).each(:str?)
52
53
  optional(:depends_on).each(:str?)
53
54
  end
54
55
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Djin
4
- VERSION = '0.7.0'
4
+ VERSION = '0.8.0'
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.7.0
4
+ version: 0.8.0
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-08-21 00:00:00.000000000 Z
11
+ date: 2020-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-cli