traquitana 0.1.1 → 0.1.6

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.
data/spec/deploy_spec.rb CHANGED
@@ -1,11 +1,18 @@
1
- require "yaml"
2
- require "fileutils"
3
- require "minitest/autorun"
1
+ # frozen_string_literal: true
2
+
3
+ require 'yaml'
4
+ require 'fileutils'
5
+ require 'minitest/autorun'
4
6
  require "#{File.expand_path(File.dirname(__FILE__))}/../lib/traquitana.rb"
5
7
 
6
8
  describe Traquitana::Deployer do
7
- before do
8
- @config = Traquitana::Config.instance
9
- @deploy = Traquitana::Deployer.new
10
- end
9
+ before do
10
+ FileUtils.cd("#{__dir__}/config")
11
+ @config = Traquitana::Config.instance
12
+ @deploy = Traquitana::Deployer.new(verbose: true)
13
+ end
14
+
15
+ it 'deploys' do
16
+ @deploy.run
17
+ end
11
18
  end
data/spec/network_spec.rb CHANGED
@@ -1,56 +1,59 @@
1
- require "digest/md5"
2
- require "minitest/autorun"
1
+ require 'digest/md5'
2
+ require 'minitest/autorun'
3
3
  require "#{File.expand_path(File.dirname(__FILE__))}/../lib/traquitana.rb"
4
4
 
5
5
  describe Traquitana::SSH do
6
- before do
7
- @config = Traquitana::Config.instance
8
- @network = Traquitana::SSH.new(@config.host,@config.user)
9
- @send = "#{File.expand_path(File.dirname(__FILE__))}/config/network_test.txt"
10
- @md5 = Digest::MD5.hexdigest(File.read(@send))
11
-
12
- Dir.mkdir(@config.directory) if !File.exists?(@config.directory)
13
- end
14
-
15
- describe "configs" do
16
- it "should have a host attribute" do
17
- @network.must_respond_to(:host)
18
- end
19
-
20
- it "should have an user attribute" do
21
- @network.must_respond_to(:user)
22
- end
23
-
24
- it "should have an options attribute" do
25
- @network.must_respond_to(:options)
26
- end
27
- end
28
-
29
- describe "operations" do
30
- it "should have a send method" do
31
- @network.must_respond_to(:send_files)
32
- end
33
-
34
- it "should send a file to the remote host" do
35
- check = "#{@config.directory}/#{File.basename(@send)}"
36
- File.unlink(check) if File.exists?(check)
37
- @network.send_files([[@send,"#{@config.directory}/#{File.basename(@send)}"]],Traquitana::Bar.new)
38
- assert File.exists?(check)
39
- Digest::MD5.hexdigest(File.read(check)).must_equal @md5
40
- end
41
-
42
- it "should have a execute method" do
43
- @network.must_respond_to(:execute)
44
- end
45
-
46
- it "should execute a command on the remote host" do
47
- remote_dir = "#{@config.directory}/remote_dir"
48
- FileUtils.rmdir(remote_dir) if File.exists?(remote_dir)
49
- @network.execute(["mkdir #{@config.directory}/remote_dir"])
50
- assert File.exists?(remote_dir)
51
- end
52
- end
53
-
54
- describe "uploading" do
55
- end
6
+ before do
7
+ @config = Traquitana::Config.instance
8
+ @network = Traquitana::SSH.new(@config.host, @config.user)
9
+ @send = "#{File.expand_path(File.dirname(__FILE__))}/config/network_test.txt"
10
+ @md5 = Digest::MD5.hexdigest(File.read(@send))
11
+
12
+ Dir.mkdir(@config.directory) if !File.exists?(@config.directory)
13
+ end
14
+
15
+ describe 'configs' do
16
+ it 'should have a host attribute' do
17
+ expect(@network).must_respond_to :host
18
+ end
19
+
20
+ it 'should have an user attribute' do
21
+ expect(@network).must_respond_to :user
22
+ end
23
+
24
+ it 'should have an options attribute' do
25
+ expect(@network).must_respond_to :options
26
+ end
27
+ end
28
+
29
+ describe 'operations' do
30
+ it 'should have a send method' do
31
+ expect(@network).must_respond_to :send_files
32
+ end
33
+
34
+ it 'should send a file to the remote host' do
35
+ check = "#{@config.directory}/#{File.basename(@send)}"
36
+ File.unlink(check) if File.exists?(check)
37
+
38
+ @network.send_files([[@send, "#{@config.directory}/#{File.basename(@send)}"]], Traquitana::Bar.new)
39
+
40
+ expect(File.exists?(check)).must_equal true
41
+ expect(Digest::MD5.hexdigest(File.read(check))).must_equal @md5
42
+ end
43
+
44
+ it 'should have a execute method' do
45
+ expect(@network).must_respond_to :execute
46
+ end
47
+
48
+ it 'should execute a command on the remote host' do
49
+ remote_dir = "#{@config.directory}/remote_dir"
50
+ FileUtils.rmdir(remote_dir) if File.exists?(remote_dir)
51
+
52
+ @network.execute(["mkdir #{@config.directory}/remote_dir"])
53
+ expect(File.exists?(remote_dir)).must_equal true
54
+ end
55
+ end
56
+
57
+ describe "uploading" do
58
+ end
56
59
  end
@@ -1,44 +1,44 @@
1
- require "fileutils"
2
- require "minitest/autorun"
1
+ require 'fileutils'
2
+ require 'minitest/autorun'
3
+ require 'minitest/focus'
3
4
  require "#{File.expand_path(File.dirname(__FILE__))}/../lib/traquitana.rb"
4
5
 
5
6
  describe Traquitana::Packager do
6
- before do
7
- @packager = Traquitana::Packager.new(File.expand_path(File.dirname(__FILE__))+"/config/")
8
- end
9
-
10
- it "should have an id method" do
11
- @packager.must_respond_to(:id)
12
- end
13
-
14
- it "should return an id" do
15
- @packager.id.wont_be_nil
16
- end
17
-
18
- it "should have a list file method" do
19
- @packager.must_respond_to(:list_file)
20
- end
21
-
22
- it "should return the correct list file name" do
23
- id = @packager.id
24
- @packager.list_file.must_equal @packager.id+".list"
25
- end
26
-
27
- it "should have a zip file method" do
28
- @packager.must_respond_to(:zip_file)
29
- end
30
-
31
- it "should return the correct zip file name" do
32
- id = @packager.id
33
- @packager.zip_file.must_equal @packager.id+".zip"
34
- end
35
-
36
- it "should have a pack method" do
37
- @packager.must_respond_to(:pack)
38
- end
39
-
40
- it "should return the list and package file" do
41
- list, package = @packager.pack
42
- end
7
+ before do
8
+ @packager = Traquitana::Packager.new(File.expand_path(File.dirname(__FILE__)) + '/config/')
9
+ end
10
+
11
+ it 'should have an id method' do
12
+ expect(@packager).must_respond_to :id
13
+ end
14
+
15
+ it 'should return an id' do
16
+ expect(@packager.id).wont_be_nil
17
+ end
18
+
19
+ it 'should have a list file method' do
20
+ expect(@packager).must_respond_to :list_file
21
+ end
22
+
23
+ it 'should return the correct list file name' do
24
+ expect(@packager.list_file).must_equal @packager.id + '.list'
25
+ end
26
+
27
+ it 'should have a zip file method' do
28
+ expect(@packager).must_respond_to :zip_file
29
+ end
30
+
31
+ it 'should return the correct zip file name' do
32
+ expect(@packager.zip_file).must_equal @packager.id + '.zip'
33
+ end
34
+
35
+ it 'should have a pack method' do
36
+ expect(@packager).must_respond_to :pack
37
+ end
38
+
39
+ it 'should return the list and package file' do
40
+ list, package = @packager.pack
41
+ expect(list).wont_be_nil
42
+ expect(package).wont_be_nil
43
+ end
43
44
  end
44
-
@@ -1,14 +1,14 @@
1
- require "fileutils"
2
- require "minitest/autorun"
1
+ require 'fileutils'
2
+ require 'minitest/autorun'
3
3
  require "#{File.expand_path(File.dirname(__FILE__))}/../lib/traquitana.rb"
4
4
 
5
5
  describe Traquitana::Selector do
6
- it "should have a selected files method" do
7
- Traquitana::Selector.new.must_respond_to(:files)
8
- end
6
+ it 'should have a selected files method' do
7
+ expect(Traquitana::Selector.new).must_respond_to :files
8
+ end
9
9
 
10
- it "should return the file list" do
11
- list = Traquitana::Selector.new(File.expand_path(File.dirname(__FILE__))+"/config/").files
12
- list.size.must_equal 29
13
- end
10
+ it 'should return the file list' do
11
+ list = Traquitana::Selector.new(File.expand_path(File.dirname(__FILE__)) + '/config/').files
12
+ expect(list.size).must_equal 29
13
+ end
14
14
  end
data/traq/config.yml CHANGED
@@ -1,4 +1,5 @@
1
1
  # Default configuration---
2
+ :version: 0.1.5
2
3
  :directory: /tmp/traq_test
3
4
  :ignore: 24
4
5
  :user: taq
@@ -6,12 +7,19 @@
6
7
  - Rakefile
7
8
  - config.ru
8
9
  - Gemfile
10
+ - package.json
11
+ - babel.config.js
12
+ - postcss.config.js
9
13
  - - config/application.rb
10
14
  - - config/environment.rb
11
15
  - - config/initializers/**/*
12
16
  - - config/environments/production.rb
13
17
  - - config/locales/**/*
14
18
  - - config/routes.rb
19
+ - - config/storage.yml
20
+ - - config/webpacker.yml
21
+ - - config/webpack/environment.js
22
+ - - config/webpack/production.js
15
23
  - - app/**/*
16
24
  - - db/migrate/**/*
17
25
  - - public/javascripts/**/*
data/traquitana.gemspec CHANGED
@@ -2,25 +2,25 @@
2
2
  require File.expand_path('../lib/traquitana/version', __FILE__)
3
3
 
4
4
  Gem::Specification.new do |gem|
5
- gem.authors = ["Eustaquio Rangel"]
6
- gem.email = ["eustaquiorangel@gmail.com"]
5
+ gem.authors = ['Eustaquio Rangel']
6
+ gem.email = ['eustaquiorangel@gmail.com']
7
7
  gem.description = %q{Simple tool for deploy Rails apps}
8
8
  gem.summary = %q{Just a simple tool to deploy Rails apps with SSH and some shell scripts}
9
- gem.homepage = "http://github.com/taq/traquitana"
9
+ gem.homepage = 'http://github.com/taq/traquitana'
10
10
 
11
11
  gem.files = `git ls-files`.split($\)
12
- gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
12
+ gem.executables = gem.files.grep(%r{^bin/}).map { |f| File.basename(f) }
13
13
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
14
- gem.name = "traquitana"
15
- gem.require_paths = ["lib"]
14
+ gem.name = 'traquitana'
15
+ gem.require_paths = ['lib']
16
16
  gem.version = Traquitana::VERSION
17
17
 
18
- gem.add_dependency("rubyzip" , [">= 1.0.0"])
19
- gem.add_dependency("net-ssh" , [">= 0"])
20
- gem.add_dependency("net-scp" , [">= 0"])
21
- gem.add_dependency("highline", [">= 0"])
18
+ gem.add_dependency('highline', ['>= 0'])
19
+ gem.add_dependency('net-scp', ['>= 0'])
20
+ gem.add_dependency('net-ssh', ['>= 0'])
21
+ gem.add_dependency('rubyzip', ['>= 2.0.0'])
22
22
 
23
- gem.license = "GPL-2.0"
23
+ gem.license = 'GPL-2.0'
24
24
 
25
25
  gem.signing_key = '/home/taq/.gemcert/gem-private_key.pem'
26
26
  gem.cert_chain = ['gem-public_cert.pem']
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.1.1
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eustaquio Rangel
@@ -10,45 +10,49 @@ bindir: bin
10
10
  cert_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r4hrwGlUl+6eDUdxUktW2wIDAQABo4GG
25
+ MIGDMAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQWBBQeQRJ+Zb0whKTS
26
+ 5l+2kfAZROALwzAkBgNVHREEHTAbgRlldXN0YXF1aW9yYW5nZWxAZ21haWwuY29t
27
+ MCQGA1UdEgQdMBuBGWV1c3RhcXVpb3JhbmdlbEBnbWFpbC5jb20wDQYJKoZIhvcN
28
+ AQELBQADggGBAF60gRzDOWc7B6g4jQzR2Bi90pVSfUXRCkODqCaosSET18pXu63G
29
+ mXh4ACRSKMM3X6Cj2uDQEhrvWnxt0R5P1TD6G3uOXGzMAmihPVyCJyUCFwuxAt9V
30
+ GLCyn2Ti9MIT0FyujhEXSQdJjAyuDGtEkO2LIKBJ+CIbG68FBqc1k+UwPQiNJCgE
31
+ s3Fsha0Wv75uupzqu57FHXHSjdnBNeQHfdC+Ma8VIlWdKxfcxZKOEL589tnJTJHF
32
+ IRNTTxZFwTTvZy2aSvBb73m+clb36mlGO3emb/S3WMu2oOlmorHD4CAbyZjPTwIs
33
+ zYVH+Nlf2O8Li2j3QNGL0r2MNCJWeuhB23IOoL60AaxvpyHAbWnfOpqidQU1Zwpg
34
+ cXxQcroczXGs/RH1diJes5AihU97po1EVyVpxjkyiVZxd0fl+r3OR7iYSSNMrdpH
35
+ Ey5t62RSM7fM69lDtUa1Jmv/CCRAeeY4TQUFwDrnNYhxQshCWcrFWQMb4ExJtwbC
36
+ iQ4FrdvzJJS+rA==
33
37
  -----END CERTIFICATE-----
34
- date: 2017-06-03 00:00:00.000000000 Z
38
+ date: 2021-05-17 00:00:00.000000000 Z
35
39
  dependencies:
36
40
  - !ruby/object:Gem::Dependency
37
- name: rubyzip
41
+ name: highline
38
42
  requirement: !ruby/object:Gem::Requirement
39
43
  requirements:
40
44
  - - ">="
41
45
  - !ruby/object:Gem::Version
42
- version: 1.0.0
46
+ version: '0'
43
47
  type: :runtime
44
48
  prerelease: false
45
49
  version_requirements: !ruby/object:Gem::Requirement
46
50
  requirements:
47
51
  - - ">="
48
52
  - !ruby/object:Gem::Version
49
- version: 1.0.0
53
+ version: '0'
50
54
  - !ruby/object:Gem::Dependency
51
- name: net-ssh
55
+ name: net-scp
52
56
  requirement: !ruby/object:Gem::Requirement
53
57
  requirements:
54
58
  - - ">="
@@ -62,7 +66,7 @@ dependencies:
62
66
  - !ruby/object:Gem::Version
63
67
  version: '0'
64
68
  - !ruby/object:Gem::Dependency
65
- name: net-scp
69
+ name: net-ssh
66
70
  requirement: !ruby/object:Gem::Requirement
67
71
  requirements:
68
72
  - - ">="
@@ -76,19 +80,19 @@ dependencies:
76
80
  - !ruby/object:Gem::Version
77
81
  version: '0'
78
82
  - !ruby/object:Gem::Dependency
79
- name: highline
83
+ name: rubyzip
80
84
  requirement: !ruby/object:Gem::Requirement
81
85
  requirements:
82
86
  - - ">="
83
87
  - !ruby/object:Gem::Version
84
- version: '0'
88
+ version: 2.0.0
85
89
  type: :runtime
86
90
  prerelease: false
87
91
  version_requirements: !ruby/object:Gem::Requirement
88
92
  requirements:
89
93
  - - ">="
90
94
  - !ruby/object:Gem::Version
91
- version: '0'
95
+ version: 2.0.0
92
96
  description: Simple tool for deploy Rails apps
93
97
  email:
94
98
  - eustaquiorangel@gmail.com
@@ -117,7 +121,6 @@ files:
117
121
  - lib/cleaner.rb
118
122
  - lib/config.rb
119
123
  - lib/deployer.rb
120
- - lib/migrator.rb
121
124
  - lib/packager.rb
122
125
  - lib/selector.rb
123
126
  - lib/ssh.rb
@@ -164,7 +167,6 @@ files:
164
167
  - spec/config/public/stylesheets/application.css
165
168
  - spec/config_spec.rb
166
169
  - spec/deploy_spec.rb
167
- - spec/migrator_spec.rb
168
170
  - spec/network_spec.rb
169
171
  - spec/packager_spec.rb
170
172
  - spec/selector_spec.rb
@@ -189,8 +191,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
189
191
  - !ruby/object:Gem::Version
190
192
  version: '0'
191
193
  requirements: []
192
- rubyforge_project:
193
- rubygems_version: 2.6.11
194
+ rubygems_version: 3.1.4
194
195
  signing_key:
195
196
  specification_version: 4
196
197
  summary: Just a simple tool to deploy Rails apps with SSH and some shell scripts
@@ -236,7 +237,6 @@ test_files:
236
237
  - spec/config/public/stylesheets/application.css
237
238
  - spec/config_spec.rb
238
239
  - spec/deploy_spec.rb
239
- - spec/migrator_spec.rb
240
240
  - spec/network_spec.rb
241
241
  - spec/packager_spec.rb
242
242
  - spec/selector_spec.rb