gengen 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -21,12 +21,12 @@ module GenGen
21
21
  usage!
22
22
  end
23
23
  github_project += '.gengen' unless github_project =~ /\.gengen$/
24
- git_url = "git@github.com:#{github_project}.git"
24
+ git_url = "https://github.com/#{github_project}.git"
25
25
  end
26
26
 
27
27
  dest_dir = args[1] || File.basename(git_url).sub('.gengen', '').sub('.git', '')
28
28
  if File.exists?(dest_dir)
29
- abort "'#{dest_dir}' already exists"
29
+ abort "[error] '#{dest_dir}' already exists"
30
30
  end
31
31
 
32
32
  temp_dir = fetch(git_url)
@@ -61,9 +61,12 @@ Examples:
61
61
  def fetch(git_url)
62
62
  temp_dir = Dir.mktmpdir
63
63
  puts "git clone #{git_url} ..."
64
- system 'git', 'clone', git_url, temp_dir
65
- FileUtils.rm_rf(File.join(temp_dir, '.git'))
66
- temp_dir
64
+ if system 'git', 'clone', git_url, temp_dir
65
+ FileUtils.rm_rf(File.join(temp_dir, '.git'))
66
+ temp_dir
67
+ else
68
+ abort "[error] faild to git clone '#{git_url}'!"
69
+ end
67
70
  end
68
71
 
69
72
  def process(dir, vars)
@@ -1,3 +1,3 @@
1
1
  module Gengen
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
@@ -5,7 +5,7 @@ require 'fileutils'
5
5
  describe GenGen do
6
6
  describe ".gen" do
7
7
  it 'works with github repository' do
8
- mock(GenGen).fetch('git@github.com:foo/bar.gengen.git') { '/tmp/baz' }
8
+ mock(GenGen).fetch('https://github.com/foo/bar.gengen.git') { '/tmp/baz' }
9
9
  mock(GenGen).process('/tmp/baz', {'a' => 'b', 'c' => 'd'})
10
10
  mock(FileUtils).mv('/tmp/baz', 'baz')
11
11
  GenGen.gen(%w(foo/bar baz a=b c=d))
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gengen
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -96,7 +96,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
96
96
  version: '0'
97
97
  segments:
98
98
  - 0
99
- hash: -2094350327006867538
99
+ hash: -2840357011157900530
100
100
  required_rubygems_version: !ruby/object:Gem::Requirement
101
101
  none: false
102
102
  requirements:
@@ -105,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
105
105
  version: '0'
106
106
  segments:
107
107
  - 0
108
- hash: -2094350327006867538
108
+ hash: -2840357011157900530
109
109
  requirements: []
110
110
  rubyforge_project:
111
111
  rubygems_version: 1.8.23