djin 0.11.0 → 0.11.1

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: 06daa5a16dcd5adf9e7ff60d976689fbe7e146cf58f708b97d3fea8de2113599
4
- data.tar.gz: e36aad9524a35db424096893fc2f817306c25160b8afea4fb19bd7c1951053fc
3
+ metadata.gz: b8b751c3b121d17a2b12ff1a74150298fb04e6a5a412a4b8def42992f7008804
4
+ data.tar.gz: b178db2c40895920abf006f9c3ac2d73af23d789651642096e9e30ef38a6c099
5
5
  SHA512:
6
- metadata.gz: 071abc594f4ee1ac16f3983550abba863fb22594afba6c2a0d1b54b92888feb8eda51f55445d6562f061f065b5da12b55e4a964dbe863e33227fb3e421e13cab
7
- data.tar.gz: 118d467194cbcad067c942e692794ac48afbcd4295183971e9a3a3c3ef41aec4ec2d693da83e7f86686e70cdfe9369458ae0eee319258b3dd8d3eb54f0761893
6
+ metadata.gz: b4c9807ae25080ec6cb2f6118b6a1d24ccccecf7b1205a677dfffb79d178668f69cf373213360e877a3fc2f2f7a9f901bfab6e7517490c59adf7d6c586b5c853
7
+ data.tar.gz: feec1ba8678b52c50f8d7bb12fd218e4bf08e147aee7ca7a634673b6f6abd76b6c4f1fe2fe4e0f902cb028deb1ae76c1a738339d46c44a81271cf8db7d1e23c3
@@ -1,3 +1,6 @@
1
+ ## 0.11.1 - 15/01/2021
2
+ * [FIX] remote-config fetch with same repo reference
3
+
1
4
  ## 0.11.0 - 14/01/2021
2
5
  * [FEATURE] Remote Configs
3
6
  * [TECH] Adds Test Coverage
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- djin (0.11.0)
4
+ djin (0.11.1)
5
5
  dry-cli (~> 0.6.0)
6
6
  dry-equalizer (~> 0.3.0)
7
7
  dry-struct (~> 1.3.0)
data/README.md CHANGED
@@ -27,7 +27,7 @@ If you use Rbenv you can install djin only once and create an alias in your .bas
27
27
  To use djin first you need to create a djin.yml file:
28
28
 
29
29
  ```yaml
30
- djin_version: '0.11.0'
30
+ djin_version: '0.11.1'
31
31
 
32
32
  tasks:
33
33
  # With a docker image
@@ -54,7 +54,7 @@ You can also set task dependencies with depends_on option:
54
54
 
55
55
 
56
56
  ```yaml
57
- djin_version: '0.11.0'
57
+ djin_version: '0.11.1'
58
58
 
59
59
  _default_run_options: &default_run_options
60
60
  options: "--rm"
@@ -83,7 +83,7 @@ tasks:
83
83
  Or mix local commands and docker/docker-compose commands:
84
84
 
85
85
  ```yaml
86
- djin_version: '0.11.0'
86
+ djin_version: '0.11.1'
87
87
 
88
88
  _default_run_options: &default_run_options
89
89
  options: "--rm"
@@ -122,7 +122,7 @@ After that you can run `djin {{task_name}}`, like `djin script` or `djin test`
122
122
  You can also use environment variables using the '{{YOUR_ENV_HERE}}' syntax, like so:
123
123
 
124
124
  ```yaml
125
- djin_version: '0.11.0'
125
+ djin_version: '0.11.1'
126
126
 
127
127
  _default_run_options: &default_run_options
128
128
  options: "--rm"
@@ -139,7 +139,7 @@ tasks:
139
139
 
140
140
  Or define some variables to use in multiple locations
141
141
  ```yaml
142
- djin_version: '0.11.0'
142
+ djin_version: '0.11.1'
143
143
 
144
144
  _default_run_options: &default_run_options
145
145
  options: "--rm"
@@ -163,7 +163,7 @@ tasks:
163
163
  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:
164
164
 
165
165
  ```yaml
166
- djin_version: '0.11.0'
166
+ djin_version: '0.11.1'
167
167
 
168
168
  _default_run_options: &default_run_options
169
169
  options: "--rm"
@@ -189,7 +189,7 @@ Under the hood djin uses [Mustache](https://mustache.github.io/), so you can use
189
189
  If you have multiple tasks with similar behavior and with small differences you can use the `include` keyword, so this:
190
190
 
191
191
  ```yaml
192
- djin_version: '0.11.0'
192
+ djin_version: '0.11.1'
193
193
 
194
194
  tasks:
195
195
  "host1:ssh":
@@ -228,7 +228,7 @@ can become this:
228
228
 
229
229
  ```yaml
230
230
  # djin.yml
231
- djin_version: '0.11.0'
231
+ djin_version: '0.11.1'
232
232
 
233
233
  include:
234
234
  - file: '.djin/server_tasks.yml'
@@ -250,7 +250,7 @@ include:
250
250
 
251
251
  ```yaml
252
252
  # .djin/server_tasks.yml
253
- djin_version: '0.11.0'
253
+ djin_version: '0.11.1'
254
254
 
255
255
  tasks:
256
256
  "{{namespace}}:ssh":
@@ -272,7 +272,7 @@ tasks:
272
272
  You can also reuse tasks in some git repository, to do that you need to declare a git source and optionally a version:
273
273
 
274
274
  ```yaml
275
- djin_version: '0.11.0'
275
+ djin_version: '0.11.1'
276
276
 
277
277
  include:
278
278
  - git: 'https://github.com/catks/djin.git'
data/djin.yml CHANGED
@@ -1,4 +1,4 @@
1
- djin_version: '0.11.0'
1
+ djin_version: '0.11.1'
2
2
 
3
3
  _default_run_options: &default_run_options
4
4
  options: "--rm --entrypoint=''"
@@ -41,5 +41,6 @@ tasks:
41
41
  release:
42
42
  local:
43
43
  run:
44
+ - (source ~/.zshrc || true)
44
45
  - verto tag up {{args}}
45
46
  - bundle exec rake release
@@ -1,5 +1,5 @@
1
1
  ---
2
- djin_version: '0.11.0'
2
+ djin_version: '0.11.1'
3
3
 
4
4
  include:
5
5
  - file: 'djin_lib/test.yml'
@@ -1,4 +1,4 @@
1
- djin_version: '0.11.0'
1
+ djin_version: '0.11.1'
2
2
 
3
3
  _default_run_options: &default_run_options
4
4
  options: "--rm --entrypoint=''"
@@ -1,4 +1,4 @@
1
- djin_version: '0.11.0'
1
+ djin_version: '0.11.1'
2
2
 
3
3
  include:
4
4
  - file: '.djin/server_tasks.yml'
@@ -1,4 +1,4 @@
1
- djin_version: '0.11.0'
1
+ djin_version: '0.11.1'
2
2
 
3
3
  include:
4
4
  - git: 'https://gitserver/myrepo.git'
@@ -23,11 +23,12 @@ module Djin
23
23
  end
24
24
 
25
25
  def fetch_all
26
- remote_configs.each do |rc|
26
+ remote_configs_by_folders.each do |rc|
27
27
  git_folder = base_path.join(rc.folder_name).expand_path
28
28
 
29
29
  # TODO: Extract STDEER Output, maybe publishing events and subscribing a observer for the logs.
30
30
  stderr.puts "Remote Path: #{base_path.expand_path}"
31
+
31
32
  git_repo = rc.missing? ? clone_repo(git_folder, rc) : fetch_repo(git_folder, rc)
32
33
 
33
34
  stderr.puts "Checking out to '#{rc.version}'"
@@ -37,7 +38,7 @@ module Djin
37
38
  end
38
39
 
39
40
  def clear
40
- remote_configs.each do |rc|
41
+ remote_configs_by_folders.each do |rc|
41
42
  git_folder = base_path.join(rc.folder_name)
42
43
 
43
44
  stderr.puts "Removing #{rc.folder_name} repository..."
@@ -57,6 +58,13 @@ module Djin
57
58
 
58
59
  attr_accessor :stderr
59
60
 
61
+ def remote_configs_by_folders
62
+ @remote_configs_by_folders ||= remote_configs
63
+ .group_by(&:folder_name)
64
+ .values
65
+ .map(&:first)
66
+ end
67
+
60
68
  def remove_remote_folder
61
69
  stderr.puts "Removing #{base_path}..."
62
70
  `rm -rf #{base_path}`
@@ -64,7 +72,7 @@ module Djin
64
72
 
65
73
  def clone_repo(git_folder, remote_config)
66
74
  stderr.puts "Missing #{remote_config.folder_name} repository, cloning in #{git_folder}"
67
- Git.clone(remote_config.git, git_folder, progress: true)
75
+ Git.clone(remote_config.git.to_s, git_folder.to_s, branch: remote_config.version)
68
76
  end
69
77
 
70
78
  def fetch_repo(git_folder, remote_config)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Djin
4
- VERSION = '0.11.0'
4
+ VERSION = '0.11.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.11.0
4
+ version: 0.11.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: 2021-01-14 00:00:00.000000000 Z
11
+ date: 2021-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-cli
@@ -270,7 +270,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
270
270
  - !ruby/object:Gem::Version
271
271
  version: '0'
272
272
  requirements: []
273
- rubygems_version: 3.0.3
273
+ rubyforge_project:
274
+ rubygems_version: 2.7.6
274
275
  signing_key:
275
276
  specification_version: 4
276
277
  summary: djin is a make-like utility for docker containers