gi-cli 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/gi +13 -8
  3. data/lib/gi/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e5cf17e4794d69fbad8f68629883168bb4b35166
4
- data.tar.gz: 6bad266931f9eeb41f773d338012386103cbbb9a
3
+ metadata.gz: 13aabb08adc0d333096f75ea242bfc4381f6d5a6
4
+ data.tar.gz: a7b74c8e5b5cae4809b25794268d8cd6d18c7111
5
5
  SHA512:
6
- metadata.gz: 8b321eba6730b785a8fd02b61e797774eaf9d55a50363b7b44721293e4d21d56153773fc72c39c052e26e6760c7ae5693ea402b6152bdc476b1f49d251052531
7
- data.tar.gz: 50d25a65820e1d59feaaa3422c7c13279e85f855e69681c5c5ddfe707e6ddd1d4c02caf009604cdb5fbb3b1f018afd6291a7d6e936f2322e718c9e45271480f5
6
+ metadata.gz: f564ef14beb14b0c2a2ed217660ad0513a8f7f12d5ffbd25b0919e93d79f484c1e810a7ad1695cd534c462d94e82693f4497497d0244813f3e4066f55d8a3d8c
7
+ data.tar.gz: 4cd303fbab60829b0c75ee848b818bcd39104ae5afa94ac5bd4afff661d01be8f82ac464a4e73cbb008465a33b6712e5059bcbeff42cb7cc816b036092cefd69
data/bin/gi CHANGED
@@ -16,7 +16,7 @@ gi = Gi::Api.new
16
16
  command :list do |c|
17
17
  c.syntax = 'gi list'
18
18
  c.description = 'list possible seeds'
19
- c.action do |args, options|
19
+ c.action do
20
20
  gi.list
21
21
  end
22
22
  end
@@ -27,15 +27,20 @@ command :seed do |c|
27
27
  c.option '--dry', 'does not create .gitignore but prints it out'
28
28
  c.option '--overwrite', 'if one exists overwrite .gitignore with the seeded one'
29
29
  c.action do |args, options|
30
- seeds = args.join(',')
31
- if options.dry
32
- exec "#{gi.base(seeds)}"
33
- elsif options.overwrite
34
- cmd = "#{gi.base(seeds)} > .gitignore"
30
+ if args.empty?
31
+ cmd = "echo 'Command requires argument(s)'"
35
32
  exec cmd
36
33
  else
37
- cmd = "#{gi.base(seeds)} >> .gitignore"
38
- exec cmd
34
+ seeds = args.join(',')
35
+ if options.dry
36
+ exec "#{gi.base(seeds)}"
37
+ elsif options.overwrite
38
+ cmd = "#{gi.base(seeds)} > .gitignore"
39
+ exec cmd
40
+ else
41
+ cmd = "#{gi.base(seeds)} >> .gitignore"
42
+ exec cmd
43
+ end
39
44
  end
40
45
  end
41
46
  end
@@ -1,3 +1,3 @@
1
1
  module Gi
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gi-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Burns
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-15 00:00:00.000000000 Z
11
+ date: 2016-05-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: commander