traquitana 2.0.5 → 2.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/Gemfile.lock +13 -5
- data/README.md +10 -7
- data/lib/deployer.rb +15 -1
- data/lib/git.rb +11 -0
- data/lib/traquitana/version.rb +1 -1
- data/lib/traquitana.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +4 -3
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8796c0d24b549a6b7f848ffc2bc374a23590d312c0d49b83d9587b956e905e08
|
4
|
+
data.tar.gz: f23850ebdac4fac4e173132d1d55ff293178fca42b49a0744cb59cfb6c40672b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6aa9a2e32d9435b2806a5a624c8477a3e6533c9239d41672585eab142227ea85f35d2adde1f4a765757be4bcd50c4198d0b682f91cc97ff24e7623bb7d7fcd28
|
7
|
+
data.tar.gz: f753cee4d955b30333e8d575666366a3bee2421c559cf1b6f5e2fe3fa28e54c3aa92dae7cf0543f962eb7fbf1ed1978b1225914ec3643da2c34c68cd7aab3ea5
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
traquitana (0.
|
4
|
+
traquitana (2.0.6)
|
5
|
+
bcrypt_pbkdf
|
6
|
+
ed25519
|
5
7
|
highline
|
6
8
|
net-scp
|
7
9
|
net-ssh
|
@@ -10,10 +12,16 @@ PATH
|
|
10
12
|
GEM
|
11
13
|
remote: https://rubygems.org/
|
12
14
|
specs:
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
15
|
+
bcrypt_pbkdf (1.1.1)
|
16
|
+
ed25519 (1.3.0)
|
17
|
+
highline (3.1.1)
|
18
|
+
reline
|
19
|
+
io-console (0.7.2)
|
20
|
+
net-scp (4.0.0)
|
21
|
+
net-ssh (>= 2.6.5, < 8.0.0)
|
22
|
+
net-ssh (7.3.0)
|
23
|
+
reline (0.5.10)
|
24
|
+
io-console (~> 0.5)
|
17
25
|
rubyzip (2.3.2)
|
18
26
|
|
19
27
|
PLATFORMS
|
data/README.md
CHANGED
@@ -44,6 +44,9 @@ $ gem install traquitana
|
|
44
44
|
- ignore: it will just send the files that had changed on less than the number of hours configured here
|
45
45
|
- server: the webserver running on the server. ex: passenger
|
46
46
|
- list: the list of file patterns searched to send to the server
|
47
|
+
- branches: optional, will check if your Git current branch is allowed on
|
48
|
+
the branches listed here (comma separated), preventing from deploying from
|
49
|
+
a wrong branch
|
47
50
|
|
48
51
|
On the list can have two elements by row, like:
|
49
52
|
|
@@ -70,12 +73,12 @@ $ gem install traquitana
|
|
70
73
|
- Will create a list with the file names found
|
71
74
|
- Will zíp the files.
|
72
75
|
- Will send the list to the server, together with some control files.
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
76
|
+
- What the control files are for: they are shell scripts that will zip the
|
77
|
+
old files (based on what new files are going), unzip the new files, run
|
78
|
+
migrations if needed, run bundle install if the Gemfile contents changed
|
79
|
+
and restart the web server. There are two files: one generic to make all
|
80
|
+
sort of things BUT not restarting the web server. The webserver script will
|
81
|
+
be send based on what webserver you need.
|
79
82
|
|
80
83
|
- Now everything should be updated. On the next time you want to update your
|
81
84
|
project, just run traq again.
|
@@ -86,7 +89,7 @@ $ gem install traquitana
|
|
86
89
|
Use for your risk. I think it's all ok but I don't give you guarantee if it
|
87
90
|
break something.
|
88
91
|
|
89
|
-
##
|
92
|
+
## CLI options
|
90
93
|
|
91
94
|
There are some command line options:
|
92
95
|
|
data/lib/deployer.rb
CHANGED
@@ -11,7 +11,7 @@ module Traquitana
|
|
11
11
|
STDOUT.puts "\e[1mRunning Traquitana version #{VERSION}\e[0m\n\n"
|
12
12
|
|
13
13
|
unless File.exist?(@config.filename)
|
14
|
-
warn "\e[31mNo config file (#{@config.filename}) found
|
14
|
+
warn "\e[31mNo config file (#{@config.filename}) found.\e[0m"
|
15
15
|
warn "Did you run \e[1mtraq setup\e[0;31m ?"
|
16
16
|
warn "Run it and check the configuration before deploying.\e[0m"
|
17
17
|
exit 1
|
@@ -19,6 +19,8 @@ module Traquitana
|
|
19
19
|
|
20
20
|
@config.load
|
21
21
|
|
22
|
+
check_branches
|
23
|
+
|
22
24
|
@options = @config.password.size > 1 ? { password: @config.password } : {}
|
23
25
|
@server = @config.server.to_s.size > 0 ? @config.server : "none"
|
24
26
|
@shell = @config.shell ? "#{@config.shell} " : ""
|
@@ -66,5 +68,17 @@ module Traquitana
|
|
66
68
|
|
67
69
|
@config.filename
|
68
70
|
end
|
71
|
+
|
72
|
+
def check_branches
|
73
|
+
return if @config.branches.to_s.size < 1
|
74
|
+
|
75
|
+
current_branch = Git.current_branch
|
76
|
+
STDOUT.puts "Checking if current branch \e[1m#{current_branch}\e[0m is allowed in #{@config.branches}\n"
|
77
|
+
|
78
|
+
return if @config.branches.split(',').map(&:strip).include?(current_branch)
|
79
|
+
|
80
|
+
warn "Branch \e[31m#{current_branch}\e[0m not allowed to deploy!\n\n"
|
81
|
+
exit 1
|
82
|
+
end
|
69
83
|
end
|
70
84
|
end
|
data/lib/git.rb
ADDED
data/lib/traquitana/version.rb
CHANGED
data/lib/traquitana.rb
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: traquitana
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eustaquio Rangel
|
@@ -36,7 +36,7 @@ cert_chain:
|
|
36
36
|
NO+xAJE0adRapfa4LBdJ6bGWqGA7u39vdJcIAbyTbO17MMWXItJuD3zDdng/9JWP
|
37
37
|
XJH9EG4shjCU
|
38
38
|
-----END CERTIFICATE-----
|
39
|
-
date: 2024-
|
39
|
+
date: 2024-11-01 00:00:00.000000000 Z
|
40
40
|
dependencies:
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: highline
|
@@ -150,6 +150,7 @@ files:
|
|
150
150
|
- lib/cleaner.rb
|
151
151
|
- lib/config.rb
|
152
152
|
- lib/deployer.rb
|
153
|
+
- lib/git.rb
|
153
154
|
- lib/packager.rb
|
154
155
|
- lib/selector.rb
|
155
156
|
- lib/ssh.rb
|
@@ -219,7 +220,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
219
220
|
- !ruby/object:Gem::Version
|
220
221
|
version: '0'
|
221
222
|
requirements: []
|
222
|
-
rubygems_version: 3.5.
|
223
|
+
rubygems_version: 3.5.9
|
223
224
|
signing_key:
|
224
225
|
specification_version: 4
|
225
226
|
summary: Just a simple tool to deploy Rails apps with SSH and some shell scripts
|
metadata.gz.sig
CHANGED
Binary file
|