Please review pull request #298: Add gitignore to default puppet module opened by (zsprackett)

Description:

This patch was merged into the seperate puppet-modlue-tool repo but I've
been asked to submit it here as well. See:

https://github.com/puppetlabs/puppet-module-tool/pull/17

  • Opened: Tue Jan 03 02:37:48 UTC 2012
  • Based on: puppetlabs:master (3a1fe3720788e6b616ed29902b9f281a5073b65c)
  • Requested merge: zsprackett:gitignore (94808b89eb27d13c5910ac5c6704e056d6cd46d5)

Diff follows:

diff --git a/lib/puppet/module_tool/applications/generator.rb b/lib/puppet/module_tool/applications/generator.rb
index 699fe24..9f932dd 100644
--- a/lib/puppet/module_tool/applications/generator.rb
+++ b/lib/puppet/module_tool/applications/generator.rb
@@ -93,6 +93,9 @@ def read
         def target
           target = @generator.destination + @source.relative_path_from(@generator.skeleton.path)
           components = target.to_s.split(File::SEPARATOR).map do |part|
+            if part[0] == '_'
+              part[0] = '.'
+            end
             part == 'NAME' ? @generator.metadata.name : part
           end
           Pathname.new(components.join(File::SEPARATOR))
diff --git a/lib/puppet/module_tool/skeleton/templates/generator/_gitignore b/lib/puppet/module_tool/skeleton/templates/generator/_gitignore
new file mode 100644
index 0000000..1ac0a8c
--- /dev/null
+++ b/lib/puppet/module_tool/skeleton/templates/generator/_gitignore
@@ -0,0 +1,15 @@
+## MAC OS
+.DS_Store
+
+## TEXTMATE
+*.tmproj
+tmtags
+
+## EMACS
+*~
+\#*
+.\#*
+
+## VIM
+*.swp
+tags

    

--
You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To post to this group, send email to puppet-dev@googlegroups.com.
To unsubscribe from this group, send email to puppet-dev+unsubscr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to