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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 20a6dbcd494ffea1598a63bf7d8205cf8ca79ff1
4
- data.tar.gz: 8ad44b436cd98667bb1e19ebdb5f96f87b824e77
3
+ metadata.gz: 3b7d705f8b8f4b3057e698d99fcdec1e33405e9c
4
+ data.tar.gz: 37b13e449175c115024cb4d25ae61f4da5cde90d
5
5
  SHA512:
6
- metadata.gz: a7bcc876816a3f1cfa9808e50e54750f64a2044130b03d72ac23b2f4b5cfbd182d24bfdfad3dc876b3e102e4a7eb5ac0fa225ce69255489378b1316734c2e25e
7
- data.tar.gz: f600a1a5168f2e113b7fb8042cc6a88ec627f531a0db9cf997f83c195a8ba37034f08078e001598978c7e63f276b6542c98cfe5aef4a5a95053b64269b677943
6
+ metadata.gz: 9687467719efed89ca41d73b592b3a4db7e80462fbbb7d4e627d1f5221433f9aa2c6829a697c08efb9b501daeab493eeee9cbe2122499b2e98286105d6455dc6
7
+ data.tar.gz: a8137b6b01fc0a579bddb1e074faad2cd9d37247f5313cc70b898ce04b1d8e33f487c955d99f758839ccbcf26c1ff8a8dfb007763a64990f793ae9c1f080caf7
@@ -1,5 +1,9 @@
1
- sudo: false
2
1
  language: ruby
3
2
  rvm:
4
- - 2.3.1
5
- before_install: gem install bundler -v 1.15.4
3
+ - 2.2.6
4
+ - 2.3.3
5
+
6
+ install:
7
+ gem install timesheet_nags
8
+
9
+ script: rake
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 "thanks" package for Node.
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.
Binary file
@@ -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
@@ -2,5 +2,7 @@ module Thanks
2
2
  REGISTRY = {
3
3
  "bundler" => "https://rubytogether.org",
4
4
  "gemstash" => "https://rubytogether.org",
5
+ "rubocop" => "https://opencollective.com/rubocop",
6
+ "split" => "https://opencollective.com/split",
5
7
  }
6
8
  end
@@ -1,3 +1,3 @@
1
1
  module Thanks
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
@@ -23,4 +23,5 @@ Gem::Specification.new do |spec|
23
23
  spec.add_development_dependency "bundler", "~> 1.15"
24
24
  spec.add_development_dependency "rake", "~> 10.0"
25
25
  spec.add_development_dependency "minitest", "~> 5.0"
26
+ spec.add_development_dependency "rubocop"
26
27
  end
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.2.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