consult 0.7.3 → 0.10.0.pre

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1d0e9e0e2f63b060fe1fae95c3a95c93d7cf89654dcf18c5cd7c7928a346db2b
4
- data.tar.gz: 6c5316a1093c3806deb091aa74f38a1f65101f8fcc1d4525f4f60a50731737f9
3
+ metadata.gz: 04de1a20dd8943a9c3740bcdd00a2b087c4dd8c706deb8ad47896f72a643ca6b
4
+ data.tar.gz: 03211311d716648cee6d9d42fb834919b616428015c860e48cbc0e04ae111e4b
5
5
  SHA512:
6
- metadata.gz: fc4a191a7b1b362b9655cecbfcb83b63354f10659d4a84d899bb271ce0013b82f2c1a9e08f008cbade94ac4132e47438bd3dd3f3fd7ce40cad4c5d54a26d4702
7
- data.tar.gz: 05c1543f7f774dae4c7fdeb25e2dbc51f732ea63d09b276e663b29aca2f40b88df80a6e6c83fb4a10b51e2e91217f5c3c0e52ef0d8b9630669f032aa386fade2
6
+ metadata.gz: c21b28fc79d2480d57e16aad107ecaf6d3e1f38609c781222263b1c98d6cd6e9dd903fc822a5e99ac89bd22f981ae19b9eb74f418ea62f1ec989ac9c6544948c
7
+ data.tar.gz: a9fa5fc6d4af723125ed276a69391036eef91a2eef94ffe4e46d1587fa5154b8ad6f5411ec51f6bc74ba0edfcf97a99b950b361d3a76462bea75b5df9a19202c
@@ -0,0 +1,78 @@
1
+ version: 2.1
2
+
3
+ jobs:
4
+ test:
5
+ parameters:
6
+ ruby_version:
7
+ type: string
8
+
9
+ docker:
10
+ - image: circleci/ruby:<< parameters.ruby_version >>
11
+ - image: consul:1.3.0
12
+ - image: vault:0.11.3
13
+ environment:
14
+ - VAULT_DEV_ROOT_TOKEN_ID=94e1a9ed-5d72-5677-27ab-ebc485cca368
15
+ # - SKIP_SETCAP=skip
16
+ # cap_add:
17
+ # - IPC_LOCK
18
+
19
+ working_directory: ~/repo
20
+
21
+ steps:
22
+ - checkout
23
+
24
+ - restore_cache:
25
+ name: restore gem cache
26
+ keys:
27
+ - v1-bundle-<< parameters.ruby_version >>-{{ .Branch }}-{{ checksum "consult.gemspec" }}
28
+ - v1-bundle-<< parameters.ruby_version >>-{{ .Branch }}-
29
+ - v1-bundle-<< parameters.ruby_version >>-
30
+
31
+ - run:
32
+ name: install dependencies
33
+ command: |
34
+ bundle check --path ./vendor/bundle || bundle install --jobs=3 --retry=3 --path vendor/bundle
35
+ bundle clean
36
+
37
+ - save_cache:
38
+ name: save gem cache
39
+ paths:
40
+ - ./vendor/bundle
41
+ key: v1-bundle-<< parameters.ruby_version >>-{{ .Branch }}-{{ checksum "consult.gemspec" }}
42
+
43
+ - run:
44
+ name: setup fixture data
45
+ command: |
46
+ ./spec/support/populate_consul.sh
47
+
48
+ - run:
49
+ name: run tests
50
+ command: |
51
+ mkdir /tmp/test-results
52
+
53
+ TEST_FILES="$(circleci tests glob "spec/**/*_spec.rb" | \
54
+ circleci tests split --split-by=timings)"
55
+
56
+ bundle exec rspec \
57
+ --format progress \
58
+ --format RspecJunitFormatter \
59
+ --out /tmp/test-results/rspec.xml \
60
+ --format progress \
61
+ $TEST_FILES
62
+
63
+ - store_test_results:
64
+ path: /tmp/test-results
65
+
66
+ - store_artifacts:
67
+ path: ./coverage
68
+ destination: coverage
69
+
70
+ workflows:
71
+ test_supported_ruby_versions:
72
+ jobs:
73
+ - test:
74
+ matrix:
75
+ parameters:
76
+ ruby_version:
77
+ - '2.5'
78
+ - '2.7'
data/.gitignore CHANGED
@@ -5,7 +5,7 @@
5
5
  /doc/
6
6
  /pkg/
7
7
  /spec/reports/
8
- /spec/support/rendered/*.yml
8
+ /spec/support/rendered/*
9
9
  /tmp/
10
10
 
11
11
  # rspec failure tracking
data/CHANGELOG.md CHANGED
@@ -1,3 +1,30 @@
1
+ #### Unreleased
2
+
3
+ #### 0.10.0
4
+
5
+ * Switch from Travis to CircleCI, and set up testing for multiple Ruby versions ([#25](https://github.com/veracross/consult/pull/25) & [#34](https://github.com/veracross/consult/pull/34))
6
+ * Improve development on Windows ([#21](https://github.com/veracross/consult/pull/21))
7
+ * Normalize string encodings to UTF-8 ([#22](https://github.com/veracross/consult/pull/22))
8
+ * Remove dependency on ActiveSupport ([#27](https://github.com/veracross/consult/pull/27))
9
+
10
+ #### 0.9.0
11
+
12
+ * Add a CLI to render templates on demand ([#20](https://github.com/veracross/consult/pull/20))
13
+
14
+ #### 0.8.2
15
+
16
+ * Use `X-Consul-Token` header for Consul authentication. See the [Consul docs](https://www.consul.io/api/index.html#authentication) for details. ([#19](https://github.com/veracross/consult/pull/19))
17
+
18
+ #### 0.8.1
19
+
20
+ * Obey template location order as specified in consult's config
21
+
22
+ #### 0.8.0
23
+
24
+ * Add support for multiple sources for a single template ([#14](https://github.com/veracross/consult/pull/14))
25
+ * Add support for Consul-sourced templates ([#15](https://github.com/veracross/consult/pull/15))
26
+ * Don't crash on rendering errors ([#16](https://github.com/veracross/consult/pull/16))
27
+
1
28
  #### 0.7.3
2
29
 
3
30
  * Add `key` function to templates to pull kv data from Consul
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  Generate configuration and secrets for Rails apps automatically from [Consul](https://github.com/hashicorp/consul) & [Vault](https://github.com/hashicorp/vault).
4
4
 
5
5
  [![Gem Version](https://badge.fury.io/rb/consult.svg)](https://badge.fury.io/rb/consult)
6
- [![Build Status](https://travis-ci.org/veracross/consult.svg?branch=master)](https://travis-ci.org/veracross/consult)
6
+ [![CircleCI](https://circleci.com/gh/veracross/consult/tree/master.svg?style=svg)](https://circleci.com/gh/veracross/consult/tree/master)
7
7
  [![Maintainability](https://api.codeclimate.com/v1/badges/d7b048b7edd9f27c83b9/maintainability)](https://codeclimate.com/github/veracross/consult/maintainability)
8
8
 
9
9
  ## Background
@@ -14,8 +14,6 @@ We use Consul Template for server level configuration, but application level con
14
14
 
15
15
  With Consult the process is the same in all environments.
16
16
 
17
- This gem is considered _beta_. At Veracross, we are just beginning to use it in staging environments.
18
-
19
17
  ## Installation
20
18
 
21
19
  Add this line to your application's Gemfile:
@@ -40,6 +38,16 @@ Pre-existing copies of files generated by Consult (such as `secrets.yml`, `datab
40
38
 
41
39
  If this gem is included in a Rails, the templates will render on Rails boot. Configuration or credential changes can be picked up by restarting your app.
42
40
 
41
+ ### CLI
42
+
43
+ Render templates on demand with the CLI. By default, this will bypass template TTLs to force rendering and provide verbose output. See `consult --help` for options.
44
+
45
+ ```bash
46
+ $ bundle exec consult
47
+ Consult: Rendered my_config
48
+ Consult: Rendered secrets
49
+ ```
50
+
43
51
  ### Configuration
44
52
 
45
53
  ```yaml
@@ -88,14 +96,20 @@ test:
88
96
  dest: config/secrets.yml
89
97
 
90
98
  production:
91
- # example: override vault token in production
92
- vault:
93
- token: 1397af7aede2-8923-412d-3eb9-8fcd5aed
94
99
  templates:
95
- # excluded from non-production environments
96
- should_be_excluded:
97
- path: config/templates/fake.yml
98
- dest: config/fake.yml
100
+ # You can concatenate multiple files together
101
+ my_config:
102
+ paths:
103
+ - config/templates/one.yml
104
+ - config/templates/two.yml
105
+ dest: config/my_config.yml
106
+
107
+ # Templates can come from Consul
108
+ your_config:
109
+ consul_keys:
110
+ - some/consul/key
111
+ - another/consul/key
112
+ dest: config/your_config.txt
99
113
  ```
100
114
 
101
115
  ### Templates
@@ -283,7 +297,7 @@ production:
283
297
  Then reference secrets in your app with `Rails.application.secrets`.
284
298
 
285
299
  ```ruby
286
- # config/intiializers/rollbar.rb
300
+ # config/initializers/rollbar.rb
287
301
  Rollbar.configure do |config|
288
302
  config.access_token = Rails.application.secrets.rollbar_token
289
303
  end
data/bin/console CHANGED
File without changes
data/bin/consult ADDED
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require_relative '../lib/consult/cli'
4
+
5
+ cli = Consult::CLI.instance
6
+ cli.parse
7
+ cli.render
data/bin/setup CHANGED
File without changes
data/consult.gemspec CHANGED
@@ -20,20 +20,19 @@ Gem::Specification.new do |spec|
20
20
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
21
21
  f.match(%r{^(test|spec|features)/})
22
22
  end
23
- spec.bindir = 'exe'
24
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
23
+ spec.bindir = 'bin'
24
+ spec.executables = ['consult']
25
25
  spec.require_paths = ['lib']
26
26
 
27
- spec.add_dependency 'activesupport', '> 4', '< 6'
28
27
  spec.add_dependency 'diplomat', '~> 2.0.2'
29
28
  spec.add_dependency 'vault', '>= 0.10.0', '< 1.0.0'
30
29
 
31
- spec.add_development_dependency 'bundler', '~> 1.16'
32
- spec.add_development_dependency 'byebug'
30
+ spec.add_development_dependency 'bundler'
33
31
  spec.add_development_dependency 'guard'
34
32
  spec.add_development_dependency 'guard-rspec'
35
- spec.add_development_dependency 'pry'
36
- spec.add_development_dependency 'rake', '~> 10.0'
33
+ spec.add_development_dependency 'pry-byebug'
34
+ spec.add_development_dependency 'rake'
37
35
  spec.add_development_dependency 'rspec', '~> 3.0'
38
- spec.add_development_dependency 'simplecov'
36
+ spec.add_development_dependency 'rspec_junit_formatter', '~> 0.4.1'
37
+ spec.add_development_dependency 'simplecov', '~> 0.16.1'
39
38
  end
data/docker-compose.yml CHANGED
@@ -1,11 +1,11 @@
1
1
  version: '3'
2
2
  services:
3
3
  consul:
4
- image: consul:1.2.0
4
+ image: consul:1.3.0
5
5
  ports:
6
6
  - "8500:8500"
7
7
  vault:
8
- image: vault:0.10.3
8
+ image: vault:0.11.3
9
9
  environment:
10
10
  - VAULT_DEV_ROOT_TOKEN_ID=94e1a9ed-5d72-5677-27ab-ebc485cca368
11
11
  cap_add:
data/lib/consult.rb CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  require 'pathname'
4
4
  require 'yaml'
5
- require 'active_support/core_ext/hash'
6
5
  require 'erb'
7
6
  require 'vault'
8
7
  require 'diplomat'
@@ -10,6 +9,7 @@ require 'diplomat'
10
9
  require 'consult/version'
11
10
  require 'consult/utilities'
12
11
  require 'consult/template'
12
+ require_relative './support/hash_extensions'
13
13
 
14
14
  module Consult
15
15
  @config = {}
@@ -18,17 +18,18 @@ module Consult
18
18
  CONSUL_DISK_TOKEN = Pathname.new("#{Dir.home}/.consul-token").freeze
19
19
 
20
20
  class << self
21
- attr_reader :config, :templates
21
+ attr_reader :config, :templates, :force_render
22
22
 
23
- def load(config_dir: nil)
23
+ def load(config_dir: nil, force_render: false, verbose: nil)
24
24
  root directory: config_dir
25
25
  yaml = root.join('config', 'consult.yml')
26
26
 
27
- @all_config = yaml.exist? ? YAML.safe_load(ERB.new(yaml.read).result, [], [], true).to_h : {}
28
- @all_config.deep_symbolize_keys!
27
+ @all_config = yaml.exist? ? YAML.safe_load(ERB.new(yaml.read).result, [], [], true, symbolize_names: true).to_h : {}
29
28
 
30
29
  @config = @all_config[:shared].to_h.deep_merge @all_config[env&.to_sym].to_h
31
- @templates = @config[:templates]&.map { |name, config| Template.new(name, config) } || []
30
+ @templates = @config[:templates]&.map { |name, config| Template.new(name, config.merge(verbose: verbose)) } || []
31
+
32
+ @force_render = force_render
32
33
 
33
34
  configure_consul
34
35
  configure_vault
@@ -41,7 +42,9 @@ module Consult
41
42
  # Additionally: prefer env vars over explicit config
42
43
  configured_address = @config[:consul].delete(:address)
43
44
  @config[:consul][:url] = ENV['CONSUL_HTTP_ADDR'] || configured_address || @config[:consul][:url]
44
- @config[:consul][:acl_token] = consul_token
45
+ # If a consul token exists, treat it as special
46
+ # See https://github.com/WeAreFarmGeek/diplomat/pull/160
47
+ (@config[:consul][:options] ||= {}).merge!(headers: {'X-Consul-Token' => consul_token}) if consul_token.to_s.length > 0
45
48
 
46
49
  Diplomat.configure do |c|
47
50
  @config[:consul].each do |opt, val|
@@ -70,7 +73,7 @@ module Consult
70
73
 
71
74
  # Return only the templates that are relevant for the current environment
72
75
  def active_templates
73
- templates.select(&:should_render?)
76
+ force_render ? templates : templates.select(&:should_render?)
74
77
  end
75
78
 
76
79
  # Render templates.
@@ -83,7 +86,7 @@ module Consult
83
86
  def consul_token
84
87
  ENV['CONSUL_HTTP_TOKEN'] ||
85
88
  @config[:consul].delete(:token) ||
86
- @config[:consul][:acl_token] ||
89
+ @config[:consul].delete(:acl_token) ||
87
90
  (CONSUL_DISK_TOKEN.exist? ? CONSUL_DISK_TOKEN.read.chomp : nil)
88
91
  end
89
92
  end
@@ -0,0 +1,55 @@
1
+ # frozen_string_literal: true
2
+
3
+ $stdout.sync = true
4
+
5
+ require 'singleton'
6
+ require 'optparse'
7
+
8
+ require_relative '../consult'
9
+
10
+ module Consult
11
+ class CLI
12
+ include Singleton
13
+
14
+ attr_reader :opts
15
+
16
+ def parse(args = ARGV)
17
+ @opts = parse_options(args)
18
+ Consult.load @opts
19
+ end
20
+
21
+ def render
22
+ Consult.render!
23
+ end
24
+
25
+ def parse_options(argv)
26
+ opts = {
27
+ config_dir: Dir.pwd,
28
+ force_render: true,
29
+ verbose: true
30
+ }
31
+
32
+ @parser = OptionParser.new do |o|
33
+ o.on '-d', '--directory=DIR', 'Path to directory containing the config directory' do |arg|
34
+ opts[:config_dir] = arg
35
+ end
36
+
37
+ o.on '-f', '--[no-]force', TrueClass, 'Ignore template TTLs and force rendering' do |arg|
38
+ opts[:force_render] = arg
39
+ end
40
+
41
+ o.on '-v', '--quiet', FalseClass, 'Silence output' do |arg|
42
+ opts[:verbose] = arg
43
+ end
44
+ end
45
+
46
+ @parser.on_tail "-h", "--help", "Show help" do
47
+ puts @parser
48
+ exit 1
49
+ end
50
+
51
+ @parser.parse! argv
52
+ opts
53
+ end
54
+ end
55
+ end
@@ -7,6 +7,8 @@ module Consult
7
7
  include Utilities
8
8
  include TemplateFunctions
9
9
 
10
+ LOCATIONS = %i[path paths consul_key consul_keys]
11
+
10
12
  attr_reader :name, :config
11
13
 
12
14
  def initialize(name, config)
@@ -15,18 +17,29 @@ module Consult
15
17
  end
16
18
 
17
19
  def render(save: true)
18
- renderer = ERB.new(File.read(path, encoding: 'utf-8'), nil, '-')
20
+ # Attempt to render
21
+ renderer = ERB.new(contents, nil, '-')
19
22
  result = renderer.result(binding)
20
23
 
21
- File.open(dest, 'w') { |f| f << result } if save
24
+ File.open(dest, 'wb') { |f| f << result } if save
25
+ puts "Consult: Rendered #{name}" if verbose?
22
26
  result
23
27
  rescue StandardError => e
24
- puts "Error rendering template: #{name}"
25
- raise e
28
+ STDERR.puts "Error rendering template: #{name}"
29
+ STDERR.puts e
30
+ nil
26
31
  end
27
32
 
28
33
  def path
29
- resolve @config.fetch(:path)
34
+ resolve @config[:path]
35
+ end
36
+
37
+ def paths
38
+ @config.fetch(:paths, []).map { |path| resolve(path) }
39
+ end
40
+
41
+ def vars
42
+ @config[:vars]
30
43
  end
31
44
 
32
45
  def dest
@@ -42,5 +55,34 @@ module Consult
42
55
  return true if !config.key?(:ttl) || !dest.exist?
43
56
  dest.mtime < (Time.now - @config[:ttl].to_i)
44
57
  end
58
+
59
+ def verbose?
60
+ @config[:verbose]
61
+ end
62
+
63
+ def ordered_locations
64
+ @config.keys & LOCATIONS
65
+ end
66
+
67
+ private
68
+
69
+ # Concatenate all the source templates together, in the order provided
70
+ def contents
71
+ ordered_locations.map do |location|
72
+ location.to_s.start_with?('consul') ? consul_contents(location) : disk_contents(location)
73
+ end.join
74
+ end
75
+
76
+ def consul_contents(location)
77
+ [@config[location]].compact.flatten.map do |key|
78
+ Diplomat::Kv.get(key, options: nil, not_found: :return, found: :return).force_encoding 'utf-8'
79
+ end.join
80
+ end
81
+
82
+ def disk_contents(location)
83
+ [public_send(location)].compact.flatten.map do |file_path|
84
+ File.read file_path, encoding: 'utf-8'
85
+ end.join
86
+ end
45
87
  end
46
88
  end
@@ -3,6 +3,7 @@
3
3
  module Consult
4
4
  module Utilities
5
5
  def resolve(path)
6
+ return unless path
6
7
  pathname = Pathname.new(path)
7
8
  pathname.relative? ? Consult.root.join(pathname) : pathname
8
9
  end
@@ -1,3 +1,3 @@
1
1
  module Consult
2
- VERSION = '0.7.3'
2
+ VERSION = '0.10.0.pre'
3
3
  end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ # ActiveSupport's corresponding methods
4
+ # - https://github.com/rails/rails/tree/master/activesupport/lib/active_support/core_ext/hash
5
+ module HashExtension
6
+ def deep_merge(other_hash, &block)
7
+ merge(other_hash) do |key, this_val, other_val|
8
+ if this_val.is_a?(Hash) && other_val.is_a?(Hash)
9
+ this_val.deep_merge other_val, &block
10
+ elsif block_given?
11
+ block.call key, this_val, other_val
12
+ else
13
+ other_val
14
+ end
15
+ end
16
+ end
17
+ end
18
+
19
+ Hash.send(:include, HashExtension)
metadata CHANGED
@@ -1,35 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: consult
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.3
4
+ version: 0.10.0.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Fraser
8
- autorequire:
9
- bindir: exe
8
+ autorequire:
9
+ bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-27 00:00:00.000000000 Z
11
+ date: 2021-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: activesupport
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">"
18
- - !ruby/object:Gem::Version
19
- version: '4'
20
- - - "<"
21
- - !ruby/object:Gem::Version
22
- version: '6'
23
- type: :runtime
24
- prerelease: false
25
- version_requirements: !ruby/object:Gem::Requirement
26
- requirements:
27
- - - ">"
28
- - !ruby/object:Gem::Version
29
- version: '4'
30
- - - "<"
31
- - !ruby/object:Gem::Version
32
- version: '6'
33
13
  - !ruby/object:Gem::Dependency
34
14
  name: diplomat
35
15
  requirement: !ruby/object:Gem::Requirement
@@ -68,18 +48,18 @@ dependencies:
68
48
  name: bundler
69
49
  requirement: !ruby/object:Gem::Requirement
70
50
  requirements:
71
- - - "~>"
51
+ - - ">="
72
52
  - !ruby/object:Gem::Version
73
- version: '1.16'
53
+ version: '0'
74
54
  type: :development
75
55
  prerelease: false
76
56
  version_requirements: !ruby/object:Gem::Requirement
77
57
  requirements:
78
- - - "~>"
58
+ - - ">="
79
59
  - !ruby/object:Gem::Version
80
- version: '1.16'
60
+ version: '0'
81
61
  - !ruby/object:Gem::Dependency
82
- name: byebug
62
+ name: guard
83
63
  requirement: !ruby/object:Gem::Requirement
84
64
  requirements:
85
65
  - - ">="
@@ -93,7 +73,7 @@ dependencies:
93
73
  - !ruby/object:Gem::Version
94
74
  version: '0'
95
75
  - !ruby/object:Gem::Dependency
96
- name: guard
76
+ name: guard-rspec
97
77
  requirement: !ruby/object:Gem::Requirement
98
78
  requirements:
99
79
  - - ">="
@@ -107,7 +87,7 @@ dependencies:
107
87
  - !ruby/object:Gem::Version
108
88
  version: '0'
109
89
  - !ruby/object:Gem::Dependency
110
- name: guard-rspec
90
+ name: pry-byebug
111
91
  requirement: !ruby/object:Gem::Requirement
112
92
  requirements:
113
93
  - - ">="
@@ -121,7 +101,7 @@ dependencies:
121
101
  - !ruby/object:Gem::Version
122
102
  version: '0'
123
103
  - !ruby/object:Gem::Dependency
124
- name: pry
104
+ name: rake
125
105
  requirement: !ruby/object:Gem::Requirement
126
106
  requirements:
127
107
  - - ">="
@@ -135,58 +115,60 @@ dependencies:
135
115
  - !ruby/object:Gem::Version
136
116
  version: '0'
137
117
  - !ruby/object:Gem::Dependency
138
- name: rake
118
+ name: rspec
139
119
  requirement: !ruby/object:Gem::Requirement
140
120
  requirements:
141
121
  - - "~>"
142
122
  - !ruby/object:Gem::Version
143
- version: '10.0'
123
+ version: '3.0'
144
124
  type: :development
145
125
  prerelease: false
146
126
  version_requirements: !ruby/object:Gem::Requirement
147
127
  requirements:
148
128
  - - "~>"
149
129
  - !ruby/object:Gem::Version
150
- version: '10.0'
130
+ version: '3.0'
151
131
  - !ruby/object:Gem::Dependency
152
- name: rspec
132
+ name: rspec_junit_formatter
153
133
  requirement: !ruby/object:Gem::Requirement
154
134
  requirements:
155
135
  - - "~>"
156
136
  - !ruby/object:Gem::Version
157
- version: '3.0'
137
+ version: 0.4.1
158
138
  type: :development
159
139
  prerelease: false
160
140
  version_requirements: !ruby/object:Gem::Requirement
161
141
  requirements:
162
142
  - - "~>"
163
143
  - !ruby/object:Gem::Version
164
- version: '3.0'
144
+ version: 0.4.1
165
145
  - !ruby/object:Gem::Dependency
166
146
  name: simplecov
167
147
  requirement: !ruby/object:Gem::Requirement
168
148
  requirements:
169
- - - ">="
149
+ - - "~>"
170
150
  - !ruby/object:Gem::Version
171
- version: '0'
151
+ version: 0.16.1
172
152
  type: :development
173
153
  prerelease: false
174
154
  version_requirements: !ruby/object:Gem::Requirement
175
155
  requirements:
176
- - - ">="
156
+ - - "~>"
177
157
  - !ruby/object:Gem::Version
178
- version: '0'
158
+ version: 0.16.1
179
159
  description: Manage consul/vault backed template files in Ruby.
180
160
  email:
181
161
  - jeff.fraser@veracross.com
182
- executables: []
162
+ executables:
163
+ - consult
183
164
  extensions: []
184
165
  extra_rdoc_files: []
185
166
  files:
167
+ - ".circleci/config.yml"
186
168
  - ".gitignore"
187
169
  - ".rspec"
188
170
  - ".rubocop.yml"
189
- - ".travis.yml"
171
+ - ".ruby-version"
190
172
  - CHANGELOG.md
191
173
  - Gemfile
192
174
  - Guardfile
@@ -195,21 +177,24 @@ files:
195
177
  - README.md
196
178
  - Rakefile
197
179
  - bin/console
180
+ - bin/consult
198
181
  - bin/setup
199
182
  - consult.gemspec
200
183
  - docker-compose.yml
201
184
  - lib/consult.rb
185
+ - lib/consult/cli.rb
202
186
  - lib/consult/rails/engine.rb
203
187
  - lib/consult/template.rb
204
188
  - lib/consult/template_functions.rb
205
189
  - lib/consult/utilities.rb
206
190
  - lib/consult/version.rb
191
+ - lib/support/hash_extensions.rb
207
192
  homepage: https://github.com/veracross/consult
208
193
  licenses:
209
194
  - MIT
210
195
  metadata:
211
196
  allowed_push_host: https://rubygems.org
212
- post_install_message:
197
+ post_install_message:
213
198
  rdoc_options: []
214
199
  require_paths:
215
200
  - lib
@@ -220,13 +205,13 @@ required_ruby_version: !ruby/object:Gem::Requirement
220
205
  version: '0'
221
206
  required_rubygems_version: !ruby/object:Gem::Requirement
222
207
  requirements:
223
- - - ">="
208
+ - - ">"
224
209
  - !ruby/object:Gem::Version
225
- version: '0'
210
+ version: 1.3.1
226
211
  requirements: []
227
- rubyforge_project:
212
+ rubyforge_project:
228
213
  rubygems_version: 2.7.6
229
- signing_key:
214
+ signing_key:
230
215
  specification_version: 4
231
216
  summary: Manage consul/vault backed template files in Ruby.
232
217
  test_files: []
data/.travis.yml DELETED
@@ -1,15 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- rvm:
4
- - 2.5
5
- - 2.4
6
- - 2.3
7
-
8
- services:
9
- - docker
10
-
11
- before_install:
12
- - gem install bundler -v 1.16.2
13
- - docker-compose --version
14
- - docker-compose up -d
15
- - docker ps