gergich 1.2.0 → 1.2.1
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 +5 -5
- data/lib/gergich.rb +3 -1
- data/spec/gergich_spec.rb +15 -0
- metadata +3 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 9f81bdfdf24629e16b6af3486388f244e73aa43721febfb8e959af52cba8efbe
|
|
4
|
+
data.tar.gz: f13157b630762c91edfcdeb342aac476f62af114cad2edbb40b18a0814060b7e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 81e0ce4960ce3338693de120d489d7e045ddac8c57c5c20331ca6f6e30daf68dc162dcadd158e0c39838f0b3a6a6bc906f837ab9e55da0e68185b9ed999c3516
|
|
7
|
+
data.tar.gz: '0687478859b3e572d5f0e888c93cd8d5e0965cc546f9dd6a688a1050d4eb4174b189214dd9f3f581f9c3df8392bcb903b81101de76f85b53c3c387a72b6523e8'
|
data/lib/gergich.rb
CHANGED
|
@@ -363,7 +363,9 @@ module Gergich
|
|
|
363
363
|
end
|
|
364
364
|
|
|
365
365
|
def db_file
|
|
366
|
-
@db_file ||= File.expand_path(
|
|
366
|
+
@db_file ||= File.expand_path(
|
|
367
|
+
"#{ENV.fetch('GERGICH_DB_PATH', '/tmp')}/#{GERGICH_USER}-#{commit.revision_id}.sqlite3"
|
|
368
|
+
)
|
|
367
369
|
end
|
|
368
370
|
|
|
369
371
|
def db
|
data/spec/gergich_spec.rb
CHANGED
|
@@ -90,6 +90,21 @@ RSpec.describe Gergich::Draft do
|
|
|
90
90
|
draft.reset!
|
|
91
91
|
end
|
|
92
92
|
|
|
93
|
+
context "#GERGICH_DB_PATH" do
|
|
94
|
+
it "uses the custom path" do
|
|
95
|
+
original_db_path = ENV["GERGICH_DB_PATH"]
|
|
96
|
+
ENV["GERGICH_DB_PATH"] = "/custom"
|
|
97
|
+
|
|
98
|
+
expect(draft.db_file).to eq("/custom/gergich-test.sqlite3")
|
|
99
|
+
|
|
100
|
+
ENV["GERGICH_DB_PATH"] = original_db_path
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
it "uses the default path" do
|
|
104
|
+
expect(draft.db_file).to eq("/tmp/gergich-test.sqlite3")
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
|
|
93
108
|
describe "#info" do
|
|
94
109
|
subject { draft.info }
|
|
95
110
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gergich
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.2.
|
|
4
|
+
version: 1.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jon Jensen
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-
|
|
11
|
+
date: 2020-11-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: httparty
|
|
@@ -156,8 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
156
156
|
- !ruby/object:Gem::Version
|
|
157
157
|
version: '0'
|
|
158
158
|
requirements: []
|
|
159
|
-
|
|
160
|
-
rubygems_version: 2.6.14.4
|
|
159
|
+
rubygems_version: 3.0.3
|
|
161
160
|
signing_key:
|
|
162
161
|
specification_version: 4
|
|
163
162
|
summary: Command-line tool for adding Gerrit comments
|