mina-circle 2.0.1 → 3.0.0.beta.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
  SHA256:
3
- metadata.gz: 3d74061e3e7b564e9e64f33d37499a7689a59e2b87295e5d9daa105d32bcdb6a
4
- data.tar.gz: a16346b86f5fd2220ace7b88b2056e9cf862a24b4a5ff5a602bae53dcbaac9b5
3
+ metadata.gz: 546110a39af0be56b00c1e981dd2dd9b1af2f5ea80eb159fc822788994394b5b
4
+ data.tar.gz: 6ab1c740d9d7bf28f58c4894673cd8d2809f2cedb0430851e2e27536b5646e37
5
5
  SHA512:
6
- metadata.gz: 244468e559eef0982a4c0edbde2b2c831747977cf6a35acf2d0ac1341263dc4013d1ba4dbfa499df9baeb68bcd7d60271035bfc9d58c0126c95fc0cc636ab213
7
- data.tar.gz: 4dad1f59a2cf15c69f526b19650cac309facd42a10fc7249897f6cd8448dc3fda880cf8dc0c6ea2fb6b976a357e3893d88f57f03ee914b5e4f3cae4e839792f2
6
+ metadata.gz: 4772a7fd3b316f1c7623abb87da3674c6ba3318f49884bb09b42f91ca589e9897524cae767d9281ee1dc9c54fed79408da3ef305766c2b7a22f66cb8ff23950f
7
+ data.tar.gz: 07f7adbc92a598895e205a69d12dec4c1237a4d6773853efac90e0cede4db69cc0783b214a1d1037c239572eecd8c37be59e8b6d2ada6bd8a3c9693c327cc18b
@@ -1,7 +1,7 @@
1
1
  require 'uri'
2
2
  module MinaCircle
3
3
  module Helpers
4
- def artifact_fetch_command
4
+ def artifact_fetch_command(settings)
5
5
  project = CircleCI::Project.new(
6
6
  organization: settings[:circleci_user],
7
7
  name: settings[:circleci_project]
@@ -18,25 +18,46 @@ extend MinaCircle::Helpers
18
18
  # Command with options for decompressing the artifact archive
19
19
 
20
20
  namespace :mina_circle do
21
- desc 'Downloads and explodes the archive file containing the build'
22
- task :deploy do
23
21
 
24
- if !circleci_artifact
25
- print_error "[mina-circle] You must specify a `circleci_artifact`"
26
- die
27
- end
28
- if !circleci_user
29
- print_error "[mina-circle] You must specify a `circleci_user`"
30
- die
22
+ def required_settings
23
+ [
24
+ :circleci_artifact,
25
+ :circleci_user,
26
+ :circleci_project,
27
+ :circleci_job_name,
28
+ :circleci_explode_command,
29
+ :branch,
30
+ ]
31
+ end
32
+
33
+ def ensure_and_fetch!(setting_name)
34
+ ensure!(setting_name)
35
+ fetch(setting_name)
31
36
  end
32
- if !circleci_project
33
- print_error "[mina-circle] You must specify a `circleci_project`"
34
- die
37
+
38
+ required_settings.each do |required_setting|
39
+ define_method required_setting do
40
+ ensure_and_fetch! required_setting
35
41
  end
42
+ end
43
+
44
+ desc 'Downloads and explodes the archive file containing the build'
45
+ task :deploy do
46
+ required_settings.each &method(:ensure!)
47
+
48
+ options = {
49
+ circleci_user: circleci_user,
50
+ circleci_project: circleci_project,
51
+ branch: branch,
52
+ circleci_job_name: circleci_job_name,
53
+ circleci_artifact: circleci_artifact,
54
+ }
55
+
56
+ comment "[mina-circle] Fetching: #{circleci_artifact}"
57
+ command artifact_fetch_command(options)
58
+
59
+ command "#{circleci_explode_command} #{circleci_artifact}"
36
60
 
37
- print_str "[mina-circle] Fetching: #{circleci_artifact}"
38
- queue echo_cmd(artifact_fetch_command)
39
- queue echo_cmd("#{circleci_explode_command} #{circleci_artifact}")
40
- queue echo_cmd("rm #{circleci_artifact}")
61
+ command "rm #{circleci_artifact}"
41
62
  end
42
63
  end
@@ -1,3 +1,3 @@
1
1
  module MinaCircle
2
- VERSION = '2.0.1'
2
+ VERSION = '3.0.0.beta.1'
3
3
  end
metadata CHANGED
@@ -1,56 +1,45 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mina-circle
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 3.0.0.beta.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrick Simpson
8
8
  - Michael Yockey
9
- autorequire:
9
+ - Ryan Cromwell
10
+ autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 2019-06-20 00:00:00.000000000 Z
13
+ date: 2021-03-19 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: mina
16
17
  requirement: !ruby/object:Gem::Requirement
17
18
  requirements:
18
- - - ">="
19
- - !ruby/object:Gem::Version
20
- version: 0.3.0
21
19
  - - "~>"
22
20
  - !ruby/object:Gem::Version
23
- version: '0.3'
21
+ version: '1.2'
24
22
  type: :runtime
25
23
  prerelease: false
26
24
  version_requirements: !ruby/object:Gem::Requirement
27
25
  requirements:
28
- - - ">="
29
- - !ruby/object:Gem::Version
30
- version: 0.3.0
31
26
  - - "~>"
32
27
  - !ruby/object:Gem::Version
33
- version: '0.3'
28
+ version: '1.2'
34
29
  - !ruby/object:Gem::Dependency
35
30
  name: rake
36
31
  requirement: !ruby/object:Gem::Requirement
37
32
  requirements:
38
33
  - - ">="
39
34
  - !ruby/object:Gem::Version
40
- version: 10.4.0
41
- - - "~>"
42
- - !ruby/object:Gem::Version
43
- version: '10.4'
35
+ version: 12.3.3
44
36
  type: :development
45
37
  prerelease: false
46
38
  version_requirements: !ruby/object:Gem::Requirement
47
39
  requirements:
48
40
  - - ">="
49
41
  - !ruby/object:Gem::Version
50
- version: 10.4.0
51
- - - "~>"
52
- - !ruby/object:Gem::Version
53
- version: '10.4'
42
+ version: 12.3.3
54
43
  - !ruby/object:Gem::Dependency
55
44
  name: minitest
56
45
  requirement: !ruby/object:Gem::Requirement
@@ -58,9 +47,6 @@ dependencies:
58
47
  - - ">="
59
48
  - !ruby/object:Gem::Version
60
49
  version: 5.8.0
61
- - - "~>"
62
- - !ruby/object:Gem::Version
63
- version: '5.8'
64
50
  type: :development
65
51
  prerelease: false
66
52
  version_requirements: !ruby/object:Gem::Requirement
@@ -68,13 +54,9 @@ dependencies:
68
54
  - - ">="
69
55
  - !ruby/object:Gem::Version
70
56
  version: 5.8.0
71
- - - "~>"
72
- - !ruby/object:Gem::Version
73
- version: '5.8'
74
57
  description: Deploy without dependancies using mina and CircleCI.
75
58
  email:
76
- - patrick@heysparkbox.com
77
- - mike@heysparkbox.com
59
+ - ryan@heysparkbox.com
78
60
  executables: []
79
61
  extensions: []
80
62
  extra_rdoc_files: []
@@ -93,7 +75,7 @@ homepage: https://github.com/sparkbox/mina-circle
93
75
  licenses:
94
76
  - MIT
95
77
  metadata: {}
96
- post_install_message:
78
+ post_install_message:
97
79
  rdoc_options: []
98
80
  require_paths:
99
81
  - lib
@@ -104,13 +86,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
104
86
  version: '0'
105
87
  required_rubygems_version: !ruby/object:Gem::Requirement
106
88
  requirements:
107
- - - ">="
89
+ - - ">"
108
90
  - !ruby/object:Gem::Version
109
- version: '0'
91
+ version: 1.3.1
110
92
  requirements: []
111
- rubyforge_project:
112
- rubygems_version: 2.7.9
113
- signing_key:
93
+ rubygems_version: 3.1.4
94
+ signing_key:
114
95
  specification_version: 4
115
96
  summary: Deploy your application from artifacts produced by CircleCI
116
97
  test_files: []