hub_link 0.4.0 → 0.5.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: 8aad7cd8013fbb914ec24690d5e7f39e72bd3d6a
4
- data.tar.gz: 61149d5323fc6ddbfb0051e3e4113203a0015433
3
+ metadata.gz: a23354ae609c086c516fb2833bb9e14161645a07
4
+ data.tar.gz: 751fc242b5d9356445f93222654ef5b0dad429ad
5
5
  SHA512:
6
- metadata.gz: 590c8db368abe5b67324bcb8b83d051fa537c8d55214f461a55a9977cc6ff33e31746c3db6ca56752d3002438c615fa688b5c909413250e48b68369a5d3c0c30
7
- data.tar.gz: 826fe2cff33c8dc037912b7feb6624ad2a7145a9f73732c857bb663ddea0c7dfb8a7f86398bfc3101b25afa9e4c519abdc9e9a41115f2f2f65e62f44eb9c3d07
6
+ metadata.gz: bdeab19613a4f234cd093de39ece77e7461ca44cf1cd7823332664354c1a38e3945132fadbebce3ed35a13b984b39bb65613911a4fdadee5270433dc8e4b5187
7
+ data.tar.gz: 495bc8f9afd3ce436a535e8ea766a72cff4195a0a3f026158b24de80a25a407d117a5966ac3c40d6f676065c087253b03aa5d06e8ad0c05d6efa9714b22c578d
data/README.md CHANGED
@@ -23,7 +23,7 @@ stream.in_batches do |batch|
23
23
  end
24
24
  ```
25
25
 
26
- Hub Link will loop through the API in batches of 2 weeks at a time.
26
+ Hub Link will loop through the API in batches of 1 day at a time.
27
27
 
28
28
  ## Contributing
29
29
 
@@ -1,5 +1,7 @@
1
1
  module HubLink
2
2
  class Batch
3
+ attr_reader :query
4
+
3
5
  def initialize(query)
4
6
  @query = query
5
7
  end
@@ -18,8 +20,6 @@ module HubLink
18
20
 
19
21
  private
20
22
 
21
- attr_reader :query
22
-
23
23
  def results
24
24
  @_results ||= Api::PullRequest.search(query)
25
25
  end
@@ -22,7 +22,7 @@ module HubLink
22
22
  end
23
23
 
24
24
  def logger
25
- logger = Logger.new(STDOUT)
25
+ logger = Logger.new("hub_link.log")
26
26
  logger.formatter = ->(_, datetime, _, msg) { "#{datetime.to_s(:db)} - #{msg}\n" }
27
27
  logger.level = Logger::INFO
28
28
  logger
@@ -3,7 +3,7 @@ require "hub_link/batch"
3
3
 
4
4
  module HubLink
5
5
  class Stream
6
- GITHUB_BATCH_SIZE = 14
6
+ GITHUB_BATCH_SIZE = 1 # Day
7
7
 
8
8
  def initialize(repo, start_date: 2.years.ago)
9
9
  @repo = repo
@@ -1,3 +1,3 @@
1
1
  module HubLink
2
- VERSION = "0.4.0"
2
+ VERSION = "0.5.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hub_link
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jens Balvig