traquitana 0.0.26 → 0.0.27

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
  SHA1:
3
- metadata.gz: ae8d0a6f15c4e20b0e2956bf8a83e62e7798ae24
4
- data.tar.gz: 20ae57a40aa1e11d7713e61ccd0e70a23cd836a0
3
+ metadata.gz: 0023c831ec77d6545377a52375f6261e83d715fb
4
+ data.tar.gz: bd9dda6ac25c6ce3a679db83b4af0c243e704ec8
5
5
  SHA512:
6
- metadata.gz: 753a9190f6db0be7672077eb7832b0937e7cef361917f05a60cb034927eb683bde41086655e3854293ddfb65d232411c08700e0548875fd15654406ff1dfe4a9
7
- data.tar.gz: 7542df5d9524aab1b0a183bed7ea9ebbfffa98f1bc26aa9815eca29697f7367150437fa86c462930f21139b086c645ea3f3ea830c07fb31da1d65475fcc2e8c9
6
+ metadata.gz: f14e132023064b2065698b4c2ab95071b8d0bb5b63bfcfc05903b356625c34748ab3df37ad639336f49616925a84bb1c1bb5a72f14769c883c7431bfdef628ea
7
+ data.tar.gz: dc354fe799f3837670d95aa8874239fe886bed7b54b475d071cc611e2dbe9a29a6823898710e4c827a2cd72ee14eae6bc79b60ce4e692b90f2f0a59c8f587bf6
Binary file
data.tar.gz.sig CHANGED
Binary file
data/Rakefile CHANGED
@@ -3,6 +3,8 @@ require "bundler/gem_tasks"
3
3
  require 'rake/testtask'
4
4
 
5
5
  Rake::TestTask.new do |t|
6
- t.libs = ["lib"]
6
+ t.libs = ["lib"]
7
7
  t.test_files = FileList['spec/**/*_spec.rb']
8
+ t.verbose = false
9
+ t.warning = false
8
10
  end
@@ -1,21 +1,21 @@
1
1
  -----BEGIN CERTIFICATE-----
2
2
  MIIDhTCCAm2gAwIBAgIBATANBgkqhkiG9w0BAQUFADBEMQwwCgYDVQQDDAN0YXEx
3
3
  HzAdBgoJkiaJk/IsZAEZFg9ldXN0YXF1aW9yYW5nZWwxEzARBgoJkiaJk/IsZAEZ
4
- FgNjb20wH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MhZELccG8VXnfUk5zfuFakoJPqFJ+W34tNhuf95AazAIQF3If4UFU=
21
21
  -----END CERTIFICATE-----
data/lib/bar.rb CHANGED
@@ -1,39 +1,40 @@
1
1
  module Traquitana
2
- class Bar
3
- attr_reader :current
4
- attr_accessor :name, :total
2
+ class Bar
3
+ attr_reader :current
4
+ attr_accessor :name, :total
5
5
 
6
- def initialize
7
- reset
8
- end
6
+ def initialize
7
+ reset
8
+ end
9
9
 
10
- def reset
11
- @name = nil
12
- @total = 0
13
- @current = 0
14
- @bar_size = 20
15
- @bar_step = 5
16
- end
10
+ def reset
11
+ @name = nil
12
+ @total = 0
13
+ @current = 0
14
+ @bar_size = 20
15
+ @bar_step = 5
16
+ end
17
17
 
18
- def indicator(current)
19
- bar = Array.new(@bar_size,"_")
20
- return bar.join if current<=0
18
+ def indicator(current)
19
+ bar = Array.new(@bar_size, "_")
20
+ return bar.join if current <= 0
21
21
 
22
- prop = current>0 ? ((100/(total/current.to_f))/@bar_step).to_i : 0
23
- return bar.join if prop<=0
22
+ prop = current > 0 ? ((100 / (total / current.to_f)) / @bar_step).to_i : 0
23
+ return bar.join if prop <= 0
24
24
 
25
- bar[0...prop] = Array.new(prop,"#")
26
- bar.join
27
- end
25
+ bar[0...prop] = Array.new(prop, "#")
26
+ bar.join
27
+ end
28
+
29
+ def update(current)
30
+ @current = current
31
+ file = File.basename(@name).ljust(25)
32
+ STDOUT.print "#{file} : #{self.indicator(current)}\r"
28
33
 
29
- def update(current)
30
- @current = current
31
- file = File.basename(@name).ljust(25)
32
- STDOUT.print "#{file} : #{self.indicator(current)}\r"
33
- if @current>=@total
34
- STDOUT.puts "\n"
35
- @current = -1
36
- end
34
+ if @current >= @total
35
+ STDOUT.puts "\n"
36
+ @current = -1
37
37
  end
38
- end
38
+ end
39
+ end
39
40
  end
@@ -1,18 +1,19 @@
1
1
  module Traquitana
2
- class Cleaner
3
- attr_accessor :network
2
+ class Cleaner
3
+ attr_accessor :network
4
4
 
5
- def initialize
6
- @config = Traquitana::Config.instance
7
- @config.load
8
- @options = @config.password.size>1 ? {:password=>@config.password} : {}
9
- @network = Traquitana::SSH.new(@config.host,@config.user,@options)
10
- end
5
+ def initialize
6
+ @config = Traquitana::Config.instance
7
+ @config.load
11
8
 
12
- def run
13
- STDOUT.print "Cleaning old files ... "
14
- @network.execute(["find #{@config.directory}/traq -type f -iname '*.zip' -o -iname '*.list' | sort | head -n-2 | xargs rm $1"])
15
- STDOUT.puts "done."
16
- end
17
- end
9
+ @options = @config.password.size > 1 ? { password: @config.password } : {}
10
+ @network = Traquitana::SSH.new(@config.host, @config.user, @options)
11
+ end
12
+
13
+ def run
14
+ STDOUT.print "Cleaning old files ... "
15
+ @network.execute(["find #{@config.directory}/traq -type f -iname '*.zip' -o -iname '*.list' | sort | head -n-2 | xargs rm $1"])
16
+ STDOUT.puts "done."
17
+ end
18
+ end
18
19
  end
@@ -1,61 +1,75 @@
1
1
  require "singleton"
2
2
 
3
3
  module Traquitana
4
- class Config
5
- include Singleton
6
- attr_accessor :filename, :target
7
-
8
- def initialize
9
- @configs = {}
10
- @filename = "config/traq.yml"
11
- load
12
- end
4
+ class Config
5
+ include Singleton
6
+ attr_accessor :filename, :target
7
+
8
+ def initialize
9
+ @configs = {}
10
+ @filename = "config/traq.yml"
11
+ @target = nil
12
+ load
13
+ end
14
+
15
+ def default
16
+ "#{File.dirname(File.expand_path(__FILE__))}/../config/default.yml"
17
+ end
18
+
19
+ def load(file = nil)
20
+ check_configs(file)
21
+ check_target
22
+ check_default_target
23
+ end
24
+
25
+ def method_missing(meth)
26
+ @configs[meth.to_s] || ""
27
+ end
13
28
 
14
- def default
15
- "#{File.dirname(File.expand_path(__FILE__))}/../config/default.yml"
29
+ def setup
30
+ STDOUT.puts "Running setup"
31
+
32
+ if File.exists?(self.filename)
33
+ STDERR.puts "The configuration file #{self.filename} already exists."
34
+ return false
16
35
  end
17
36
 
18
- def load(file=nil)
19
- @configs = YAML.load(File.read(file || self.filename)) rescue nil
20
- return if !@configs
21
-
22
- if @target
23
- if !@configs[@target]
24
- STDERR.puts "Target #{@target} not found."
25
- exit(1)
26
- end
27
- @configs = @configs[@target]
28
- STDOUT.puts "Loaded #{@target} target."
29
- end
30
- if !@target && @configs["default"]
31
- STDOUT.puts "Loading default target ..."
32
- @configs = @configs["default"]
33
- end
37
+ dir = File.dirname(self.filename)
38
+ Dir.mkdir(dir) if !File.exist?(dir)
39
+
40
+ STDOUT.puts "Writing #{self.filename}"
41
+ File.open(self.filename, "w") do |file|
42
+ file << "# Default configuration"
43
+ file << File.read(self.default)
34
44
  end
35
45
 
36
- def method_missing(meth)
37
- @configs[meth.to_s] || ""
46
+ STDOUT.puts "Setup completed!"
47
+ STDOUT.puts "You MUST check the configurations on #{self.filename} before deploying!"
48
+ true
49
+ end
50
+
51
+ private
52
+ def check_configs(file)
53
+ @configs = YAML.load(File.read(file || self.filename)) rescue nil
54
+ raise Exception.new("Configs not found (tried #{file} and #{self.filename}") if !@configs
55
+ end
56
+
57
+ def check_target
58
+ return if !@target
59
+ if !@configs[@target]
60
+ STDERR.puts "Target #{@target} not found."
61
+ exit(1)
38
62
  end
39
63
 
40
- def setup
41
- STDOUT.puts "Running setup"
42
- if File.exists?(self.filename)
43
- STDERR.puts "The configuration file #{self.filename} already exists."
44
- return false
45
- end
46
-
47
- dir = File.dirname(self.filename)
48
- Dir.mkdir(dir) if !File.exist?(dir)
49
-
50
- STDOUT.puts "Writing #{self.filename}"
51
- File.open(self.filename,"w") do |file|
52
- file << "# Default configuration"
53
- file << File.read(self.default)
54
- end
55
-
56
- STDOUT.puts "Setup completed!"
57
- STDOUT.puts "You MUST check the configurations on #{self.filename} before deploying!"
58
- true
64
+ @configs = @configs[@target]
65
+ STDOUT.puts "Loaded #{@target} target."
66
+ end
67
+
68
+ def check_default_target
69
+ if !@target && @configs["default"]
70
+ STDOUT.puts "Loading default target ..."
71
+ @configs = @configs["default"]
59
72
  end
60
- end
73
+ end
74
+ end
61
75
  end
@@ -20,16 +20,16 @@ module Traquitana
20
20
 
21
21
  @config.load
22
22
 
23
- @options = @config.password.size>1 ? {:password=>@config.password} : {}
24
- @server = @config.server.to_s.size>0 ? @config.server : "none"
25
- @shell = @config.shell ? "#{@config.shell} " : ""
26
- @network = Traquitana::SSH.new(@config.host,@config.user,@options)
23
+ @options = @config.password.size > 1 ? { password: @config.password } : {}
24
+ @server = @config.server.to_s.size > 0 ? @config.server : "none"
25
+ @shell = @config.shell ? "#{@config.shell} " : ""
26
+ @network = Traquitana::SSH.new(@config.host, @config.user, @options)
27
27
 
28
- @packager = Traquitana::Packager.new
29
- @packager.verbose = @verbose
28
+ @packager = Traquitana::Packager.new
29
+ @packager.verbose = @verbose
30
30
  all_list_file, all_list_zip = @packager.pack
31
- if !File.exists?(all_list_file) ||
32
- !File.exists?(all_list_zip)
31
+
32
+ if !File.exists?(all_list_file) || !File.exists?(all_list_zip)
33
33
  STDERR.puts "\e[31mCould not create the needed files.\e[0m"
34
34
  exit 2
35
35
  end
@@ -41,8 +41,8 @@ module Traquitana
41
41
  STDOUT.puts "Sending files ..."
42
42
  @network.send_files([["#{File.dirname(File.expand_path(__FILE__))}/../config/proc.sh","#{@config.directory}/traq/proc.sh"],
43
43
  ["#{File.dirname(File.expand_path(__FILE__))}/../config/#{@server}.sh","#{@config.directory}/traq/server.sh"],
44
- [all_list_file,"#{@config.directory}/traq/#{File.basename(all_list_file)}"],
45
- [all_list_zip ,"#{@config.directory}/traq/#{File.basename(all_list_zip)}"]],@updater)
44
+ [all_list_file,"#{@config.directory}/traq/#{File.basename(all_list_file)}"],
45
+ [all_list_zip ,"#{@config.directory}/traq/#{File.basename(all_list_zip)}"]],@updater)
46
46
  STDOUT.puts "\e[32mAll files sent.\e[0m\n\n"
47
47
 
48
48
  @network.execute(["chmod +x #{@config.directory}/traq/proc.sh"],@verbose)
@@ -1,25 +1,25 @@
1
1
  require "yaml"
2
2
 
3
3
  module Traquitana
4
- class Migrator
5
- def run
6
- old_file = "./traq/config.yml"
7
- new_file = "./config/traq.yml"
4
+ class Migrator
5
+ def run
6
+ old_file = "./traq/config.yml"
7
+ new_file = "./config/traq.yml"
8
8
 
9
- return false if !File.exists?(old_file) || File.exists?(new_file)
9
+ return false if !File.exists?(old_file) || File.exists?(new_file)
10
10
 
11
- STDOUT.puts "Migrating old config file ..."
12
- contents = YAML.load(File.read(old_file))
13
- contents = contents.inject({}) {|hash,val| hash[val.first.to_s] = val.last; hash}.reject {|k,v| k=="ignore"}.to_yaml
14
- File.open(new_file,"w") {|f| f<<contents}
11
+ STDOUT.puts "Migrating old config file ..."
12
+ contents = YAML.load(File.read(old_file))
13
+ contents = contents.inject({}) {|hash,val| hash[val.first.to_s] = val.last; hash}.reject { |k,v| k == "ignore"}.to_yaml
14
+ File.open(new_file, "w") { |f| f << contents }
15
15
 
16
- File.unlink(old_file)
17
- first_run = "#{File.dirname(old_file)}/.first_run"
18
- File.unlink(first_run) if File.exists?(first_run)
16
+ File.unlink(old_file)
17
+ first_run = "#{File.dirname(old_file)}/.first_run"
18
+ File.unlink(first_run) if File.exists?(first_run)
19
19
 
20
- dir = "#{File.dirname(old_file)}"
21
- Dir.unlink(dir) if Dir.exists?(dir)
22
- true
23
- end
24
- end
20
+ dir = "#{File.dirname(old_file)}"
21
+ Dir.unlink(dir) if Dir.exists?(dir)
22
+ true
23
+ end
24
+ end
25
25
  end
@@ -2,43 +2,43 @@ require "tmpdir"
2
2
  require "zip"
3
3
 
4
4
  module Traquitana
5
- class Packager
6
- attr_reader :id
7
- attr_accessor :verbose
5
+ class Packager
6
+ attr_reader :id
7
+ attr_accessor :verbose
8
8
 
9
- def initialize(dir="")
10
- @dir = dir
11
- @id = Time.now.strftime("%Y%m%d%H%M%S%L")
12
- @verbose = verbose
13
- end
9
+ def initialize(dir = "")
10
+ @dir = dir
11
+ @id = Time.now.strftime("%Y%m%d%H%M%S%L")
12
+ @verbose = verbose
13
+ end
14
14
 
15
- def list_file
16
- "#{@id}.list"
17
- end
15
+ def list_file
16
+ "#{@id}.list"
17
+ end
18
18
 
19
- def zip_file
20
- "#{@id}.zip"
21
- end
19
+ def zip_file
20
+ "#{@id}.zip"
21
+ end
22
22
 
23
- def pack
24
- list_path = "#{Dir.tmpdir}/#{self.list_file}"
25
- zip_path = "#{Dir.tmpdir}/#{self.zip_file}"
26
- list = Traquitana::Selector.new(@dir).files
27
- regex = @dir.to_s.size<1 ? "" : Regexp.new("^#{@dir}")
23
+ def pack
24
+ list_path = "#{Dir.tmpdir}/#{self.list_file}"
25
+ zip_path = "#{Dir.tmpdir}/#{self.zip_file}"
26
+ list = Traquitana::Selector.new(@dir).files
27
+ regex = @dir.to_s.size < 1 ? "" : Regexp.new("^#{@dir}")
28
28
 
29
- # write list file
30
- STDOUT.puts "Creating the list file: #{list_path}" if @verbose
31
- File.open(list_path,"w") {|file| file << list.map {|f| f.sub(regex,"")}.join("\n") }
29
+ # write list file
30
+ STDOUT.puts "Creating the list file: #{list_path}" if @verbose
31
+ File.open(list_path, "w") {|file| file << list.map { |f| f.sub(regex,"") }.join("\n") }
32
32
 
33
- # write zip file
34
- STDOUT.puts "Creating the zip file : #{zip_path}" if @verbose
35
- Zip::File.open(zip_path ,"w") do |zip_file|
36
- for file in list
37
- strip = file.sub(regex,"")
38
- zip_file.add(strip,file)
39
- end
40
- end
41
- [list_path,zip_path]
33
+ # write zip file
34
+ STDOUT.puts "Creating the zip file : #{zip_path}" if @verbose
35
+ Zip::File.open(zip_path, "w") do |zip_file|
36
+ for file in list
37
+ strip = file.sub(regex, "")
38
+ zip_file.add(strip, file)
39
+ end
42
40
  end
43
- end
41
+ [ list_path, zip_path ]
42
+ end
43
+ end
44
44
  end
@@ -1,24 +1,26 @@
1
1
  module Traquitana
2
- class Selector
3
- def initialize(dir="")
4
- @dir = dir
5
- end
2
+ class Selector
3
+ def initialize(dir = "")
4
+ @dir = dir
5
+ end
6
+
7
+ def files
8
+ config = Traquitana::Config.instance
9
+ selected = []
10
+
11
+ for file in config.list
12
+ send, *ignore = *file
13
+ mask = "#{@dir}#{send}"
14
+ send_list = Dir.glob(mask).select { |f| File.file?(f) }
6
15
 
7
- def files
8
- config = Traquitana::Config.instance
9
- selected = []
10
- for file in config.list
11
- send, *ignore = *file
12
- mask = "#{@dir}#{send}"
13
- send_list = Dir.glob(mask).select { |f| File.file?(f) }
14
- for ignore_mask in ignore
15
- mask = "#{@dir}#{ignore_mask}"
16
- ignore_list = Dir.glob(mask).select { |f| File.file?(f) }
17
- send_list = send_list - ignore_list if ignore_list.size>0
18
- end
19
- selected.push(*send_list)
20
- end
21
- selected
16
+ for ignore_mask in ignore
17
+ mask = "#{@dir}#{ignore_mask}"
18
+ ignore_list = Dir.glob(mask).select { |f| File.file?(f) }
19
+ send_list = send_list - ignore_list if ignore_list.size > 0
20
+ end
21
+ selected.push(*send_list)
22
22
  end
23
- end
23
+ selected
24
+ end
25
+ end
24
26
  end
data/lib/ssh.rb CHANGED
@@ -6,7 +6,7 @@ module Traquitana
6
6
  class SSH
7
7
  attr_reader :host, :user, :options
8
8
 
9
- def initialize(host,user,options=nil)
9
+ def initialize(host, user, options = nil)
10
10
  @host = host
11
11
  @user = user
12
12
  @options = options || {}
@@ -26,29 +26,30 @@ module Traquitana
26
26
  rst << ch.exec(cmd)
27
27
  end # for
28
28
 
29
- ch.on_data do |ch, data|
29
+ ch.on_data do |chd, data|
30
30
  msg = data.inspect.to_s.gsub(/^"/,"").gsub(/"$/,"").gsub(/"\\"/,"\\").gsub("\\r","").gsub("\\n","\n").gsub("\\e","\e").strip.chomp
31
31
  if data.inspect =~ /sudo/
32
- pwd = ask("\nNeed password to run as root/sudo: ") {|c| c.echo = "*"}
32
+ pwd = ask("\nNeed password to run as root/sudo: ") { |c| c.echo = "*" }
33
33
  channel.send_data("#{pwd}\n")
34
34
  sleep 0.1
35
35
  else
36
36
  puts msg if msg.size > 1
37
37
  end
38
- ch.wait
38
+ chd.wait
39
39
  end
40
40
  end # tty
41
41
  end # channel
42
+ ssh.loop
42
43
  end # ssh start
43
44
  rst
44
45
  end
45
46
 
46
47
  def send_files(col,updater=nil)
47
- Net::SCP.start(@host,@user,@options) do |scp|
48
+ Net::SCP.start(@host, @user, @options) do |scp|
48
49
  for files in col
49
50
  from, to = *files
50
51
  next if from.nil? || to.nil?
51
- scp.upload!(from,to) do |ch,name,sent,total|
52
+ scp.upload!(from,to) do |ch, name, sent, total|
52
53
  if !updater.nil?
53
54
  updater.name = to
54
55
  updater.total = total
@@ -1,3 +1,3 @@
1
1
  module Traquitana
2
- VERSION = "0.0.26"
2
+ VERSION = "0.0.27"
3
3
  end
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: 0.0.26
4
+ version: 0.0.27
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eustaquio Rangel
@@ -12,25 +12,25 @@ cert_chain:
12
12
  -----BEGIN CERTIFICATE-----
13
13
  MIIDhTCCAm2gAwIBAgIBATANBgkqhkiG9w0BAQUFADBEMQwwCgYDVQQDDAN0YXEx
14
14
  HzAdBgoJkiaJk/IsZAEZFg9ldXN0YXF1aW9yYW5nZWwxEzARBgoJkiaJk/IsZAEZ
15
- FgNjb20wHhcNMTUwMjExMTY0OTEwWhcNMTYwMjExMTY0OTEwWjBEMQwwCgYDVQQD
15
+ FgNjb20wHhcNMTYwNDAyMjIzODAxWhcNMTcwNDAyMjIzODAxWjBEMQwwCgYDVQQD
16
16
  DAN0YXExHzAdBgoJkiaJk/IsZAEZFg9ldXN0YXF1aW9yYW5nZWwxEzARBgoJkiaJ
17
- k/IsZAEZFgNjb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCcDWwn
18
- S4H/r6CZ577XaroqFjsoRY+823lMw8gFbrWPPPsAsuma6oIc6LGE8Yn3ve0PXzkM
19
- +rHdoHQMlM9unlkLWyF0YMYdwSDrbymmpdlJBD6Etg2AdWGjcKJ2RS1wKgl5V7Dx
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Pzh/ivk18o96gwXIhQFD81TY6STmUcXBF5F90fyUnLmx2xA28O9
28
- rdyYjgCNiYXeVZ2Vehrsh7rij/DovExi9OaWYxDmnlPrTrDlCqANRP1FzBC3HVEs
29
- Z9ncTDY+w3EME375YJ3hAyl+DxTvARmrQfK7bGMubj9XICGqkPm8vJ2Sas8aUJZI
30
- J4J4HPo8DsPExBVYFK0wxk+E7+DpuJKeXHjREKPinlu9q78sfxQwp2Wi/kLMNTDf
31
- Hd5pxAM71WnkL+Y1GdxT8PMQhDpIxR34b40v4bIDbog91NqJFVKWg94=
26
+ bC5jb20wDQYJKoZIhvcNAQEFBQADggEBADA8Wu48wOBngTxogX8sTsz5JArv5Jv+
27
+ 9JMr1WI8ldCqpoPmIjo19luBmPd2aav3NgY1ZUrfjlnbO1p5P/KdVmcaM64bL1hV
28
+ pBvlfk/1yR8MqjMMX8vR2JHPlLN6M+7+fBI9fXnVtUmL6oIBk9gvyxxi0x2pp8UX
29
+ JaiwRuWr5x9rbt8xYvDmX/uVFIz0ZB9nB8kKX3I4viJZ8JS6ZNNCpq8Qri8DURq2
30
+ JzBjXv5+jP7BaxFmlTOJBcCLZQATZKINFqzb7fMkFfbnMdKdcs1P7wkzKw18sP/t
31
+ FYMhZELccG8VXnfUk5zfuFakoJPqFJ+W34tNhuf95AazAIQF3If4UFU=
32
32
  -----END CERTIFICATE-----
33
- date: 2015-02-11 00:00:00.000000000 Z
33
+ date: 2016-04-02 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: rubyzip
metadata.gz.sig CHANGED
Binary file