git-restart 0.0.8.dev → 0.0.9.dev

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e9833ee584c855dead1bc0a24a9cc0fcb3b02ece
4
- data.tar.gz: f2c59fd8ff22d2d3afbf0e341ebbe34a6bdf8627
3
+ metadata.gz: 75f5330e5092f1d4e22a9ad2439342eabc0b422d
4
+ data.tar.gz: bbbd2ec79c299cbc7d9e65c0ea0db6c37c9c5a40
5
5
  SHA512:
6
- metadata.gz: aa7e481f34683202cc4f2d503322de2add28d4eafd028acd5c97b888be8705a0d1206e1640beb7d32cbd9aebed42521f67956f60e72e370f0427a08864ad25e8
7
- data.tar.gz: 143d6fb5ae86745e6d049db5f222ee78c54d3bb449233f1109e2e86e780030ffb93dc6233ea053ab3dc6f705e42c2984a026954d06a7db4e6018c33479ac7098
6
+ metadata.gz: 286bd49c889435be2eda8c496a55521028e28cef0caf4fca1ae66ef7f8c76be30df78a1d2d633b6779ea15c6276782c5b25fea47d501f05465a4c0c53d43b335
7
+ data.tar.gz: 626c4ac82b10a21d9de2591811431276751c0472f080f572f3e3df0e8ae1a620f15b91a288a7ec2501142ad1565d1846bf70a68903bad7f71bf4e217f900c324
@@ -19,7 +19,7 @@ module GitRestart
19
19
  attr_accessor :octokit
20
20
 
21
21
  def current_commit()
22
- @git.object("HEAD^").sha;
22
+ @git.object("HEAD").sha;
23
23
  end
24
24
  def current_branch()
25
25
  @git.current_branch();
@@ -65,15 +65,17 @@ module GitRestart
65
65
  end
66
66
 
67
67
  def update_status(name, newStatus, message = nil)
68
- #return unless @octokit;
68
+ puts "Task #{@name} assumed a new status: #{status}#{message ? " MSG:#{message}" : ""}"
69
69
 
70
- #begin
71
- @octokit.create_status(@repo, current_commit, newStatus, {
70
+ return unless @octokit;
71
+
72
+ begin
73
+ @octokit.create_status(@repo, current_commit(), newStatus, {
72
74
  context: "#{@name}/#{name}".gsub(" ", "_"),
73
75
  description: message,
74
76
  })
75
- #rescue
76
- #end
77
+ rescue
78
+ end
77
79
  end
78
80
 
79
81
  def _start_task_thread()
@@ -130,7 +132,7 @@ module GitRestart
130
132
  def _start_next_tasks()
131
133
  _generate_next_tasks();
132
134
 
133
- puts "\n\nStarting next tasks!"
135
+ puts "\nStarting next tasks!"
134
136
  @next_tasks.each do |name, t|
135
137
  next unless t.active;
136
138
  next unless t.triggered?
@@ -141,7 +143,7 @@ module GitRestart
141
143
  end
142
144
 
143
145
  def _switch_to(branch, commit = nil)
144
- puts "\nSwitching to branch: #{branch}#{commit ? ",commit: #{commit}" : ""}"
146
+ puts "\n\nSwitching to branch: #{branch}#{commit ? ",commit: #{commit}" : ""}"
145
147
 
146
148
  begin
147
149
  @git.fetch();
@@ -104,7 +104,6 @@ module GitRestart
104
104
  return unless @report_status
105
105
 
106
106
  runner().update_status(@name, status, message);
107
- puts "Task #{@name} assumed a new status: #{status}#{message ? " MSG:#{message}" : ""}"
108
107
  end
109
108
  private :_report_status
110
109
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-restart
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8.dev
4
+ version: 0.0.9.dev
5
5
  platform: ruby
6
6
  authors:
7
7
  - Xasin