kafo 0.7.3 → 0.7.4

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: 357f8e1980ad47e91e5c7d8320a8abab921bb1c8
4
- data.tar.gz: cbd0e38cb265b461b1b37a7c4055b675263f41eb
3
+ metadata.gz: 31829e71a59ecdc1e898223994ef52e1d5b94735
4
+ data.tar.gz: d09d90ef8f881d92a9b6da01c2c5d7b7c27b7493
5
5
  SHA512:
6
- metadata.gz: 929c44d536d597978e5cbc19989e496bed18386b254938d25c121046132a939f217b1c8393af8ede19f63d19756f3d2d0ea0f65c4c5e8091cdfad150fdd15c6f
7
- data.tar.gz: 57167458f21fa390c7600879dcb9835264dfc931ac51b891213b8c9e99157864b2144b9666d64e40258770b11d097a45d67e4020d242658a8e82d685e0256e85
6
+ metadata.gz: 87e3a8b3b6411741b03cf87445906311cbc6996a10003578a045f3a904690018cf8dcb834960ae5ccfd172afcc25f8d7c529fda4a2d3b46e52fe14a155422074
7
+ data.tar.gz: b66f5e77a7fc31b1d9807a170e45b3b14d3f01485b76d143223fe753dd0062e1206cd77e000fc56cf1729693d1b3e21ed4faf8f48a2143b56ab6bf763d88b488
@@ -27,8 +27,7 @@ module Kafo
27
27
  :hook_dirs => [],
28
28
  :custom => {},
29
29
  :low_priority_modules => [],
30
- :verbose_log_level => 'info',
31
- :parser_cache_path => './config/parser_cache.json'
30
+ :verbose_log_level => 'info'
32
31
  }
33
32
 
34
33
  def initialize(file, persist = true)
@@ -252,6 +251,7 @@ module Kafo
252
251
  migrations.store_applied
253
252
  @logger.info("#{migrations.migrations.count} migration/s were applied. Updated configuration was saved.")
254
253
  end
254
+ migrations.migrations.count
255
255
  end
256
256
 
257
257
  def migrations_dir
@@ -57,9 +57,9 @@ module Kafo
57
57
  setup_config(config_file)
58
58
 
59
59
  self.class.hooking.execute(:pre_migrations)
60
-
61
- # run migrations
62
- self.class.config.run_migrations
60
+ reload_config
61
+ applied_total = self.class.config.run_migrations
62
+ request_config_reload if applied_total > 0
63
63
 
64
64
  if ARGV.include?('--migrations-only')
65
65
  self.class.verbose = (ARGV.include?('--verbose') || ARGV.include?('-v'))
@@ -68,13 +68,7 @@ module Kafo
68
68
  self.class.exit(0)
69
69
  end
70
70
 
71
- # reload config
72
- if @config_reload_requested
73
- scenario_manager = setup_scenario_manager
74
- self.class.scenario_manager = scenario_manager
75
- setup_config(self.class.config_file)
76
- self.class.logger.info('Installer configuration was reloaded')
77
- end
71
+ reload_config
78
72
 
79
73
  if scenario_manager.configured?
80
74
  scenario_manager.check_scenario_change(self.class.config_file)
@@ -241,6 +235,16 @@ module Kafo
241
235
  self.class.hooking.kafo = self
242
236
  end
243
237
 
238
+ def reload_config
239
+ if @config_reload_requested
240
+ scenario_manager = setup_scenario_manager
241
+ self.class.scenario_manager = scenario_manager
242
+ setup_config(self.class.config_file)
243
+ self.class.logger.info('Installer configuration was reloaded')
244
+ @config_reload_requested = false
245
+ end
246
+ end
247
+
244
248
  def setup_scenario_manager
245
249
  ScenarioManager.new((defined?(CONFIG_DIR) && CONFIG_DIR) || (defined?(CONFIG_FILE) && CONFIG_FILE))
246
250
  end
data/lib/kafo/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # encoding: UTF-8
2
2
  module Kafo
3
- VERSION = "0.7.3"
3
+ VERSION = "0.7.4"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kafo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.3
4
+ version: 0.7.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marek Hulan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-18 00:00:00.000000000 Z
11
+ date: 2016-06-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler