ruboty-capistrano 0.1.3 → 0.1.4
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
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 98eb1ff20faf98c4324e0251dd1bde9558598c197083db240ee8ffda0a45db67
|
|
4
|
+
data.tar.gz: 44190bd6165237e7c36ecfba627d1a4e686f760eb7c2a8b499f110c72f83ee11
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ab23f72acc0b7122beb6a93bab71ceae38de1c5d7fe9ec7e0955887bc4b2494bb71c5e69dfed4940c9507b02c455ca8f5e88119be759a0ed762e58efb805281d
|
|
7
|
+
data.tar.gz: e3ec5c9723f4c8f9a07e2a67a8a1223f4689de81ca3fa725150b4f0c1448585d711d51a0d166ed50530e367555d42f57806f60f0a14f01df66fd8eed66c12cbd
|
data/{LICENSE.txt → LICENSE}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
The MIT License (MIT)
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2016 Morioka Shuhei
|
|
3
|
+
Copyright (c) 2016 Morioka Shuhei (selmertsx) and Speee, Inc.
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
data/lib/ruboty/capistrano.rb
CHANGED
|
@@ -16,12 +16,12 @@ module Ruboty
|
|
|
16
16
|
@config ||= Ruboty::Capistrano::Config.config
|
|
17
17
|
end
|
|
18
18
|
|
|
19
|
-
def self.
|
|
19
|
+
def self.logger
|
|
20
20
|
return STDOUT if Ruboty::Capistrano.config.log_path.to_s.empty?
|
|
21
21
|
return @logger if @logger
|
|
22
22
|
|
|
23
|
-
log_path = File.join(Ruboty::Capistrano.config.log_path, "#{DateTime.now.strftime('%Y%m%d
|
|
24
|
-
@logger = Logger.new(
|
|
23
|
+
log_path = File.join(Ruboty::Capistrano.config.log_path, "#{DateTime.now.strftime('%Y%m%d')}.log")
|
|
24
|
+
@logger = Logger.new(log_path)
|
|
25
25
|
end
|
|
26
26
|
end
|
|
27
27
|
end
|
|
@@ -37,12 +37,28 @@ module Ruboty
|
|
|
37
37
|
Ruboty::Capistrano.config.local_repo_path[role]
|
|
38
38
|
end
|
|
39
39
|
|
|
40
|
+
def cmd
|
|
41
|
+
return @cmd if @cmd
|
|
42
|
+
cmd_ary = []
|
|
43
|
+
cmd_ary << "cd #{repo_path}"
|
|
44
|
+
version_file = "#{repo_path}/.ruby-version"
|
|
45
|
+
if Ruboty::Capistrano.config.rbenv_root && File.exist?(version_file)
|
|
46
|
+
cmd_ary << "RBENV_VERSION=\"$(cat #{version_file})\" rbenv exec bundle"
|
|
47
|
+
cmd_ary << "RBENV_VERSION=\"$(cat #{version_file})\" rbenv exec bundle exec cap #{env} deploy BRANCH=#{branch}"
|
|
48
|
+
else
|
|
49
|
+
cmd_ary << 'bundle'
|
|
50
|
+
cmd_ary << "bundle exec cap #{env} deploy BRANCH=#{branch}"
|
|
51
|
+
end
|
|
52
|
+
@cmd = cmd_ary.join(' && ')
|
|
53
|
+
end
|
|
54
|
+
|
|
40
55
|
def deploy
|
|
41
|
-
|
|
56
|
+
Ruboty::Capistrano.logger.info("RUN: #{cmd}")
|
|
42
57
|
out, err, status = Bundler.with_clean_env { Open3.capture3(cmd) }
|
|
58
|
+
Ruboty::Capistrano.logger.info(out)
|
|
43
59
|
return if err.empty?
|
|
44
60
|
|
|
45
|
-
Ruboty::Capistrano.logger
|
|
61
|
+
Ruboty::Capistrano.logger.error(err)
|
|
46
62
|
errors << 'deploy中にエラーが発生しました'
|
|
47
63
|
end
|
|
48
64
|
end
|
|
@@ -17,6 +17,7 @@ module Ruboty
|
|
|
17
17
|
config.log_path = ENV['DEPLOY_LOG_PATH']
|
|
18
18
|
config.remote_repo_path = extract.call(ENV['REMOTE_REPOSITORY_PATH'])
|
|
19
19
|
config.local_repo_path = extract.call(ENV['LOCAL_REPOSITORY_PATH'])
|
|
20
|
+
config.rbenv_root = ENV['RBENV_ROOT']
|
|
20
21
|
end
|
|
21
22
|
end
|
|
22
23
|
end
|
data/ruboty-capistrano.gemspec
CHANGED
|
@@ -6,7 +6,7 @@ require 'ruboty/capistrano/version'
|
|
|
6
6
|
Gem::Specification.new do |spec|
|
|
7
7
|
spec.name = "ruboty-capistrano"
|
|
8
8
|
spec.version = Ruboty::Capistrano::VERSION
|
|
9
|
-
spec.authors = ["Morioka Shuhei"]
|
|
9
|
+
spec.authors = ["Morioka Shuhei (selmertsx)", "Speee, Inc."]
|
|
10
10
|
spec.email = ["selmertsx@gmail.com"]
|
|
11
11
|
|
|
12
12
|
spec.summary = %q{ Ruboty plugin for deploy application via capistrano.}
|
metadata
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ruboty-capistrano
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
|
-
- Morioka Shuhei
|
|
7
|
+
- Morioka Shuhei (selmertsx)
|
|
8
|
+
- Speee, Inc.
|
|
8
9
|
autorequire:
|
|
9
10
|
bindir: exe
|
|
10
11
|
cert_chain: []
|
|
11
|
-
date:
|
|
12
|
+
date: 2018-06-06 00:00:00.000000000 Z
|
|
12
13
|
dependencies:
|
|
13
14
|
- !ruby/object:Gem::Dependency
|
|
14
15
|
name: activesupport
|
|
@@ -119,7 +120,7 @@ files:
|
|
|
119
120
|
- CODE_OF_CONDUCT.md
|
|
120
121
|
- Gemfile
|
|
121
122
|
- Gemfile.lock
|
|
122
|
-
- LICENSE
|
|
123
|
+
- LICENSE
|
|
123
124
|
- README.md
|
|
124
125
|
- Rakefile
|
|
125
126
|
- bin/console
|
|
@@ -152,7 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
152
153
|
version: '0'
|
|
153
154
|
requirements: []
|
|
154
155
|
rubyforge_project:
|
|
155
|
-
rubygems_version: 2.6
|
|
156
|
+
rubygems_version: 2.7.6
|
|
156
157
|
signing_key:
|
|
157
158
|
specification_version: 4
|
|
158
159
|
summary: Ruboty plugin for deploy application via capistrano.
|