hammer_cli_foreman_templates 0.0.1 → 0.1.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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1917cf54c7c3d800a959c07d1eb01ef7a0417c3a
|
4
|
+
data.tar.gz: 4211d9a71a68c0521e6eaab7b6fddb747091f554
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2bfd8b21cd082d12fe4ea5d8df61a548a7db078b035380f1fe5773ad7d2b4952c253d3102e3b41f2ed88d404dd17e1a6a5cccbb55e98de02e6863a1b0e415894
|
7
|
+
data.tar.gz: a48ae2d980d23dace8e843636c93d9149e9026de6e91acdd6bbfc987d341f5d3c70822a352445288c8eaca195a5bd86eacf35dbcb73c58795cd4e770896aadcc
|
data/README.md
CHANGED
@@ -23,7 +23,7 @@ First, cd into the directory where your projects will live. Then clone everythin
|
|
23
23
|
|
24
24
|
```bash
|
25
25
|
git clone https://github.com/theforeman/hammer-cli-foreman.git
|
26
|
-
git clone https://github.com/theforeman/
|
26
|
+
git clone https://github.com/theforeman/hammer-cli-foreman-templates.git
|
27
27
|
```
|
28
28
|
|
29
29
|
Before we bundle, we need to setup our local Gemfile. Edit `Gemfile.local.rb` in your hammer_cli_foreman_templates directory to point to the local projects instead of using the gems. Enter the following:
|
@@ -1,8 +1,21 @@
|
|
1
|
-
|
2
|
-
require '
|
3
|
-
require 'hammer_cli_foreman_templates/import'
|
4
|
-
require 'hammer_cli_foreman_templates/export'
|
1
|
+
require 'hammer_cli_foreman'
|
2
|
+
require 'hammer_cli_foreman/template'
|
5
3
|
|
6
4
|
module HammerCLIForemanTemplates
|
5
|
+
require 'hammer_cli_foreman_templates/version'
|
6
|
+
require 'hammer_cli_foreman_templates/import'
|
7
|
+
require 'hammer_cli_foreman_templates/export'
|
7
8
|
|
8
|
-
|
9
|
+
HammerCLI::MainCommand.lazy_subcommand(
|
10
|
+
ImportCommand.command_name,
|
11
|
+
ImportCommand.desc,
|
12
|
+
'HammerCLIForemanTemplates::ImportCommand',
|
13
|
+
'hammer_cli_foreman_templates/import'
|
14
|
+
)
|
15
|
+
HammerCLI::MainCommand.lazy_subcommand(
|
16
|
+
ExportCommand.command_name,
|
17
|
+
ExportCommand.desc,
|
18
|
+
'HammerCLIForemanTemplates::ExportCommand',
|
19
|
+
'hammer_cli_foreman_templates/export'
|
20
|
+
)
|
21
|
+
end
|
@@ -1,25 +1,13 @@
|
|
1
|
-
require 'hammer_cli_foreman'
|
2
|
-
require 'hammer_cli_foreman/template'
|
3
|
-
|
4
1
|
module HammerCLIForemanTemplates
|
5
|
-
|
6
2
|
class ExportCommand < HammerCLIForeman::Command
|
7
|
-
|
8
|
-
|
9
|
-
desc _("Exports templates")
|
3
|
+
command_name 'export-templates'
|
4
|
+
desc _('Export templates to a git repo or a directory on the server')
|
10
5
|
|
11
6
|
resource :template, :export
|
12
7
|
|
13
|
-
success_message _(
|
14
|
-
failure_message _(
|
8
|
+
success_message _('Export finished')
|
9
|
+
failure_message _('Could not export')
|
15
10
|
|
16
11
|
build_options
|
17
12
|
end
|
18
|
-
|
19
|
-
HammerCLIForeman::Template.subcommand(
|
20
|
-
'export',
|
21
|
-
_("Exports templates"),
|
22
|
-
HammerCLIForemanTemplates::ExportCommand
|
23
|
-
)
|
24
|
-
|
25
|
-
end
|
13
|
+
end
|
@@ -1,25 +1,13 @@
|
|
1
|
-
require 'hammer_cli_foreman'
|
2
|
-
require 'hammer_cli_foreman/template'
|
3
|
-
|
4
1
|
module HammerCLIForemanTemplates
|
5
|
-
|
6
2
|
class ImportCommand < HammerCLIForeman::Command
|
7
|
-
|
8
|
-
|
9
|
-
desc _("Imports templates")
|
3
|
+
command_name 'import-templates'
|
4
|
+
desc _('Import templates from a git repo or a directory on the server')
|
10
5
|
|
11
6
|
resource :template, :import
|
12
7
|
|
13
|
-
success_message _(
|
14
|
-
failure_message _(
|
8
|
+
success_message _('Import finished')
|
9
|
+
failure_message _('Could not import')
|
15
10
|
|
16
11
|
build_options
|
17
12
|
end
|
18
|
-
|
19
|
-
HammerCLIForeman::Template.subcommand(
|
20
|
-
'import',
|
21
|
-
_("Imports templates"),
|
22
|
-
HammerCLIForemanTemplates::ImportCommand
|
23
|
-
)
|
24
|
-
|
25
|
-
end
|
13
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hammer_cli_foreman_templates
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- The Foreman team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-03-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hammer_cli_foreman
|
@@ -24,8 +24,9 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 0.11.0
|
27
|
-
description:
|
28
|
-
|
27
|
+
description: 'CLI plugin with import and export commands for Hammer_CLI_Foreman
|
28
|
+
|
29
|
+
'
|
29
30
|
email:
|
30
31
|
executables: []
|
31
32
|
extensions: []
|
@@ -62,7 +63,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
62
63
|
version: '0'
|
63
64
|
requirements: []
|
64
65
|
rubyforge_project:
|
65
|
-
rubygems_version: 2.6.
|
66
|
+
rubygems_version: 2.6.14
|
66
67
|
signing_key:
|
67
68
|
specification_version: 4
|
68
69
|
summary: Foreman Hammer commands for exporting and importing templates
|