ors 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/lib/ors.rb CHANGED
@@ -2,6 +2,7 @@ require "rubygems"
2
2
  require "git"
3
3
  require "yaml"
4
4
 
5
+ require "ors/version"
5
6
  require "ors/core_ext"
6
7
  require "ors/log_unifier"
7
8
  require "ors/config"
data/lib/ors/command.rb CHANGED
@@ -13,17 +13,22 @@ module ORS
13
13
  command, *options = args
14
14
  klass = command.to_s.capitalize
15
15
 
16
- if available_commands.include? klass
17
- ORS::Config.parse_options options
18
- ORS::Config.parse_config_file
19
-
20
- if ORS::Config.valid_options?
21
- Base.run ORS::Commands.const_get(klass)
16
+ if command =~ /-*version/i
17
+ puts "ORS v#{ORS::VERSION}"
18
+ else
19
+ if available_commands.include? klass
20
+ ORS::Config.parse_options options
21
+ ORS::Config.parse_config_file
22
+
23
+ if ORS::Config.valid_options?
24
+ Base.run ORS::Commands.const_get(klass)
25
+ else
26
+ puts "ERROR: Invalid options given."
27
+ Base.run Help
28
+ end
22
29
  else
23
30
  Base.run Help
24
31
  end
25
- else
26
- Base.run Help
27
32
  end
28
33
  end
29
34
 
data/lib/ors/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module ORS
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -21,6 +21,11 @@ describe ORS::Command do
21
21
  subject.run ["as0d9fja0s9djf"]
22
22
  end
23
23
 
24
+ it "should show the version when given version as a command" do
25
+ mock(ORS::Command).puts("ORS v#{ORS::VERSION}")
26
+ subject.run ["version"]
27
+ end
28
+
24
29
  end
25
30
 
26
31
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ors
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jason Dew and John Long
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-02-25 00:00:00 -05:00
18
+ date: 2011-02-28 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -138,7 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
138
138
  requirements: []
139
139
 
140
140
  rubyforge_project: ors
141
- rubygems_version: 1.4.1
141
+ rubygems_version: 1.5.2
142
142
  signing_key:
143
143
  specification_version: 3
144
144
  summary: Heroku-like deployment utilities for ORS