gi-cli 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +38 -0
- data/Rakefile +10 -0
- data/bin/console +14 -0
- data/bin/gi +39 -0
- data/bin/setup +8 -0
- data/gi.gemspec +28 -0
- data/lib/gi.rb +15 -0
- data/lib/gi/version.rb +3 -0
- metadata +112 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 0e5657a5bd44c7df88f9d6c17ac5e9951979fd9d
|
4
|
+
data.tar.gz: 6e75bc6d97fbcb0f77146ddd6750a9b5d652d798
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 8fc0a7cfa12669b66df2a3c534fb2d0a725d41fc9edbde48ef41f981caa30803baa12471e66d6f75166e530cbf1ac803b36be963479a92739f1a91f73e8e2c49
|
7
|
+
data.tar.gz: 0c2db9d2da3628ded3fe6b0e7b0e78ec0abda753d2041407bb91d07b631f8fa4ed01d71b7f8ea5855f8ada982ce479ed4aa68fbcd537e278b082786b68b62b94
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 Josh Burns
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
Gi
|
2
|
+
=====
|
3
|
+
|
4
|
+
CLI util, to create a `.gitignore` file that has been seeded by [gitignore.io](http://gitignore.io)
|
5
|
+
|
6
|
+
## Installation
|
7
|
+
|
8
|
+
Add this line to your application's Gemfile:
|
9
|
+
|
10
|
+
install it with ruby-gems:
|
11
|
+
|
12
|
+
```rb
|
13
|
+
$ gem install gi-cli
|
14
|
+
```
|
15
|
+
|
16
|
+
## Usage
|
17
|
+
|
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"`
|
20
|
+
|
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
|
23
|
+
|
24
|
+
1. `$ gi`
|
25
|
+
2. `$ list,ignore,seeds: osx,node`
|
26
|
+
|
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)_
|
29
|
+
|
30
|
+
## Contributing
|
31
|
+
|
32
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/bernsie/gi.
|
33
|
+
|
34
|
+
|
35
|
+
## License
|
36
|
+
|
37
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
38
|
+
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "gi"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/gi
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'commander/import'
|
5
|
+
require 'gi'
|
6
|
+
require 'gi/version'
|
7
|
+
|
8
|
+
program :name, 'gi'
|
9
|
+
program :version, Gi::VERSION
|
10
|
+
program :description, 'Create a seeded .gitignore file'
|
11
|
+
program :help_formatter, :compact
|
12
|
+
program :help, 'Author', 'Josh Burns <josh@bernsie.com>'
|
13
|
+
|
14
|
+
gi = Gi::Api.new
|
15
|
+
|
16
|
+
command :list do |c|
|
17
|
+
c.syntax = 'gi list'
|
18
|
+
c.description = 'list possible seeds'
|
19
|
+
c.action do |args, options|
|
20
|
+
gi.list
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
command :seed do |c|
|
25
|
+
c.syntax = 'gi seed'
|
26
|
+
c.description = 'create a .gitignore with the provided seed list'
|
27
|
+
c.option '--dry', 'does not create .gitignore but prints it out'
|
28
|
+
c.action do |args, options|
|
29
|
+
seeds = ask("list,ignore,seeds: ")
|
30
|
+
if options.dry
|
31
|
+
puts `curl -L -s https://gitignore.io/api/#{seeds}`
|
32
|
+
else
|
33
|
+
puts `curl -L -s https://gitignore.io/api/#{seeds} > .gitignore`
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
# default command
|
39
|
+
default_command :seed
|
data/bin/setup
ADDED
data/gi.gemspec
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'gi/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "gi-cli"
|
8
|
+
spec.version = Gi::VERSION
|
9
|
+
spec.authors = ["Josh Burns"]
|
10
|
+
spec.email = ["josh@bernsie.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{cli util to create seeded .gitignore files}
|
13
|
+
spec.description = %q{cli util to create seeded .gitignore files}
|
14
|
+
spec.homepage = "http://github.com/bernsie/gi-cli"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
|
18
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
19
|
+
spec.bindir = "bin"
|
20
|
+
spec.executables = ["gi"]
|
21
|
+
spec.require_paths = ["lib"]
|
22
|
+
|
23
|
+
spec.add_dependency "commander", "~> 4.4.0"
|
24
|
+
|
25
|
+
spec.add_development_dependency "bundler", "~> 1.11"
|
26
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
27
|
+
spec.add_development_dependency "minitest", "~> 5.0"
|
28
|
+
end
|
data/lib/gi.rb
ADDED
data/lib/gi/version.rb
ADDED
metadata
ADDED
@@ -0,0 +1,112 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: gi-cli
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Josh Burns
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-04-09 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: commander
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 4.4.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 4.4.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.11'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.11'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '10.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '10.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: minitest
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '5.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '5.0'
|
69
|
+
description: cli util to create seeded .gitignore files
|
70
|
+
email:
|
71
|
+
- josh@bernsie.com
|
72
|
+
executables:
|
73
|
+
- gi
|
74
|
+
extensions: []
|
75
|
+
extra_rdoc_files: []
|
76
|
+
files:
|
77
|
+
- ".gitignore"
|
78
|
+
- Gemfile
|
79
|
+
- LICENSE.txt
|
80
|
+
- README.md
|
81
|
+
- Rakefile
|
82
|
+
- bin/console
|
83
|
+
- bin/gi
|
84
|
+
- bin/setup
|
85
|
+
- gi.gemspec
|
86
|
+
- lib/gi.rb
|
87
|
+
- lib/gi/version.rb
|
88
|
+
homepage: http://github.com/bernsie/gi-cli
|
89
|
+
licenses:
|
90
|
+
- MIT
|
91
|
+
metadata: {}
|
92
|
+
post_install_message:
|
93
|
+
rdoc_options: []
|
94
|
+
require_paths:
|
95
|
+
- lib
|
96
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
97
|
+
requirements:
|
98
|
+
- - ">="
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
version: '0'
|
101
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
102
|
+
requirements:
|
103
|
+
- - ">="
|
104
|
+
- !ruby/object:Gem::Version
|
105
|
+
version: '0'
|
106
|
+
requirements: []
|
107
|
+
rubyforge_project:
|
108
|
+
rubygems_version: 2.4.5
|
109
|
+
signing_key:
|
110
|
+
specification_version: 4
|
111
|
+
summary: cli util to create seeded .gitignore files
|
112
|
+
test_files: []
|