revans-sleeve 0.2.4 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2008 Code Wranglers, Inc. & Robert R Evans
1
+ Copyright (c) 2009 Code Wranglers, Inc. & Robert R Evans
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy of
4
4
  this software and associated documentation files (the "Software"), to deal in
data/bin/sleeve CHANGED
@@ -3,5 +3,9 @@
3
3
  require 'rubygems'
4
4
  require 'sleeve'
5
5
 
6
- options = Sleeve::Options.parse(ARGV)
7
- Sleeve::Generate.gem(options)
6
+ if ARGV.first.nil?
7
+ puts "You need to give a gem name: sleeve gem_name" and exit(0)
8
+ else
9
+ options = Sleeve::Options.parse(ARGV)
10
+ Sleeve::Generate.gem(options)
11
+ end
@@ -20,6 +20,8 @@ module Sleeve
20
20
  def self.gem(options)
21
21
  gen = new(options)
22
22
  gen.files
23
+ rescue
24
+ exit
23
25
  end
24
26
 
25
27
 
data/lib/sleeve/parser.rb CHANGED
@@ -4,19 +4,13 @@ module Sleeve
4
4
  # Parse Arguments being passed
5
5
  def self.parse(args)
6
6
  options = OpenStruct.new
7
- options.name = args.first.sub(/(\s+)/, "-")
7
+ options.name = args.first.sub(/(\s+)/, "-") unless args.first.nil?
8
8
 
9
9
  opts = OptionParser.new do |opts|
10
10
  opts.banner = "Usage: Creates a Sleeve for your Gem, so you can spend your time writing your Gem code instead of the sleeve that creates your Gem."
11
11
  opts.separator ""
12
12
  opts.separator "Specific Options:"
13
13
 
14
- # # Required Arguments
15
- # opts.on("--name NAME", "The Name of the Gem") do |ext|
16
- # options.name = ext
17
- # options.name.sub!(/(\s+)/, "-")
18
- # end
19
-
20
14
  # Optional Arguments
21
15
  opts.on("--path PATH", "The path of where you want your Gem to live. If not supplied, it will create the gem in the current Directory.") do |ext|
22
16
  options.path = ext || Dir.pwd
data/lib/sleeve.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Sleeve
2
- Version = "0.2.4"
2
+ Version = "0.2.6"
3
3
  class GemNameRequired < StandardError; end
4
4
  end
5
5
 
data/readme.markdown CHANGED
@@ -11,7 +11,7 @@ Sleeve is a very simple Gem Generator that creates a gemspec that can be used by
11
11
  git clone git://github.com/revans/sleeve.git
12
12
  cd sleeve
13
13
  gem build sleeve.gemspec
14
- sudo gem install sleeve-0.2.4.gem
14
+ sudo gem install sleeve-0.2.6.gem
15
15
 
16
16
  ## Usage
17
17
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: revans-sleeve
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Evans