thanks 0.1.0 → 0.2.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: 4a957b904fe6be8c7f7c83f796e2ad09f6b199df
4
- data.tar.gz: 11102ef4c922809cd8348bc94761a5298e4a2ef6
3
+ metadata.gz: 20a6dbcd494ffea1598a63bf7d8205cf8ca79ff1
4
+ data.tar.gz: 8ad44b436cd98667bb1e19ebdb5f96f87b824e77
5
5
  SHA512:
6
- metadata.gz: f0bb40d64b594ce66769dcc8f2bb167ee1b6aeea5affcb4f5e7426f548c6c86f988b8ae6ba10a004103fa58386c54c1d430fa9077c0631ba28331e843d5b1e12
7
- data.tar.gz: 1a425648f196c8b8a400a9dbe055893fbe16cf3f932fca5351eb8ea90a396ca43599200a58ab560d453029b8502342a76f425945126b685813bcbb9e458e06e8
6
+ metadata.gz: a7bcc876816a3f1cfa9808e50e54750f64a2044130b03d72ac23b2f4b5cfbd182d24bfdfad3dc876b3e102e4a7eb5ac0fa225ce69255489378b1316734c2e25e
7
+ data.tar.gz: f600a1a5168f2e113b7fb8042cc6a88ec627f531a0db9cf997f83c195a8ba37034f08078e001598978c7e63f276b6542c98cfe5aef4a5a95053b64269b677943
data/.gitignore CHANGED
@@ -7,3 +7,7 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+
11
+ *swp
12
+ *swo
13
+ *~
data/README.md CHANGED
@@ -1,28 +1,34 @@
1
1
  # Thanks
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/thanks`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ ![download counter link at rubygems](https://img.shields.io/gem/dt/rails.svg)
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
5
+ Find out how to support the authors of the gems you depend on. Inspired by @feross's "thanks" package for Node.
6
6
 
7
- ## Installation
7
+ TODO:
8
8
 
9
- Add this line to your application's Gemfile:
9
+ - Tests
10
+ - Get list of gems for local context
11
+ - Get gems from gemspec
12
+ - Get gems from Gemfile
13
+ - Add your donation linkt to the registry
10
14
 
11
- ```ruby
12
- gem 'thanks'
13
- ```
15
+ Help wanted! This is free of course :)
14
16
 
15
- And then execute:
17
+ ## Installation
16
18
 
17
- $ bundle
19
+ Install this directly:
18
20
 
19
- Or install it yourself as:
21
+ `$ gem install thanks`
20
22
 
21
- $ gem install thanks
23
+ And then execute:
22
24
 
23
- ## Usage
25
+ ```sh
26
+ $ thanks_rb
24
27
 
25
- TODO: Write usage instructions here
28
+ Sweet! You are using gems with donation pages!
29
+
30
+ - bundler https://rubytogether.org
31
+ ```
26
32
 
27
33
  ## Development
28
34
 
@@ -30,10 +36,6 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
30
36
 
31
37
  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
38
 
33
- ## Contributing
34
-
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/thanks. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
36
-
37
39
  ## License
38
40
 
39
41
  The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
data/bin/thanks_rb ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'thanks'
4
+
5
+ Thanks.print_list
@@ -0,0 +1,6 @@
1
+ module Thanks
2
+ REGISTRY = {
3
+ "bundler" => "https://rubytogether.org",
4
+ "gemstash" => "https://rubytogether.org",
5
+ }
6
+ end
@@ -1,3 +1,3 @@
1
1
  module Thanks
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
data/lib/thanks.rb CHANGED
@@ -1,5 +1,20 @@
1
1
  require "thanks/version"
2
+ require "thanks/registry"
2
3
 
3
4
  module Thanks
4
- # Your code goes here...
5
+ def self.print_list
6
+ matches = REGISTRY.select do |name, url|
7
+ system_gems.include?(name)
8
+ end
9
+
10
+ if matches.any?
11
+ puts "Sweet! You are using gems with donation pages!\n\n"
12
+ matches.each { |name, url| puts " - #{name}\t#{url}" }
13
+ end
14
+
15
+ end
16
+
17
+ def self.system_gems
18
+ @_system_gems ||= `gem list`.split("\n").map(&:split).map(&:first)
19
+ end
5
20
  end
data/thanks.gemspec CHANGED
@@ -17,8 +17,7 @@ Gem::Specification.new do |spec|
17
17
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
18
18
  f.match(%r{^(test|spec|features)/})
19
19
  end
20
- spec.bindir = "exe"
21
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
+ spec.executables = ["thanks_rb"]
22
21
  spec.require_paths = ["lib"]
23
22
 
24
23
  spec.add_development_dependency "bundler", "~> 1.15"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thanks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel J. Pritchett
8
8
  autorequire:
9
- bindir: exe
9
+ bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-10 00:00:00.000000000 Z
11
+ date: 2018-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -55,7 +55,8 @@ dependencies:
55
55
  description: Find out how to support the authors of the gems you depend on
56
56
  email:
57
57
  - dpritchett@gmail.com
58
- executables: []
58
+ executables:
59
+ - thanks_rb
59
60
  extensions: []
60
61
  extra_rdoc_files: []
61
62
  files:
@@ -68,8 +69,9 @@ files:
68
69
  - Rakefile
69
70
  - bin/console
70
71
  - bin/setup
71
- - bin/thanks
72
+ - bin/thanks_rb
72
73
  - lib/thanks.rb
74
+ - lib/thanks/registry.rb
73
75
  - lib/thanks/version.rb
74
76
  - thanks.gemspec
75
77
  homepage: https://github.com/dpritchett/thanks-ruby
data/bin/thanks DELETED
File without changes