puppetfile-updater 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YzY1M2M4NDEzYzgyZjQ1NzFmOWNhMzE5MDc1OTczOGI5NzIyNDcxOA==
4
+ Y2FkZjBlNmZjNWM3NTEwYWM0OTY1YTBlZjY4OWUxZjJhOGJhM2Y4Mw==
5
5
  data.tar.gz: !binary |-
6
- OGFlODkwZGIyYTg3M2IxZmY1OTIyNjRmNjA0OTUyY2FiNGViNjRhZQ==
6
+ YTBlYTRlNGU3ZWVlNWZjM2FiMmIyZGEyNGZiYTBjNzQxYjI1NTY1MQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YmQ1MmIxNWFjMWYzZjY3NzcyMjA2MjZkOGZiZGY3NWY2ZjZkZjc1MjdkNTkz
10
- NzQyMmU2MDRhOGZiMjM1ZGQ2MzcyNTU5MDViYTFlYWZhOTFmNDkzMjY3NTUy
11
- MWMzMjE2OWVkZDI0YTQ3YTE4MDczOWM2YjM5NDA1OWU0ZTU5NmE=
9
+ ZTNjOGIxNzc0YTAwYWE4MDlhNDc5ZjQ3MTVlYTYwMTBjYmI3YTFiZjJjOGEz
10
+ ZDk2ZGViMDI4Njk2ZDkyOGE5MThkNGMzODkzMjFlYWIyMTJjNjNkY2E3OWQz
11
+ MWMxNGFlZmNlNTZlMTQ2NTVlZWNkNzQ0ZjkxMjQxMjgwZGZiNTg=
12
12
  data.tar.gz: !binary |-
13
- MDg2ODI4MzZiYzg3OWJlNjkwZmUyM2E5NjM2YzhhMDI4MzBiMjBjZjQyNzY5
14
- ZTA2ODg2M2Q2ZDVlMWZjMjVlYzY5MDZhYjU2NGJmM2VjMjI1MTRiOWJlMzNm
15
- MTU2MjkyODY0ZGQ4N2JmMDZjOGRhNzQwZDA0NDM5ZWFkZTUwMTY=
13
+ MDhjMTQyNDU3YzcyNjc3NjRkZTQ1ODc2MzljZTQyZmEzZGQzOTZhMTUzYjg0
14
+ Nzc0ODE0ZTFhMzgyMzkwYWM0MWRkM2RkNTI2MThhNzIxZTJjOGM1YjUwYzk0
15
+ NzkwMzk5YWVlMDg5NjQwY2Y5OGJlOWE4Njk1YzdjNTVhYzUyN2E=
data/README.md CHANGED
@@ -4,7 +4,6 @@ Puppetfile-updater
4
4
  [![Build Status](https://img.shields.io/travis/camptocamp/puppetfile-updater.svg)](https://travis-ci.org/camptocamp/puppetfile-updater)
5
5
  [![Gem Version](https://img.shields.io/gem/v/puppetfile-updater.svg)](https://rubygems.org/gems/puppetfile-updater)
6
6
  [![Gem Downloads](https://img.shields.io/gem/dt/puppetfile-updater.svg)](https://rubygems.org/gems/puppetfile-updater)
7
- [![Coverage Status](https://img.shields.io/coveralls/camptocamp/puppetfile-updater.svg)](https://coveralls.io/r/camptocamp/puppetfile-updater?branch=master)
8
7
  [![Gemnasium](https://img.shields.io/gemnasium/camptocamp/puppetfile-updater.svg)](https://gemnasium.com/camptocamp/puppetfile-updater)
9
8
 
10
9
  Puppetfile is a cool format, used by [librarian-puppet](https://github.com/rodjek/librarian-puppet) and [r10k](https://github.com/puppetlabs/r10k) to install and maintain collection of Puppet modules.
@@ -0,0 +1,52 @@
1
+ (*
2
+ Module: Puppetfile
3
+ Parses libarian-puppet's Puppetfile format
4
+
5
+ Author: Raphael Pinson <raphael.pinson@camptocamp.com>
6
+
7
+ About: Reference
8
+ See https://github.com/rodjek/librarian-puppet
9
+
10
+ About: License
11
+ This file is licenced under the LGPL v2+, like the rest of Augeas.
12
+
13
+ About: Lens Usage
14
+ To be documented
15
+
16
+ About: Configuration files
17
+ This lens applies to Puppetfiles.
18
+
19
+ About: Examples
20
+ The <Test_Puppetfile> file contains various examples and tests.
21
+ *)
22
+
23
+ module Puppetfile =
24
+
25
+ (* View: comma
26
+ a comma, optionally preceded or followed by spaces or newlines *)
27
+ let comma = del /[ \t\n]*,[ \t\n]*/ ", "
28
+
29
+ (* View: forge
30
+ a forge entry *)
31
+ let forge = [ Util.indent . key "forge" . Sep.space . Quote.any . Util.eol ]
32
+
33
+ (* View: metadata
34
+ a metadata entry *)
35
+ let metadata = [ Util.indent . key "metadata" . Util.eol ]
36
+
37
+ (* View: mod
38
+ a module entry, with optional version and options *)
39
+ let mod =
40
+ let mod_name = Quote.do_quote (store (Rx.word . /[\/-]/ . Rx.word))
41
+ in let version = [ label "@version" . Quote.do_quote (store /[^:\n]+/) ]
42
+ in let opt = [ Util.del_str ":" . key Rx.word . del /[ \t]*=>[ \t]*/ " => "
43
+ . Quote.do_quote (store /[^,\n]*/) ]
44
+ in let opts = Build.opt_list opt comma
45
+ in [ Util.indent . Util.del_str "mod" . seq "mod" . Sep.space . mod_name
46
+ . (comma . version)?
47
+ . (comma . opts)?
48
+ . Util.eol ]
49
+
50
+ (* View: lns
51
+ the Puppetfile lens *)
52
+ let lns = (Util.empty | Util.comment | forge | metadata | mod)*
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puppetfile-updater
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Camptocamp
@@ -76,6 +76,7 @@ extensions: []
76
76
  extra_rdoc_files: []
77
77
  files:
78
78
  - README.md
79
+ - augeas/lenses/puppetfile.aug
79
80
  - lib/puppetfile-updater.rb
80
81
  - lib/puppetfile-updater/task.rb
81
82
  homepage: https://github.com/camptocamp/puppetfile-updater