gi-cli 0.1.3 → 0.1.4

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: 6018403ddbe991c9db71d38af75bb0e4f6c1cdea
4
- data.tar.gz: a887c9f9ac4dff7be514dac8b772e7d91709aa86
3
+ metadata.gz: e5cf17e4794d69fbad8f68629883168bb4b35166
4
+ data.tar.gz: 6bad266931f9eeb41f773d338012386103cbbb9a
5
5
  SHA512:
6
- metadata.gz: 69425f3427e1a6384e8afa135e17c903b71c4723299481914336d2de0cfe3abe62ca4e975103f80683821b44e3fe9a6b7b370f5c0a7ec28fa6888b52156b2eb9
7
- data.tar.gz: b81f91a48a6144dccf6ff387603f7dfac4264811145a010496d1c2967af74573e6b46c8eeaaa165a911e04bfb19ead065d9c2018235bf2eedc30533b5a4c47a3
6
+ metadata.gz: 8b321eba6730b785a8fd02b61e797774eaf9d55a50363b7b44721293e4d21d56153773fc72c39c052e26e6760c7ae5693ea402b6152bdc476b1f49d251052531
7
+ data.tar.gz: 50d25a65820e1d59feaaa3422c7c13279e85f855e69681c5c5ddfe707e6ddd1d4c02caf009604cdb5fbb3b1f018afd6291a7d6e936f2322e718c9e45271480f5
data/.gitignore CHANGED
@@ -6,4 +6,4 @@
6
6
  /doc/
7
7
  /pkg/
8
8
  /spec/reports/
9
- /tmp/
9
+ /tmp/
data/README.md CHANGED
@@ -19,10 +19,10 @@ $ gem install gi-cli
19
19
  for a list of seeds run `$ gi list`, on a side note if you are searching for a specific one you can simply use `grep` or `ack` and pipe in your search term `gi list | ack "node"`
20
20
 
21
21
  ### seed
22
- the default command is the one that appends the `.gitignore` file, it works in a two step process. upon calling the command `$ gi` __OR__ `$ gi seed`. you will see a prompt asking you to list your seeds. _i.e_ creating an ignore list for a node.js project on a macbook
22
+ the default command is the one that appends the `.gitignore` file, it works in a two step process. upon calling the command `$ gi <args>` __OR__ `$ gi seed <args>`.
23
23
 
24
- 1. `$ gi`
25
- 2. `$ list,ignore,seeds: osx,node`
24
+ 1. `$ gi osx,ruby,node,emacs`
25
+ 2. `$ gi seed osx,ruby,node,emacs`
26
26
 
27
27
  #### --dry
28
28
  attaching the `--dry` flag to the initial `seed` command will simply print out the (would be) contents of the .gitignore to the terminal and not actually create a file on the hard drive _(really this only exists for testing but hey, someone might use it)_
@@ -32,7 +32,7 @@ attaching the `--overwrite` flag to `seed` will overwrite the existing `.gitigno
32
32
 
33
33
  ## Contributing
34
34
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/bernsie/gi.
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/bernsie/gi-cli.
36
36
 
37
37
 
38
38
  ## License
data/bin/gi CHANGED
@@ -22,21 +22,22 @@ command :list do |c|
22
22
  end
23
23
 
24
24
  command :seed do |c|
25
- c.syntax = 'gi seed'
25
+ c.syntax = 'gi seed <list,of,arguments>'
26
26
  c.description = 'append .gitignore with the provided seed list OR use --overwrite to overwrite the existing one all together'
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 = ask("list,ignore,seeds: ")
30
+ seeds = args.join(',')
31
31
  if options.dry
32
- puts `curl -L -s https://gitignore.io/api/#{seeds}`
32
+ exec "#{gi.base(seeds)}"
33
33
  elsif options.overwrite
34
- puts `curl -L -s https://gitignore.io/api/#{seeds} > .gitignore`
34
+ cmd = "#{gi.base(seeds)} > .gitignore"
35
+ exec cmd
35
36
  else
36
- puts `curl -L -s https://gitignore.io/api/#{seeds} >> .gitignore`
37
+ cmd = "#{gi.base(seeds)} >> .gitignore"
38
+ exec cmd
37
39
  end
38
40
  end
39
41
  end
40
42
 
41
- # default command
42
43
  default_command :seed
data/lib/gi.rb CHANGED
@@ -3,7 +3,7 @@ require "gi/version"
3
3
  module Gi
4
4
  class Api
5
5
  def base(suf)
6
- puts `curl -L -s http://gitignore.io/api/#{suf}`
6
+ "curl -L -s http://gitignore.io/api/#{suf}"
7
7
  end
8
8
  def list
9
9
  base('list')
@@ -1,3 +1,3 @@
1
1
  module Gi
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
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.3
4
+ version: 0.1.4
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-04-12 00:00:00.000000000 Z
11
+ date: 2016-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: commander
@@ -105,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
105
105
  version: '0'
106
106
  requirements: []
107
107
  rubyforge_project:
108
- rubygems_version: 2.4.5
108
+ rubygems_version: 2.5.1
109
109
  signing_key:
110
110
  specification_version: 4
111
111
  summary: cli util to create seeded .gitignore files