gitignore-cli 0.4.0 → 0.6.0

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
  SHA256:
3
- metadata.gz: 9f82ec2b974ac7833f10db0b36617fb047e2145d7d4e114f6818532c72b0d8b5
4
- data.tar.gz: ba94d390600d2692d7f163302c4611aac9f6b400835f494adcf97cf6e9c56bc2
3
+ metadata.gz: bc434755583290fdafbe89d0aaf3485f8407a16979f407169d7c3e9f07f06a38
4
+ data.tar.gz: 61ddcfb4040a47289b9103ad60d3898c4d21a0df3a74aadba55484fa28268b48
5
5
  SHA512:
6
- metadata.gz: b78383cc183f0a559ab532fa7b5254895893eaa5c3031d3382fc946aa6bea31c53c8e3265873bc9f7477a9b6381ebf15650949d71cc2dc81b6a82cb389bd096b
7
- data.tar.gz: 550a2126d403735fe334a316657e965029826f883c67fbbd35efcf2439f18b96f540a7a30ecb6d70cd3e85b4f9dbaa55d4029dbbf6f92097fbcd8fef3d191d0a
6
+ metadata.gz: 6b265ea37157b28c28befb39c5ef829cab218839c66f09cad0b4e08c22f77de488290b52ccde6516411152a1110ca65dd237863cee680657882ec088605cb961
7
+ data.tar.gz: 79689f1b32464051786213e46bdc5f29499d0ba59751554bc67e80f1a798fe4763ee71cf3f9d29147cf7401e79887239c741e2720113af00619af9cc9834aec0
data/.gitignore CHANGED
@@ -1,11 +1,88 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
1
+
2
+ # Created by https://www.gitignore.io/api/ruby,vim
3
+ # Edit at https://www.gitignore.io/?templates=ruby,vim
4
+
5
+ ### Ruby ###
6
+ *.gem
7
+ *.rbc
8
+ /.config
4
9
  /coverage/
5
- /doc/
10
+ /InstalledFiles
6
11
  /pkg/
7
12
  /spec/reports/
13
+ /spec/examples.txt
14
+ /test/tmp/
15
+ /test/version_tmp/
8
16
  /tmp/
9
17
 
10
- # rspec failure tracking
11
- .rspec_status
18
+ # Used by dotenv library to load environment variables.
19
+ # .env
20
+
21
+ # Ignore Byebug command history file.
22
+ .byebug_history
23
+
24
+ ## Specific to RubyMotion:
25
+ .dat*
26
+ .repl_history
27
+ build/
28
+ *.bridgesupport
29
+ build-iPhoneOS/
30
+ build-iPhoneSimulator/
31
+
32
+ ## Specific to RubyMotion (use of CocoaPods):
33
+ #
34
+ # We recommend against adding the Pods directory to your .gitignore. However
35
+ # you should judge for yourself, the pros and cons are mentioned at:
36
+ # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
37
+ # vendor/Pods/
38
+
39
+ ## Documentation cache and generated files:
40
+ /.yardoc/
41
+ /_yardoc/
42
+ /doc/
43
+ /rdoc/
44
+
45
+ ## Environment normalization:
46
+ /.bundle/
47
+ /vendor/bundle
48
+ /lib/bundler/man/
49
+
50
+ # for a library or gem, you might want to ignore these files since the code is
51
+ # intended to run in multiple environments; otherwise, check them in:
52
+ # Gemfile.lock
53
+ # .ruby-version
54
+ # .ruby-gemset
55
+
56
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
57
+ .rvmrc
58
+
59
+ ### Ruby Patch ###
60
+ # Used by RuboCop. Remote config files pulled in from inherit_from directive.
61
+ # .rubocop-https?--*
62
+
63
+ ### Vim ###
64
+ # Swap
65
+ [._]*.s[a-v][a-z]
66
+ [._]*.sw[a-p]
67
+ [._]s[a-rt-v][a-z]
68
+ [._]ss[a-gi-z]
69
+ [._]sw[a-p]
70
+
71
+ # Session
72
+ Session.vim
73
+ Sessionx.vim
74
+
75
+ # Temporary
76
+ .netrwhist
77
+ *~
78
+
79
+ # Auto-generated tag files
80
+ tags
81
+
82
+ # Persistent undo
83
+ [._]*.un~
84
+
85
+ # Coc configuration directory
86
+ .vim
87
+
88
+ # End of https://www.gitignore.io/api/ruby,vim
data/README.md CHANGED
@@ -1,38 +1,50 @@
1
- # AddGitignore
1
+ # gitignore-cli
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/add_gitignore`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ [![Gem Version](https://badge.fury.io/rb/gitignore-cli.svg)](https://badge.fury.io/rb/gitignore-cli)
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
5
+ Provides a simple CLI that uses the fantastic `gitignore.io` tool to generate `.gitignore` files for your project.
6
6
 
7
7
  ## Installation
8
8
 
9
- Add this line to your application's Gemfile:
9
+ You will need to have `ruby >= 2.3`, or running on Docker.
10
10
 
11
11
  ```ruby
12
- gem 'add_gitignore'
12
+ $ gem install gitignore-cli
13
13
  ```
14
14
 
15
- And then execute:
15
+ ## Usage
16
16
 
17
- $ bundle install
17
+ You can use the following commands:
18
18
 
19
- Or install it yourself as:
19
+ #### list
20
20
 
21
- $ gem install add_gitignore
21
+ The command `list` will return all available environments.
22
+
23
+ **Example:**
24
+
25
+ ```shellscript
26
+ $ gitignore list
27
+ ```
22
28
 
23
- ## Usage
24
29
 
25
- TODO: Write usage instructions here
26
30
 
27
- ## Development
31
+ #### generate
32
+
33
+ Generates the .gitignore output to stdout using all environments that you choose.
34
+
35
+ ```shellscript
36
+ $ gitignore generate ruby vim node > .gitignore
37
+ ```
38
+
39
+ ## Author
28
40
 
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
41
+ Daniel Vinciguerra <daniel.vinciguerra@bivee.com.br>
30
42
 
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
43
 
33
- ## Contributing
44
+ ### Special Thanks
34
45
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/dvinciguerra/add_gitignore.
46
+ * [Joe Blau](https://github.com/joeblau) for [gitignore.io](https://gitignore.io).
47
+ * [Tejas Kumar](https://github.com/TejasQ) for the inspiration, [at TejasQ/add-gitignore](https://github.com/TejasQ/add-gitignore)
36
48
 
37
49
 
38
50
  ## License
data/bin/gitignore CHANGED
@@ -1,6 +1,7 @@
1
1
  #!ruby
2
2
 
3
3
  require "gitignore"
4
+ require "tty-prompt"
4
5
 
5
6
  command = ARGV[0]
6
7
 
@@ -14,12 +15,27 @@ when "generate", "g"
14
15
  envs = ARGV[1..-1]
15
16
  puts Gitignore.generate(envs)
16
17
 
18
+ when "create"
19
+ prompt = TTY::Prompt.new
20
+
21
+ env_list = Gitignore.list
22
+ results = prompt.multi_select(
23
+ "Select envs to generate the .gitignore?", env_list, filter: true
24
+ )
25
+
26
+ file = File.open('.gitignore', 'w')
27
+ file.write(Gitignore.generate(results))
28
+ file.close
29
+
30
+ puts "The .gitignore is generated!"
31
+
17
32
  else
18
33
  puts <<~HELP
19
34
  Usage: #{File.basename($0)} [command] [options]
20
35
 
21
36
  Commonly used command are:
22
37
  list : list all environment options
38
+ create : generate a .gitignore file using a interactive term ui
23
39
  generate : generate a .gitignore file by all environment that you choose
24
40
  HELP
25
41
  end
@@ -6,14 +6,14 @@ Gem::Specification.new do |spec|
6
6
  spec.authors = ["Daniel Vinciguerra"]
7
7
  spec.email = ["daniel.vinciguerra@bivee.com.br"]
8
8
 
9
- spec.summary = %q{A ruby cli tool that use gitignore.io to generate your gitignore files}
10
- spec.description = %q{A ruby cli tool that use gitignore.io to generate your gitignore files}
11
- spec.homepage = "https://github.com/dvinciguerra/gitignore"
9
+ spec.summary = %q{Simple Ruby CLI to generate .gitignore files}
10
+ spec.description = %q{A Ruby CLI tool that use fantastic gitignore.io to generate .gitignore files to your projects}
11
+ spec.homepage = "https://github.com/dvinciguerra/gitignore-cli"
12
12
  spec.license = "MIT"
13
13
  spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
14
14
 
15
15
  spec.metadata["homepage_uri"] = spec.homepage
16
- spec.metadata["source_code_uri"] = "https://github.com/dvinciguerra/gitignore"
16
+ spec.metadata["source_code_uri"] = "https://github.com/dvinciguerra/gitignore-cli"
17
17
 
18
18
  # Specify which files should be added to the gem when it is released.
19
19
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
@@ -26,4 +26,5 @@ Gem::Specification.new do |spec|
26
26
  spec.require_paths = ["lib"]
27
27
 
28
28
  spec.add_runtime_dependency 'http', '~> 4.3', '>= 4.3.0'
29
+ spec.add_runtime_dependency 'tty-prompt', '~> 0.20.0'
29
30
  end
@@ -1,3 +1,3 @@
1
1
  module Gitignore
2
- VERSION = "0.4.0"
2
+ VERSION = "0.6.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitignore-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Vinciguerra
@@ -30,7 +30,22 @@ dependencies:
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
32
  version: 4.3.0
33
- description: A ruby cli tool that use gitignore.io to generate your gitignore files
33
+ - !ruby/object:Gem::Dependency
34
+ name: tty-prompt
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: 0.20.0
40
+ type: :runtime
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: 0.20.0
47
+ description: A Ruby CLI tool that use fantastic gitignore.io to generate .gitignore
48
+ files to your projects
34
49
  email:
35
50
  - daniel.vinciguerra@bivee.com.br
36
51
  executables:
@@ -49,12 +64,12 @@ files:
49
64
  - gitignore-cli.gemspec
50
65
  - lib/gitignore.rb
51
66
  - lib/gitignore/version.rb
52
- homepage: https://github.com/dvinciguerra/gitignore
67
+ homepage: https://github.com/dvinciguerra/gitignore-cli
53
68
  licenses:
54
69
  - MIT
55
70
  metadata:
56
- homepage_uri: https://github.com/dvinciguerra/gitignore
57
- source_code_uri: https://github.com/dvinciguerra/gitignore
71
+ homepage_uri: https://github.com/dvinciguerra/gitignore-cli
72
+ source_code_uri: https://github.com/dvinciguerra/gitignore-cli
58
73
  post_install_message:
59
74
  rdoc_options: []
60
75
  require_paths:
@@ -74,5 +89,5 @@ rubyforge_project:
74
89
  rubygems_version: 2.7.6
75
90
  signing_key:
76
91
  specification_version: 4
77
- summary: A ruby cli tool that use gitignore.io to generate your gitignore files
92
+ summary: Simple Ruby CLI to generate .gitignore files
78
93
  test_files: []