gemit 0.0.1 → 0.0.2

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.
Files changed (3) hide show
  1. data/lib/gemit.rb +7 -3
  2. data/lib/gemit/version.rb +1 -1
  3. metadata +3 -3
@@ -13,9 +13,9 @@ class Gemit
13
13
  raise "Name cannot contain white spaces!" if @name =~ /\s/
14
14
  raise "Folder already exists #{@name}" if File.exists? @name
15
15
 
16
- FileUtils.mkdir_p(File.join(@name, "bin"), :verbose => @verbose)
17
- FileUtils.mkdir_p(File.join(@name, "lib"), :verbose => @verbose)
18
- FileUtils.mkdir_p(File.join(@name, "lib", @name), :verbose => @verbose)
16
+ create_dir("bin")
17
+ create_dir("lib")
18
+ create_dir("lib", @name)
19
19
 
20
20
  create_file(gemspec_file, gemspec)
21
21
  create_file(readme_file, readme)
@@ -26,6 +26,10 @@ class Gemit
26
26
 
27
27
  private
28
28
 
29
+ def create_dir(*args)
30
+ FileUtils.mkdir_p(File.join(@name, args), :verbose => @verbose)
31
+ end
32
+
29
33
  def create_file(name, content)
30
34
  file_name = File.join(@name, name)
31
35
  File.open(file_name, 'w') {|f| f.write(content) }
@@ -1,3 +1,3 @@
1
1
  module Gemit
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gemit
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - |