app_builder 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/app_builder/config.rb +21 -10
- data/lib/app_builder/uploader.rb +1 -1
- data/lib/app_builder/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3a9a7a2e2b527a50937de68b43d92875efd6d3ebed6b825d6ab85b2ac1b77fc
|
4
|
+
data.tar.gz: 50209788fbf7a82ecf0750156595830884972c319398a4415a64ec1dfa042641
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e2f8f7182e97a7d05c7415ceb8cf85a4b4548f5e091dc3411aa873a1b922d8968b14f2a0c96288eb6473be6eb9fad00f50e75b424f7133e124b33a89d471e62
|
7
|
+
data.tar.gz: 8795cfc3472e6eb06f81167c0eb718d1811b059c39e702a98c6834d57a2f58b9bd6c1d362ab3b72a04e968cc32e8c0067cf3680154bd54e796100356c21b6797
|
data/lib/app_builder/config.rb
CHANGED
@@ -1,14 +1,15 @@
|
|
1
1
|
module AppBuilder
|
2
2
|
class Config
|
3
3
|
CHANGEABLE_PARAMETERS = [
|
4
|
-
:build_id,
|
5
|
-
:project_name,
|
6
|
-
:remote_repository,
|
7
|
-
:branch,
|
8
|
-
:revision,
|
9
|
-
:upload_type,
|
10
|
-
:upload_id,
|
11
|
-
:
|
4
|
+
:build_id, # default: timestamp
|
5
|
+
:project_name, # default: repository name
|
6
|
+
:remote_repository, # default: remote origin
|
7
|
+
:branch, # default: TARGET_BRANCH or master
|
8
|
+
:revision, # default: commit hash
|
9
|
+
:upload_type, # :s3 or :http or :https (default: :s3)
|
10
|
+
:upload_id, # bucket name or remote host (default: none)
|
11
|
+
:remote_app_home_base, # default: /var/www
|
12
|
+
:logger, # default: AppBuilder::Logger
|
12
13
|
|
13
14
|
# hooks
|
14
15
|
:before_archive,
|
@@ -47,6 +48,7 @@ module AppBuilder
|
|
47
48
|
:remote_src_file,
|
48
49
|
:remote_manifest_file,
|
49
50
|
:src_url,
|
51
|
+
:manifest_url,
|
50
52
|
:remote_app_home,
|
51
53
|
].concat(CHANGEABLE_PARAMETERS).freeze
|
52
54
|
|
@@ -109,11 +111,19 @@ module AppBuilder
|
|
109
111
|
end
|
110
112
|
|
111
113
|
def src_url
|
112
|
-
|
114
|
+
uploaded_url(remote_src_file)
|
115
|
+
end
|
116
|
+
|
117
|
+
def manifest_url
|
118
|
+
uploaded_url(remote_manifest_file)
|
113
119
|
end
|
114
120
|
|
115
121
|
def remote_app_home
|
116
|
-
File.join(
|
122
|
+
File.join(remote_app_home_base, project_name)
|
123
|
+
end
|
124
|
+
|
125
|
+
def uploaded_url(path)
|
126
|
+
"#{upload_type.to_s}://#{File.join(upload_id, path)}"
|
117
127
|
end
|
118
128
|
|
119
129
|
def reset
|
@@ -127,6 +137,7 @@ module AppBuilder
|
|
127
137
|
@remote_manifest_path = "manifests"
|
128
138
|
@resource_user = ENV.fetch("USER", nil)
|
129
139
|
@resource_ssh_options = {}
|
140
|
+
@remote_app_home_base = "/var/www"
|
130
141
|
@logger = Logger.new(STDOUT)
|
131
142
|
@upload_type = :s3
|
132
143
|
|
data/lib/app_builder/uploader.rb
CHANGED
data/lib/app_builder/version.rb
CHANGED