traquitana 0.1.2 → 0.1.3

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.
@@ -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/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.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eustaquio Rangel
@@ -11,48 +11,48 @@ cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
13
  MIIEVjCCAr6gAwIBAgIBATANBgkqhkiG9w0BAQsFADAqMSgwJgYDVQQDDB9ldXN0
14
- YXF1aW9yYW5nZWwvREM9Z21haWwvREM9Y29tMB4XDTE4MTExNDIwNTMxMVoXDTE5
15
- MTExNDIwNTMxMVowKjEoMCYGA1UEAwwfZXVzdGFxdWlvcmFuZ2VsL0RDPWdtYWls
16
- L0RDPWNvbTCCAaIwDQYJKoZIhvcNAQEBBQADggGPADCCAYoCggGBAKKJMledxeWV
17
- 5zzrIQ0NEfSOANd/P6MXg8j7nkO0huQDrk856B1/7I7oQkWy90xJJrBimaWuLGN8
18
- gcWQMNCr2RIRvoMirlAdQOrKgRcvUludBfGYOLtxnPVXuuaMuyike9jY50ba2ROP
19
- 04sTU3G18f7EF4+NTkqbN2lGedlyFtqX8+uGDAhiM7TV4agUU2p38043U1qudowR
20
- 8VmXzGwSLMsrz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1YVBO70NaOyJPjaXs+lc4PltdEF59+YDCIVjAAoQd31F7x+eO2pjr+Mu1
31
+ yH5aCyn1BwklE7TF8076SZK4MNLeD/KD3whOjL0k1xeQqAqaImf+oxDbhU3tJCEd
32
+ dfcBNOr98LHzsGEYQRB24Ksnw7dcEqWs/trbJrgA7lX2/8TAch5fSLgVDQwSLPk7
33
+ E34l4xf0bry+lF2zuD15Mps1ZDxJhKcgDWNg82huuVh1zqzNYqgWB1hYPBehhXGo
34
+ NdMU5fm01/k08H5psRBGWS/EcpX063ll3qcOGVqbPPH2U3LCYzWww+2PdslwJo/c
35
+ uek3m7n2XoRODoAGEm3apnmP8WWMEmI0tXdsvDBwoNVXEMkFnxD+RIMQPW22r3ZL
36
+ waOiThAR0oxaTQ==
37
37
  -----END CERTIFICATE-----
38
- date: 2018-11-14 00:00:00.000000000 Z
38
+ date: 2019-11-27 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
- name: rubyzip
41
+ name: highline
42
42
  requirement: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - ">="
45
45
  - !ruby/object:Gem::Version
46
- version: 1.0.0
46
+ version: '0'
47
47
  type: :runtime
48
48
  prerelease: false
49
49
  version_requirements: !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - - ">="
52
52
  - !ruby/object:Gem::Version
53
- version: 1.0.0
53
+ version: '0'
54
54
  - !ruby/object:Gem::Dependency
55
- name: net-ssh
55
+ name: net-scp
56
56
  requirement: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - ">="
@@ -66,7 +66,7 @@ dependencies:
66
66
  - !ruby/object:Gem::Version
67
67
  version: '0'
68
68
  - !ruby/object:Gem::Dependency
69
- name: net-scp
69
+ name: net-ssh
70
70
  requirement: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - ">="
@@ -80,19 +80,19 @@ dependencies:
80
80
  - !ruby/object:Gem::Version
81
81
  version: '0'
82
82
  - !ruby/object:Gem::Dependency
83
- name: highline
83
+ name: rubyzip
84
84
  requirement: !ruby/object:Gem::Requirement
85
85
  requirements:
86
86
  - - ">="
87
87
  - !ruby/object:Gem::Version
88
- version: '0'
88
+ version: 2.0.0
89
89
  type: :runtime
90
90
  prerelease: false
91
91
  version_requirements: !ruby/object:Gem::Requirement
92
92
  requirements:
93
93
  - - ">="
94
94
  - !ruby/object:Gem::Version
95
- version: '0'
95
+ version: 2.0.0
96
96
  description: Simple tool for deploy Rails apps
97
97
  email:
98
98
  - eustaquiorangel@gmail.com
@@ -121,7 +121,6 @@ files:
121
121
  - lib/cleaner.rb
122
122
  - lib/config.rb
123
123
  - lib/deployer.rb
124
- - lib/migrator.rb
125
124
  - lib/packager.rb
126
125
  - lib/selector.rb
127
126
  - lib/ssh.rb
@@ -168,7 +167,6 @@ files:
168
167
  - spec/config/public/stylesheets/application.css
169
168
  - spec/config_spec.rb
170
169
  - spec/deploy_spec.rb
171
- - spec/migrator_spec.rb
172
170
  - spec/network_spec.rb
173
171
  - spec/packager_spec.rb
174
172
  - spec/selector_spec.rb
@@ -193,8 +191,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
193
191
  - !ruby/object:Gem::Version
194
192
  version: '0'
195
193
  requirements: []
196
- rubyforge_project:
197
- rubygems_version: 2.7.6
194
+ rubygems_version: 3.0.3
198
195
  signing_key:
199
196
  specification_version: 4
200
197
  summary: Just a simple tool to deploy Rails apps with SSH and some shell scripts
@@ -240,7 +237,6 @@ test_files:
240
237
  - spec/config/public/stylesheets/application.css
241
238
  - spec/config_spec.rb
242
239
  - spec/deploy_spec.rb
243
- - spec/migrator_spec.rb
244
240
  - spec/network_spec.rb
245
241
  - spec/packager_spec.rb
246
242
  - spec/selector_spec.rb
metadata.gz.sig CHANGED
Binary file
data/lib/migrator.rb DELETED
@@ -1,25 +0,0 @@
1
- require "yaml"
2
-
3
- module Traquitana
4
- class Migrator
5
- def run
6
- old_file = "./traq/config.yml"
7
- new_file = "./config/traq.yml"
8
-
9
- return false if !File.exists?(old_file) || File.exists?(new_file)
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 }
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)
19
-
20
- dir = "#{File.dirname(old_file)}"
21
- Dir.unlink(dir) if Dir.exists?(dir)
22
- true
23
- end
24
- end
25
- end
@@ -1,75 +0,0 @@
1
- require "minitest/autorun"
2
- require "#{File.expand_path(File.dirname(__FILE__))}/../lib/traquitana.rb"
3
-
4
- describe Traquitana::Migrator do
5
- before do
6
- @migrator = Traquitana::Migrator.new
7
-
8
- @old_file = "#{File.expand_path(File.dirname(__FILE__))}/../traq/config.yml"
9
- @old_cont = File.read(@old_file)
10
-
11
- @new_file = "#{File.expand_path(File.dirname(__FILE__))}/../config/traq.yml"
12
- @new_cont = File.read(@new_file)
13
-
14
- File.unlink(@new_file)
15
- end
16
-
17
- after do
18
- FileUtils.mkdir(File.dirname(@old_file)) if !Dir.exists?(File.dirname(@old_file))
19
- FileUtils.mkdir(File.dirname(@new_file)) if !Dir.exists?(File.dirname(@new_file))
20
-
21
- File.open(@new_file,"w") {|f| f<<@new_cont}
22
- File.open(@old_file,"w") {|f| f<<@old_cont}
23
- end
24
-
25
- it "should have a run method" do
26
- @migrator.must_respond_to(:run)
27
- end
28
-
29
- it "should return false when there isn't an old config file" do
30
- contents = File.read(@old_file)
31
- File.unlink(@old_file)
32
- assert !@migrator.run
33
- File.open(@old_file,"w") {|f| f<<contents}
34
- end
35
-
36
- it "should return false if there is a new config file" do
37
- File.open(@new_file,"w") {|f| f<<@new_cont}
38
- assert !@migrator.run
39
- end
40
-
41
- it "should return true when there is an old config file" do
42
- assert @migrator.run
43
- end
44
-
45
- it "should have the new file after run" do
46
- File.unlink(@new_file) if File.exists?(@new_file)
47
- @migrator.run
48
- assert File.exists?(@new_file)
49
- end
50
-
51
- it "should not have the old file after run" do
52
- @migrator.run
53
- assert !File.exists?(@old_file)
54
- end
55
-
56
- it "should not have the old dir after run" do
57
- @migrator.run
58
- assert !Dir.exists?(File.dirname(@old_file))
59
- end
60
-
61
- it "should not have the ignore clause on the new file" do
62
- @migrator.run
63
- assert !YAML.load(File.read(@new_file)).include?("ignore")
64
- end
65
-
66
- it "should have all the keys of the old file on the new one" do
67
- old_content = YAML.load(File.read(@old_file)).reject {|k,v| k==:ignore}
68
- @migrator.run
69
- new_content = YAML.load(File.read(@new_file))
70
- old_content.each do |key,val|
71
- assert new_content.include?(key.to_s)
72
- assert new_content[key.to_s].to_s==old_content[key].to_s
73
- end
74
- end
75
- end