git-semaphore 2.5.1 → 2.6.0

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: 20f1ef4e38ff8168a497b5305e64687fd34f9d3b
4
- data.tar.gz: 6246830f4d07135694cabec9db4d39f9a7ae017b
3
+ metadata.gz: 64fe9562a298648ed4e338a137e7897113d2185e
4
+ data.tar.gz: 796dcf1d547bab0029f9b78e4be1f71b59bf6098
5
5
  SHA512:
6
- metadata.gz: 98257219a6498e9bcb4f6d695f7777ad78ac3c9932e22a1f929c6b660821da641721afe9ac2510019a45d05ad9bc62ad44af8e94ff198e877ed373964f9de7ad
7
- data.tar.gz: 959d38c7b382eedc035e13f418754da81a320b95b1a5c79e658607995f89fe23d5c45ce08cfd02ed55e87273f4a3aab29d4e0a676b4852a23a8996985845addb
6
+ metadata.gz: fb02f3fe0df5e8e8dad6876e11c928c1bdd6768e89633477d17e354cdf1d5f5f88e0cfe71011a1b5d2c563963b224028c57c506d58a66363b6fedfdf1bc62e3e
7
+ data.tar.gz: 1ab4dcb69ddff097ae24ac55164d5064309eb451b883e2af5333186cce0b63d2de04af5ecbe2b9db1b870445c6a2a9361b397a882839aa83fc6f98e27cee2a3b
data/README.md CHANGED
@@ -100,7 +100,16 @@ For performance reasons _(especially for Semaphore API calls that are paginated)
100
100
 
101
101
  This means that running `git semaphore` commands may return stale data, in cases where things have changed on `semaphoreci.com` since the last time `git semaphore` was run.
102
102
 
103
- To delete the cache - and force a refresh of the Semaphore data on the next API call - use the `git semaphore --clean` command... this will empty out the entire `${HOME}/.git/semaphore` cache directory.
103
+ To update the cached results, the following commands support the `--refresh` flag:
104
+
105
+ * `--projects`
106
+ * `--branches`
107
+ * `--status`
108
+ * `--history`
109
+ * `--information`
110
+ * `--log`
111
+
112
+ Without the `-refresh` flag, these options will always return cached - and possibly stale - results _(if they were invoked previously, that is, in which case the cache was populated)_, but when the `--refresh` flag is used, they will all make a new API call and return the most up-to-date SemaphoreCI data _(and update the cached data as a side effect)_.
104
113
 
105
114
  ## Integration with `git`
106
115
 
@@ -37,6 +37,7 @@ options = Slop.parse(help: true) do |o|
37
37
 
38
38
  o.on '--browse', 'Open the project on https://semaphoreci.com/'
39
39
  o.on '--rebuild', 'Rebuild last revision for the current branch'
40
+ o.on '--result', 'Latest un-cached build result for the current branch'
40
41
 
41
42
  o.on '--settings', 'Display most relevant settings'
42
43
  o.on '--internals', 'Display all internal settings'
@@ -87,6 +88,7 @@ when options.projects? then puts Git::Semaphore::Project.all(refresh).to_json
87
88
 
88
89
  when options.browse? then puts project.browse.to_json
89
90
  when options.rebuild? then puts project.rebuild.to_json
91
+ when options.result? then puts project.result
90
92
 
91
93
  when options.settings? then puts project.settings.to_json
92
94
  when options.internals? then puts project.internals.to_json
@@ -141,6 +141,11 @@ module Git
141
141
  Git::Semaphore::API.rebuild(project_hash_id, branch_id, @auth_token)
142
142
  end
143
143
 
144
+ def result
145
+ Git::Semaphore::API.status(project_hash_id, branch_id, @auth_token)\
146
+ ['result'] # the latest un-cached build result for the current branch
147
+ end
148
+
144
149
  def browse
145
150
  `open #{branch_url}`
146
151
  { url: branch_url }
@@ -1,6 +1,6 @@
1
1
  module Git
2
2
  module Semaphore
3
3
  NAME = 'git-semaphore'.freeze
4
- VERSION = '2.5.1'.freeze
4
+ VERSION = '2.6.0'.freeze
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-semaphore
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.1
4
+ version: 2.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Vandenberk
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-11-13 00:00:00.000000000 Z
11
+ date: 2018-11-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rugged