hub_store 0.18.0 → 0.19.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/hub_store.gemspec +1 -1
- data/lib/hub_store.rb +0 -2
- data/lib/hub_store/storage/database.rb +0 -10
- data/lib/hub_store/storage/import.rb +6 -2
- data/lib/hub_store/storage/issue.rb +16 -0
- data/lib/hub_store/version.rb +1 -1
- metadata +8 -9
- data/lib/hub_store/storage/review_request.rb +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d65502034027d283a8745cabceb8ec3b4081b4b3ab37f5232e77272945db5bdb
|
4
|
+
data.tar.gz: 48752b836543b21df1e52a600d54d649e1e0a7e68d0a73134c8d617da04e2da4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2b4779d416fdb59b41e3513318a00b4f2e166bb6a85af6dc21132f480b5e950d1cadd2dd1978959865fec0dd77d5918e00b1ad9d7e9b6aa943a894186134f97
|
7
|
+
data.tar.gz: 1fd0f3e6450bd9212e11f13aacde14b769074f915c42b4ba055c9505cda3ea21ea62261d1c7543d22c811a7b2dd12dabe320982c4d60d445c3f0b2badc51ec73
|
data/hub_store.gemspec
CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.require_paths = ["lib"]
|
24
24
|
|
25
25
|
spec.add_development_dependency "bundler"
|
26
|
-
spec.add_development_dependency "rake", "
|
26
|
+
spec.add_development_dependency "rake", ">= 12.3.3"
|
27
27
|
spec.add_development_dependency "minitest", "~> 5.0"
|
28
28
|
spec.add_development_dependency "pry"
|
29
29
|
|
data/lib/hub_store.rb
CHANGED
@@ -3,11 +3,9 @@ require "hub_store/version"
|
|
3
3
|
require "hub_store/cli"
|
4
4
|
require "hub_store/storage/pull_request"
|
5
5
|
require "hub_store/storage/review"
|
6
|
-
require "hub_store/storage/review_request"
|
7
6
|
|
8
7
|
module HubStore
|
9
8
|
RESOURCES = {
|
10
|
-
review_requests: Storage::ReviewRequest,
|
11
9
|
reviews: Storage::Review,
|
12
10
|
pull_requests: Storage::PullRequest
|
13
11
|
}.freeze
|
@@ -52,16 +52,6 @@ module HubStore::Storage
|
|
52
52
|
t.text "body"
|
53
53
|
end
|
54
54
|
end
|
55
|
-
|
56
|
-
unless ActiveRecord::Base.connection.table_exists?("review_requests")
|
57
|
-
create_table "review_requests", force: :cascade, id: false do |t|
|
58
|
-
t.string "digest", limit: 40, primary: true
|
59
|
-
t.bigint "pull_request_id"
|
60
|
-
t.string "requester"
|
61
|
-
t.string "reviewer"
|
62
|
-
t.datetime "created_at", null: false
|
63
|
-
end
|
64
|
-
end
|
65
55
|
end
|
66
56
|
end
|
67
57
|
end
|
@@ -15,10 +15,14 @@ module HubStore
|
|
15
15
|
|
16
16
|
private
|
17
17
|
|
18
|
-
attr_reader :repo
|
18
|
+
attr_reader :repo
|
19
19
|
|
20
20
|
def since
|
21
|
-
@since.presence ||
|
21
|
+
@since.presence || last_pull_request_update
|
22
|
+
end
|
23
|
+
|
24
|
+
def last_pull_request_update
|
25
|
+
PullRequest.for(repo).latest_update
|
22
26
|
end
|
23
27
|
end
|
24
28
|
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require "active_record"
|
2
|
+
|
3
|
+
module HubStore::Storage
|
4
|
+
class Issue < ActiveRecord::Base
|
5
|
+
scope :recently_updated_first, -> { order(updated_at: :desc) }
|
6
|
+
validates :repo, presence: true
|
7
|
+
|
8
|
+
def self.for(repo)
|
9
|
+
where(repo: repo.to_s)
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.latest_update
|
13
|
+
recently_updated_first.first&.updated_at
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/lib/hub_store/version.rb
CHANGED
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.
|
4
|
+
version: 0.19.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:
|
11
|
+
date: 2020-05-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -28,16 +28,16 @@ dependencies:
|
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 12.3.3
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 12.3.3
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: minitest
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -175,9 +175,9 @@ files:
|
|
175
175
|
- lib/hub_store/exporter.rb
|
176
176
|
- lib/hub_store/storage/database.rb
|
177
177
|
- lib/hub_store/storage/import.rb
|
178
|
+
- lib/hub_store/storage/issue.rb
|
178
179
|
- lib/hub_store/storage/pull_request.rb
|
179
180
|
- lib/hub_store/storage/review.rb
|
180
|
-
- lib/hub_store/storage/review_request.rb
|
181
181
|
- lib/hub_store/ui.rb
|
182
182
|
- lib/hub_store/version.rb
|
183
183
|
homepage: https://balvig.com
|
@@ -199,8 +199,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
199
199
|
- !ruby/object:Gem::Version
|
200
200
|
version: '0'
|
201
201
|
requirements: []
|
202
|
-
|
203
|
-
rubygems_version: 2.7.6
|
202
|
+
rubygems_version: 3.1.3
|
204
203
|
signing_key:
|
205
204
|
specification_version: 4
|
206
205
|
summary: Downloads PR/Review info CSV files
|