coral_core 0.2.5 → 0.2.6

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.5
1
+ 0.2.6
data/coral_core.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "coral_core"
8
- s.version = "0.2.5"
8
+ s.version = "0.2.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Adrian Webb"]
@@ -13,7 +13,7 @@ class Core
13
13
  def initialize(options = {})
14
14
  config = Config.ensure(options)
15
15
 
16
- @@ui = Interface.new(config)
16
+ @ui = Interface.new(config)
17
17
  end
18
18
 
19
19
  #-----------------------------------------------------------------------------
@@ -13,6 +13,7 @@ class Memory < Repository
13
13
  super(config)
14
14
 
15
15
  @absolute_config_file = ''
16
+ @config_file = ''
16
17
 
17
18
  @properties = config.get(:properties, {})
18
19
 
@@ -22,7 +23,6 @@ class Memory < Repository
22
23
  @commit_message = config.get(:commit_message, 'Saving state')
23
24
 
24
25
  self.config_file = config.get(:config_file, '')
25
- dbg(self, 'memory')
26
26
  end
27
27
 
28
28
  #---
@@ -53,9 +53,9 @@ class Memory < Repository
53
53
 
54
54
  #---
55
55
 
56
- def config_file=config_file
57
- unless Util::Data.empty?(config_file)
58
- @config_file = ( config_file.is_a?(Array) ? config_file.join(File::SEPARATOR) : string(config_file) )
56
+ def config_file=file
57
+ unless Util::Data.empty?(file)
58
+ @config_file = ( file.is_a?(Array) ? file.join(File::SEPARATOR) : string(file) )
59
59
  end
60
60
 
61
61
  set_absolute_config_file
@@ -39,9 +39,9 @@ class Data
39
39
 
40
40
  def self.empty?(value)
41
41
  if undef?(value) || false?(value) || (value.respond_to?('empty?') && value.empty?)
42
- return false
42
+ return true
43
43
  end
44
- return true
44
+ return false
45
45
  end
46
46
 
47
47
  #-----------------------------------------------------------------------------
@@ -18,7 +18,7 @@ class Shell < Core
18
18
  error_prefix = config.get(:error_prefix, '')
19
19
  error_suffix = config.get(:error_suffix, '')
20
20
 
21
- ui = config.get(:ui, @@ui)
21
+ ui = config.get(:ui, Coral.ui)
22
22
 
23
23
  conditions = Coral::Event.instance(config.get(:exit, {}), true)
24
24
 
data/lib/coral_core.rb CHANGED
@@ -59,6 +59,10 @@ module Coral
59
59
 
60
60
  @@ui = Coral::Core.ui
61
61
 
62
+ def self.ui
63
+ return @@ui
64
+ end
65
+
62
66
  #-----------------------------------------------------------------------------
63
67
  # Initialization
64
68
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coral_core
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 5
10
- version: 0.2.5
9
+ - 6
10
+ version: 0.2.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Adrian Webb