power_stencil 0.8.13 → 0.9.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +27 -15
- data/doc/faq.md +4 -7
- data/doc/git_integration.md +38 -12
- data/etc/meta_templates/plugin_seed/.gitignore +12 -0
- data/etc/meta_templates/plugin_seed/.gitlab-ci.yml +11 -0
- data/etc/meta_templates/plugin_seed/README.md +20 -5
- data/etc/meta_templates/plugin_seed/etc/plugin_capabilities.yaml +3 -0
- data/etc/meta_templates/plugin_seed/psplugin_{entity}.gemspec +2 -0
- data/etc/meta_templates/plugin_seed/spec/project_helper.rb +50 -0
- data/etc/meta_templates/plugin_seed/spec/spec_helper.rb +2 -1
- data/etc/meta_templates/plugin_seed/spec/{entity}_spec.rb +21 -1
- data/etc/power_stencil.yaml +6 -1
- data/etc/templates/plugin_definition/.gitignore +2 -1
- data/etc/templates/plugin_definition/.gitlab-ci.yml +11 -0
- data/etc/templates/plugin_definition/README.md +20 -5
- data/etc/templates/plugin_definition/etc/plugin_capabilities.yaml +3 -0
- data/etc/templates/plugin_definition/psplugin_{entity}.gemspec +2 -0
- data/etc/templates/plugin_definition/spec/project_helper.rb +50 -0
- data/etc/templates/plugin_definition/spec/spec_helper.rb +2 -1
- data/etc/templates/plugin_definition/spec/{entity}_spec.rb +21 -1
- data/etc/templates/project/.ps_project/versioned-config.yaml +1 -0
- data/etc/templates/zsh_command_line_completion/_power_stencil.sh.erb +18 -8
- data/lib/power_stencil.rb +4 -0
- data/lib/power_stencil/command_processors/adm.rb +29 -1
- data/lib/power_stencil/command_processors/create.rb +14 -4
- data/lib/power_stencil/dsl/completion.rb +37 -0
- data/lib/power_stencil/engine/base.rb +2 -0
- data/lib/power_stencil/engine/directory_processor.rb +20 -1
- data/lib/power_stencil/engine/project_engine.rb +1 -1
- data/lib/power_stencil/engine/renderers/haml.rb +21 -0
- data/lib/power_stencil/initializer.rb +6 -1
- data/lib/power_stencil/plugins/base.rb +0 -1
- data/lib/power_stencil/plugins/capabilities.rb +4 -0
- data/lib/power_stencil/plugins/command_line.rb +3 -1
- data/lib/power_stencil/plugins/require.rb +6 -6
- data/lib/power_stencil/project/base.rb +2 -0
- data/lib/power_stencil/project/plugins.rb +35 -2
- data/lib/power_stencil/ultra_command_line/command_line_manager.rb +35 -0
- data/lib/power_stencil/ultra_command_line/option_definition.rb +5 -0
- data/lib/power_stencil/ultra_command_line/providers_manager.rb +21 -0
- data/lib/power_stencil/ultra_command_line/sub_command.rb +12 -0
- data/lib/power_stencil/utils/completion.rb +19 -9
- data/lib/power_stencil/utils/dependency_solver.rb +19 -0
- data/lib/power_stencil/version.rb +1 -1
- data/power_stencil.gemspec +2 -1
- metadata +35 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c36f08f7b3ad9a916e27a18e755af6794084b97f
|
4
|
+
data.tar.gz: 82104cf2bda5b15f57020b57ccf66b1e95ee241c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d1db8dd8989c9299eea8fe869e527f7c86b93db49353962ecf2620a34614fb143a39b02e12480dd02929c57c5adce19ec53b35754e327e79c9620bff0d1708f
|
7
|
+
data.tar.gz: 8e1377704873ca6d8a8eb69c4ba7e41f3e2a9cb0af77b3c7d06ea5bb5fc3174b72dc3df81140dcbd4cb0c286b21bac3ebc7e15fff4ff44d82e4e08acc5925e31
|
data/README.md
CHANGED
@@ -15,10 +15,10 @@ See [official website][PowerStencil site].
|
|
15
15
|
- [Installation](#installation)
|
16
16
|
- [Usage](#usage)
|
17
17
|
- [Help](#help)
|
18
|
-
- [Command line auto-completion](#command-line-auto-completion)
|
19
|
-
- [Creating a `PowerStencil` project](#creating-a-powerstencil-project)
|
20
|
-
- [`PowerStencil` project structure](#powerstencil-project-structure)
|
21
18
|
- [Getting started](#getting-started)
|
19
|
+
- [Creating a `PowerStencil` project](#creating-a-powerstencil-project)
|
20
|
+
- [`PowerStencil` project structure overview](#powerstencil-project-structure-overview)
|
21
|
+
- [Command line auto-completion](#command-line-auto-completion)
|
22
22
|
- [Entities](#entities)
|
23
23
|
- [Templates](#templates)
|
24
24
|
- [Builds](#builds)
|
@@ -62,11 +62,12 @@ The `PowerStencil` gem provides the `power_stencil` executable which is a plugga
|
|
62
62
|
|
63
63
|
**Actually `PowerStencil` is _not_ a templating engine**. It uses already existing and proven templating engines.
|
64
64
|
|
65
|
-
|
65
|
+
`PowerStenil` currently embeds two templating engines:
|
66
66
|
|
67
|
-
|
67
|
+
* **[ERB] is the default**. This is a pretty standard and very well known engine in the [Ruby] world and especially for people who already used the [Rails] framework. This is a generic templating engine which can handle any use-case. Each template will be processed by default using the [ERB] engine.
|
68
|
+
* When it comes to generate mark-up documents like XML or HTML, many people prefer to use [Haml], as it designed towards generating these kinds of documents and tends to end-up with much clearer templates. Any template whose names ends by `.haml` will be processed by the [Haml] engine by default instead of [ERB].
|
68
69
|
|
69
|
-
So `PowerStencil` is definitely not a templating it is actually much more than that.
|
70
|
+
So `PowerStencil` is definitely not a templating engine, it is actually much more than that. It is a framework to manage your templates, design the relational data you can use in your templates, manage the versioning, define the way you build things etc... Read this documentation (and especially the [getting started](#getting-started) section which is a tutorial in itself).
|
70
71
|
|
71
72
|
|
72
73
|
# Installation
|
@@ -134,17 +135,16 @@ The program uses the standard paradigm of sub-commands (à-la-git), and each can
|
|
134
135
|
|
135
136
|
[Plugins] may bring extra subcommands and/or options, so depending on the project you are working in, the output of `--help` may differ...
|
136
137
|
|
137
|
-
## Command line auto-completion
|
138
138
|
|
139
|
-
`PowerStencil` comes with a command-line auto-completion feature for `zsh`. It is not yet available for `bash`.
|
140
139
|
|
141
|
-
You can install it by running:
|
142
140
|
|
143
|
-
$ power_stencil adm --zsh-completion
|
144
141
|
|
145
|
-
|
142
|
+
## Getting started
|
143
|
+
|
144
|
+
See the following topics as a kind of tutorial on `PowerStencil`. You should read them in order, as each of them assumes you already read the previous one.
|
146
145
|
|
147
|
-
|
146
|
+
|
147
|
+
### Creating a `PowerStencil` project
|
148
148
|
|
149
149
|
To create a new project, use the `init` sub-command. It works as you would expect. If you run it in an existing directory it will create the project here but you can specify the directory where you want the project to be created (the path will be created provided you have enough rights on the filesystem):
|
150
150
|
|
@@ -156,7 +156,7 @@ Once the project created, if you are anywhere within the project tree, you don't
|
|
156
156
|
|
157
157
|
**:information_source: If you have `git` installed on your system, **the repository of the newly created project has been automatically turned into a git repository. And any action done through the `power_stencil` command-line will be automatically tracked by `git`**. Only things you will do outside of the `power_stencil` command-line (adding or modifying templates, creating or modifying entity types... any manual action) will require a user action to make `git` take it in account. You can completely de-activate this behaviour if you want to fully manage things by yourself by adding `:no-git: true` in the `.ps_project/versioned-config.yaml`, yet there is no good reason for that... Unless you know what you are doing, you should keep the default settings. See [Git integration] for further information.
|
158
158
|
|
159
|
-
|
159
|
+
### `PowerStencil` project structure overview
|
160
160
|
|
161
161
|
The structure of a brand new `PowerStencil` project is the following:
|
162
162
|
|
@@ -191,9 +191,21 @@ There is the same mechanism between `.ps_project/entities` (where the project da
|
|
191
191
|
|
192
192
|
The `plugins` directory can optionally contain project specific plugins. Plugins are a great way to extend `PowerStencil` for the needs of a project or organization.
|
193
193
|
|
194
|
-
|
194
|
+
### Command line auto-completion
|
195
|
+
|
196
|
+
`PowerStencil` comes with a powerful command-line auto-completion feature for `zsh`. (It is not yet available for `bash`).
|
197
|
+
|
198
|
+
You can install it by running:
|
199
|
+
|
200
|
+
$ power_stencil adm --zsh-completion
|
201
|
+
|
202
|
+
It provides a very useful auto-completion for sub-commands, options as well as options parameters...
|
203
|
+
|
204
|
+
`PowerStencil` uses a _two-stages_ auto-completion mechanism:
|
205
|
+
|
206
|
+
* Project independent completion is generated in `~/.zsh/completion/_power_stencil`, whereas completion related to new commands or options, coming from plugins used in a project, is generated (and versioned) within the project itself, in `.ps_project/.zsh_project_completion`.
|
195
207
|
|
196
|
-
|
208
|
+
* Meaning that if you want to benefit from the "_full_" completion from within a project you may have to re-run `power_stencil add --zsh-completion` from within any project where you use extra plugins, in order to generate that `.ps_project/.zsh_project_completion` file. If you don't, it is not a big deal, but then you will only have access to the "_generic_" completion, ie completion not taking in account any of the extra commands or options you are using in this project brought by plugins you may use...
|
197
209
|
|
198
210
|
### Entities
|
199
211
|
|
data/doc/faq.md
CHANGED
@@ -72,12 +72,13 @@ I had the opportunity to have access to a Windows VM and tested `PowerStencil`.
|
|
72
72
|
|
73
73
|
# What is the status of `PowerStencil` ?
|
74
74
|
|
75
|
-
`PowerStencil` is still under development, yet **it can already be safely used
|
75
|
+
`PowerStencil` is still considered under development until version `1.0.0` is released, yet **it can already be safely used**, event for production.
|
76
|
+
|
77
|
+
**Since it entered the `0.9.x` version, no new feature should be added**. That branch will be used for statibilisation and anything released there should only be related to bugfixes, and plugin developement. As a bunch of official plugins should be released along with the version `1.0.0`.
|
76
78
|
|
77
79
|
Regarding `PowerStencil` core:
|
78
80
|
|
79
|
-
- The
|
80
|
-
- New system entity types may appear.
|
81
|
+
- The plugin related features may still evole a bit along with first official plugins development, but since both local and gems plugins are supported no big change may arise in the architecture.
|
81
82
|
- The functional documentation is evolving.
|
82
83
|
- There is almost no technical/architectural documentation yet. Read the code...
|
83
84
|
|
@@ -85,10 +86,6 @@ Anyway `PowerStencil` follows the semantic versioning pattern and if incompatibl
|
|
85
86
|
|
86
87
|
There are already some plugins in the pipe. See [example use cases], to get an idea of the first official plugins to come.
|
87
88
|
|
88
|
-
:information_source: Of course, `PowerStencil` is new software and it is expected to evolve with the needs of its users...
|
89
|
-
|
90
|
-
|
91
|
-
|
92
89
|
|
93
90
|
[:back:][Documentation root]
|
94
91
|
<!-- End of Document -->
|
data/doc/git_integration.md
CHANGED
@@ -13,6 +13,7 @@ Git integration
|
|
13
13
|
- [Deleting an entity](#deleting-an-entity)
|
14
14
|
- [`PowerStencil` shell session](#powerstencil-shell-session)
|
15
15
|
- [Plugin creation](#plugin-creation)
|
16
|
+
- [(Re)Generating `zsh` command line completion for the project](#regenerating-zsh-command-line-completion-for-the-project)
|
16
17
|
- [Manual actions](#manual-actions)
|
17
18
|
|
18
19
|
<!-- /TOC -->
|
@@ -36,18 +37,19 @@ Here is a summary:
|
|
36
37
|
|
37
38
|
| `PowerStencil` sub-command | Status |
|
38
39
|
|----------------------------|:------:|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
40
|
+
|`init` | creates a project
|
41
|
+
|`info` | read-only
|
42
|
+
|`plugin` | creates a plugin
|
43
|
+
|`get` | read-only
|
44
|
+
|`shell` | do anything
|
45
|
+
|`adm --zsh-completion` | generates zsh command-line completion
|
46
|
+
|`check` | read-only
|
47
|
+
|`create` | creates entities
|
48
|
+
|`edit` | modifies entities
|
49
|
+
|`delete` | deletes entities
|
50
|
+
|`describe` | read-only
|
51
|
+
|`build` | read-only
|
52
|
+
|
51
53
|
|
52
54
|
On top this we could add some other actions, you can obviously perform manually within the repository, like:
|
53
55
|
|
@@ -306,6 +308,30 @@ Date: Sun Nov 3 19:42:11 2019 +0100
|
|
306
308
|
Cool ! Nevertheless, plugins may be one of the things you may want to track a bit differently. For example as git sub-modules, to keep a separated git history, and ease future re-useability of the plugin you are developing.
|
307
309
|
So it's up to you and `PowerStencil` provides an easy way to keep your plugin out of your project repo. Same as for `power_stencil init`, `power_stencil plugin --create` supports the `--no-git` option...
|
308
310
|
|
311
|
+
## (Re)Generating `zsh` command line completion for the project
|
312
|
+
|
313
|
+
If you generate the zsh command line completion file for the project by doing, from within the project:
|
314
|
+
|
315
|
+
$ power_stencil adm --zsh-completion
|
316
|
+
|
317
|
+
You will then generate a file that contains project-specific zsh completion directives: `.ps_project/.zsh_project_completion`.
|
318
|
+
|
319
|
+
That file is versioned too, because its content depends on the plugins (local or as gems) that you actually use in this project. **If you add a new plugin or modify the way local ones handle the command-line, you should then regenerate it**, by re-running that command if you want the completion to fully take in account your changes.
|
320
|
+
|
321
|
+
It is tracked like that:
|
322
|
+
```
|
323
|
+
$ git log -1 --summary
|
324
|
+
commit 0c7bedb7249654873882c56bb15172c528511cff
|
325
|
+
Author: Joe <joe@outerspace.org>
|
326
|
+
Date: Sun Nov 10 11:21:10 2019 +0100
|
327
|
+
|
328
|
+
Adding project specific zsh completion file: '.ps_project/.zsh_project_completion'.
|
329
|
+
|
330
|
+
create mode 100644 .ps_project/.zsh_project_completion
|
331
|
+
```
|
332
|
+
|
333
|
+
|
334
|
+
|
309
335
|
# Manual actions
|
310
336
|
|
311
337
|
Ok, so far we have a pretty nice git history:
|
@@ -0,0 +1,11 @@
|
|
1
|
+
image: "ruby:2.3"
|
2
|
+
|
3
|
+
before_script:
|
4
|
+
- gem install bundler --no-document
|
5
|
+
- bundle install --jobs $(nproc) "${FLAGS[@]}"
|
6
|
+
- git config --global user.email "noone@nowhere.org"
|
7
|
+
- git config --global user.name "Testman"
|
8
|
+
|
9
|
+
rspec:
|
10
|
+
script:
|
11
|
+
- bundle exec rspec
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<%= plugin_title_name %>
|
3
3
|
<%= '=' * plugin_title_name.size %>
|
4
4
|
|
5
|
-
[![Gem Version](https://badge.fury.io/rb/<%= gem_name %>.svg)](https://rubygems.org/gems/<%= gem_name %>) [![Pipeline status](https://gitlab.com/tools4devops/psplugins/<%=
|
5
|
+
[![Gem Version](https://badge.fury.io/rb/<%= gem_name %>.svg)](https://rubygems.org/gems/<%= gem_name %>) [![Pipeline status](https://gitlab.com/tools4devops/psplugins/<%= plugin_name %>/badges/master/pipeline.svg)](https://gitlab.com/tools4devops/psplugins/<%= gem_name %>/commits/master)
|
6
6
|
|
7
7
|
[PowerStencil] is the Swiss-army knife templating workflow for developers and ops.
|
8
8
|
|
@@ -16,6 +16,9 @@ See [official website][PowerStencil site].
|
|
16
16
|
- [What is a PowerStencil plugin ?](#what-is-a-powerstencil-plugin-)
|
17
17
|
- [Using this plugin in your `PowerStencil` projects](#using-this-plugin-in-your-powerstencil-projects)
|
18
18
|
- [Goal of this plugin](#goal-of-this-plugin)
|
19
|
+
- [Plugin dependencies](#plugin-dependencies)
|
20
|
+
- [Standard gems dependencies](#standard-gems-dependencies)
|
21
|
+
- [Dependency to other plugins](#dependency-to-other-plugins)
|
19
22
|
- [Plugin capabilities](#plugin-capabilities)
|
20
23
|
- [Config](#config)
|
21
24
|
- [Subcommands and options](#subcommands-and-options)
|
@@ -66,9 +69,22 @@ And then you may see information about the plugin by running:
|
|
66
69
|
* `power_stencil info` in the plugins section.
|
67
70
|
* `power_stencil plugin --list -v`
|
68
71
|
|
69
|
-
#
|
72
|
+
# Goal of this plugin
|
70
73
|
|
71
|
-
#
|
74
|
+
# Plugin dependencies
|
75
|
+
|
76
|
+
## Standard gems dependencies
|
77
|
+
|
78
|
+
Standard dependencies are declared normally in the _gemspec file_. They are automatically installed when installing the plugin with `power_stencil plugin --install`.
|
79
|
+
|
80
|
+
## Dependency to other plugins
|
81
|
+
|
82
|
+
For development purpose, dependency to other plugins are declared in the _gemspec file_ as _development dependency_.
|
83
|
+
|
84
|
+
But within a project, dependencies have to be added to the `:project_plugins` array in the project configuration file (`.ps_project/versioned-config.yaml`).
|
85
|
+
|
86
|
+
|
87
|
+
# Plugin capabilities
|
72
88
|
|
73
89
|
This plugin provides the following features:
|
74
90
|
|
@@ -78,13 +94,12 @@ This plugin provides the following features:
|
|
78
94
|
|
79
95
|
## Post-build actions
|
80
96
|
|
81
|
-
##
|
97
|
+
## DSL in templates and in `power_stencil shell`
|
82
98
|
|
83
99
|
## Entity types
|
84
100
|
|
85
101
|
## Templates-templates
|
86
102
|
|
87
|
-
|
88
103
|
# Contributing
|
89
104
|
|
90
105
|
Bug reports and pull requests are welcome on Gitlab at https://gitlab.com/tools4devops/psplugins/<%= plugin_name %>/issues. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
@@ -11,6 +11,8 @@ Gem::Specification.new do |spec|
|
|
11
11
|
|
12
12
|
spec.summary = %q{<%= plugin_name %> is a plugin for the PowerStencil framework.}
|
13
13
|
spec.description = %q{TODO: Write a longer description or delete this line.}
|
14
|
+
# For official plugins
|
15
|
+
# spec.homepage = "https://powerstencil.brizone.org/#plugins"
|
14
16
|
spec.homepage = "TODO: Put your gem's website or public repo URL here."
|
15
17
|
spec.license = 'MIT'
|
16
18
|
|
@@ -0,0 +1,50 @@
|
|
1
|
+
module PowerStencilTests
|
2
|
+
|
3
|
+
module Project
|
4
|
+
|
5
|
+
TEMP_DIR_PREFIX = 'PS_TESTS_'
|
6
|
+
|
7
|
+
module ClassMethods
|
8
|
+
|
9
|
+
|
10
|
+
def temporary_project(project_name, with_git_support: false, scope: :all)
|
11
|
+
self.instance_eval do
|
12
|
+
puts scope
|
13
|
+
around(scope) do |execution|
|
14
|
+
Dir.mktmpdir(TEMP_DIR_PREFIX) do |tests_root_dir|
|
15
|
+
tmp_project_path = File.join tests_root_dir, project_name
|
16
|
+
create_project_including_this_plugin tmp_project_path, with_git_support: with_git_support
|
17
|
+
execution.run
|
18
|
+
@tmp_project_path = nil
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
def plugin_path
|
25
|
+
File.expand_path File.join('..', '..'), __FILE__
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
|
30
|
+
attr_reader :tmp_project_path
|
31
|
+
|
32
|
+
def self.included(base)
|
33
|
+
base.extend(ClassMethods)
|
34
|
+
end
|
35
|
+
|
36
|
+
def create_project_including_this_plugin(project_path, with_git_support: false)
|
37
|
+
cmd = "power_stencil init --project-path '#{project_path}'"
|
38
|
+
cmd << ' --no-git' unless with_git_support
|
39
|
+
`#{cmd}`
|
40
|
+
project_plugin_path = File.join project_path, '.ps_project', 'plugins'
|
41
|
+
`ln -s '#{self.class.plugin_path}' '#{project_plugin_path}'`
|
42
|
+
@tmp_project_path = project_path
|
43
|
+
end
|
44
|
+
|
45
|
+
def temporary_project_cmd(params)
|
46
|
+
"power_stencil #{params} --project-path '#{tmp_project_path}'"
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
50
|
+
end
|
@@ -1,10 +1,30 @@
|
|
1
1
|
RSpec.describe <%= plugin_module_name %> do
|
2
|
+
|
3
|
+
include PowerStencilTests::Project
|
4
|
+
temporary_project 'test_project', scope: :all
|
5
|
+
|
6
|
+
let(:plugin_list) { 'plugin --list' }
|
7
|
+
let(:test_entity) { '<%= plugin_name %>_entity/test_<%= plugin_name %>' }
|
8
|
+
let(:create_<%= plugin_name %>) { "create #{test_entity}" }
|
9
|
+
let(:get_<%= plugin_name %>) { "get #{test_entity}" }
|
10
|
+
|
2
11
|
it 'has a version number' do
|
3
12
|
expect(<%= plugin_module_name %>::VERSION).not_to be nil
|
4
13
|
end
|
5
14
|
|
6
|
-
it '
|
15
|
+
it 'should add a "<%= plugin_name %>" sub-command' do
|
16
|
+
expect(`#{temporary_project_cmd plugin_list}`).to match '- <%= plugin_name %>'
|
17
|
+
end
|
18
|
+
|
19
|
+
it 'should be possible to create a "<%= plugin_name %>_entity"' do
|
20
|
+
`#{temporary_project_cmd create_<%= plugin_name %>}`
|
21
|
+
expect($?.success?).to be_truthy
|
22
|
+
expect(`#{temporary_project_cmd get_<%= plugin_name %>}`).not_to be_empty
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'should do something useful' do
|
7
26
|
pending 'Tests implementation'
|
8
27
|
RSpec.fail
|
9
28
|
end
|
29
|
+
|
10
30
|
end
|
data/etc/power_stencil.yaml
CHANGED
@@ -72,7 +72,9 @@
|
|
72
72
|
# Map to define which kind of template engine for which type of file. Be careful if you
|
73
73
|
# overlap two definitions. Warning, it is ruby Regex not shell pattern !
|
74
74
|
:templating_engines_map:
|
75
|
-
#
|
75
|
+
# Haml for .haml files
|
76
|
+
:haml: '\.haml$'
|
77
|
+
# All the rest with ERB
|
76
78
|
:erb: '.*'
|
77
79
|
|
78
80
|
# Files matching particular patterns can be changed on the fly
|
@@ -82,6 +84,8 @@
|
|
82
84
|
^(.+)\.zzzgitignore\.erb$: '\1.gitignore'
|
83
85
|
# Erb files
|
84
86
|
^(.+)\.erb$: '\1'
|
87
|
+
# Haml files
|
88
|
+
^(.+)\.haml$: '\1'
|
85
89
|
|
86
90
|
|
87
91
|
# PLUGINS
|
@@ -110,6 +114,7 @@
|
|
110
114
|
:completion_target:
|
111
115
|
:zsh:
|
112
116
|
:completion_dir: ~/.zsh/completion
|
117
|
+
:project_completion_filename: .zsh_project_completion
|
113
118
|
|
114
119
|
|
115
120
|
|
@@ -0,0 +1,11 @@
|
|
1
|
+
image: "ruby:2.3"
|
2
|
+
|
3
|
+
before_script:
|
4
|
+
- gem install bundler --no-document
|
5
|
+
- bundle install --jobs $(nproc) "${FLAGS[@]}"
|
6
|
+
- git config --global user.email "noone@nowhere.org"
|
7
|
+
- git config --global user.name "Testman"
|
8
|
+
|
9
|
+
rspec:
|
10
|
+
script:
|
11
|
+
- bundle exec rspec
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<%= plugin_title_name %>
|
3
3
|
<%= '=' * plugin_title_name.size %>
|
4
4
|
|
5
|
-
[![Gem Version](https://badge.fury.io/rb/<%= gem_name %>.svg)](https://rubygems.org/gems/<%= gem_name %>) [![Pipeline status](https://gitlab.com/tools4devops/psplugins/<%=
|
5
|
+
[![Gem Version](https://badge.fury.io/rb/<%= gem_name %>.svg)](https://rubygems.org/gems/<%= gem_name %>) [![Pipeline status](https://gitlab.com/tools4devops/psplugins/<%= plugin_name %>/badges/master/pipeline.svg)](https://gitlab.com/tools4devops/psplugins/<%= gem_name %>/commits/master)
|
6
6
|
|
7
7
|
[PowerStencil] is the Swiss-army knife templating workflow for developers and ops.
|
8
8
|
|
@@ -16,6 +16,9 @@ See [official website][PowerStencil site].
|
|
16
16
|
- [What is a PowerStencil plugin ?](#what-is-a-powerstencil-plugin-)
|
17
17
|
- [Using this plugin in your `PowerStencil` projects](#using-this-plugin-in-your-powerstencil-projects)
|
18
18
|
- [Goal of this plugin](#goal-of-this-plugin)
|
19
|
+
- [Plugin dependencies](#plugin-dependencies)
|
20
|
+
- [Standard gems dependencies](#standard-gems-dependencies)
|
21
|
+
- [Dependency to other plugins](#dependency-to-other-plugins)
|
19
22
|
- [Plugin capabilities](#plugin-capabilities)
|
20
23
|
- [Config](#config)
|
21
24
|
- [Subcommands and options](#subcommands-and-options)
|
@@ -66,9 +69,22 @@ And then you may see information about the plugin by running:
|
|
66
69
|
* `power_stencil info` in the plugins section.
|
67
70
|
* `power_stencil plugin --list -v`
|
68
71
|
|
69
|
-
#
|
72
|
+
# Goal of this plugin
|
70
73
|
|
71
|
-
#
|
74
|
+
# Plugin dependencies
|
75
|
+
|
76
|
+
## Standard gems dependencies
|
77
|
+
|
78
|
+
Standard dependencies are declared normally in the _gemspec file_. They are automatically installed when installing the plugin with `power_stencil plugin --install`.
|
79
|
+
|
80
|
+
## Dependency to other plugins
|
81
|
+
|
82
|
+
For development purpose, dependency to other plugins are declared in the _gemspec file_ as _development dependency_.
|
83
|
+
|
84
|
+
But within a project, dependencies have to be added to the `:project_plugins` array in the project configuration file (`.ps_project/versioned-config.yaml`).
|
85
|
+
|
86
|
+
|
87
|
+
# Plugin capabilities
|
72
88
|
|
73
89
|
This plugin provides the following features:
|
74
90
|
|
@@ -78,13 +94,12 @@ This plugin provides the following features:
|
|
78
94
|
|
79
95
|
## Post-build actions
|
80
96
|
|
81
|
-
##
|
97
|
+
## DSL in templates and in `power_stencil shell`
|
82
98
|
|
83
99
|
## Entity types
|
84
100
|
|
85
101
|
## Templates-templates
|
86
102
|
|
87
|
-
|
88
103
|
# Contributing
|
89
104
|
|
90
105
|
Bug reports and pull requests are welcome on Gitlab at https://gitlab.com/tools4devops/psplugins/<%= plugin_name %>/issues. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|