gems_bond 1.0.4 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gems_bond.rb +3 -2
- data/lib/gems_bond/configuration.rb +2 -0
- data/lib/gems_bond/{examination_helper.rb → examination.rb} +30 -18
- data/lib/gems_bond/fetchers/fetcher.rb +34 -0
- data/lib/gems_bond/{fetcher → fetchers}/github.rb +54 -10
- data/lib/gems_bond/fetchers/ruby_gems.rb +82 -0
- data/lib/gems_bond/gem.rb +128 -10
- data/lib/gems_bond/helpers/concurrency_helper.rb +24 -0
- data/lib/gems_bond/helpers/formatting_helper.rb +48 -0
- data/lib/gems_bond/printers/csv.rb +54 -0
- data/lib/gems_bond/printers/html.rb +61 -0
- data/lib/gems_bond/printers/printer.rb +58 -0
- data/lib/gems_bond/printers/stdout.rb +90 -0
- data/lib/gems_bond/railtie.rb +2 -1
- data/lib/gems_bond/spy/all.rb +93 -0
- data/lib/gems_bond/spy/one.rb +59 -0
- data/lib/gems_bond/version.rb +1 -1
- data/lib/tasks/gems_bond/spy/all.rake +36 -0
- data/lib/tasks/gems_bond/spy/one.rake +29 -0
- metadata +17 -10
- data/lib/gems_bond/fetch_helper.rb +0 -71
- data/lib/gems_bond/fetcher/ruby_gems.rb +0 -58
- data/lib/gems_bond/printer.rb +0 -88
- data/lib/gems_bond/spy.rb +0 -62
- data/lib/tasks/gems_bond/spy.rake +0 -34
@@ -1,34 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "gems_bond/spy"
|
4
|
-
|
5
|
-
begin
|
6
|
-
require "#{Rails.root}/config/initializers/gems_bond" if defined?(Rails)
|
7
|
-
rescue LoadError
|
8
|
-
nil
|
9
|
-
end
|
10
|
-
|
11
|
-
namespace :gems_bond do
|
12
|
-
desc "Investigates gems"
|
13
|
-
task :spy do
|
14
|
-
puts "Welcome, my name is Bond, Gems Bond."\
|
15
|
-
" I will do some spying on your gems for you..."
|
16
|
-
|
17
|
-
GemsBond.configure do |config|
|
18
|
-
# set github_token from ENV if given
|
19
|
-
config.github_token = ENV["GITHUB_TOKEN"] if ENV["GITHUB_TOKEN"]
|
20
|
-
end
|
21
|
-
|
22
|
-
unless GemsBond.configuration.github_token
|
23
|
-
puts "It seems that you didn't provide any GitHub token."\
|
24
|
-
" This is necessary to fetch more data from GitHub,"\
|
25
|
-
" like the last commit date, the forks count, the sise of the repository..."
|
26
|
-
|
27
|
-
puts "Please provide a GitHub token by adding it in the configuration"\
|
28
|
-
" or passing GITHUB_TOKEN=<token> when running the task."
|
29
|
-
exit
|
30
|
-
end
|
31
|
-
|
32
|
-
GemsBond::Spy.new.call
|
33
|
-
end
|
34
|
-
end
|