puppetry_toolbox 0.0.2 → 0.0.3

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: d1e7133aa00b73f27c8564ac46c3b8cfbf76cf84
4
- data.tar.gz: 840ef01a982ae1fd48427046c70e828dcb0539a2
3
+ metadata.gz: 728dd6cf900292d60d1ab928de71d2d4ad72779d
4
+ data.tar.gz: c5f205bfd548448e2e28cd8836707f984855f5cc
5
5
  SHA512:
6
- metadata.gz: 248b5fda0e151afacd701d8768817d6fa3d6930dbfc26984ab1a95811af77c300248b667726f644497dc30d88e8d7faabb172c5b3a3a7c73ed478bc00e6bcee5
7
- data.tar.gz: e3ad2da276e305d4fab5711b538e97118cb0c0506869ffd31dda548fc79403595211ab3639fa960460be16103ae4ba53aeac7fc186ebd7d1d2c6f7baf420531e
6
+ metadata.gz: b9215068d3e3b4f80530825be51a9cc3a94300a8ae496d96f7bddfe61e0aa5e83fb110511ba5e04d94572989545fe66ac641eef59ca4d0283ba23b8ee3822988
7
+ data.tar.gz: 128342723db841153416165b5e5f485a0e519c00c174761af2a82a184f51c899c5bd65b0f6bef7693d16f6b2f111c513bf90a9657c59cdc910fcef2eee074582
@@ -0,0 +1,11 @@
1
+ ---
2
+ language: ruby
3
+
4
+ rvm:
5
+ - 1.9.3
6
+ - 2.0.0
7
+
8
+ install: bundle install --path vendor/bundle
9
+
10
+ script:
11
+ - bundle exec rake test:end_to_end
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
1
  source "https://rubygems.org"
2
2
 
3
3
  gemspec
4
+
5
+ gem 'travis'
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
@@ -1,5 +1,9 @@
1
1
  require 'rake/testtask'
2
- require 'bundler/gem_tasks'
2
+ require 'puppetry/version'
3
+
4
+ namespace :gem do
5
+ require 'bundler/gem_tasks'
6
+ end
3
7
 
4
8
  namespace :test do
5
9
  Rake::TestTask.new(:end_to_end) do |t|
@@ -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.rm_rf File.expand_path('.git', name)
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
@@ -1,3 +1,3 @@
1
1
  module Puppetry
2
- Version = VERSION = '0.0.2'.freeze
2
+ Version = VERSION = '0.0.3'.freeze
3
3
  end
@@ -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
@@ -1,3 +1,6 @@
1
+ require 'coveralls'
2
+ Coveralls.wear!
3
+
1
4
  require 'minitest/autorun'
2
5
  require 'minitest/pride'
3
6
  require 'minitest/spec'
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.2
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-20 00:00:00.000000000 Z
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