hiddengems 0.3.0 → 0.3.1

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: 61ca9fbd2ce6b45ccfafd3ee33feac087833e5f4ec40b8255134ce38523b2bee
4
- data.tar.gz: 332a46385eb03d77ee543a87792d2a5674ed2e629bc8ebdf95c863461bb59c2f
3
+ metadata.gz: e29968b1a0adad5f4dd2a9157d3fed7230731bbe6c0c4c280e76651ffe1386ba
4
+ data.tar.gz: cdacc9d81bd931e81ee5f163a463f646703f0f8204b55c5835c430145bbfc4ef
5
5
  SHA512:
6
- metadata.gz: 267c90327e59a508b1a1d8933bd569d6aa614a2f2d0702473ef9afcb239854d92ff9a80d48fec59a7de3d6faedb47a489592f94ed43fa3a7bab57084fe3f7035
7
- data.tar.gz: 5c3221b36b09e2d364538db18e04381f8910b920a6b94eacfc76e3f42f29f299b2d47e6f73f4eec31658767bd38f7a10b18279842c6abcce968fbe166a138a3d
6
+ metadata.gz: b6b8cefd2cd498838b7ccb91126ccd9aba5e94c1965c5dd89bcdcc16be4c2ed6f76f6d81e3470278d910788daeaadefa6a16cec8bb506d3d010b21b32d73d748
7
+ data.tar.gz: 0dcc45deb33d553985583bc2c3478cac6dedbf8e2a7d2ce8998123fb5c5ee53a2f8cb1d87b4b62a06ff13771d1b46f17430eb890534c369cf287e86a224a5d0e
data/LICENSE ADDED
@@ -0,0 +1,7 @@
1
+ Copyright 2022 David Parker
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -15,12 +15,21 @@ The first is comprised of 5 lists of individual rankings sorted best -> worst fo
15
15
 
16
16
  The second table contains a list of gems and their descriptions sorted by the *sum* of all a given gems ranks from the first table. The lowest overall score is best. By default each individual ranking is given a weight of 1, but you can alter this with command line options (see below)
17
17
 
18
+ ![illustration of how scoring works by default](img/2022-09-04_13-40.png "Scoring example")
19
+
18
20
  The rationale for this is that ranking based on download count alone (e.g. http://bestgems.org) doesn't always give you a good sense of where things stand for a given search term. Looking at download count alone, a gem that has been around for many years and has garnered many downloads but has stagnated will tend to retain its top ranking due to the fact that people will tend to download the top ranking gem first. In other words: it invites a positive feedback situation.
19
21
 
20
22
  hiddengems.rb attempts to do a better job of ranking for a given search term. As it's grabbing all the requisite data at run time, it's not as fast as using an indexing site, but it's definitely "smarter".
21
23
 
22
24
  The program supports options that allow you to adjust the weights of the metrics that are used to calculate the rank sum table. By default all metrics are given equal weight, but you can tweak this as you see fit.
23
25
 
26
+ Example:
27
+ ```
28
+ hiddengems.rb 'zabbix sender' --links --downloads 0 --avg-version-date 3 --download-slope 3 --latest-version-date 2
29
+ ```
30
+ gives:
31
+ ![illustration of how scoring works with weight adjustments](img/2022-09-04_13-51.png "Weighted Scoring example")
32
+
24
33
  The program also includes a link validation function. If you use it (--links), hiddengems.rb will first audit each gem's homepage_uri and source_code_uri links to ensure that (a) at least one of those URIs is populated and (b) that the links that are defined are valid. If both (a) and (b) fail, the gem is removed from the list of found gems before ranking is calculated.
25
34
 
26
35
  The --links option can add a bunch of time to processing so it's not on by default, but it does a good job of weeding out dead projects.
@@ -44,18 +53,17 @@ Where [options] are:
44
53
  -h, --help Show this message
45
54
 
46
55
 
47
- $ ./hiddengems.rb --links --avg-version-date 2 'zabbix sender'
56
+ $ hiddengems.rb 'zabbix sender' --links
48
57
  Option values:
49
58
  {
50
- :links => true,
51
- :downloads => 1,
52
- :versions => 1,
53
- :latest_version_date => 1,
54
- :avg_version_date => 2,
55
- :download_slope => 1,
56
- :help => false,
57
- :links_given => true,
58
- :avg_version_date_given => true
59
+ :links => true,
60
+ :downloads => 1,
61
+ :versions => 1,
62
+ :latest_version_date => 1,
63
+ :avg_version_date => 1,
64
+ :download_slope => 1,
65
+ :help => false,
66
+ :links_given => true
59
67
  }
60
68
 
61
69
  Search term: zabbix sender
@@ -73,13 +81,13 @@ Attempting https://github.com/englishm/zabbix_send
73
81
  Attempting https://github.com/englishm/zabbix_send
74
82
  Rejecting zabbix_receiver due to lack of valid URIs
75
83
 
76
- 5 remain gems after link validation
84
+ 5 remaining gems after link validation
77
85
 
78
86
  Calculating rankings...
79
87
 
80
88
  Individual Rankings (best -> worst)
81
89
  +-----+------------------------------+------------------------------+------------------------------+------------------------------+------------------------------+
82
- |rank |downloads |versions |latest_version_date |avg_version_date |download_slope |
90
+ |rank |downloads (1) |versions (1) |latest_version_date (1) |avg_version_date (1) |download_slope (1) |
83
91
  +-----+------------------------------+------------------------------+------------------------------+------------------------------+------------------------------+
84
92
  |0 |zabbix-ruby-client (51536) |zabbix-ruby-client (24) |zabbix_sender_api (2022) |zabbix_sender_api (2021) |zabbix_send (1289) |
85
93
  |1 |zabbix_sender (35317) |zabbix_sender_api (11) |zabbix_sender (2020) |zabbix_sender (2017) |zabbix_sender (320) |
@@ -92,11 +100,11 @@ Rank sums (best -> worst)
92
100
  +-----+-----------------------------------+----------------------------------------------------------------------------------------------------+
93
101
  |score|name |info |
94
102
  +-----+-----------------------------------+----------------------------------------------------------------------------------------------------+
95
- |7 |zabbix_sender |Zabbix Sender gem |
103
+ |6 |zabbix_sender |Zabbix Sender gem |
96
104
  |7 |zabbix_sender_api |This gem implements an api that abstracts the zabbix sender/trapper mechanism. It saves tons of ti… |
97
- |13 |zabbix-ruby-client |A zabbix alternative to zabbix-agent using zabbix-sender. |
98
- |15 |zabbix_sender_legacy |Improved zabbix_sender gem just for legacy ruby < 2.0 like in Debian Wheezy |
99
- |18 |zabbix_send |Send data to Zabbix trappers from Ruby |
105
+ |10 |zabbix-ruby-client |A zabbix alternative to zabbix-agent using zabbix-sender. |
106
+ |13 |zabbix_sender_legacy |Improved zabbix_sender gem just for legacy ruby < 2.0 like in Debian Wheezy |
107
+ |14 |zabbix_send |Send data to Zabbix trappers from Ruby |
100
108
  +-----+-----------------------------------+----------------------------------------------------------------------------------------------------+
101
109
 
102
110
 
@@ -130,4 +138,4 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
130
138
 
131
139
  ## Contributing
132
140
 
133
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/hiddengems.
141
+ Bug reports and pull requests are welcome on GitHub at https://gitlab.com/svdasein/hiddengems.
data/exe/hiddengems.rb CHANGED
@@ -161,7 +161,7 @@ if opts[:links]
161
161
  false
162
162
  end
163
163
  }
164
- puts "\n#{gems.size} remain gems after link validation"
164
+ puts "\n#{gems.size} remaining gems after link validation"
165
165
  end
166
166
 
167
167
  puts "\nCalculating rankings..."
@@ -186,7 +186,7 @@ gems.each_index {|index|
186
186
  }
187
187
  puts
188
188
  puts "Individual Rankings (best -> worst)"
189
- puts TTY::Table.new(header: [:rank]+data.keys, rows: report).render(:ascii, resize: false, column_widths: [5] + [30] * data.keys.size)
189
+ puts TTY::Table.new(header: [:rank]+data.keys.collect {|each| "#{each} (#{opts[each]})" }, rows: report).render(:ascii, resize: false, column_widths: [5] + [30] * data.keys.size)
190
190
 
191
191
  puts "\nRank sums (best -> worst)"
192
192
  puts TTY::Table.new(header: [:score, :name,:info], rows: gems.sort {|a,b| a.rank<=>b.rank}.collect {|each| [each.rank,each.name,each.info]}).render(:ascii, column_widths: [5,35,100],resize: false)
data/hiddengems.gemspec CHANGED
@@ -9,9 +9,10 @@ Gem::Specification.new do |spec|
9
9
  spec.email = ["dparker@svdasein.org"]
10
10
 
11
11
  spec.summary = "Search for ruby gems with a search term (like bestgems.org) with better ranking"
12
- spec.description = "Provides a cli that lets you search rubygems for a search term. Displays multiple ranking criteria with emphasis on project vitality"
12
+ spec.description = "Provides a cli that lets you search rubygems for a search term. Displays multiple ranking criteria with emphasis on project vitality. Alternative to rubygems.org"
13
13
  spec.homepage = "https://gitlab.com/svdasein/hiddengems"
14
14
  spec.required_ruby_version = ">= 2.4.0"
15
+ spec.license = 'MIT'
15
16
 
16
17
  spec.metadata["allowed_push_host"] = "https://rubygems.org"
17
18
 
Binary file
Binary file
Binary file
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Hiddengems
4
- VERSION = "0.3.0"
4
+ VERSION = "0.3.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hiddengems
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dave Parker
@@ -151,7 +151,7 @@ dependencies:
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0'
153
153
  description: Provides a cli that lets you search rubygems for a search term. Displays
154
- multiple ranking criteria with emphasis on project vitality
154
+ multiple ranking criteria with emphasis on project vitality. Alternative to rubygems.org
155
155
  email:
156
156
  - dparker@svdasein.org
157
157
  executables:
@@ -161,16 +161,21 @@ extra_rdoc_files: []
161
161
  files:
162
162
  - ".gitignore"
163
163
  - Gemfile
164
+ - LICENSE
164
165
  - README.md
165
166
  - Rakefile
166
167
  - bin/console
167
168
  - bin/setup
168
169
  - exe/hiddengems.rb
169
170
  - hiddengems.gemspec
171
+ - img/2022-09-04_12-37.png
172
+ - img/2022-09-04_13-40.png
173
+ - img/2022-09-04_13-51.png
170
174
  - lib/hiddengems.rb
171
175
  - lib/hiddengems/version.rb
172
176
  homepage: https://gitlab.com/svdasein/hiddengems
173
- licenses: []
177
+ licenses:
178
+ - MIT
174
179
  metadata:
175
180
  allowed_push_host: https://rubygems.org
176
181
  homepage_uri: https://gitlab.com/svdasein/hiddengems