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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bc7ed0d0ed3666e14d60baf3cb0c236428faf9d0f8775ac592f180d94b34820c
4
- data.tar.gz: 47370413424e7be03f3e02faa2303a2e03f4eb7fd1e81d56ec2c673a86bfe6f8
3
+ metadata.gz: 38eb0ff1197e63c25cf4189657ac784bfa14846754bcdaca5f3feaf570f18ae3
4
+ data.tar.gz: 52817fa5359fb0c6156ba79f279cbb1085254d4d3d82d28e45c69c8293c2a7f8
5
5
  SHA512:
6
- metadata.gz: f3f75543b91094fbbe223fdb9d377a3a8e196ce88400a3fc26c724bc6e9f3c6294ee7555dc4ab1680b05fdfd6755fe372664fac084fde5f12cd7b9b7d807e9e1
7
- data.tar.gz: 0ee0b6e0f52605fa33281e6c724a6b41f0fbcc5b20cd9f96902b2dab75af58f9c70455ccb72e45f1637389a5699b5d90f31705ce22400894918100824c85298f
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.1)
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.6.0.pre.1)
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 (= 0.6.0.pre.1)
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
@@ -0,0 +1,13 @@
1
+ require 'lino'
2
+ require_relative 'base'
3
+
4
+ module RubyEasyRSA
5
+ module Commands
6
+ class InitialisePKI < Base
7
+ def configure_command(builder, opts)
8
+ builder
9
+ .with_subcommand('init-pki')
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,7 @@
1
+ require_relative 'commands/initialise_pki'
2
+
3
+ module RubyEasyRSA
4
+ module Commands
5
+
6
+ end
7
+ end
@@ -1,3 +1,3 @@
1
1
  module RubyEasyRSA
2
- VERSION = '0.2.0.pre.1'
2
+ VERSION = '0.2.0.pre.2'
3
3
  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
@@ -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.6.0.pre.1'
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.1
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.6.0.pre.1
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.6.0.pre.1
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