Module: Gitignore
- Defined in:
- lib/gitignore.rb,
lib/gitignore/version.rb
Defined Under Namespace
Classes: Error
Constant Summary collapse
- GITIGNORE_HOST =
ENV['GITIGNORE_HOST'] || 'https://www.toptal.com/developers/gitignore'
- VERSION =
'0.11.0'
Class Method Summary collapse
Class Method Details
.generate(envs = []) ⇒ Object
18 19 20 21 |
# File 'lib/gitignore.rb', line 18 def generate(envs = []) response = HTTP.get("#{GITIGNORE_HOST}/api/#{envs.join(',')}") response.body.to_s end |
.list ⇒ Object
13 14 15 16 |
# File 'lib/gitignore.rb', line 13 def list response = HTTP.get("#{GITIGNORE_HOST}/api/list") response.body.to_s.gsub(/\n/, ',').split(',') end |