Class: GemHadar::Setup

Inherits:
Object
  • Object
show all
Includes:
FileUtils
Defined in:
lib/gem_hadar/setup.rb

Instance Method Summary collapse

Instance Method Details

#performObject



4
5
6
7
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
# File 'lib/gem_hadar/setup.rb', line 4

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 <<~EOT
          # vim: set filetype=ruby et sw=2 ts=2:

          require 'gem_hadar'

          GemHadar do
            #developing true
            #name       'TODO'
            module_type :class
            #author     'TODO'
            #email      '[email protected]'
            #homepage   "https://github.com/TODO/NAME"
            #summary    'TODO'
            description 'TODO'
            test_dir    'spec'
            ignore      '.*.sw[pon]', 'pkg', 'Gemfile.lock', '.AppleDouble', '.bundle', '.yardoc', 'tags'
            readme      'README.md'

            #executables << 'bin/TODO'

            #dependency  'TODO', '~>1.2.3'

            #licenses << 'TODO
          end
      EOT
    end
  end
end