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.
@@ -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