agile_check_in 0.0.7 → 0.0.8

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.
@@ -48,10 +48,21 @@ module AgileCheckIn
48
48
  end
49
49
 
50
50
  def self.pre_commit_tasks
51
- if File::exists? '.agile_check_in.yml'
52
- config_hash = YAML::load(File.read('.agile_check_in.yml'))
51
+ if File::exists? '.agile_check_in.yml'
52
+ File.read '.agile_check_in.yml' do |file|
53
+ config_hash = YAML::load(file)
54
+ end
53
55
  pre_commit_tasks = config_hash["pre_commit"]
54
- end
56
+ end
57
+ end
58
+
59
+ def self.push_commits
60
+ puts "*******"
61
+ puts "About to push these changes:"
62
+ puts Git.local_commits
63
+ puts "*******"
64
+ puts "Shoving..."
65
+ system("git push")
55
66
  end
56
67
 
57
68
  def self.push_and_test
@@ -59,20 +70,16 @@ module AgileCheckIn
59
70
  puts "About to test these changes:"
60
71
  puts Git.local_commits
61
72
  puts "*******"
62
-
63
73
  if pre_commit_tasks
64
74
  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")
75
+ push_commits
71
76
  else
72
77
  puts "Tests failed. Shove aborted."
73
78
  exit(1)
74
79
  end
80
+ else
81
+ push_commits
75
82
  end
76
-
77
83
  end
84
+
78
85
  end
@@ -1,3 +1,3 @@
1
1
  module AgileCheckIn
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: agile_check_in
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2012-08-07 00:00:00.000000000 Z
14
+ date: 2012-08-09 00:00:00.000000000 Z
15
15
  dependencies: []
16
16
  description: Easy check in
17
17
  email: