app_builder 0.1.1 → 0.1.2

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: 90d50fefbbf304f1583a317d7e75d2a7b76522f3a3853afc4f10a5a7d317e782
4
- data.tar.gz: 6f435137c829b1f7e5228c2c773262ade74ca48afb6a8c397eb05d440d379ffd
3
+ metadata.gz: 7f082bfd74839a0da79160de4b4e0d8cc76428c45edba8de0a693c315fdafc89
4
+ data.tar.gz: 42854ccc07fe1e5a86f789a724e90dd8c3a88cefeed15c612f858747a898d975
5
5
  SHA512:
6
- metadata.gz: 31819cb8c80f1ff2ba9c1b6bc9f7488f67635ac310350741f7fe640846349aa489d7d5a1a08da30e1138e5b21230408d6d7e924c8bf1f9c295f7480f0ca0c63b
7
- data.tar.gz: dccdc528227c9dae120e398dbe30a2ae48952292c825c7e1a83038f912c9189c491c1cc49d9ae81c8198c6ea57aee85704b062979dc6891f1554ad1941bed3a1
6
+ metadata.gz: 39737fe2d6a50f3d006f2fac2580db2cd0b3f95a468e62174327f0bdf1e09a4b5e57f9a33e00ea5364d9d12708d5b79e71e79bfdb982dbd577071bd6163cd4b2
7
+ data.tar.gz: 897305cd932a00ff217c2b87adb1f282b829ab939fb9724549eb9ea0544c9d7545216a93b3bfb345d4d4b13dda6be37954efc10cfef76a01560482d093870c04
@@ -1,5 +1,11 @@
1
1
  module AppBuilder
2
2
  class Archiver < Base
3
+ class << self
4
+ def archive(config)
5
+ new(config).archive
6
+ end
7
+ end
8
+
3
9
  def archive
4
10
  execute("mkdir -p #{working_path} #{archive_path} #{build_path}")
5
11
  if File.exist?("#{repo_path}/HEAD")
@@ -1,5 +1,11 @@
1
1
  module AppBuilder
2
2
  class Builder < Base
3
+ class << self
4
+ def build(config)
5
+ new(config).build
6
+ end
7
+ end
8
+
3
9
  def build
4
10
  archiver.archive
5
11
  execute("tar zcf #{builded_src_path} .", chdir: archive_path)
@@ -32,8 +32,9 @@ module AppBuilder
32
32
 
33
33
  attr_accessor *VALID_OPTIONS
34
34
 
35
- def initialize
35
+ def initialize(options = {})
36
36
  reset
37
+ merge(options)
37
38
  end
38
39
 
39
40
  def merge(params)
@@ -84,7 +85,7 @@ module AppBuilder
84
85
  end
85
86
 
86
87
  def manifest_url
87
- File.join(manifest_base_url, build_name)
88
+ File.join(manifest_base_url, manifest_name)
88
89
  end
89
90
 
90
91
  def remote_app_home
@@ -4,6 +4,9 @@ dest: <%= remote_app_home %>/releases/<%= build_id %>
4
4
  commands:
5
5
  pre:
6
6
  - echo 'staring deploy'
7
+ - mkdir -p <%= remote_app_home %>/releases
8
+ - mkdir -p <%= remote_app_home %>/shared/log
9
+ - mkdir -p <%= remote_app_home %>/shared/pids
7
10
  post:
8
11
  - ln -nfs <%= remote_app_home %>/releases/<%= build_id %> <%= remote_app_home %>/current
9
12
  - rm -rf <%= remote_app_home %>/current/log
@@ -1,5 +1,11 @@
1
1
  module AppBuilder
2
2
  class Uploader < Base
3
+ class << self
4
+ def upload(config)
5
+ new(config).upload
6
+ end
7
+ end
8
+
3
9
  def upload
4
10
  builder.build
5
11
  if s3?(src_url)
@@ -1,3 +1,3 @@
1
1
  module AppBuilder
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: app_builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - i2bskn