thanks 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +7 -3
- data/README.md +8 -2
- data/img/screencast.gif +0 -0
- data/lib/thanks.rb +19 -4
- data/lib/thanks/registry.rb +2 -0
- data/lib/thanks/version.rb +1 -1
- data/thanks.gemspec +1 -0
- metadata +16 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b7d705f8b8f4b3057e698d99fcdec1e33405e9c
|
4
|
+
data.tar.gz: 37b13e449175c115024cb4d25ae61f4da5cde90d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9687467719efed89ca41d73b592b3a4db7e80462fbbb7d4e627d1f5221433f9aa2c6829a697c08efb9b501daeab493eeee9cbe2122499b2e98286105d6455dc6
|
7
|
+
data.tar.gz: a8137b6b01fc0a579bddb1e074faad2cd9d37247f5313cc70b898ce04b1d8e33f487c955d99f758839ccbcf26c1ff8a8dfb007763a64990f793ae9c1f080caf7
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -2,7 +2,9 @@
|
|
2
2
|
|
3
3
|
![download counter link at rubygems](https://img.shields.io/gem/dt/rails.svg)
|
4
4
|
|
5
|
-
Find out how to support the authors of the gems you depend on. Inspired by @feross's
|
5
|
+
Find out how to support the authors of the gems you depend on. Inspired by @feross's [thanks package for Node](https://github.com/feross/thanks).
|
6
|
+
|
7
|
+
![screencast of the gem in action](img/screencast.gif)
|
6
8
|
|
7
9
|
TODO:
|
8
10
|
|
@@ -14,7 +16,7 @@ TODO:
|
|
14
16
|
|
15
17
|
Help wanted! This is free of course :)
|
16
18
|
|
17
|
-
## Installation
|
19
|
+
## Installation and Usage
|
18
20
|
|
19
21
|
Install this directly:
|
20
22
|
|
@@ -30,6 +32,10 @@ Sweet! You are using gems with donation pages!
|
|
30
32
|
- bundler https://rubytogether.org
|
31
33
|
```
|
32
34
|
|
35
|
+
## How do I get my gem added to the registry?
|
36
|
+
|
37
|
+
[Submit a PR](https://github.com/dpritchett/thanks-ruby/pulls) with your info!
|
38
|
+
|
33
39
|
## Development
|
34
40
|
|
35
41
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
data/img/screencast.gif
ADDED
Binary file
|
data/lib/thanks.rb
CHANGED
@@ -3,18 +3,33 @@ require "thanks/registry"
|
|
3
3
|
|
4
4
|
module Thanks
|
5
5
|
def self.print_list
|
6
|
-
matches = REGISTRY.select do |name, url|
|
7
|
-
system_gems.include?(name)
|
8
|
-
end
|
9
6
|
|
10
7
|
if matches.any?
|
11
8
|
puts "Sweet! You are using gems with donation pages!\n\n"
|
12
|
-
matches.each { |name, url| puts " - #{name}\t#{url}" }
|
9
|
+
matches.sort.each { |name, url| puts " - #{name}\t#{url}" }
|
10
|
+
else
|
11
|
+
puts "Man! Can't find any gems on your system to support!"
|
13
12
|
end
|
14
13
|
|
14
|
+
puts "\nAdd more gem donation links to our list at https://github.com/dpritchett/thanks-ruby"
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.matches
|
18
|
+
@_matches ||= REGISTRY.select do |name, url|
|
19
|
+
system_gems.include?(name) ||
|
20
|
+
bundled_gems.include?(name)
|
21
|
+
end
|
15
22
|
end
|
16
23
|
|
17
24
|
def self.system_gems
|
18
25
|
@_system_gems ||= `gem list`.split("\n").map(&:split).map(&:first)
|
19
26
|
end
|
27
|
+
|
28
|
+
def self.bundled_gems
|
29
|
+
@_bundled_gems ||= `bundle list`
|
30
|
+
.split("\n")
|
31
|
+
.drop(1).map(&:split)
|
32
|
+
.map { |words| words.drop(1) }
|
33
|
+
.map(&:first)
|
34
|
+
end
|
20
35
|
end
|
data/lib/thanks/registry.rb
CHANGED
data/lib/thanks/version.rb
CHANGED
data/thanks.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thanks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel J. Pritchett
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '5.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rubocop
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
55
69
|
description: Find out how to support the authors of the gems you depend on
|
56
70
|
email:
|
57
71
|
- dpritchett@gmail.com
|
@@ -70,6 +84,7 @@ files:
|
|
70
84
|
- bin/console
|
71
85
|
- bin/setup
|
72
86
|
- bin/thanks_rb
|
87
|
+
- img/screencast.gif
|
73
88
|
- lib/thanks.rb
|
74
89
|
- lib/thanks/registry.rb
|
75
90
|
- lib/thanks/version.rb
|