orca 0.3.1 → 0.3.2

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,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- orca (0.3.1)
4
+ orca (0.3.2)
5
5
  colored
6
6
  net-sftp
7
7
  net-ssh
data/README.md CHANGED
@@ -76,6 +76,13 @@ So here are some examples (assuming you have a package called "app" and a node c
76
76
 
77
77
  orca apply app server
78
78
  orca remove app server
79
+ orca validate app server
80
+
81
+ If you have a package with the same name as a group or server you can abreviate this to...
82
+
83
+ orca apply server
84
+ orca remove server
85
+ orca validate server
79
86
 
80
87
  You can also directly trigger actions from the CLI like so...
81
88
 
@@ -10,18 +10,18 @@ class Orca::Cli < Thor
10
10
  class_option :verbose, :type => :boolean, :desc => "print all SSH output, useful for debugging"
11
11
  class_option :'skip-dependancies', :type => :boolean, :desc => "Don't validate and run dependancies."
12
12
 
13
- desc "apply PACKAGE_NAME GROUP_OR_NODE_NAME", "apply the given package onto the given named group"
14
- def apply(package, group)
13
+ desc "apply PACKAGE_NAME [GROUP_OR_NODE_NAME]", "apply the given package onto the given named group"
14
+ def apply(package, group=package)
15
15
  run_command(package, group, :apply)
16
16
  end
17
17
 
18
- desc "remove PACKAGE_NAME GROUP_OR_NODE_NAME", "remove the given package onto the given named group"
19
- def remove(package, group)
18
+ desc "remove PACKAGE_NAME [GROUP_OR_NODE_NAME]", "remove the given package onto the given named group"
19
+ def remove(package, group=package)
20
20
  run_command(package, group, :remove)
21
21
  end
22
22
 
23
- desc "validate PACKAGE_NAME GROUP_OR_NODE_NAME", "run validation steps on the given named group"
24
- def validate(package, group)
23
+ desc "validate PACKAGE_NAME [GROUP_OR_NODE_NAME]", "run validation steps on the given named group"
24
+ def validate(package, group=package)
25
25
  run_command(package, group, :validate)
26
26
  end
27
27
 
@@ -43,7 +43,11 @@ class Orca::Node
43
43
 
44
44
  def remove(path)
45
45
  log('sftp', "REMOVE: #{path}")
46
- sftp.remove!(path)
46
+ begin
47
+ sftp.remove!(path)
48
+ rescue Net::SFTP::StatusException
49
+ sudo("rm #{path}")
50
+ end
47
51
  end
48
52
 
49
53
  def stat(path)
@@ -10,7 +10,7 @@ Gem::Specification.new do |gem|
10
10
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
11
11
  gem.name = "orca"
12
12
  gem.require_paths = ["lib"]
13
- gem.version = '0.3.1'
13
+ gem.version = '0.3.2'
14
14
  gem.add_dependency('colored')
15
15
  gem.add_dependency('net-ssh')
16
16
  gem.add_dependency('net-sftp')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: orca
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -132,7 +132,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
132
132
  version: '0'
133
133
  segments:
134
134
  - 0
135
- hash: -4313409858467376914
135
+ hash: -77465203265155118
136
136
  required_rubygems_version: !ruby/object:Gem::Requirement
137
137
  none: false
138
138
  requirements:
@@ -141,7 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
141
141
  version: '0'
142
142
  segments:
143
143
  - 0
144
- hash: -4313409858467376914
144
+ hash: -77465203265155118
145
145
  requirements: []
146
146
  rubyforge_project:
147
147
  rubygems_version: 1.8.23