localhost 1.1.7 → 1.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/localhost/authority.rb +14 -8
- data/lib/localhost/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a8bb85b8e82b1ceaec73363ba246313ee46da6d47c948ed2b57bfa1f931b51a
|
4
|
+
data.tar.gz: 8953521fbcd8eb215ddfaaa59a65b96715c8e69dfb925b0794d1e5e41c204613
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 16e6781fb5b9caf6180ae68579066d2ab0006fbbb5107d81a6ed475dabeb37a0362ecb67a4e19a7f4d527794e56848c9c367286a1a6424494e0f3bc81cfc9704
|
7
|
+
data.tar.gz: 93a1b52e82b6abf55413b9af17f3769bc659cfcc857da9e6a0c9860120137247490abd11d9261d17539f1ef9ef234db29827c3ce07745ac89a0dd1ebad28b2fb
|
data/lib/localhost/authority.rb
CHANGED
@@ -169,15 +169,21 @@ module Localhost
|
|
169
169
|
end
|
170
170
|
|
171
171
|
def save(path)
|
172
|
-
File.
|
173
|
-
File.join(path, "#{@hostname}.crt"),
|
174
|
-
self.certificate.to_pem
|
175
|
-
)
|
172
|
+
lockfile_path = File.join(path, "#{@hostname}.lock")
|
176
173
|
|
177
|
-
File.
|
178
|
-
|
179
|
-
|
180
|
-
|
174
|
+
File.open(lockfile_path, File::RDWR|File::CREAT, 0644) do |lockfile|
|
175
|
+
lockfile.flock(File::LOCK_EX)
|
176
|
+
|
177
|
+
File.write(
|
178
|
+
File.join(path, "#{@hostname}.crt"),
|
179
|
+
self.certificate.to_pem
|
180
|
+
)
|
181
|
+
|
182
|
+
File.write(
|
183
|
+
File.join(path, "#{@hostname}.key"),
|
184
|
+
self.key.to_pem
|
185
|
+
)
|
186
|
+
end
|
181
187
|
end
|
182
188
|
end
|
183
189
|
end
|
data/lib/localhost/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: localhost
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -94,7 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
94
94
|
- !ruby/object:Gem::Version
|
95
95
|
version: '0'
|
96
96
|
requirements: []
|
97
|
-
rubygems_version: 3.
|
97
|
+
rubygems_version: 3.2.3
|
98
98
|
signing_key:
|
99
99
|
specification_version: 4
|
100
100
|
summary: Manage a local certificate authority for self-signed localhost development
|