kata 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/bin/kata +40 -15
  2. metadata +8 -2
data/bin/kata CHANGED
@@ -1,22 +1,47 @@
1
1
  require 'kata'
2
2
 
3
- usage = 'kata [-s|--setup] file'
3
+ usage = <<EOF
4
+ NAME
5
+ kata - Ruby kata management
4
6
 
5
- if %w{-s --setup}.include? ARGV[0]
6
- raise ArgumentError unless ARGV[1] && File.exists?(ARGV[1])
7
+ SYNOPSIS
8
+ kata [COMMAND] [ARGS]
7
9
 
8
- name = nil
10
+ DESCRIPTION
11
+ The kata gem allows one to manage their personal development in the
12
+ practice of writing code through repitition.
9
13
 
10
- File.open(ARGV[1]).each do |line|
11
- if line.match /^kata *\"([^\"]*)\" *do$/
12
- name = $1
13
- break
14
- end
15
- end
14
+ PRIMARY COMMANDS
15
+ kata setup file
16
+ Setup a github repo for the kata development session
17
+
18
+ kata take file
19
+ Start a kata development session
20
+ EOF
21
+
22
+ begin
23
+ case ARGV[0].downcase.to_sym
24
+ when :setup
25
+ raise ArgumentError unless ARGV[1] && File.exists?(ARGV[1])
16
26
 
17
- setup = Kata::Setup.new name
18
- setup.build_tree
19
- setup.create_repo
20
- else
21
- load ARGV[0]
27
+ name = nil
28
+
29
+ File.open(ARGV[1]).each do |line|
30
+ if line.match /^kata *\"([^\"]*)\" *do$/
31
+ name = $1
32
+ break
33
+ end
34
+ end
35
+
36
+ setup = Kata::Setup.new name
37
+ setup.build_tree
38
+ setup.create_repo
39
+ when :take
40
+ load ARGV[1]
41
+ else
42
+ raise ArgumentError
43
+ end
44
+ rescue Exception
45
+ puts usage
46
+ exit 1
22
47
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: kata
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.0.0
5
+ version: 1.0.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Wes
@@ -16,7 +16,6 @@ default_executable:
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: bundler
19
- prerelease: false
20
19
  requirement: &id001 !ruby/object:Gem::Requirement
21
20
  none: false
22
21
  requirements:
@@ -24,6 +23,7 @@ dependencies:
24
23
  - !ruby/object:Gem::Version
25
24
  version: 1.0.0
26
25
  type: :development
26
+ prerelease: false
27
27
  version_requirements: *id001
28
28
  description: This DSL provides an easy way for you to write a code kata for pairing exercises or individual testing
29
29
  email: baywes@gmail.com
@@ -58,12 +58,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - ">="
60
60
  - !ruby/object:Gem::Version
61
+ hash: -4334512147184042673
62
+ segments:
63
+ - 0
61
64
  version: "0"
62
65
  required_rubygems_version: !ruby/object:Gem::Requirement
63
66
  none: false
64
67
  requirements:
65
68
  - - ">="
66
69
  - !ruby/object:Gem::Version
70
+ hash: -4334512147184042673
71
+ segments:
72
+ - 0
67
73
  version: "0"
68
74
  requirements: []
69
75