puppetry_toolbox 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +11 -0
- data/Gemfile +2 -0
- data/README.md +35 -0
- data/Rakefile +5 -1
- data/lib/puppetry/cli.rb +6 -1
- data/lib/puppetry/version.rb +1 -1
- data/puppetry.gemspec +2 -0
- data/test/end_to_end/puppetry_test.rb +10 -0
- data/test/test_helper.rb +3 -0
- metadata +31 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 728dd6cf900292d60d1ab928de71d2d4ad72779d
|
4
|
+
data.tar.gz: c5f205bfd548448e2e28cd8836707f984855f5cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9215068d3e3b4f80530825be51a9cc3a94300a8ae496d96f7bddfe61e0aa5e83fb110511ba5e04d94572989545fe66ac641eef59ca4d0283ba23b8ee3822988
|
7
|
+
data.tar.gz: 128342723db841153416165b5e5f485a0e519c00c174761af2a82a184f51c899c5bd65b0f6bef7693d16f6b2f111c513bf90a9657c59cdc910fcef2eee074582
|
data/.travis.yml
ADDED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,2 +1,37 @@
|
|
1
1
|
# Puppetry
|
2
2
|
|
3
|
+
## Project Status
|
4
|
+
[![Gem Version](https://badge.fury.io/rb/puppetry_toolbox.png)](http://badge.fury.io/rb/puppetry_toolbox)
|
5
|
+
[![Build Status](https://travis-ci.org/stefanozanella/puppetry.png?branch=master)](https://travis-ci.org/stefanozanella/puppetry)
|
6
|
+
[![Code Climate](https://codeclimate.com/github/stefanozanella/puppetry.png)](https://codeclimate.com/github/stefanozanella/puppetry)
|
7
|
+
[![Coverage Status](https://coveralls.io/repos/stefanozanella/puppetry/badge.png?branch=master)](https://coveralls.io/r/stefanozanella/puppetry?branch=master)
|
8
|
+
## Installation
|
9
|
+
Puppetry is currently shipped as a gem, so you just need to install it with:
|
10
|
+
~~~
|
11
|
+
$ gem install puppetry_toolbox
|
12
|
+
~~~
|
13
|
+
or, if you're using Bundler, set the following dependency line in your
|
14
|
+
`Gemfile`:
|
15
|
+
~~~
|
16
|
+
gem 'puppetry_toolbox'
|
17
|
+
~~~
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
Puppetry can help you with the development of a Puppet module in many ways.
|
21
|
+
Let's look at each of them.
|
22
|
+
|
23
|
+
### Starting a new module
|
24
|
+
If you're to start development of a new module, you'll find that you need to
|
25
|
+
at least setup a proper directory structure. If you're going to test your
|
26
|
+
Puppet code (you **ARE** testing your Puppet code, aren't you?), you'll also
|
27
|
+
need to setup your project dependencies, test helper file, load path, etc.
|
28
|
+
Since this is almost all repeatable stuff, Puppetry ships with a command to
|
29
|
+
generate the scaffolding for a new module.
|
30
|
+
|
31
|
+
Let's pretend you want to start working on the `my_nice_module` module; then you just need to:
|
32
|
+
~~~
|
33
|
+
puppetry new my_nice_module
|
34
|
+
~~~
|
35
|
+
This will generate a `my_nice_module` subdirectory in the current working
|
36
|
+
directory. This directory will contain everything you need to start developing
|
37
|
+
your new module.
|
data/Rakefile
CHANGED
data/lib/puppetry/cli.rb
CHANGED
@@ -15,7 +15,12 @@ module Puppetry
|
|
15
15
|
Grit::Git.new(name).clone({}, "git://github.com/stefanozanella/puppet-skeleton", name)
|
16
16
|
# This looks rather rough, but maybe it's the simplest way to erase all
|
17
17
|
# git history from the folder?
|
18
|
-
FileUtils.
|
18
|
+
FileUtils.cd name do
|
19
|
+
FileUtils.rm_rf File.expand_path('.git', '.')
|
20
|
+
Bundler.with_clean_env do
|
21
|
+
system "bundle install --path vendor/bundle"
|
22
|
+
end
|
23
|
+
end
|
19
24
|
end
|
20
25
|
end
|
21
26
|
end
|
data/lib/puppetry/version.rb
CHANGED
data/puppetry.gemspec
CHANGED
@@ -20,7 +20,9 @@ Gem::Specification.new do |s|
|
|
20
20
|
s.add_runtime_dependency "thor"
|
21
21
|
s.add_runtime_dependency "grit"
|
22
22
|
|
23
|
+
s.add_development_dependency "rake"
|
23
24
|
s.add_development_dependency "minitest"
|
25
|
+
s.add_development_dependency "coveralls"
|
24
26
|
|
25
27
|
s.description = %s{
|
26
28
|
Puppetry is a command line tool that aims at easing and uniforming
|
@@ -36,5 +36,15 @@ describe "puppetry" do
|
|
36
36
|
end
|
37
37
|
end
|
38
38
|
end
|
39
|
+
|
40
|
+
it "runs bundler to install deps after folder initialization" do
|
41
|
+
Dir.mktmpdir do |dir|
|
42
|
+
FileUtils.cd(dir) do
|
43
|
+
Puppetry::CLI.start(["new", "test_module_setup"])
|
44
|
+
|
45
|
+
assert Dir.entries("test_module_setup").must_include ".bundle"
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
39
49
|
end
|
40
50
|
end
|
data/test/test_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puppetry_toolbox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefano Zanella
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-05-
|
11
|
+
date: 2013-05-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: minitest
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -52,6 +66,20 @@ dependencies:
|
|
52
66
|
- - '>='
|
53
67
|
- !ruby/object:Gem::Version
|
54
68
|
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: coveralls
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
55
83
|
description: "\n Puppetry is a command line tool that aims at easing and uniforming\n
|
56
84
|
\ development of Puppet modules, by performing common tasks such as setting\n
|
57
85
|
\ up a new module source folder starting from a skeleton containing the\n proper
|
@@ -66,6 +94,7 @@ extra_rdoc_files:
|
|
66
94
|
files:
|
67
95
|
- .gitignore
|
68
96
|
- .ruby-version
|
97
|
+
- .travis.yml
|
69
98
|
- Gemfile
|
70
99
|
- README.md
|
71
100
|
- Rakefile
|