ruby_easy_rsa 0.2.0.pre.1 → 0.2.0.pre.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/lib/ruby_easy_rsa/commands/base.rb +53 -0
- data/lib/ruby_easy_rsa/commands/initialise_pki.rb +13 -0
- data/lib/ruby_easy_rsa/commands.rb +7 -0
- data/lib/ruby_easy_rsa/version.rb +1 -1
- data/lib/ruby_easy_rsa.rb +23 -0
- data/ruby_easy_rsa.gemspec +1 -1
- metadata +8 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 38eb0ff1197e63c25cf4189657ac784bfa14846754bcdaca5f3feaf570f18ae3
|
4
|
+
data.tar.gz: 52817fa5359fb0c6156ba79f279cbb1085254d4d3d82d28e45c69c8293c2a7f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 010cdcd7e0fc8be6532f6295b8da6d2800a4b096e7b411c611b4e323811fa4a92060c258b143bf51904ca88e156e534254c2e34be13e1c800294eace5056f7d5
|
7
|
+
data.tar.gz: 651ef2261512aafeff08ff944efccc9fe5d95dd929d1f35b06d10b3a84e84bad56857a1d2b9d72f6b4bb6531856e6fa251cd96cf0b6b694d3c47ac79303dec4f
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ruby_easy_rsa (0.2.0.pre.
|
4
|
+
ruby_easy_rsa (0.2.0.pre.2)
|
5
5
|
lino (~> 1.1)
|
6
6
|
|
7
7
|
GEM
|
@@ -37,7 +37,7 @@ GEM
|
|
37
37
|
open4 (1.3.4)
|
38
38
|
public_suffix (4.0.4)
|
39
39
|
rake (13.0.1)
|
40
|
-
rake_circle_ci (0.
|
40
|
+
rake_circle_ci (0.7.0)
|
41
41
|
colored2 (~> 3.1)
|
42
42
|
excon (~> 0.72)
|
43
43
|
rake_factory (~> 0.23)
|
@@ -83,7 +83,7 @@ DEPENDENCIES
|
|
83
83
|
bundler (~> 2.1)
|
84
84
|
gem-release (~> 2.0)
|
85
85
|
rake (~> 13.0)
|
86
|
-
rake_circle_ci (
|
86
|
+
rake_circle_ci (~> 0.7)
|
87
87
|
rake_github (~> 0.3)
|
88
88
|
rake_ssh (~> 0.2)
|
89
89
|
rspec (~> 3.9)
|
@@ -0,0 +1,53 @@
|
|
1
|
+
require 'lino'
|
2
|
+
|
3
|
+
module RubyEasyRSA
|
4
|
+
module Commands
|
5
|
+
class Base
|
6
|
+
attr_reader :binary
|
7
|
+
|
8
|
+
def initialize(binary: nil)
|
9
|
+
@binary = binary || RubyEasyRSA.configuration.binary
|
10
|
+
end
|
11
|
+
|
12
|
+
def stdin
|
13
|
+
''
|
14
|
+
end
|
15
|
+
|
16
|
+
def stdout
|
17
|
+
STDOUT
|
18
|
+
end
|
19
|
+
|
20
|
+
def stderr
|
21
|
+
STDERR
|
22
|
+
end
|
23
|
+
|
24
|
+
def execute(opts = {})
|
25
|
+
builder = instantiate_builder
|
26
|
+
|
27
|
+
do_before(opts)
|
28
|
+
configure_command(builder, opts)
|
29
|
+
.build
|
30
|
+
.execute(
|
31
|
+
stdin: stdin,
|
32
|
+
stdout: stdout,
|
33
|
+
stderr: stderr)
|
34
|
+
do_after(opts)
|
35
|
+
end
|
36
|
+
|
37
|
+
def instantiate_builder
|
38
|
+
Lino::CommandLineBuilder
|
39
|
+
.for_command(binary)
|
40
|
+
.with_option_separator('=')
|
41
|
+
end
|
42
|
+
|
43
|
+
def do_before(opts)
|
44
|
+
end
|
45
|
+
|
46
|
+
def configure_command(builder, opts)
|
47
|
+
end
|
48
|
+
|
49
|
+
def do_after(opts)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
data/lib/ruby_easy_rsa.rb
CHANGED
@@ -1,5 +1,28 @@
|
|
1
1
|
require 'ruby_easy_rsa/version'
|
2
|
+
require 'ruby_easy_rsa/commands'
|
2
3
|
|
3
4
|
module RubyEasyRSA
|
5
|
+
class << self
|
6
|
+
attr_writer :configuration
|
4
7
|
|
8
|
+
def configuration
|
9
|
+
@configuration ||= Configuration.new
|
10
|
+
end
|
11
|
+
|
12
|
+
def configure
|
13
|
+
yield(configuration)
|
14
|
+
end
|
15
|
+
|
16
|
+
def reset!
|
17
|
+
@configuration = nil
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
class Configuration
|
22
|
+
attr_accessor :binary
|
23
|
+
|
24
|
+
def initialize
|
25
|
+
@binary = 'easyrsa'
|
26
|
+
end
|
27
|
+
end
|
5
28
|
end
|
data/ruby_easy_rsa.gemspec
CHANGED
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
|
|
28
28
|
|
29
29
|
spec.add_development_dependency 'bundler', '~> 2.1'
|
30
30
|
spec.add_development_dependency 'rake', '~> 13.0'
|
31
|
-
spec.add_development_dependency 'rake_circle_ci', '0.
|
31
|
+
spec.add_development_dependency 'rake_circle_ci', '~> 0.7'
|
32
32
|
spec.add_development_dependency 'rake_github', '~> 0.3'
|
33
33
|
spec.add_development_dependency 'rake_ssh', '~> 0.2'
|
34
34
|
spec.add_development_dependency 'rspec', '~> 3.9'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_easy_rsa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.0.pre.
|
4
|
+
version: 0.2.0.pre.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Toby Clemson
|
@@ -56,16 +56,16 @@ dependencies:
|
|
56
56
|
name: rake_circle_ci
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.
|
61
|
+
version: '0.7'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0.
|
68
|
+
version: '0.7'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rake_github
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -156,6 +156,9 @@ files:
|
|
156
156
|
- config/secrets/rubygems/credentials
|
157
157
|
- go
|
158
158
|
- lib/ruby_easy_rsa.rb
|
159
|
+
- lib/ruby_easy_rsa/commands.rb
|
160
|
+
- lib/ruby_easy_rsa/commands/base.rb
|
161
|
+
- lib/ruby_easy_rsa/commands/initialise_pki.rb
|
159
162
|
- lib/ruby_easy_rsa/version.rb
|
160
163
|
- ruby_easy_rsa.gemspec
|
161
164
|
- scripts/ci/common/configure-git.sh
|