gem-check 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/bin/gem-check +4 -1
- data/lib/gem-check/cli.rb +13 -0
- data/lib/gem-check/helpers.rb +1 -1
- data/lib/gem-check/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d4bb5ed1286dccd168236733020b5a74635d5e63
|
4
|
+
data.tar.gz: 4de4f37c285863fe3e938d00d75b40f06aab7408
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9aa6538fc3b9b156245731856e2cb7a5bb8904eb733ba41f941195216b24322f4834e28dbb9de23679123280799400c9486d4c2e4bc2b7c6a7843dee1ed8eb81
|
7
|
+
data.tar.gz: 070d876c531488b2d01d8f58b6650f4ebe53d6a2c1c9edab280c591d514ca19b01a7bb1565d3734f59f0834a8bce3373f3ca694605ca7e581e53b3e57aa6168c
|
data/README.md
CHANGED
data/bin/gem-check
CHANGED
@@ -1,8 +1,11 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
require_relative '../lib/gem-check'
|
3
3
|
include GemCheck
|
4
|
-
|
4
|
+
|
5
|
+
if Checker.option?(ARGV, ['-h','--help', 'help'])
|
5
6
|
Checker.show_help
|
7
|
+
elsif Checker.option?(ARGV, ['-u','--update','update'])
|
8
|
+
Checker.update
|
6
9
|
else
|
7
10
|
Checker.new(ARGV).check
|
8
11
|
end
|
data/lib/gem-check/cli.rb
CHANGED
@@ -6,6 +6,19 @@ module GemCheck
|
|
6
6
|
puts "\n Flags:\n"
|
7
7
|
puts " -f Don't save the updated stats for this run."
|
8
8
|
puts " -h Display this help screen."
|
9
|
+
puts " -u Update gem-check."
|
10
|
+
puts
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.option?(argv, opts)
|
14
|
+
argv.any? { |option| opts.include?(option) }
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.update
|
18
|
+
puts "\nThis will install the latest version of gem-check."
|
19
|
+
print 'Continue? [Yn] '
|
20
|
+
response = STDIN.gets.chomp
|
21
|
+
puts "\n" + `gem install gem-check` if response.downcase.include?('y')
|
9
22
|
puts
|
10
23
|
end
|
11
24
|
|
data/lib/gem-check/helpers.rb
CHANGED
@@ -27,7 +27,7 @@ module GemCheck
|
|
27
27
|
return latest_info if @previous_stats.empty?
|
28
28
|
latest_info.each do |row|
|
29
29
|
prev_info = search_by_column(@previous_stats, COL_NAME, row[COL_NAME])
|
30
|
-
prev_info = search_by_column(prev_info, COL_VER, row[COL_VER])
|
30
|
+
prev_info = search_by_column(prev_info, COL_VER, row[COL_VER])
|
31
31
|
prev_info = prev_info.first || new_version_info(row)
|
32
32
|
calc_new_downloads(COL_TDL, row, prev_info)
|
33
33
|
calc_new_downloads(COL_VDL, row, prev_info)
|
data/lib/gem-check/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gem-check
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Meissa Dia
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gems
|