prospectus 0.0.11 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/prospectus/helpers/github_api.rb +4 -0
- data/lib/prospectus/helpers/gitlab_api.rb +11 -3
- data/lib/prospectus/modules/github_hash.rb +0 -4
- data/lib/prospectus/modules/github_release.rb +0 -4
- data/lib/prospectus/modules/github_tag.rb +0 -4
- data/lib/prospectus/modules/gitlab_tag.rb +4 -11
- data/lib/prospectus/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe7f317b732d90d80f3d84e14661fafba07689d5
|
4
|
+
data.tar.gz: da0cafc823726a687ee26c28cbb0b1793e2dd1a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 055911dbbdac5e599e39b4e7e70fc067365ff33775f032312a55de48c2369216d0acc1d6d74c6059bac628453dae8306e06554dc51323110bcb993e0cd89ee43
|
7
|
+
data.tar.gz: 4bcefbeee574b7c6cd87127a50c681da94fa8c55096452d528a9ec3bfa2b2bd8a17f4909001a51bb59b473a3a6179865ba88fc6c9b19dcf2b0254a03f402c51f
|
@@ -8,7 +8,7 @@ module LogCabin
|
|
8
8
|
module GitlabApi
|
9
9
|
def gitlab_api
|
10
10
|
@gitlab_api ||= Gitlab.client(
|
11
|
-
endpoint: gitlab_endpoint,
|
11
|
+
endpoint: gitlab_endpoint + '/api/v3',
|
12
12
|
private_token: gitlab_token
|
13
13
|
)
|
14
14
|
end
|
@@ -23,11 +23,19 @@ module LogCabin
|
|
23
23
|
@gitlab_token ||= Keylime.new(
|
24
24
|
server: gitlab_endpoint,
|
25
25
|
account: 'prospectus'
|
26
|
-
).get!(
|
26
|
+
).get!("GitLab API token (#{gitlab_endpoint}/profile/account)").password
|
27
27
|
end
|
28
28
|
|
29
29
|
def gitlab_endpoint
|
30
|
-
@gitlab_endpoint ||= 'https://gitlab.com
|
30
|
+
@gitlab_endpoint ||= 'https://gitlab.com'
|
31
|
+
end
|
32
|
+
|
33
|
+
def repo(value)
|
34
|
+
@repo = value
|
35
|
+
end
|
36
|
+
|
37
|
+
def endpoint(value)
|
38
|
+
@gitlab_endpoint = value
|
31
39
|
end
|
32
40
|
end
|
33
41
|
end
|
@@ -1,8 +1,6 @@
|
|
1
1
|
require 'json'
|
2
2
|
require 'open-uri'
|
3
3
|
|
4
|
-
Prospectus.extra_dep('gitlab_tag', 'version_sorter')
|
5
|
-
|
6
4
|
module LogCabin
|
7
5
|
module Modules
|
8
6
|
##
|
@@ -19,15 +17,10 @@ module LogCabin
|
|
19
17
|
private
|
20
18
|
|
21
19
|
def tag
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
@tags ||= gitlab_api.tags(gitlab_slug(@repo), per_page: 1).map(&:name)
|
27
|
-
end
|
28
|
-
|
29
|
-
def repo(value)
|
30
|
-
@repo = value
|
20
|
+
@tag ||= gitlab_api.tags(gitlab_slug(@repo)).sort do |*points|
|
21
|
+
dates = points.map { |x| Date.parse(x.commit.committed_date) }
|
22
|
+
dates.last <=> dates.first
|
23
|
+
end.first.name
|
31
24
|
end
|
32
25
|
end
|
33
26
|
end
|
data/lib/prospectus/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prospectus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Les Aker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01-
|
11
|
+
date: 2016-01-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mercenary
|