hub_store 0.6.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9d608a1df55b59c1018630b8840b1265144cb43f4697f4e3939f79556efecb2d
4
- data.tar.gz: d9dad1c9d112eede66045a65b255ee9107261b076c33f16217845ac69b51b1dd
3
+ metadata.gz: 1cc3b407432b8cd4c42e64b8ac908390e089860cc3c5f9295fc5efe26e394c95
4
+ data.tar.gz: 20f89a14ad08ca38b31542dfe5eda2fe9e1d71225c55111951163b9d27e46b7d
5
5
  SHA512:
6
- metadata.gz: 4058d615f51d8bd34135194c0aecf6a35042b445f1d9aa85ee7124ee5b2961143aecd6172bbffab0bd12553d0c287c85da308f8a931d27a706efd6448d14ba7e
7
- data.tar.gz: f61d994ca4e4b20a744ee8f58dcfd01095b7b097feeff82ce8df6cb1e920a1e8203e213559c6bc8f96bb66f76833803dfe029ccb56576c36b31aa569ec8d063d
6
+ metadata.gz: 701b35231adb89cbf9e8288d56b06b7d5169180f4538b938c9ab2ad04a2d85ad68818d9778c4d6245135ad3ec1fd13b2342db5940460a033c51ea8cdfcbc29dc
7
+ data.tar.gz: 4d013553b140680a3aac53d6d145646196cdda99713757f0fcdd3b70a4bfeb69e091cf517f19900ed09a9eb6d2399d5189ab8c8d31803569877b044f3d7bb3d5
data/hub_store.gemspec CHANGED
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
31
31
 
32
32
  spec.add_dependency "activerecord"
33
33
  spec.add_dependency "dotenv"
34
- spec.add_dependency "hub_link", ">= 0.6"
34
+ spec.add_dependency "hub_link", ">= 0.7"
35
35
  spec.add_dependency "sqlite3"
36
36
  spec.add_dependency "tty-spinner"
37
37
  end
data/lib/hub_store/cli.rb CHANGED
@@ -21,8 +21,7 @@ module HubStore
21
21
 
22
22
  def import_data
23
23
  repos.each do |repo|
24
- start_date = PullRequest.for(repo).recently_updated_first.first&.updated_at
25
- Importer.new(repo: repo, start_date: start_date).run
24
+ Importer.new(repo: repo).run
26
25
  end
27
26
  end
28
27
 
@@ -8,7 +8,7 @@ module HubStore
8
8
  class Importer
9
9
  def initialize(repo:, start_date: nil, ui: Ui.new)
10
10
  @repo = repo
11
- @start_date = (start_date || 2.years.ago).to_date
11
+ @start_date = start_date
12
12
  @ui = ui
13
13
  end
14
14
 
@@ -25,6 +25,14 @@ module HubStore
25
25
 
26
26
  attr_reader :repo, :start_date, :ui
27
27
 
28
+ def start_date
29
+ @start_date || latest_local_update
30
+ end
31
+
32
+ def latest_local_update
33
+ PullRequest.for(repo).recently_updated_first.first&.updated_at
34
+ end
35
+
28
36
  def import_prs(batch)
29
37
  ui.start("Importing PRs")
30
38
 
@@ -1,3 +1,3 @@
1
1
  module HubStore
2
- VERSION = "0.6.0"
2
+ VERSION = "0.7.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hub_store
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jens Balvig
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-01-15 00:00:00.000000000 Z
11
+ date: 2019-01-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -128,14 +128,14 @@ dependencies:
128
128
  requirements:
129
129
  - - ">="
130
130
  - !ruby/object:Gem::Version
131
- version: '0.6'
131
+ version: '0.7'
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - ">="
137
137
  - !ruby/object:Gem::Version
138
- version: '0.6'
138
+ version: '0.7'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: sqlite3
141
141
  requirement: !ruby/object:Gem::Requirement