traquitana 0.0.7 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/config/default.yml +1 -0
  2. data/lib/config.rb +2 -2
  3. data/lib/deploy.rb +7 -2
  4. metadata +45 -66
data/config/default.yml CHANGED
@@ -22,3 +22,4 @@
22
22
  :password: fill your password here
23
23
  :host: localhost
24
24
  :server: passenger
25
+ :shell: bash -l -c
data/lib/config.rb CHANGED
@@ -20,8 +20,8 @@ module Traquitana
20
20
  "#{File.dirname(File.expand_path(__FILE__))}/../config/default.yml"
21
21
  end
22
22
 
23
- def load
24
- @configs = YAML.load(File.read(config))
23
+ def load(other=nil)
24
+ @configs = YAML.load(File.read(other || config))
25
25
  end
26
26
 
27
27
  def method_missing(meth)
data/lib/deploy.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module Traquitana
2
2
  class Deploy
3
- TRAQ_VERSION="0.0.5"
3
+ TRAQ_VERSION="0.0.10"
4
4
 
5
5
  def initialize
6
6
  @config = Traquitana::Config.instance
@@ -63,6 +63,7 @@ module Traquitana
63
63
  exit 1
64
64
  end
65
65
  @config.load
66
+ @shell = @config.shell ? "#{@config.shell} " : ""
66
67
 
67
68
  puts "Running Traquitana version #{TRAQ_VERSION}\n"
68
69
  puts "Connecting to #{@config.host} with #{@config.user}, sending files to #{@config.directory}"
@@ -132,7 +133,11 @@ module Traquitana
132
133
 
133
134
  Net::SSH.start(@config.host,@config.user,options) do |ssh|
134
135
  result = ""
135
- ssh.exec!("#{@config.directory}/traq/proc.sh #{@config.directory}/traq #{all_list_file.split(File.extname(all_list_file)).first}") do |channel, stream, data|
136
+ cmd = "#{@config.directory}/traq/proc.sh #{@config.directory}/traq #{all_list_file.split(File.extname(all_list_file)).first}"
137
+ cmd = "#{@shell} \"#{cmd}\"" if @shell
138
+ section_msg("Executing #{cmd} on remote host ...")
139
+
140
+ ssh.exec!(cmd) do |channel, stream, data|
136
141
  result << data
137
142
  end
138
143
  puts result
metadata CHANGED
@@ -1,70 +1,57 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: traquitana
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 0
8
- - 7
9
- version: 0.0.7
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.10
5
+ prerelease:
10
6
  platform: ruby
11
- authors:
7
+ authors:
12
8
  - Eustaquio 'TaQ' Rangel
13
9
  autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
-
17
- date: 2011-05-05 00:00:00 -03:00
12
+ date: 2011-05-05 00:00:00.000000000 -03:00
18
13
  default_executable:
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
21
16
  name: rubyzip
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
17
+ requirement: &75722500 !ruby/object:Gem::Requirement
24
18
  none: false
25
- requirements:
26
- - - ">="
27
- - !ruby/object:Gem::Version
28
- segments:
29
- - 0
30
- version: "0"
19
+ requirements:
20
+ - - ! '>='
21
+ - !ruby/object:Gem::Version
22
+ version: '0'
31
23
  type: :runtime
32
- version_requirements: *id001
33
- - !ruby/object:Gem::Dependency
34
- name: net-ssh
35
24
  prerelease: false
36
- requirement: &id002 !ruby/object:Gem::Requirement
25
+ version_requirements: *75722500
26
+ - !ruby/object:Gem::Dependency
27
+ name: net-ssh
28
+ requirement: &75722200 !ruby/object:Gem::Requirement
37
29
  none: false
38
- requirements:
39
- - - ">="
40
- - !ruby/object:Gem::Version
41
- segments:
42
- - 0
43
- version: "0"
30
+ requirements:
31
+ - - ! '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
44
34
  type: :runtime
45
- version_requirements: *id002
46
- - !ruby/object:Gem::Dependency
47
- name: net-scp
48
35
  prerelease: false
49
- requirement: &id003 !ruby/object:Gem::Requirement
36
+ version_requirements: *75722200
37
+ - !ruby/object:Gem::Dependency
38
+ name: net-scp
39
+ requirement: &75721890 !ruby/object:Gem::Requirement
50
40
  none: false
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- segments:
55
- - 0
56
- version: "0"
41
+ requirements:
42
+ - - ! '>='
43
+ - !ruby/object:Gem::Version
44
+ version: '0'
57
45
  type: :runtime
58
- version_requirements: *id003
46
+ prerelease: false
47
+ version_requirements: *75721890
59
48
  description: Simple tool for deploy Rails apps
60
49
  email: eustaquiorangel@gmail.com
61
- executables:
50
+ executables:
62
51
  - traq
63
52
  extensions: []
64
-
65
53
  extra_rdoc_files: []
66
-
67
- files:
54
+ files:
68
55
  - bin/traq
69
56
  - lib/config.rb
70
57
  - lib/deploy.rb
@@ -74,34 +61,26 @@ files:
74
61
  has_rdoc: true
75
62
  homepage: http://github.com/taq/traquitana
76
63
  licenses: []
77
-
78
64
  post_install_message:
79
65
  rdoc_options: []
80
-
81
- require_paths:
66
+ require_paths:
82
67
  - lib
83
- required_ruby_version: !ruby/object:Gem::Requirement
68
+ required_ruby_version: !ruby/object:Gem::Requirement
84
69
  none: false
85
- requirements:
86
- - - ">="
87
- - !ruby/object:Gem::Version
88
- segments:
89
- - 0
90
- version: "0"
91
- required_rubygems_version: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - ! '>='
72
+ - !ruby/object:Gem::Version
73
+ version: '0'
74
+ required_rubygems_version: !ruby/object:Gem::Requirement
92
75
  none: false
93
- requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- segments:
97
- - 0
98
- version: "0"
76
+ requirements:
77
+ - - ! '>='
78
+ - !ruby/object:Gem::Version
79
+ version: '0'
99
80
  requirements: []
100
-
101
81
  rubyforge_project:
102
- rubygems_version: 1.3.7
82
+ rubygems_version: 1.6.2
103
83
  signing_key:
104
84
  specification_version: 3
105
85
  summary: Simple tool for deploy Rails apps
106
86
  test_files: []
107
-