Class: GemHadar::Setup
- Inherits:
-
Object
- Object
- GemHadar::Setup
- Includes:
- FileUtils
- Defined in:
- lib/gem_hadar/setup.rb
Instance Method Summary collapse
-
#perform ⇒ Object
The perform method sets up the basic project structure by creating the lib directory, initializing a VERSION file with ‘0.0.0’ if it doesn’t exist, and creating a default Rakefile with basic GemHadar configuration if one doesn’t already exist.
Instance Method Details
#perform ⇒ Object
The perform method sets up the basic project structure by creating the lib directory, initializing a VERSION file with ‘0.0.0’ if it doesn’t exist, and creating a default Rakefile with basic GemHadar configuration if one doesn’t already exist.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/gem_hadar/setup.rb', line 8 def perform mkdir_p 'lib' unless File.exist?('VERSION') File.open('VERSION', 'w') do |output| output.puts '0.0.0' end end unless File.exist?('Rakefile') File.open('Rakefile', 'w') do |output| output.puts " # vim: set filetype=ruby et sw=2 ts=2:\n\n require 'gem_hadar'\n\n GemHadar do\n #developing true\n #name 'TODO'\n module_type :class\n #author 'TODO'\n #email '[email protected]'\n #homepage \"https://github.com/TODO/NAME\"\n #summary 'TODO'\n description 'TODO'\n test_dir 'spec'\n ignore '.*.sw[pon]', 'pkg', 'Gemfile.lock', '.AppleDouble', '.bundle', '.yardoc', 'tags'\n readme 'README.md'\n\n #executables << 'bin/TODO'\n\n #dependency 'TODO', '~>1.2.3'\n\n #licenses << 'TODO\n end\n EOT\n end\n end\nend\n" |