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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3ac62931ea2ebb0b28856025b7312e5810aca8c1
4
- data.tar.gz: e18b59b315bbbbf5fe878704af799a1ba3eaadf1
3
+ metadata.gz: fe7f317b732d90d80f3d84e14661fafba07689d5
4
+ data.tar.gz: da0cafc823726a687ee26c28cbb0b1793e2dd1a3
5
5
  SHA512:
6
- metadata.gz: 09f7b22522fe35672de8b61a482ec9460ee56a436f711a266723ae46bf8d2f33e482a4d2ac9acb8765071de01dd2813b5fd9f127fe84f2c6cb2f827ba9b5f916
7
- data.tar.gz: 497154e7cd0a1b83e7d1e1001955363578fee01678d128fff35467a19b1123f7ed07bd51bf90dab227a5d00dacc4d8873fb553db19bf97e40eae55ba82c20f82
6
+ metadata.gz: 055911dbbdac5e599e39b4e7e70fc067365ff33775f032312a55de48c2369216d0acc1d6d74c6059bac628453dae8306e06554dc51323110bcb993e0cd89ee43
7
+ data.tar.gz: 4bcefbeee574b7c6cd87127a50c681da94fa8c55096452d528a9ec3bfa2b2bd8a17f4909001a51bb59b473a3a6179865ba88fc6c9b19dcf2b0254a03f402c51f
@@ -21,6 +21,10 @@ module LogCabin
21
21
  autosave: true
22
22
  )
23
23
  end
24
+
25
+ def repo(value)
26
+ @repo = value
27
+ end
24
28
  end
25
29
  end
26
30
  end
@@ -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!('GitLab API token (https://gitlab.com/profile/account)').password
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/api/v3'
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
@@ -17,10 +17,6 @@ module LogCabin
17
17
  @hash ||= github_api.branch(@repo, @branch).commit.sha
18
18
  end
19
19
 
20
- def repo(value)
21
- @repo = value
22
- end
23
-
24
20
  def branch(value)
25
21
  @branch = value
26
22
  end
@@ -19,10 +19,6 @@ module LogCabin
19
19
  def release
20
20
  @release ||= github_api.latest_release(@repo).tag_name
21
21
  end
22
-
23
- def repo(value)
24
- @repo = value
25
- end
26
22
  end
27
23
  end
28
24
  end
@@ -19,10 +19,6 @@ module LogCabin
19
19
  def tag
20
20
  @tag ||= github_api.tags(@repo).first.name
21
21
  end
22
-
23
- def repo(value)
24
- @repo = value
25
- end
26
22
  end
27
23
  end
28
24
  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
- VersionSorter.rsort(tags).first
23
- end
24
-
25
- def tags
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
@@ -2,5 +2,5 @@
2
2
  ##
3
3
  # Declare package version
4
4
  module Prospectus
5
- VERSION = '0.0.11'.freeze
5
+ VERSION = '0.0.12'.freeze
6
6
  end
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.11
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-26 00:00:00.000000000 Z
11
+ date: 2016-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mercenary