sensu-settings 3.0.0 → 3.1.0

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
  SHA1:
3
- metadata.gz: 465a54c899448ee7c064f1228578e3fd226daecf
4
- data.tar.gz: 4e1254a5e35fbdaee4e01be93e14e3e1295a0928
3
+ metadata.gz: ea3160019d1e51d06445c7127de83cee7b3b2ed8
4
+ data.tar.gz: e11e7fa4e4b5249952e5282c75202e85f0a74db5
5
5
  SHA512:
6
- metadata.gz: 9bd57ce2da4854212f624673af2da4d7c96e0ca1c74c9a825c4f71f4723a041ff1f3ea6f70e878016cfd1e14c92c2cf0c7c33c8c62f1b75b7cbcab69931b391d
7
- data.tar.gz: bd9d90d96bdf5546b13b796321410897c2d2d80a39688d055759fd4ab10cfff074f1fcd02b90b30b688d004410c288e83df4d3683f4762b82f683ec5c3aac578
6
+ metadata.gz: a505d51dfe881de20edfd91c4759dd3df12f29884ad27c1f3ce5663b19fcf4acfee79d5b5757a8330deb38624222818c8656fef40eeae527c4daa7f25861c788
7
+ data.tar.gz: 2b3f4cca5fa7372596aa0c58eb973dd2081333df062c96ccc13e5b0ae45f93a4d14d5e4ded40dc5b0a59ded6f3eb0aa4002f3ce8727ef10c5512cce1df424516
@@ -124,7 +124,7 @@ module Sensu
124
124
  def load_directory(directory)
125
125
  warning("loading config files from directory", :directory => directory)
126
126
  path = directory.gsub(/\\(?=\S)/, "/")
127
- Dir.glob(File.join(path, "**/*.json")).each do |file|
127
+ Dir.glob(File.join(path, "**{,/*/**}/*.json")).uniq.each do |file|
128
128
  load_file(file)
129
129
  end
130
130
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "sensu-settings"
5
- spec.version = "3.0.0"
5
+ spec.version = "3.1.0"
6
6
  spec.authors = ["Sean Porter"]
7
7
  spec.email = ["portertech@gmail.com"]
8
8
  spec.summary = "The Sensu settings library, loader and validator"
@@ -0,0 +1,11 @@
1
+ {
2
+ "checks": {
3
+ "symlinked": {
4
+ "command": "echo -n symlinked",
5
+ "subscribers": [
6
+ "baz"
7
+ ],
8
+ "interval": 60
9
+ }
10
+ }
11
+ }
data/spec/loader_spec.rb CHANGED
@@ -139,7 +139,7 @@ describe "Sensu::Settings::Loader" do
139
139
  it "can load settings from files in a directory" do
140
140
  @loader.load_directory(@config_dir)
141
141
  warnings = @loader.warnings
142
- expect(warnings.size).to eq(4)
142
+ expect(warnings.size).to eq(6)
143
143
  messages = warnings.map do |warning|
144
144
  warning[:message]
145
145
  end
@@ -159,7 +159,7 @@ describe "Sensu::Settings::Loader" do
159
159
  it "can set environment variables for child processes" do
160
160
  @loader.load_file(@config_file)
161
161
  @loader.load_directory(@config_dir)
162
- expect(@loader.loaded_files.size).to eq(3)
162
+ expect(@loader.loaded_files.size).to eq(4)
163
163
  @loader.set_env!
164
164
  expect(ENV["SENSU_LOADED_TEMPFILE"]).to match(/sensu_rspec_loaded_files/)
165
165
  loaded_files = IO.read(ENV["SENSU_LOADED_TEMPFILE"])
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-settings
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Porter
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-09 00:00:00.000000000 Z
11
+ date: 2015-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json
@@ -108,6 +108,7 @@ files:
108
108
  - lib/sensu/settings/validators/subdue.rb
109
109
  - lib/sensu/settings/validators/transport.rb
110
110
  - sensu-settings.gemspec
111
+ - spec/assets/alternative/conf.d/symlinked.json
111
112
  - spec/assets/app/config/sensu/app_http_endpoint.json
112
113
  - spec/assets/bom.json
113
114
  - spec/assets/conf.d/merger.json
@@ -144,6 +145,7 @@ signing_key:
144
145
  specification_version: 4
145
146
  summary: The Sensu settings library, loader and validator
146
147
  test_files:
148
+ - spec/assets/alternative/conf.d/symlinked.json
147
149
  - spec/assets/app/config/sensu/app_http_endpoint.json
148
150
  - spec/assets/bom.json
149
151
  - spec/assets/conf.d/merger.json