kata 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/kata/setup.rb +12 -14
  2. metadata +1 -1
@@ -30,28 +30,26 @@ module Kata
30
30
  user_string = "-u '#{github.user}/token:#{github.token}'"
31
31
  repo_params = "-d 'name=#{repo_name}' -d 'description=code+kata+repo'"
32
32
 
33
- Create the repo on github
33
+ # Create the repo on github
34
+ print 'Creating github repo...'
34
35
  raise SystemCallError, 'unable to use curl to create repo on github' unless system <<-EOF
35
- echo -n 'Creating github repo...';
36
- curl -s #{user_string} #{repo_params} #{github.url}repos/create 2> /dev/null;
37
- echo 'complete'
36
+ curl -s #{user_string} #{repo_params} #{github.url}repos/create 2>&1 > /dev/null;
38
37
  EOF
38
+ puts 'complete'
39
39
 
40
40
  # publish to github
41
+
42
+ print 'creating files for repo and initializing...'
41
43
  raise SystemCallError, 'unable to publish repo to github' unless system <<-EOF
42
- echo -n 'Initializing repo...';
43
44
  cd #{repo_name};
44
- git init 2> /dev/null;
45
- git add README lib/ spec/ 2> /dev/null;
46
- git commit -m 'starting kata' 2> /dev/null;
47
- echo 'complete'
48
- echo -n 'adding origin...'
49
- git remote add origin git@github.com:#{github.user}/#{repo_name}.git 2> /dev/null;
50
- echo 'complete'
51
- echo -n 'pushing...'
45
+ git init 2>&1 > /dev/null;
46
+ git add README lib/ spec/ 2>&1 > /dev/null;
47
+ git commit -m 'starting kata' 2>&1 > /dev/null;
48
+ git remote add origin git@github.com:#{github.user}/#{repo_name}.git 2>&1 > /dev/null;
52
49
  git push origin master 2> /dev/null
53
- echo 'complete'
54
50
  EOF
51
+ puts 'done'
52
+ puts "You can now change directories to #{repo_name} and take your kata"
55
53
  end
56
54
 
57
55
  def repo_name= kata_name
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: kata
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.0.3
5
+ version: 1.0.4
6
6
  platform: ruby
7
7
  authors:
8
8
  - Wes