vagrant-docker-hosts-manager 0.2.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 +7 -0
- data/CHANGELOG.md +8 -0
- data/LICENSE.md +22 -0
- data/README.md +196 -0
- data/lib/vagrant-docker-hosts-manager/VERSION +1 -0
- data/lib/vagrant-docker-hosts-manager/command.rb +457 -0
- data/lib/vagrant-docker-hosts-manager/config.rb +44 -0
- data/lib/vagrant-docker-hosts-manager/helpers.rb +42 -0
- data/lib/vagrant-docker-hosts-manager/plugin.rb +142 -0
- data/lib/vagrant-docker-hosts-manager/util/docker.rb +29 -0
- data/lib/vagrant-docker-hosts-manager/util/hosts_file.rb +477 -0
- data/lib/vagrant-docker-hosts-manager/util/i18n.rb +40 -0
- data/lib/vagrant-docker-hosts-manager/util/json.rb +15 -0
- data/lib/vagrant-docker-hosts-manager/version.rb +10 -0
- data/lib/vagrant-docker-hosts-manager.rb +3 -0
- data/locales/en.yml +114 -0
- data/locales/fr.yml +115 -0
- metadata +108 -0
data/locales/fr.yml
ADDED
@@ -0,0 +1,115 @@
|
|
1
|
+
fr:
|
2
|
+
help:
|
3
|
+
title: "Vagrant Docker Hosts Manager"
|
4
|
+
usage: "Utilisation : vagrant hosts <apply|remove|view|help|version> [options]"
|
5
|
+
commands_header: "Commandes :"
|
6
|
+
options_header: "Options :"
|
7
|
+
topics_header: "Sujets d'aide :"
|
8
|
+
topic_header: "Aide : vagrant hosts %{topic}"
|
9
|
+
usage_label: "Utilisation :"
|
10
|
+
description_label: "Description :"
|
11
|
+
options_label: "Options :"
|
12
|
+
examples_label: "Exemples :"
|
13
|
+
commands:
|
14
|
+
apply: "apply [IP] [DOMAIN] Ajouter/mettre à jour des entrées dans le fichier hosts"
|
15
|
+
remove: "remove [IP|DOMAIN] Supprimer des entrées ou tout le bloc géré"
|
16
|
+
view: "view [DOMAIN] Afficher les entrées prévues/gérées"
|
17
|
+
version: "version Afficher la version du plugin"
|
18
|
+
help: "help [command] Afficher l'Aide générale ou d'un sous-commande"
|
19
|
+
options:
|
20
|
+
json: "--json Sortie JSON lisible par machine"
|
21
|
+
dry_run: "--dry-run Ne pas modifier le fichier hosts"
|
22
|
+
lang: "--lang LANG Forcer la langue (en|fr)"
|
23
|
+
no_emoji: "--no-emoji Désactiver les émojis dans la sortie CLI"
|
24
|
+
help: "-h, --help Afficher l'aide"
|
25
|
+
topic:
|
26
|
+
apply:
|
27
|
+
title: "apply"
|
28
|
+
usage: "vagrant hosts apply <IP> <DOMAIN>"
|
29
|
+
description: >
|
30
|
+
Ajoute ou met à jour le mapping fourni dans le bloc géré pour la VM cible.
|
31
|
+
Si aucun mapping n'est fourni, les valeurs du Vagrantfile (docker_hosts) sont utilisées.
|
32
|
+
Les deux paramètres sont validés : IPv4 (ex. 172.28.100.2) et DOMAINE (ex. example.test).
|
33
|
+
options:
|
34
|
+
json: "--json Sortie JSON (machine-readable)"
|
35
|
+
dryrun: "--dry-run Ne pas modifier le fichier hosts"
|
36
|
+
lang: "--lang <en|fr> Forcer la langue"
|
37
|
+
noemoji: "--no-emoji Désactiver les émojis dans la sortie"
|
38
|
+
examples:
|
39
|
+
- "vagrant hosts apply 172.28.100.2 flowfind.noesi.local"
|
40
|
+
- "vagrant hosts apply 172.28.100.3 flowfind3.noesi.local default"
|
41
|
+
remove:
|
42
|
+
title: "remove"
|
43
|
+
usage: "vagrant hosts remove [<IP>|<DOMAIN>]"
|
44
|
+
description: >
|
45
|
+
Supprime un mapping par IP ou DOMAINE. Si aucun paramètre n'est fourni, une confirmation
|
46
|
+
est demandée avant de supprimer TOUTES les entrées gérées pour la VM (invite : yes/No).
|
47
|
+
Le format du paramètre est validé (IPv4 ou DOMAINE).
|
48
|
+
options:
|
49
|
+
json: "--json Sortie JSON (machine-readable)"
|
50
|
+
dryrun: "--dry-run Ne pas modifier le fichier hosts"
|
51
|
+
lang: "--lang <en|fr> Forcer la langue"
|
52
|
+
noemoji: "--no-emoji Désactiver les émojis dans la sortie"
|
53
|
+
examples:
|
54
|
+
- "vagrant hosts remove 172.28.100.2"
|
55
|
+
- "vagrant hosts remove flowfind.noesi.local"
|
56
|
+
- "vagrant hosts remove # demande une confirmation pour TOUT supprimer"
|
57
|
+
view:
|
58
|
+
title: "view"
|
59
|
+
usage: "vagrant hosts view"
|
60
|
+
description: >
|
61
|
+
Affiche les entrées prévues (depuis le Vagrantfile) et les entrées gérées présentes
|
62
|
+
dans le fichier hosts. Affiche des paires uniques IP → DOMAINE.
|
63
|
+
options:
|
64
|
+
json: "--json Sortie JSON (machine-readable)"
|
65
|
+
dryrun: "--dry-run Ne pas modifier le fichier hosts"
|
66
|
+
lang: "--lang <en|fr> Forcer la langue"
|
67
|
+
noemoji: "--no-emoji Désactiver les émojis dans la sortie"
|
68
|
+
examples:
|
69
|
+
- "vagrant hosts view"
|
70
|
+
- "vagrant hosts view default"
|
71
|
+
version:
|
72
|
+
title: "version"
|
73
|
+
usage: "vagrant hosts version"
|
74
|
+
description: "Affiche la version du plugin."
|
75
|
+
options: {}
|
76
|
+
examples:
|
77
|
+
- "vagrant hosts version"
|
78
|
+
help:
|
79
|
+
title: "help"
|
80
|
+
usage: "vagrant hosts help [apply|remove|view|version|help]"
|
81
|
+
description: "Afficher l'aide générale ou l'aide détaillée d'une sous-commande."
|
82
|
+
options: {}
|
83
|
+
examples:
|
84
|
+
- "vagrant hosts help"
|
85
|
+
- "vagrant hosts help apply"
|
86
|
+
|
87
|
+
messages:
|
88
|
+
no_entries: "Aucune entrée hosts configurée."
|
89
|
+
applied: "Entrées hosts appliquées."
|
90
|
+
removed_count: "%{count} entrée(s) supprimée(s)."
|
91
|
+
cleaned: "Entrées gérées supprimées."
|
92
|
+
nothing_to_clean: "Rien à nettoyer."
|
93
|
+
missing_ip_for: "Aucune IP configurée pour %{domain} ; ignoré."
|
94
|
+
detected_ip: "IP détectée pour %{domain} : %{ip}."
|
95
|
+
no_ip_found: "Aucune IP trouvée pour %{domain} (conteneur : %{container})."
|
96
|
+
lang_set: "Langue définie sur %{lang}."
|
97
|
+
no_change: "Rien à appliquer. Déjà à jour."
|
98
|
+
invalid_ip: "Adresse IPv4 invalide : %{ip}"
|
99
|
+
invalid_host: "Hôte/FQDN invalide : %{host}"
|
100
|
+
missing_mapping: "Fournissez l'IP et le FQDN (ex. `vagrant hosts apply 1.2.3.4 example.test`)."
|
101
|
+
invalid_key: "IP ou FQDN invalide : %{key}"
|
102
|
+
view_header: "Entrées hosts prévues :"
|
103
|
+
view_managed_header: "Entrées hosts gérées :"
|
104
|
+
apply_summary: "Ajoutées : %{a}, Modifiées : %{u}, Inchangées : %{s}"
|
105
|
+
remove_expected_format: "Format attendu : IPv4 (ex. 172.28.100.2) ou FQDN (ex. example.test)."
|
106
|
+
confirm_remove_all: "Cela va supprimer TOUTES les entrées gérées pour %{vm}. Continuer ? (yes/NO)"
|
107
|
+
remove_all_cancelled: "Annulé. Rien supprimé."
|
108
|
+
remove_none: "Aucune entrée correspondante à supprimer."
|
109
|
+
|
110
|
+
errors:
|
111
|
+
no_machine: "Aucune machine cible trouvée. Lancez cette commande dans un projet Vagrant ou indiquez un nom de VM."
|
112
|
+
not_admin: "Droits administrateur/root requis pour modifier le fichier hosts : %{path}."
|
113
|
+
|
114
|
+
log:
|
115
|
+
version_line: "vagrant-docker-hosts-manager version %{version}"
|
metadata
ADDED
@@ -0,0 +1,108 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: vagrant-docker-hosts-manager
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Julien Poirou
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2025-08-20 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: i18n
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.8'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.8'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rspec
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '3.12'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '3.12'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '13.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '13.0'
|
55
|
+
description: Adds `vagrant hosts` command and lifecycle hooks to apply/remove managed
|
56
|
+
hosts entries with ownership markers, JSON output, i18n, and safe cleanup.
|
57
|
+
email:
|
58
|
+
- julienpoirou@protonmail.com
|
59
|
+
executables: []
|
60
|
+
extensions: []
|
61
|
+
extra_rdoc_files: []
|
62
|
+
files:
|
63
|
+
- CHANGELOG.md
|
64
|
+
- LICENSE.md
|
65
|
+
- README.md
|
66
|
+
- lib/vagrant-docker-hosts-manager.rb
|
67
|
+
- lib/vagrant-docker-hosts-manager/VERSION
|
68
|
+
- lib/vagrant-docker-hosts-manager/command.rb
|
69
|
+
- lib/vagrant-docker-hosts-manager/config.rb
|
70
|
+
- lib/vagrant-docker-hosts-manager/helpers.rb
|
71
|
+
- lib/vagrant-docker-hosts-manager/plugin.rb
|
72
|
+
- lib/vagrant-docker-hosts-manager/util/docker.rb
|
73
|
+
- lib/vagrant-docker-hosts-manager/util/hosts_file.rb
|
74
|
+
- lib/vagrant-docker-hosts-manager/util/i18n.rb
|
75
|
+
- lib/vagrant-docker-hosts-manager/util/json.rb
|
76
|
+
- lib/vagrant-docker-hosts-manager/version.rb
|
77
|
+
- locales/en.yml
|
78
|
+
- locales/fr.yml
|
79
|
+
homepage: https://github.com/julienpoirou/vagrant-docker-hosts-manager
|
80
|
+
licenses:
|
81
|
+
- MIT
|
82
|
+
metadata:
|
83
|
+
rubygems_mfa_required: 'true'
|
84
|
+
bug_tracker_uri: https://github.com/julienpoirou/vagrant-docker-hosts-manager/issues
|
85
|
+
changelog_uri: https://github.com/julienpoirou/vagrant-docker-hosts-manager/blob/main/CHANGELOG.md
|
86
|
+
source_code_uri: https://github.com/julienpoirou/vagrant-docker-hosts-manager
|
87
|
+
homepage_uri: https://github.com/julienpoirou/vagrant-docker-hosts-manager
|
88
|
+
post_install_message:
|
89
|
+
rdoc_options: []
|
90
|
+
require_paths:
|
91
|
+
- lib
|
92
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '3.1'
|
97
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
98
|
+
requirements:
|
99
|
+
- - ">="
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0'
|
102
|
+
requirements: []
|
103
|
+
rubygems_version: 3.4.19
|
104
|
+
signing_key:
|
105
|
+
specification_version: 4
|
106
|
+
summary: Manage /etc/hosts (or Windows hosts) entries for Docker/Vagrant projects
|
107
|
+
safely
|
108
|
+
test_files: []
|