gi-cli 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (6) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -2
  3. data/bin/gi +5 -2
  4. data/lib/gi.rb +0 -3
  5. data/lib/gi/version.rb +1 -1
  6. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0e5657a5bd44c7df88f9d6c17ac5e9951979fd9d
4
- data.tar.gz: 6e75bc6d97fbcb0f77146ddd6750a9b5d652d798
3
+ metadata.gz: 6018403ddbe991c9db71d38af75bb0e4f6c1cdea
4
+ data.tar.gz: a887c9f9ac4dff7be514dac8b772e7d91709aa86
5
5
  SHA512:
6
- metadata.gz: 8fc0a7cfa12669b66df2a3c534fb2d0a725d41fc9edbde48ef41f981caa30803baa12471e66d6f75166e530cbf1ac803b36be963479a92739f1a91f73e8e2c49
7
- data.tar.gz: 0c2db9d2da3628ded3fe6b0e7b0e78ec0abda753d2041407bb91d07b631f8fa4ed01d71b7f8ea5855f8ada982ce479ed4aa68fbcd537e278b082786b68b62b94
6
+ metadata.gz: 69425f3427e1a6384e8afa135e17c903b71c4723299481914336d2de0cfe3abe62ca4e975103f80683821b44e3fe9a6b7b370f5c0a7ec28fa6888b52156b2eb9
7
+ data.tar.gz: b81f91a48a6144dccf6ff387603f7dfac4264811145a010496d1c2967af74573e6b46c8eeaaa165a911e04bfb19ead065d9c2018235bf2eedc30533b5a4c47a3
data/README.md CHANGED
@@ -19,13 +19,16 @@ $ 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 creates 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 file 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` __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
23
23
 
24
24
  1. `$ gi`
25
25
  2. `$ list,ignore,seeds: osx,node`
26
26
 
27
27
  #### --dry
28
- attaching the `--dry` flag to the initial `seed` command will simply print out the (would be) contents of the .gitignore to `stdout` and not actually create a file on the hard drive _(really this only exists for testing but hey, someone might use it)_
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)_
29
+
30
+ #### --overwrite
31
+ attaching the `--overwrite` flag to `seed` will overwrite the existing `.gitignore` with the seeded one.
29
32
 
30
33
  ## Contributing
31
34
 
data/bin/gi CHANGED
@@ -23,14 +23,17 @@ end
23
23
 
24
24
  command :seed do |c|
25
25
  c.syntax = 'gi seed'
26
- c.description = 'create a .gitignore with the provided seed list'
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
+ c.option '--overwrite', 'if one exists overwrite .gitignore with the seeded one'
28
29
  c.action do |args, options|
29
30
  seeds = ask("list,ignore,seeds: ")
30
31
  if options.dry
31
32
  puts `curl -L -s https://gitignore.io/api/#{seeds}`
32
- else
33
+ elsif options.overwrite
33
34
  puts `curl -L -s https://gitignore.io/api/#{seeds} > .gitignore`
35
+ else
36
+ puts `curl -L -s https://gitignore.io/api/#{seeds} >> .gitignore`
34
37
  end
35
38
  end
36
39
  end
data/lib/gi.rb CHANGED
@@ -8,8 +8,5 @@ module Gi
8
8
  def list
9
9
  base('list')
10
10
  end
11
- def seed(arg)
12
- base('#{arg}')
13
- end
14
11
  end
15
12
  end
data/lib/gi/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Gi
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
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.2
4
+ version: 0.1.3
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-09 00:00:00.000000000 Z
11
+ date: 2016-04-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: commander