github_issue_stats 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3d2a2224ba34cdcf8773b071963589cd11301528
4
- data.tar.gz: 1803971b22a7e9d595c475ce953d9943927e9946
3
+ metadata.gz: e44a369c67f5f5183e8cd90f26d8fc204e41a4eb
4
+ data.tar.gz: 98ac378482af845a7d3b564bb98576c34f6b7112
5
5
  SHA512:
6
- metadata.gz: 928a826283caa5366d4aa9d8985205342e0695076bb894ae1c1ba9c56e95228986bd38c7cd390ba19f86bdcc8f19ce11c19b5e3e83d87480fd3bd7bb913d20ab
7
- data.tar.gz: 6537b9071c607dc09f342efb91d84ad379578a6409578a2520e73988339f9e2c5c6e0152831ad09a14e12235fa1829cc5f90aea3d74a0051d503afbf894b9972
6
+ metadata.gz: 4d1147b5ccf451cad07c2b455ffe08ad657fdf54d82e95eab9329625a2128ab56c66eb66414d7d8e2c87df18d8251a03a3e66db86e295c4396291c2a11c8782a
7
+ data.tar.gz: 293fce8c08876c7207cb30b0662bef63ad392395ac08bbcdafed6c89b033a0f6cc4bd7559b7c8a4ff8a8b00c75d2cae2fdc1d9ce518f87e4d19e395932da275b
@@ -5,7 +5,6 @@ require "github_issue_stats"
5
5
 
6
6
  ARGV.push('-h') if ARGV.empty?
7
7
 
8
- version = "0.1.0"
9
8
  options = {}
10
9
 
11
10
  options[:verbose] = false
@@ -73,7 +72,7 @@ opt_parser = OptionParser.new do |opts|
73
72
  end
74
73
 
75
74
  opts.on_tail("-v", "--version", "Show version", "\n") do
76
- STDERR.puts(version)
75
+ STDERR.puts(GitHubIssueStats::VERSION)
77
76
  exit
78
77
  end
79
78
  end
@@ -29,9 +29,8 @@ module Enumerable
29
29
  end
30
30
  end
31
31
 
32
- Octokit.auto_paginate = true
33
-
34
32
  class GitHubIssueStats
33
+ VERSION = "0.2.0"
35
34
 
36
35
  attr_accessor :client, # Octokit client for acesing the API
37
36
  :logger, # Logger for writing debugging info
@@ -46,7 +45,12 @@ class GitHubIssueStats
46
45
  @logger.debug "Creating a new Octokit client with token #{token[0..5]}"
47
46
 
48
47
  begin
49
- @client = Octokit::Client.new(:access_token => token)
48
+ @client = Octokit::Client.new(
49
+ :access_token => token,
50
+ :auto_paginate => true,
51
+ :user_agent => "GitHubIssueStats/#{VERSION} (@izuzak) #{Octokit.user_agent}"
52
+ )
53
+
50
54
  @client.rate_limit
51
55
  rescue Octokit::Unauthorized => exception
52
56
  @logger.error "Token #{token[0..5]} is not valid"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: github_issue_stats
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Zuzak