fulmar 2.0.1 → 2.0.2

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
  SHA1:
3
- metadata.gz: b109fec07e1c8f289643c435c31842bb97e844ee
4
- data.tar.gz: 1464b61a64c4688257d3a8bf31a43a0c530d0c29
3
+ metadata.gz: 1b386982a3ab26556fd6efa59581e8431d768234
4
+ data.tar.gz: 8c06a406efb3477836ceba7c40ed3d418949ae7f
5
5
  SHA512:
6
- metadata.gz: 3aa757adae168d75ca1aea2bb8db89469ff8efe355e4ec52a9e9f97aac505d2b8f4b7485ac311039022893f5a5d5562c2d006174cf6db2fd753ac15aa2692679
7
- data.tar.gz: b1da4f12f9971c59c6d4bae2cd08ce234714ff9abfca5d3b1d01d15ea92b38b84d4dd634d3710a174d3c164ba4431e7b628bf1616e52d5136120bb4360361344
6
+ metadata.gz: 4d4fd4a803b9c83b4a74dd3042501567ce731c57ee6b414094205f8ebe6d5ae83c62395e4d788d680c54ed9218181ee73570f15c79cda5faa24513fed811f3b8
7
+ data.tar.gz: cd186eb2339d4b36ea5dc171c849201b34f4cd7308454bb8ddf55de431d7e2614676d9413582d3344260fe5dc2dbcf9e2d13955e2575df88794c8da9215fbe66
@@ -1,4 +1,5 @@
1
1
  require 'erb'
2
+ require 'fulmar/domain/service/plugin_service'
2
3
 
3
4
  module Fulmar
4
5
  module Domain
@@ -34,8 +35,6 @@ module Fulmar
34
35
 
35
36
  # Runs all methods beginning with test_ and returns the report
36
37
  def run
37
- test_dirs = ["#{File.dirname(__FILE__)}/config_tests/"]
38
- test_files = test_dirs.collect{ |dir| Dir.glob("#{dir}/*.rb") }.flatten
39
38
  test_files.each do |file|
40
39
  eval File.read(file)
41
40
  end
@@ -55,6 +54,13 @@ module Fulmar
55
54
  def ssh_hostnames
56
55
  @ssh_hostnames ||= `grep -E '^Host [^ *]+$' ~/.ssh/config | sort | uniq | cut -d ' ' -f 2`.split("\n")
57
56
  end
57
+
58
+ def test_files
59
+ dir = "#{File.dirname(__FILE__)}/config_tests/"
60
+ files = Dir.glob("#{dir}/*.rb")
61
+ plugin_service = Fulmar::Domain::Service::PluginService.instance
62
+ files + plugin_service.test_files
63
+ end
58
64
  end
59
65
  end
60
66
  end
@@ -0,0 +1,27 @@
1
+ target_test 'probably old template config' do |config|
2
+ if config[:config_templates] && config[:config_templates].class == Array
3
+ next {
4
+ severity: :warning,
5
+ message: 'config probably contains obsolete configuration field.' +
6
+ ' Use "templates:" instead of "config_templates:" in Fulmar 2'
7
+ }
8
+ end
9
+ end
10
+
11
+ target_test 'probably missing plugin' do |config|
12
+ if config[:mariadb] && !config.plugins.include?(:mariadb)
13
+ next {
14
+ severity: :warning,
15
+ message: 'config contains a mariadb config but plugin is not loaded'
16
+ }
17
+ end
18
+ end
19
+
20
+ target_test 'probably old mariadb config' do |config|
21
+ if config[:maria]
22
+ next {
23
+ severity: :warning,
24
+ message: 'config contains a config setting "maria" which is "mariadb" in Fulmar 2'
25
+ }
26
+ end
27
+ end
@@ -51,6 +51,10 @@ module Fulmar
51
51
  end
52
52
  end
53
53
 
54
+ def test_files
55
+ @plugins.values.select{|plugin| plugin.respond_to?(:test_files) }.collect(&:test_files).flatten
56
+ end
57
+
54
58
  def rake_files
55
59
  @plugins.values.collect(&:rake_files).flatten
56
60
  end
@@ -1,4 +1,4 @@
1
1
  # Provides a global version number
2
2
  module Fulmar
3
- VERSION = '2.0.1'
3
+ VERSION = '2.0.2'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fulmar
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonas Siegl
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-04-24 00:00:00.000000000 Z
12
+ date: 2017-05-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -111,6 +111,7 @@ files:
111
111
  - lib/fulmar/domain/model/configuration.rb
112
112
  - lib/fulmar/domain/model/project.rb
113
113
  - lib/fulmar/domain/service/config_test_service.rb
114
+ - lib/fulmar/domain/service/config_tests/compatibility.rb
114
115
  - lib/fulmar/domain/service/config_tests/hosts.rb
115
116
  - lib/fulmar/domain/service/config_tests/paths.rb
116
117
  - lib/fulmar/domain/service/config_tests/project.rb