coldshoulder 1.1.2 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -16,23 +16,27 @@ module Coldshoulder
16
16
 
17
17
  def parse!(commands)
18
18
  options = {}
19
- begin
20
- opts = OptionParser.new do |opts|
21
- opts.banner = "Usage: coldshoulder [options] [template name]"
22
- opts.separator ""
23
- opts.separator "Commands: "
24
-
25
- opts.on_tail("-v", "--version", "Display the version") do
26
- puts "Current version: #{Coldshoulder::VERSION}"
27
- end
28
-
29
- opts.on_tail("-h", "--help", "Displays this message") do
30
- puts opts
19
+ if self.command == "generate"
20
+ generate!
21
+ else
22
+ begin
23
+ opts = OptionParser.new do |opts|
24
+ opts.banner = "Usage: coldshoulder [options] [template name]"
25
+ opts.separator ""
26
+ opts.separator "Commands: "
27
+
28
+ opts.on_tail("-v", "--version", "Display the version") do
29
+ puts "Current version: #{Coldshoulder::VERSION}"
30
+ end
31
+
32
+ opts.on_tail("-h", "--help", "Displays this message") do
33
+ puts opts
34
+ end
31
35
  end
36
+ opts.parse!(commands)
37
+ rescue OptionParser::ParseError => e
38
+ puts "Error: #{e.message}"
32
39
  end
33
- opts.parse!(commands)
34
- rescue OptionParser::ParseError => e
35
- puts "Error: #{e.message}"
36
40
  end
37
41
  end
38
42
 
@@ -1,3 +1,3 @@
1
1
  module Coldshoulder
2
- VERSION = "1.1.2"
2
+ VERSION = "1.1.3"
3
3
  end
data/lib/coldshoulder.rb CHANGED
@@ -1,8 +1,8 @@
1
1
  require "coldshoulder/version"
2
2
  require 'coldshoulder/generator'
3
3
  require 'coldshoulder/commander'
4
+ require 'optparse'
4
5
 
5
6
  module Coldshoulder
6
7
  require 'curb'
7
-
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coldshoulder
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-14 00:00:00.000000000 Z
12
+ date: 2012-08-15 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Generate gitignore files with ease.
15
15
  email:
@@ -53,7 +53,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
53
53
  version: '0'
54
54
  requirements: []
55
55
  rubyforge_project:
56
- rubygems_version: 1.8.23
56
+ rubygems_version: 1.8.24
57
57
  signing_key:
58
58
  specification_version: 3
59
59
  summary: Written in Ruby, coldshoulder is a command line tool that will let you easily