popito 0.0.1.alpha → 0.0.2.alpha
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a9d70fc64c62da1cec61bd91b7e4b6ae012b2399888cb5eb97fd16896f0d1a5
|
4
|
+
data.tar.gz: d336b6c6d8deece10e61af4e323c24e1068435fbcff31dfaf2d4f50dadbced60
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 991d30945797a6e820660bc9a8211f6a96831f1fc007f11bc42150b076dd696bd736f43cddd4ccdb996ef1021b44316bc1e46a7c9a95a5131124264085fd0aa1
|
7
|
+
data.tar.gz: f91a46bd0fb607f8ecd00e303149c6c4dca414275ce303a14818a97db351126e5b79d181f5d4262f2683232bf4f98e529ba15389e817954bce3cad1ec6519323
|
data/Gemfile.lock
CHANGED
data/exe/popito
CHANGED
@@ -6,7 +6,7 @@ module Popito
|
|
6
6
|
def download_and_extract(stage:)
|
7
7
|
payload = { stage: stage, build_config: config_payload.build_config,
|
8
8
|
included_files: config_payload.included_files_payload }
|
9
|
-
response = RestClient.post("#{
|
9
|
+
response = RestClient.post("#{config_payload.api_endpoint}/api/v1/archive", payload, headers = default_headers)
|
10
10
|
extract_tgz(response.body)
|
11
11
|
rescue RestClient::UnprocessableEntity => e
|
12
12
|
raise parse_error(e)
|
@@ -4,7 +4,7 @@ require 'minitar'
|
|
4
4
|
module Popito
|
5
5
|
class IncludedFiles < Popito::ClientBase
|
6
6
|
def included_files_list
|
7
|
-
response = RestClient.get("#{
|
7
|
+
response = RestClient.get("#{config_payload.api_endpoint}/api/v1/included-files", headers = default_headers)
|
8
8
|
JSON.parse(response.body)
|
9
9
|
rescue RestClient::UnprocessableEntity => e
|
10
10
|
raise parse_error(e)
|
@@ -1,9 +1,9 @@
|
|
1
1
|
require 'base64'
|
2
2
|
module Popito
|
3
3
|
class ConfigPayload
|
4
|
-
attr_accessor :project_path, :build_path, :deploy_path, :stages, :build_config, :project_token, :included_files
|
4
|
+
attr_accessor :project_path, :build_path, :deploy_path, :stages, :build_config, :project_token, :included_files, :api_endpoint
|
5
5
|
|
6
|
-
def initialize(project_path:, project_token:, stages: [], build_config: {}, included_files: [])
|
6
|
+
def initialize(project_path:, project_token:, stages: [], build_config: {}, included_files: [], api_endpoint: 'http://localhost:3000')
|
7
7
|
self.project_path = File.expand_path(project_path)
|
8
8
|
self.build_path = File.expand_path("#{project_path}/#{Popito::BUILD_DIR_NAME}")
|
9
9
|
self.deploy_path = File.expand_path("#{project_path}/#{Popito::DEPLOY_DIR_NAME}")
|
@@ -11,6 +11,7 @@ module Popito
|
|
11
11
|
self.project_token = project_token
|
12
12
|
self.build_config = build_config
|
13
13
|
self.included_files = included_files
|
14
|
+
self.api_endpoint = api_endpoint
|
14
15
|
end
|
15
16
|
|
16
17
|
def included_files_payload
|