mina-circle 1.4.0 → 1.4.1

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: 5b24a4c6e3a4b0fac490634f87c07b44d18a8b22
4
- data.tar.gz: 2998dcb6f40bfcc4ed2443a8161677e0cc668bb6
3
+ metadata.gz: 77a114e9936f5cffa9062cfb75f6dfe4e54a5a9a
4
+ data.tar.gz: 3dbfb4047f9467595956cd741fc73996fe7a4176
5
5
  SHA512:
6
- metadata.gz: 2140e0f606001221f316c86db74f79bdeb819108b20433d3089b0891ddc882d0bc799e1e391c950a224a8ac7cd5fcb658c96cecefd0dc808d40102d47bd21cf3
7
- data.tar.gz: 7cd5adf6327286fd21c886ecc5f3817901a8b4b40cce5fbafd3b66e3ec410f35c1eadefedba8d3a0813f46279a1053928a954d95960acad4bde4e4f76296b1cf
6
+ metadata.gz: 1ab933b40b843f2d4a9ec03f013f785052afb1f5bcf2c986c1d0f197bb7c80fb65590a61f15200485b820da7a9062ece4c9edd8ccc02d642a485794100e49543
7
+ data.tar.gz: adc0919a0b1a8ed84df183c2c96ec6ad27ade18ba6fb2af8c58713ffaed45dd8a5150e5b32302dc6e2aed364eaa6b5caea894cd728af8cf385dd0108aa01add2
@@ -13,19 +13,33 @@ class CircleCI::Project
13
13
  end
14
14
 
15
15
  def api_path
16
+ api_path_parts.join('/')
17
+ end
18
+
19
+ def build_path
20
+ parts = api_path_parts + ['tree', real_branch]
21
+
22
+ parts.compact.join('/')
23
+ end
24
+
25
+ private
26
+
27
+ def api_path_parts
16
28
  [
17
29
  'project',
18
30
  vcs_type,
19
31
  organization,
20
32
  name
21
- ].join('/')
33
+ ]
22
34
  end
23
35
 
24
- private
36
+ def real_branch
37
+ branch || 'master'
38
+ end
25
39
 
26
40
  def fetch_artifacts
27
41
  # To support Circle 2.0
28
- build_info = CircleCI::Client.instance.get "#{api_path}", filter: 'successful', branch: branch ? branch : 'master', has_artifacts: true
42
+ build_info = CircleCI::Client.instance.get "#{build_path}", filter: 'successful', has_artifacts: true
29
43
 
30
44
  build_num = 'latest' # circle version 1.0
31
45
 
@@ -35,7 +49,7 @@ class CircleCI::Project
35
49
 
36
50
  puts "Using Build: #{build_num}"
37
51
 
38
- artifact_hashes = CircleCI::Client.instance.get "#{api_path}/#{build_num}/artifacts", filter: 'successful', branch: branch ? branch : 'master'
52
+ artifact_hashes = CircleCI::Client.instance.get "#{api_path}/#{build_num}/artifacts", filter: 'successful', branch: real_branch
39
53
  artifact_hashes.collect { |artifact_hash|
40
54
  CircleCI::Artifact.new artifact_hash
41
55
  }
@@ -1,3 +1,3 @@
1
1
  module MinaCircle
2
- VERSION = '1.4.0'
2
+ VERSION = '1.4.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mina-circle
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrick Simpson
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-03-01 00:00:00.000000000 Z
12
+ date: 2018-06-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mina