gi-cli 1.0.0 → 1.1.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d0be11c362ef685952fe718fcb16edaabd2ba369
4
- data.tar.gz: 77b69fcc36ad9919e6d4125d20d0a40872d753cd
3
+ metadata.gz: aeb63b7ee594912af79df9b723515dbc0f578511
4
+ data.tar.gz: 3910854222a729eba5b875316ff8162b19ad6d51
5
5
  SHA512:
6
- metadata.gz: 5af0fcb7302cd291d072f27380dc78477866c54e8f82fd96a12ac630047bb54ddc88420139a24ccbbbff04339fb3a8766b7545b0755b81348cbfd7d20f6d412a
7
- data.tar.gz: 029c33f13f3231b55d2c06ff7b3dcaca856cfb62f1aa547747cdb62c5d044288f2fd06a65cc15ae25caff49931c005ac540cfac2206e3a92ecf2d40f4d9e843f
6
+ metadata.gz: 7ee60ead6abdb3c4858769da6a403845bb8d496a6501674fee303070724fafcbe71f67bc96af942ddefd609677f591e15eee5295a7dec38bc363c80378996f57
7
+ data.tar.gz: 74fced90cefb9c75a70098b3be83e91266950273c5e66b689c5d1f8c63a11d86a8c6a0a90acd2b539182a0b4dc7bbaf886f41ab35963d5e8a28c7717e15d2c91
data/README.md CHANGED
@@ -16,7 +16,13 @@ $ gem install gi-cli
16
16
  ## Usage
17
17
 
18
18
  ### list
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"`
19
+ running `$ gi list` will return a list of all available seeds.
20
+
21
+ > --search <search_term>
22
+
23
+ attaching `--search` will allow you to search for a specific pattern
24
+
25
+ 1. `$ gi list --search node`
20
26
 
21
27
  ### seed
22
28
  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>`.
data/bin/gi CHANGED
@@ -14,10 +14,16 @@ program :help, 'Author', 'Josh Burns <joshyburnss@gmail.com>'
14
14
  gi = Gi::Api.new
15
15
 
16
16
  command :list do |c|
17
- c.syntax = 'gi list'
17
+ c.syntax = 'gi list [--search <search_term>]'
18
18
  c.description = 'list possible seeds'
19
- c.action do
20
- gi.listAll
19
+ c.option '--search', 'search for a specific ignore class'
20
+ c.action do |args, options|
21
+ if options.search
22
+ search_terms = args.join(',')
23
+ gi.list_and_find(search_terms)
24
+ else
25
+ gi.list_all
26
+ end
21
27
  end
22
28
  end
23
29
 
data/gi.gemspec CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
7
7
  spec.name = "gi-cli"
8
8
  spec.version = Gi::VERSION
9
9
  spec.authors = ["Josh Burns"]
10
- spec.email = ["josh@bernsie.com"]
10
+ spec.email = ["joshyburnss@gmail.com"]
11
11
 
12
12
  spec.summary = %q{cli util to create seeded .gitignore files}
13
13
  spec.description = %q{cli util to create seeded .gitignore files}
data/lib/gi.rb CHANGED
@@ -6,9 +6,12 @@ module Gi
6
6
  # def base(suf)
7
7
  # "curl -L -s http://gitignore.io/api/#{suf}"
8
8
  # end
9
- def listAll
9
+ def list_all
10
10
  puts `curl -L -s http://gitignore.io/api/list`
11
11
  end
12
+ def list_and_find(search_terms)
13
+ puts `curl -L -s http://gitignore.io/api/list | grep #{search_terms}`
14
+ end
12
15
  def ignores(suf)
13
16
  cmd = "curl -L -s http://gitignore.io/api/#{suf}"
14
17
  return cmd
@@ -1,3 +1,3 @@
1
1
  module Gi
2
- VERSION = "1.0.0"
2
+ VERSION = "1.1.0"
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: 1.0.0
4
+ version: 1.1.0
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-08-28 00:00:00.000000000 Z
11
+ date: 2017-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: commander
@@ -68,7 +68,7 @@ dependencies:
68
68
  version: '5.0'
69
69
  description: cli util to create seeded .gitignore files
70
70
  email:
71
- - josh@bernsie.com
71
+ - joshyburnss@gmail.com
72
72
  executables:
73
73
  - gi
74
74
  extensions: []
@@ -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.5.1
108
+ rubygems_version: 2.6.8
109
109
  signing_key:
110
110
  specification_version: 4
111
111
  summary: cli util to create seeded .gitignore files