finger-puppet 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. data/.gitignore +1 -0
  2. data/Gemfile +4 -0
  3. data/Gemfile.lock +34 -0
  4. data/LICENSE +165 -0
  5. data/README.md +138 -0
  6. data/Rakefile +1 -0
  7. data/bin/finger-puppet +30 -0
  8. data/features/finger-puppet.feature +184 -0
  9. data/features/step_definitions/finger-puppet_steps.rb +149 -0
  10. data/features/support/env.rb +11 -0
  11. data/features/support/repos/simple/Gemfile +5 -0
  12. data/features/support/repos/simple/manifests/nodes/.stub +0 -0
  13. data/features/support/repos/simple/manifests/site.pp +1 -0
  14. data/features/support/repos/simple/modules/test/manifests/init.pp +5 -0
  15. data/features/support/repos/simple/var/.stub +0 -0
  16. data/features/support/repos/simple/var/reports/.stub +0 -0
  17. data/features/support/repos/simple_26/manifests/nodes/.stub +0 -0
  18. data/features/support/repos/simple_26/manifests/site.pp +1 -0
  19. data/features/support/repos/simple_26/modules/test/files/checkout +0 -0
  20. data/features/support/repos/simple_26/modules/test/manifests/init.pp +5 -0
  21. data/features/support/repos/simple_26/var/.stub +0 -0
  22. data/features/support/repos/simple_26/var/reports/.stub +0 -0
  23. data/finger-puppet.gemspec +25 -0
  24. data/lib/finger-puppet.rb +204 -0
  25. data/lib/generators/git/description +1 -0
  26. data/lib/generators/git/hooks/pre-commit +29 -0
  27. data/lib/generators/git/hooks/pre-receive +0 -0
  28. data/lib/generators/git/info/exclude +6 -0
  29. data/lib/generators/puppet/.gitignore +2 -0
  30. data/lib/generators/puppet/Gemfile +6 -0
  31. data/lib/generators/puppet/README.md +27 -0
  32. data/lib/generators/puppet/etc/puppet.conf +2 -0
  33. data/lib/generators/puppet/manifests/nodes.pp +1 -0
  34. data/lib/generators/puppet/manifests/site.pp +8 -0
  35. data/lib/generators/puppet/modules/.gitkeep +0 -0
  36. data/lib/generators/puppet/var/.gitkeep +0 -0
  37. data/lib/generators/puppet/vendor/.gitkeep +0 -0
  38. data/man/finger-puppet.1 +328 -0
  39. data/man/finger-puppet.1.html +308 -0
  40. data/man/finger-puppet.1.ronn +214 -0
  41. metadata +178 -0
data/.gitignore ADDED
@@ -0,0 +1 @@
1
+ pkg/*
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in finger-puppet.gemspec
4
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,34 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ finger-puppet (0.3)
5
+ bundler
6
+ thor
7
+
8
+ GEM
9
+ remote: http://rubygems.org/
10
+ specs:
11
+ builder (3.0.0)
12
+ cucumber (0.10.2)
13
+ builder (>= 2.1.2)
14
+ diff-lcs (>= 1.1.2)
15
+ gherkin (>= 2.3.5)
16
+ json (>= 1.4.6)
17
+ term-ansicolor (>= 1.0.5)
18
+ diff-lcs (1.1.2)
19
+ facter (1.5.7)
20
+ gherkin (2.3.5)
21
+ json (>= 1.4.6)
22
+ json (1.5.1)
23
+ puppet (2.6.0)
24
+ facter (>= 1.5.1)
25
+ term-ansicolor (1.0.5)
26
+ thor (0.13.4)
27
+
28
+ PLATFORMS
29
+ ruby
30
+
31
+ DEPENDENCIES
32
+ cucumber
33
+ puppet
34
+ finger-puppet!
data/LICENSE ADDED
@@ -0,0 +1,165 @@
1
+ GNU LESSER GENERAL PUBLIC LICENSE
2
+ Version 3, 29 June 2007
3
+
4
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
5
+ Everyone is permitted to copy and distribute verbatim copies
6
+ of this license document, but changing it is not allowed.
7
+
8
+
9
+ This version of the GNU Lesser General Public License incorporates
10
+ the terms and conditions of version 3 of the GNU General Public
11
+ License, supplemented by the additional permissions listed below.
12
+
13
+ 0. Additional Definitions.
14
+
15
+ As used herein, "this License" refers to version 3 of the GNU Lesser
16
+ General Public License, and the "GNU GPL" refers to version 3 of the GNU
17
+ General Public License.
18
+
19
+ "The Library" refers to a covered work governed by this License,
20
+ other than an Application or a Combined Work as defined below.
21
+
22
+ An "Application" is any work that makes use of an interface provided
23
+ by the Library, but which is not otherwise based on the Library.
24
+ Defining a subclass of a class defined by the Library is deemed a mode
25
+ of using an interface provided by the Library.
26
+
27
+ A "Combined Work" is a work produced by combining or linking an
28
+ Application with the Library. The particular version of the Library
29
+ with which the Combined Work was made is also called the "Linked
30
+ Version".
31
+
32
+ The "Minimal Corresponding Source" for a Combined Work means the
33
+ Corresponding Source for the Combined Work, excluding any source code
34
+ for portions of the Combined Work that, considered in isolation, are
35
+ based on the Application, and not on the Linked Version.
36
+
37
+ The "Corresponding Application Code" for a Combined Work means the
38
+ object code and/or source code for the Application, including any data
39
+ and utility programs needed for reproducing the Combined Work from the
40
+ Application, but excluding the System Libraries of the Combined Work.
41
+
42
+ 1. Exception to Section 3 of the GNU GPL.
43
+
44
+ You may convey a covered work under sections 3 and 4 of this License
45
+ without being bound by section 3 of the GNU GPL.
46
+
47
+ 2. Conveying Modified Versions.
48
+
49
+ If you modify a copy of the Library, and, in your modifications, a
50
+ facility refers to a function or data to be supplied by an Application
51
+ that uses the facility (other than as an argument passed when the
52
+ facility is invoked), then you may convey a copy of the modified
53
+ version:
54
+
55
+ a) under this License, provided that you make a good faith effort to
56
+ ensure that, in the event an Application does not supply the
57
+ function or data, the facility still operates, and performs
58
+ whatever part of its purpose remains meaningful, or
59
+
60
+ b) under the GNU GPL, with none of the additional permissions of
61
+ this License applicable to that copy.
62
+
63
+ 3. Object Code Incorporating Material from Library Header Files.
64
+
65
+ The object code form of an Application may incorporate material from
66
+ a header file that is part of the Library. You may convey such object
67
+ code under terms of your choice, provided that, if the incorporated
68
+ material is not limited to numerical parameters, data structure
69
+ layouts and accessors, or small macros, inline functions and templates
70
+ (ten or fewer lines in length), you do both of the following:
71
+
72
+ a) Give prominent notice with each copy of the object code that the
73
+ Library is used in it and that the Library and its use are
74
+ covered by this License.
75
+
76
+ b) Accompany the object code with a copy of the GNU GPL and this license
77
+ document.
78
+
79
+ 4. Combined Works.
80
+
81
+ You may convey a Combined Work under terms of your choice that,
82
+ taken together, effectively do not restrict modification of the
83
+ portions of the Library contained in the Combined Work and reverse
84
+ engineering for debugging such modifications, if you also do each of
85
+ the following:
86
+
87
+ a) Give prominent notice with each copy of the Combined Work that
88
+ the Library is used in it and that the Library and its use are
89
+ covered by this License.
90
+
91
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
92
+ document.
93
+
94
+ c) For a Combined Work that displays copyright notices during
95
+ execution, include the copyright notice for the Library among
96
+ these notices, as well as a reference directing the user to the
97
+ copies of the GNU GPL and this license document.
98
+
99
+ d) Do one of the following:
100
+
101
+ 0) Convey the Minimal Corresponding Source under the terms of this
102
+ License, and the Corresponding Application Code in a form
103
+ suitable for, and under terms that permit, the user to
104
+ recombine or relink the Application with a modified version of
105
+ the Linked Version to produce a modified Combined Work, in the
106
+ manner specified by section 6 of the GNU GPL for conveying
107
+ Corresponding Source.
108
+
109
+ 1) Use a suitable shared library mechanism for linking with the
110
+ Library. A suitable mechanism is one that (a) uses at run time
111
+ a copy of the Library already present on the user's computer
112
+ system, and (b) will operate properly with a modified version
113
+ of the Library that is interface-compatible with the Linked
114
+ Version.
115
+
116
+ e) Provide Installation Information, but only if you would otherwise
117
+ be required to provide such information under section 6 of the
118
+ GNU GPL, and only to the extent that such information is
119
+ necessary to install and execute a modified version of the
120
+ Combined Work produced by recombining or relinking the
121
+ Application with a modified version of the Linked Version. (If
122
+ you use option 4d0, the Installation Information must accompany
123
+ the Minimal Corresponding Source and Corresponding Application
124
+ Code. If you use option 4d1, you must provide the Installation
125
+ Information in the manner specified by section 6 of the GNU GPL
126
+ for conveying Corresponding Source.)
127
+
128
+ 5. Combined Libraries.
129
+
130
+ You may place library facilities that are a work based on the
131
+ Library side by side in a single library together with other library
132
+ facilities that are not Applications and are not covered by this
133
+ License, and convey such a combined library under terms of your
134
+ choice, if you do both of the following:
135
+
136
+ a) Accompany the combined library with a copy of the same work based
137
+ on the Library, uncombined with any other library facilities,
138
+ conveyed under the terms of this License.
139
+
140
+ b) Give prominent notice with the combined library that part of it
141
+ is a work based on the Library, and explaining where to find the
142
+ accompanying uncombined form of the same work.
143
+
144
+ 6. Revised Versions of the GNU Lesser General Public License.
145
+
146
+ The Free Software Foundation may publish revised and/or new versions
147
+ of the GNU Lesser General Public License from time to time. Such new
148
+ versions will be similar in spirit to the present version, but may
149
+ differ in detail to address new problems or concerns.
150
+
151
+ Each version is given a distinguishing version number. If the
152
+ Library as you received it specifies that a certain numbered version
153
+ of the GNU Lesser General Public License "or any later version"
154
+ applies to it, you have the option of following the terms and
155
+ conditions either of that published version or of any later version
156
+ published by the Free Software Foundation. If the Library as you
157
+ received it does not specify a version number of the GNU Lesser
158
+ General Public License, you may choose any version of the GNU Lesser
159
+ General Public License ever published by the Free Software Foundation.
160
+
161
+ If the Library as you received it specifies that a proxy can decide
162
+ whether future versions of the GNU Lesser General Public License shall
163
+ apply, that proxy's public statement of acceptance of any version is
164
+ permanent authorization for you to choose that version for the
165
+ Library.
data/README.md ADDED
@@ -0,0 +1,138 @@
1
+ finger-puppet
2
+ ====
3
+
4
+ finger-puppet helps you run Puppet locally against a Git checkout.
5
+
6
+ finger-puppet encourages a Puppet workflow where you quickly + iteratively develop your
7
+ Puppet manifests on a single machine, then push your changes up to a repository
8
+ to deploy to the rest of your infrastructure.
9
+
10
+ This workflow also complements a Capistrano or MCollective-style deployment,
11
+ where you remotely instruct finger-puppet to check out a copy of the latest manifests
12
+ and run them.
13
+
14
+ finger-puppet also has the ability to freeze Puppet in to the manifests repository,
15
+ letting you quickly test different versions of Puppet without waiting for
16
+ packages to appear, and reducing the dependencies on a system to run Puppet
17
+ down to just Ruby and git.
18
+
19
+ This is originally forked from the the work of rump by railsmachine, my rationale for
20
+ renaming and re-releasing was because it had become overly burdensome to manually build
21
+ the gem on each system i was going to do an intitial deploy with from git, and had no
22
+ feedback despite asking for a new version of the gem to get pushed, original source code
23
+ here: https://github.com/railsmachine/rump
24
+
25
+ Installing
26
+ ----------
27
+
28
+ $ gem install finger-puppet
29
+
30
+ Using finger-puppet
31
+ ----------
32
+
33
+ Make sure you check out the [man pages](finger-puppet/blob/master/man/finger-puppet.1.ronn).
34
+
35
+ Check out your repository of Puppet manifests:
36
+
37
+ $ finger-puppet clone git@github.com:me_at_example_dot_org/puppet.git
38
+
39
+ Now `cd` into the directory, and do a Puppet run:
40
+
41
+ $ sudo finger-puppet go
42
+
43
+ When you make changes, run Puppet through finger-puppet:
44
+
45
+ $ sudo finger-puppet go
46
+
47
+ You can append options you'd normally pass to the `puppet` command at the end
48
+ of `finger-puppet go`:
49
+
50
+ $ sudo finger-puppet go --verbose --debug --noop
51
+
52
+ There's nothing stopping you from running finger-puppet against different checkouts/branches
53
+ of manifests. This is especially powerful when developing locally with the following
54
+ workflow:
55
+
56
+ 1. `finger-puppet clone git@github.com:me_at_example_dot_org/puppet.git`
57
+ 2. `finger-puppet go`
58
+ 3. `cd puppet && git checkout -b new_feature`
59
+ 4. Make your changes &amp;&amp; `finger-puppet go --noop` to see what will change.
60
+ 5. Apply the changes with `finger-puppet go`
61
+ 6. *Iterate until everything's working*
62
+ 7. `git checkout master && git merge new_feature`
63
+ 8. `git push`
64
+
65
+ Freezing Puppet
66
+ ---------------
67
+
68
+ Alternatively, if you want to live on the bleeding edge and eschew your
69
+ distribution's packages, you can run finger-puppet entirely from RubyGems or Git. This
70
+ gives you a whole bunch of advantages:
71
+
72
+ * You only need Ruby installed on your system to run Puppet
73
+ * A checkout of your manifests also gives you Puppet
74
+ * Bind your manifests to a particular version of Puppet
75
+ * Test your manifests against new versions of Puppet in a separate branch
76
+ * Manage upgrades of Puppet outside your operating system's release cycle
77
+
78
+ You can freeze Puppet and it's dependencies very easily:
79
+
80
+ $ finger-puppet freeze
81
+
82
+ This will freeze Puppet + Facter under `vendor/`, using Bundler.
83
+
84
+ When you run `finger-puppet go`, finger-puppet checks whether you have frozen Puppet + Facter, and
85
+ runs the frozen Puppet if available.
86
+
87
+ You can manage the versions of Puppet you want frozen using the `Gemfile` at
88
+ the root of your project. To use a specific version of Puppet, edit your
89
+ `Gemfile`:
90
+
91
+ ```ruby
92
+ source :rubygems
93
+
94
+ gem "puppet", "2.6.4"
95
+ ```
96
+
97
+ If you want to live on the bleeding edge, you can run Puppet out of git:
98
+
99
+ ```ruby
100
+ source :rubygems
101
+
102
+ gem "puppet", "2.6.7", :git => "git://github.com/puppetlabs/puppet.git", :tag => "2.7.0rc1"
103
+ gem "facter", "1.5.8", :git => "git://github.com/puppetlabs/facter.git", :tag => "1.5.9rc5"
104
+ ```
105
+
106
+ Any dependency you bundle will automatically be added to the load path when you
107
+ run `finger-puppet go`.
108
+
109
+ Developing + Testing finger-puppet
110
+ -------------------------
111
+
112
+ Check out the repository, and run `bundle install` to suck down all the
113
+ required development dependencies.
114
+
115
+ There's a suite of Cucumber tests to fully exercise finger-puppet in `features/`:
116
+
117
+ $ cucumber features/
118
+
119
+ The scenarios are tagged with `@offline` and `@online`, depending on whether
120
+ the test requires internet connectivity. Run all but `@online` tests with:
121
+
122
+ $ cucumber --tags ~@online features/
123
+
124
+ Quirks
125
+ ------
126
+
127
+ 1. Puppet's fileserver (`source => "puppet:///..."` on File resources) doesn't
128
+ behave as expected on Puppet < 2.6. If you are using Puppet < 2.6, all files
129
+ need to be templates.
130
+
131
+ 2. Manifests need to be in modules so Puppet can pick them up correctly.
132
+
133
+ License
134
+ -------
135
+
136
+ Original Copyright Rails Machine LLC 2010-2011, released under the LGPL.
137
+ Copyright Somerset Technical Solutions LTD 2011 released under the LGPL.
138
+ See [LICENSE](finger-puppet/blob/master/LICENSE) for more info.
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require 'bundler/gem_tasks'
data/bin/finger-puppet ADDED
@@ -0,0 +1,30 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'pathname'
4
+
5
+ # Show the man page
6
+ if ARGV.any? {|arg| arg =~ /help|--help|-h/}
7
+ root = Pathname.new(File.dirname(__FILE__)).parent.expand_path
8
+ command = "man #{root + 'man' + 'rump.1'}"
9
+ exec(command)
10
+ end
11
+
12
+ # If we are running from the root of a Rump/Puppet repo, load the bundled rump.
13
+ rump_binstub = Pathname.new(Dir.pwd) + 'bin' + 'rump'
14
+ if rump_binstub.exist? and rump_binstub.to_s != __FILE__
15
+ load rump_binstub
16
+ exit
17
+ end
18
+
19
+ # Otherwise, load rump from a gem as per usual.
20
+ begin
21
+ require 'rump'
22
+ rescue LoadError
23
+ $: << File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib'))
24
+ require 'rump'
25
+ end
26
+
27
+ command = ARGV.first
28
+ arguments = ARGV[1..-1]
29
+
30
+ Rump.new.invoke(command, arguments)
@@ -0,0 +1,184 @@
1
+ Feature: finger-puppet
2
+ To iterate quickly
3
+ When writing and running
4
+ Puppet manifests
5
+ A user
6
+ Should have a helper tool
7
+ To smooth things out
8
+
9
+ @offline
10
+ Scenario: Cloning a repository
11
+ Given I am working in "/tmp"
12
+ And I have an empty git repository named "master-puppet"
13
+ And there is no "clone-puppet" repository
14
+ When I run "finger-puppet clone master-puppet clone-puppet"
15
+ Then I should have a git repository at "clone-puppet"
16
+
17
+ @offline
18
+ Scenario: Doing a puppet run
19
+ Given I am working in "/tmp"
20
+ And I have a simple Puppet repository named "foobar"
21
+ And there is no "simple-puppet" repository
22
+ And there is no "/tmp/checkout" file
23
+ And "puppet" is on my path
24
+ When I run "finger-puppet clone foobar simple-puppet"
25
+ Given I am working in "/tmp/simple-puppet"
26
+ When I run "finger-puppet go"
27
+ Then I should see a file at "/tmp/checkout"
28
+
29
+ @offline
30
+ Scenario: Initialising a safe repo
31
+ Given I am working in "/tmp"
32
+ And there is no "safe-puppet" repository
33
+ And there is no "/tmp/checkout" file
34
+ When I run "finger-puppet init safe-puppet"
35
+ Then I should have a git repository at "safe-puppet"
36
+
37
+ @offline
38
+ Scenario: Verifying author name
39
+ Given I am working in "/tmp"
40
+ And there is no "safe-puppet" repository
41
+ And there is no "/tmp/checkout" file
42
+ When I run "finger-puppet init safe-puppet"
43
+ Then I should have a git repository at "safe-puppet"
44
+ Given I am working in "/tmp/safe-puppet"
45
+ When I touch "/tmp/safe-puppet/random"
46
+ When I run "git add ."
47
+ Then running "GIT_AUTHOR_NAME=root git commit -m 'created random' ." should fail
48
+
49
+ @offline
50
+ Scenario: Verifying author email
51
+ Given I am working in "/tmp"
52
+ And there is no "safe-puppet" repository
53
+ And there is no "/tmp/checkout" file
54
+ When I run "finger-puppet init safe-puppet"
55
+ Then I should have a git repository at "safe-puppet"
56
+ Given I am working in "/tmp/safe-puppet"
57
+ When I touch "/tmp/safe-puppet/random"
58
+ When I run "git add ."
59
+ Then running "GIT_AUTHOR_EMAIL=me@$(hostname) git commit -m 'created random' ." should fail
60
+
61
+ @offline
62
+ Scenario: Setting author email
63
+ Given I am working in "/tmp"
64
+ And there is no "whoami-email-puppet" repository
65
+ And there is no "/tmp/checkout" file
66
+ When I run "finger-puppet init whoami-email-puppet"
67
+ Then I should have a git repository at "whoami-email-puppet"
68
+ Given I am working in "/tmp/whoami-email-puppet"
69
+ When I run "finger-puppet whoami 'Spoons McDoom <spoons@mcdoom.com>'"
70
+ When I touch "/tmp/whoami-email-puppet/random"
71
+ When I run "git add ."
72
+ Then running "GIT_AUTHOR_EMAIL=$(git config user.email) git commit -m 'created random' ." should succeed
73
+
74
+ @offline
75
+ Scenario: Setting author name
76
+ Given I am working in "/tmp"
77
+ And there is no "whoami-name-puppet" repository
78
+ And there is no "/tmp/checkout" file
79
+ When I run "finger-puppet init whoami-name-puppet"
80
+ Then I should have a git repository at "whoami-name-puppet"
81
+ Given I am working in "/tmp/whoami-name-puppet"
82
+ When I run "finger-puppet whoami 'Spoons McDoom <spoons@mcdoom.com>'"
83
+ When I touch "/tmp/whoami-name-puppet/random"
84
+ When I run "git add ."
85
+ Then running "GIT_AUTHOR_NAME=$(git config user.name) git commit -m 'created random' ." should succeed
86
+
87
+ @offline
88
+ Scenario: Getting author name and email
89
+ Given I am working in "/tmp"
90
+ And there is no "whoami-getter-puppet" repository
91
+ And there is no "/tmp/checkout" file
92
+ When I run "finger-puppet init whoami-getter-puppet"
93
+ Then I should have a git repository at "whoami-getter-puppet"
94
+ Given I am working in "/tmp/whoami-getter-puppet"
95
+ When I run "finger-puppet whoami 'Spoons McDoom <spoons@mcdoom.com>'"
96
+ Then running "finger-puppet whoami" should output "Spoons McDoom <spoons@mcdoom.com>"
97
+
98
+ @online
99
+ Scenario: Freezing Puppet + Facter as gems
100
+ Given I am working in "/tmp"
101
+ And I have a simple Puppet repository named "foobar"
102
+ And there is no "simple-puppet" repository
103
+ And there is no "/tmp/checkout" file
104
+ When I run "finger-puppet clone foobar simple-puppet"
105
+ Given I am working in "/tmp/simple-puppet"
106
+ When I run "finger-puppet freeze"
107
+ And I run "finger-puppet go"
108
+ Then I should see a file at "/tmp/checkout"
109
+
110
+ @online
111
+ Scenario: Freezing Puppet + Facter as git repos
112
+ Given I am working in "/tmp"
113
+ And I have a simple Puppet repository named "foobar"
114
+ And there is no "simple-puppet" repository
115
+ And there is no "/tmp/checkout" file
116
+ When I run "finger-puppet clone foobar simple-puppet"
117
+ Given I am working in "/tmp/simple-puppet"
118
+ When the Gemfile looks like this:
119
+ """
120
+ source :rubygems
121
+
122
+ gem "finger-puppet"
123
+ gem "puppet", "0.0", :git => "git://github.com/puppetlabs/puppet.git"
124
+ gem "facter", "0.0", :git => "git://github.com/puppetlabs/facter.git"
125
+ """
126
+ When I run "finger-puppet freeze"
127
+ And I run "finger-puppet go"
128
+ Then I should see a file at "/tmp/checkout"
129
+
130
+ @online
131
+ Scenario: Freezing Puppet + Facter as git repos with specific versions
132
+ Given I am working in "/tmp"
133
+ And I have a simple Puppet repository named "foobar"
134
+ And there is no "simple-puppet" repository
135
+ And there is no "/tmp/checkout" file
136
+ When I run "finger-puppet clone foobar simple-puppet"
137
+ Given I am working in "/tmp/simple-puppet"
138
+ When the Gemfile looks like this:
139
+ """
140
+ source :rubygems
141
+
142
+ gem "finger-puppet"
143
+ gem "puppet", "2.7.0rc1", :git => "git://github.com/puppetlabs/puppet.git", :tag => "2.7.0rc1"
144
+ gem "facter", "1.5.9rc5", :git => "git://github.com/puppetlabs/facter.git", :tag => "1.5.9rc5"
145
+ """
146
+ When I run "finger-puppet freeze"
147
+ And I run "finger-puppet go"
148
+ Then I should see a file at "/tmp/checkout"
149
+
150
+ @online
151
+ Scenario: Freezing and running Puppet 2.6
152
+ Given I am working in "/tmp"
153
+ And I have a simple Puppet 2.6 repository named "foobar"
154
+ And there is no "tagged-puppet" repository
155
+ And there is no "/tmp/checkout" file
156
+ When I run "finger-puppet clone foobar tagged-puppet"
157
+ Given I am working in "/tmp/tagged-puppet"
158
+ When the Gemfile looks like this:
159
+ """
160
+ source :rubygems
161
+
162
+ gem "finger-puppet"
163
+ gem "puppet", "2.6.7", :git => "git://github.com/puppetlabs/puppet.git", :tag => "2.6.7"
164
+ gem "facter", "1.5.8", :git => "git://github.com/puppetlabs/facter.git", :tag => "1.5.8"
165
+ """
166
+ When I run "finger-puppet freeze"
167
+ And I run "finger-puppet go"
168
+ Then I should see a file at "/tmp/checkout"
169
+
170
+ @offline
171
+ Scenario: Generating project scaffolding
172
+ Given I am working in "/tmp/"
173
+ When I run "finger-puppet scaffold my-new-project"
174
+ Given I am working in "/tmp/my-new-project"
175
+ Then I should see the following directories:
176
+ | directory |
177
+ | /tmp/my-new-project |
178
+ | /tmp/my-new-project/manifests |
179
+ | /tmp/my-new-project/modules |
180
+ | /tmp/my-new-project/vendor |
181
+ And I should see a file at "/tmp/my-new-project/README.md"
182
+
183
+
184
+