gimmea 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cae1c8123cea1ecc3d63bfb6dd46d0b2796f11db
4
- data.tar.gz: f600d460471665de2342002492dd5033e3b13bd2
3
+ metadata.gz: 7a573bd336467540aee5dbb33c0c53346b6ffb01
4
+ data.tar.gz: 3b184511062789d343265223f85bc572d4e2cfa2
5
5
  SHA512:
6
- metadata.gz: e38e47111f0f21e3c5ca68a920849ac6a8f1ce70a0eaa074702cbef18dac88c531406117a09fb38d7e23600e323a3946e2c2055f354d27918074fdc95c391a1e
7
- data.tar.gz: f4d594fc83bff8e3336d585716483898e5f27f980577f2d31aeed84a5c16478ad567088d3368443a0ddbc36cdfd34eaf4e7076f4a634a1594c2287b12f2aee42
6
+ metadata.gz: 559e2c2465f6dd3671d9ff517ddab7d6fe03533420cf6fe7dd32f0f4555bb04b9e76c4b19e1f1bf8efa6b0ced7ef934ed175f47c7eb71b0072b6ae4f21269ead
7
+ data.tar.gz: 956d2c64692e1730601524308a4332a06592c39dd6b802cc018e285cd8ea36f7a85b4535f41b4b9ccab6a97f84bad30f689d36e4cb3ee3f72c0df4d3db60116c
data/README.md CHANGED
@@ -1,24 +1,15 @@
1
1
  # Gimmea
2
2
 
3
- TODO: Write a gem description
3
+ Sure, you can use `which` to find out where something is, but most of the time
4
+ I just use it to see if I have something installed. Gimmea is much more fun. :)
4
5
 
5
6
  ## Installation
6
7
 
7
- Add this line to your application's Gemfile:
8
-
9
- gem 'gimmea'
10
-
11
- And then execute:
12
-
13
- $ bundle
14
-
15
- Or install it yourself as:
16
-
17
8
  $ gem install gimmea
18
9
 
19
10
  ## Usage
20
11
 
21
- TODO: Write usage instructions here
12
+ $ gimmea thing
22
13
 
23
14
  ## Contributing
24
15
 
data/bin/gimmea CHANGED
@@ -1,5 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
+ # Let me run this without installing the gem
4
+ $:.unshift(File.expand_path('../lib', File.dirname(__FILE__)))
5
+
3
6
  require 'gimmea'
4
7
 
5
- Gimmea::Main.new(ARGV[0])
8
+ Gimmea::Main.check ARGV[0]
data/lib/gimmea.rb CHANGED
@@ -2,16 +2,19 @@ require "gimmea/version"
2
2
 
3
3
  module Gimmea
4
4
  class Main
5
- def initialize what
6
- if what.class == nil.class
5
+ def self.check what
6
+ if !what
7
7
  puts "Usage: gimmea ____"
8
8
  exit
9
9
  end
10
10
 
11
- if `which #{what}`.empty?
12
- puts "..."
13
- else
11
+ # This will be true or false depending on the return code of which
12
+ # Which means that if "what" exists it will be true
13
+ if system "which #{what}"
14
14
  puts "#{what.upcase}!"
15
+ else
16
+ puts "..."
17
+ exit 1
15
18
  end
16
19
  end
17
20
  end
@@ -1,3 +1,3 @@
1
1
  module Gimmea
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gimmea
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Anderson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-04-15 00:00:00.000000000 Z
11
+ date: 2013-06-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler