cinchize 0.4.1 → 0.4.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.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/cinchize.rb +15 -1
  3. metadata +6 -6
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.1
1
+ 0.4.2
@@ -10,6 +10,9 @@ require 'daemons'
10
10
  require 'yaml'
11
11
 
12
12
  module Cinchize
13
+ VERSION = File.read(File.dirname(__FILE__) + "/../VERSION").chomp
14
+
15
+
13
16
  def self.config options, network
14
17
  config_file = options[:system] ? options[:system_config]: options[:local_config]
15
18
 
@@ -102,7 +105,7 @@ module Cinchize
102
105
  app = daemon.new_application :mode => :none, :log_output => options[:log_output]
103
106
  app.start
104
107
 
105
- network = @network.keys.inject({}) { |memo, key| memo[key.to_sym] = @network[key]; memo }
108
+ network = _sym_hash(@network)
106
109
  plugins = @plugins
107
110
  plugin_options = @plugin_options
108
111
 
@@ -148,6 +151,17 @@ module Cinchize
148
151
  rescue Errno::ESRCH => e
149
152
  return false
150
153
  end
154
+
155
+ def _sym_hash hsh
156
+ hsh.keys.inject({}) do |memo, key|
157
+ if hsh[key].is_a? Hash
158
+ memo[key.to_sym] = _sym_hash(hsh[key])
159
+ else
160
+ memo[key.to_sym] = hsh[key]
161
+ end
162
+ memo
163
+ end
164
+ end
151
165
  end
152
166
  end
153
167
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cinchize
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-27 00:00:00.000000000Z
12
+ date: 2012-08-03 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cinch
16
- requirement: &70214672262680 !ruby/object:Gem::Requirement
16
+ requirement: &70228789632980 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 2.0.1
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70214672262680
24
+ version_requirements: *70228789632980
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: daemons
27
- requirement: &70214672262140 !ruby/object:Gem::Requirement
27
+ requirement: &70228789632400 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70214672262140
35
+ version_requirements: *70228789632400
36
36
  description: Create dynamic Cinch IRC-bots and daemonize them, without the need of
37
37
  writing any code
38
38
  email: victor.bergoo@gmail.com