agile_check_in 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -20,6 +20,13 @@ Or install it yourself as:
20
20
 
21
21
  TODO: Write usage instructions here
22
22
 
23
+ If you would like to run tests before checking in:
24
+
25
+ * create a ".agile_check_in.yml" file
26
+ * add a "pre_commit:" key with a sting of tasks you would like to run
27
+
28
+ `pre_commit: 'rake spec && guard-jasmine'`
29
+
23
30
  ## Contributing
24
31
 
25
32
  1. Fork it
@@ -2,8 +2,8 @@
2
2
  require File.expand_path('../lib/agile_check_in/version', __FILE__)
3
3
 
4
4
  Gem::Specification.new do |gem|
5
- gem.authors = ["phillc", "rsliter"]
6
- gem.email = ["spyyderz@gmail.com", "rsliter@thoughtworks.com"]
5
+ gem.authors = ["phillc", "rsliter", "kormie"]
6
+ gem.email = ["spyyderz@gmail.com", "rsliter@thoughtworks.com", "kormie@gmail.com"]
7
7
  gem.description = %q{Easy check in}
8
8
  gem.summary = %q{Easy check in}
9
9
  gem.homepage = ""
@@ -47,23 +47,32 @@ module AgileCheckIn
47
47
 
48
48
  end
49
49
 
50
+ def pre_commit_tasks
51
+ if File::exists? '.agile_check_in.yml'
52
+ config_hash = YAML::load(File.read('.agile_check_in.yml'))
53
+ pre_commit_tasks = config_hash["pre_commit"]
54
+ end
55
+ end
56
+
50
57
  def self.push_and_test
51
58
  puts "*******"
52
59
  puts "About to test these changes:"
53
60
  puts Git.local_commits
54
61
  puts "*******"
55
62
 
56
-
57
- if system("rake spec")
58
- puts "*******"
59
- puts "About to push these changes:"
60
- puts Git.local_commits
61
- puts "*******"
62
- puts "Shoving..."
63
- system("git push")
64
- else
65
- puts "Tests failed. Shove aborted."
66
- exit(1)
63
+ if pre_commit_tasks
64
+ if system(pre_commit_tasks)
65
+ puts "*******"
66
+ puts "About to push these changes:"
67
+ puts Git.local_commits
68
+ puts "*******"
69
+ puts "Shoving..."
70
+ system("git push")
71
+ else
72
+ puts "Tests failed. Shove aborted."
73
+ exit(1)
74
+ end
67
75
  end
76
+
68
77
  end
69
78
  end
@@ -1,3 +1,3 @@
1
1
  module AgileCheckIn
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,21 +1,23 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: agile_check_in
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - phillc
9
9
  - rsliter
10
+ - kormie
10
11
  autorequire:
11
12
  bindir: bin
12
13
  cert_chain: []
13
- date: 2012-06-28 00:00:00.000000000 Z
14
+ date: 2012-08-07 00:00:00.000000000 Z
14
15
  dependencies: []
15
16
  description: Easy check in
16
17
  email:
17
18
  - spyyderz@gmail.com
18
19
  - rsliter@thoughtworks.com
20
+ - kormie@gmail.com
19
21
  executables:
20
22
  - ci
21
23
  - cic
@@ -47,21 +49,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
47
49
  - - ! '>='
48
50
  - !ruby/object:Gem::Version
49
51
  version: '0'
50
- segments:
51
- - 0
52
- hash: -2157812595005328629
53
52
  required_rubygems_version: !ruby/object:Gem::Requirement
54
53
  none: false
55
54
  requirements:
56
55
  - - ! '>='
57
56
  - !ruby/object:Gem::Version
58
57
  version: '0'
59
- segments:
60
- - 0
61
- hash: -2157812595005328629
62
58
  requirements: []
63
59
  rubyforge_project:
64
- rubygems_version: 1.8.11
60
+ rubygems_version: 1.8.10
65
61
  signing_key:
66
62
  specification_version: 3
67
63
  summary: Easy check in