popito 0.0.1.alpha → 0.0.2.alpha

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
  SHA256:
3
- metadata.gz: 3e56e16a84c3bf667dab3e304d6d83581bebfcdeceeae420efb78d27af8f08f9
4
- data.tar.gz: 1312c4cc5388d955f3c871cbedf267c6ff07d554ebe9e21555ded7957ca4334b
3
+ metadata.gz: 3a9d70fc64c62da1cec61bd91b7e4b6ae012b2399888cb5eb97fd16896f0d1a5
4
+ data.tar.gz: d336b6c6d8deece10e61af4e323c24e1068435fbcff31dfaf2d4f50dadbced60
5
5
  SHA512:
6
- metadata.gz: f87b027418d1663b04f489cf6dcd20aa6894901c3f14d366fcc9657f5b8e6276eb8ae9fd8f648d7554a6533d1da11e7166e624117f802f4a759236c043837bf5
7
- data.tar.gz: 51a241c5d4ac3f04572d20df75e593dcf80b5b6760769297e97e1a208854072594dd7038f720cd148a725da730b84599a69c63ca9b983512f539b6ee8fb708c3
6
+ metadata.gz: 991d30945797a6e820660bc9a8211f6a96831f1fc007f11bc42150b076dd696bd736f43cddd4ccdb996ef1021b44316bc1e46a7c9a95a5131124264085fd0aa1
7
+ data.tar.gz: f91a46bd0fb607f8ecd00e303149c6c4dca414275ce303a14818a97db351126e5b79d181f5d4262f2683232bf4f98e529ba15389e817954bce3cad1ec6519323
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- popito (0.0.1.alpha)
4
+ popito (0.0.2.alpha)
5
5
  deep_merge (~> 1.2)
6
6
  erb (~> 2.2)
7
7
  json (~> 2.5)
data/exe/popito CHANGED
@@ -30,6 +30,7 @@ config_payload = Popito::ConfigPayload.new(
30
30
  project_path: params[:path],
31
31
  stages: stages,
32
32
  project_token: params[:token],
33
+ api_endpoint: params[:endpoint],
33
34
  build_config: {
34
35
  IMAGE_TAG: params[:tag],
35
36
  IMAGE_TAG_ALT: params[:tag_alt],
@@ -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("#{API_HOST}/api/v1/archive", payload, headers = default_headers)
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("#{API_HOST}/api/v1/included-files", headers = default_headers)
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Popito
4
- VERSION = "0.0.1.alpha"
4
+ VERSION = "0.0.2.alpha"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: popito
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.alpha
4
+ version: 0.0.2.alpha
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wagner Caixeta