liquid-ext 3.5.0 → 3.5.2

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: f1eb7c79616fa8b96ebb46d0dbff36b696b54896
4
- data.tar.gz: bf5333639d97bf2c6b7842d0d3cff015cac441af
3
+ metadata.gz: fcf33e837810fb6d1c70d5263c0c0036b45c8c2c
4
+ data.tar.gz: 704fe02ff19e1c7f0374b1e45c134ef523abe6dc
5
5
  SHA512:
6
- metadata.gz: 6ed90f105bc6ae3888833d2f03a3161ff639d46715a41cf4b54a71a322decdd3c5f90f369f4e3b76563051d6551f3c0c99a543108d2eedf042f6802161d1d6f8
7
- data.tar.gz: a0ee19cd66b5906d89d50fb4437fd42db27084be22b8f5fa98633d6237b718ea11550f2d41360da11691309168917d910193d83b274b62596bb74bb00897ff60
6
+ metadata.gz: a95157e84464c6bb4e3d62db3bbcd4419ba336a969fcd876dbad9684e60a6d2bec31284b38fbb05106ea5bea00db37e9e8184b05ee153718dca5b4f385b0f5cf
7
+ data.tar.gz: cbbb0d4082065136c21688602c71395fff7f280a92a5ed43d356f5fd43cc19c539851c79c62492107b8cf81f203c7222da4970e219fa9399d66a5b9adb7e1681
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- liquid-ext (3.5.0)
4
+ liquid-ext (3.5.2)
5
5
  activesupport
6
6
  erubis
7
7
  jmx4r
@@ -12,13 +12,14 @@ PATH
12
12
  GEM
13
13
  remote: http://rubygems.org/
14
14
  specs:
15
- activesupport (4.1.1)
15
+ activesupport (4.1.5)
16
16
  i18n (~> 0.6, >= 0.6.9)
17
17
  json (~> 1.7, >= 1.7.7)
18
18
  minitest (~> 5.1)
19
19
  thread_safe (~> 0.1)
20
20
  tzinfo (~> 1.1)
21
21
  awesome_print (1.2.0)
22
+ bond (0.5.1)
22
23
  bond (0.5.1-java)
23
24
  brice (0.2.9)
24
25
  ruby-nuggets (>= 0.5.2)
@@ -33,7 +34,7 @@ GEM
33
34
  rspec (>= 2.14.0, < 3.1.0)
34
35
  ruby-progressbar (~> 1.4)
35
36
  hirb (0.7.1)
36
- i18n (0.6.9)
37
+ i18n (0.6.11)
37
38
  jmx4r (0.1.4)
38
39
  json (1.8.1-java)
39
40
  liquid-development (0.2.1)
@@ -55,11 +56,15 @@ GEM
55
56
  yard
56
57
  log_switch (0.4.0)
57
58
  method_source (0.8.2)
58
- minitest (5.3.4)
59
+ minitest (5.4.0)
59
60
  mixlib-cli (1.5.0)
60
61
  multi_json (1.10.1)
61
62
  nokogiri (1.6.2.1-java)
62
63
  parallel (1.0.0)
64
+ pry (0.9.12.6)
65
+ coderay (~> 1.0)
66
+ method_source (~> 0.8)
67
+ slop (~> 3.4)
63
68
  pry (0.9.12.6-java)
64
69
  coderay (~> 1.0)
65
70
  method_source (~> 0.8)
@@ -107,10 +112,10 @@ GEM
107
112
  tins (~> 1.0)
108
113
  terminal-table (1.4.5)
109
114
  text-table (1.2.3)
110
- thread_safe (0.3.3-java)
115
+ thread_safe (0.3.4-java)
111
116
  timecop (0.7.1)
112
117
  tins (1.3.0)
113
- tzinfo (1.1.0)
118
+ tzinfo (1.2.2)
114
119
  thread_safe (~> 0.1)
115
120
  yard (0.8.7.4)
116
121
 
data/lib/liquid/boot.rb CHANGED
@@ -68,7 +68,7 @@ reload_mixins = ->(conf) do
68
68
  config_yml = File.join(ROOT, 'config.yml')
69
69
  conf.mixin(config_yml) if File.exist?(config_yml)
70
70
  dot_user = File.join(ROOT, '.user')
71
- if File.exists?(dot_user)
71
+ if File.exist?(dot_user)
72
72
  File.readlines(dot_user).each do |line|
73
73
  user_yml = File.join(ROOT, 'config', 'mixins', "#{line.chomp}.yml")
74
74
  conf.mixin(user_yml)
data/lib/liquid/cli.rb CHANGED
@@ -1,6 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
- require 'liquid/boot'
4
3
  require 'mixlib/cli'
5
4
 
6
5
  class CLI
@@ -8,10 +8,6 @@ class Array
8
8
  self[Kernel::rand(size)-1]
9
9
  end
10
10
 
11
- def to_h(&block)
12
- Hash[*self.map { |v| [v, block.call(v)] }.flatten]
13
- end
14
-
15
11
  def / parts
16
12
  inject([[]]) do |ary, x|
17
13
  ary << [] if [*ary.last].nitems == length / parts
@@ -3,20 +3,6 @@
3
3
  #
4
4
  class Hash
5
5
 
6
- # Recursively merge +other_hash+ into +self+ and return the new hash.
7
- def deep_merge(other_hash)
8
- self.merge(other_hash) do |key, oldval, newval|
9
- oldval = oldval.to_hash if oldval.respond_to?(:to_hash) && !oldval.is_a?(Array)
10
- newval = newval.to_hash if newval.respond_to?(:to_hash) && !newval.is_a?(Array)
11
- oldval.is_a?(Hash) && newval.is_a?(Hash) ? oldval.deep_merge(newval) : newval
12
- end
13
- end
14
-
15
- # Recursively merge and replace +other_hash+ into +self+.
16
- def deep_merge!(other_hash)
17
- replace(deep_merge(other_hash))
18
- end
19
-
20
6
  # accumulate existing keys from +other_hash+ into +self+.
21
7
  def delta_merge!(other_hash)
22
8
  other_hash.each do |k,v|
@@ -23,6 +23,10 @@ class HealthCheck
23
23
  @@checks = {}
24
24
  @@callbacks = []
25
25
 
26
+ def self.register(name, &block)
27
+ @@checks[name.to_s] = block
28
+ end
29
+
26
30
  def self.inherited(child)
27
31
  @@checks[child.name.demodulize] = child
28
32
  end
@@ -32,9 +36,19 @@ class HealthCheck
32
36
  end
33
37
 
34
38
  def self.run
35
- @@checks.inject({}) do |result, (name, handler)|
36
- result[name] = handler.new.execute
37
- result
39
+ @@checks.inject({}) do |results, (name, handler)|
40
+ if handler.is_a? Proc
41
+ result = handler.call
42
+ else
43
+ result = handler.new.execute
44
+ end
45
+
46
+ unless result.is_a? Result
47
+ result = Result.new(result , nil, nil)
48
+ end
49
+
50
+ results[name] = result
51
+ results
38
52
  end
39
53
  end
40
54
 
Binary file
@@ -1,5 +1,4 @@
1
1
  require 'liquid/metrics/reporter'
2
- require 'liquid/tracker'
3
2
 
4
3
  module Metrics
5
4
  class TrackerReporter < Reporter
@@ -21,7 +21,8 @@ module Tracker
21
21
  end
22
22
 
23
23
  def event(obj)
24
- @tracker.event(@topic, @serializer.dump(obj))
24
+ log_entry = @serializer.dump(obj)
25
+ @tracker.event(@topic, log_entry) if log_entry
25
26
  end
26
27
  end
27
28
  end
@@ -1,4 +1,3 @@
1
- require 'liquid/boot'
2
1
  require 'liquid/tracker/base'
3
2
 
4
3
  module Tracker
data/liquid-ext.gemspec CHANGED
@@ -1,24 +1,24 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  Gem::Specification.new do |spec|
4
- spec.name = "liquid-ext"
5
- spec.version = "3.5.0"
6
- spec.authors = ["LiquidM, Inc."]
7
- spec.email = ["opensource@liquidm.com"]
8
- spec.description = %q{Ruby core extensions and helper libraries}
9
- spec.summary = %q{Ruby core extensions and helper libraries}
10
- spec.homepage = "https://github.com/liquidm/ext"
4
+ spec.name = 'liquid-ext'
5
+ spec.version = '3.5.2'
6
+ spec.authors = ['LiquidM, Inc.']
7
+ spec.email = ['opensource@liquidm.com']
8
+ spec.description = %q{LiquidM ruby core extensions and helper libraries}
9
+ spec.summary = %q{A collection of common utilities used in various LiquidM projects}
10
+ spec.homepage = 'https://github.com/liquidm/ext'
11
11
  spec.license = 'MIT'
12
12
 
13
13
  spec.files = `git ls-files`.split($/)
14
14
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
15
15
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
16
- spec.require_paths = ["lib"]
16
+ spec.require_paths = ['lib']
17
17
 
18
- spec.add_dependency "activesupport"
19
- spec.add_dependency "erubis"
20
- spec.add_dependency "jmx4r"
21
- spec.add_dependency "mixlib-cli"
22
- spec.add_dependency "multi_json"
23
- spec.add_dependency "terminal-table"
18
+ spec.add_dependency 'activesupport', '~> 0'
19
+ spec.add_dependency 'erubis', '~> 0'
20
+ spec.add_dependency 'jmx4r', '~> 0'
21
+ spec.add_dependency 'mixlib-cli', '~> 0'
22
+ spec.add_dependency 'multi_json', '~> 0'
23
+ spec.add_dependency 'terminal-table', '~> 0'
24
24
  end
metadata CHANGED
@@ -1,100 +1,100 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: liquid-ext
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.0
4
+ version: 3.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - LiquidM, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-21 00:00:00.000000000 Z
11
+ date: 2014-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: activesupport
15
- version_requirements: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - '>='
18
- - !ruby/object:Gem::Version
19
- version: '0'
20
14
  requirement: !ruby/object:Gem::Requirement
21
15
  requirements:
22
- - - '>='
16
+ - - ~>
23
17
  - !ruby/object:Gem::Version
24
18
  version: '0'
19
+ name: activesupport
25
20
  prerelease: false
26
21
  type: :runtime
27
- - !ruby/object:Gem::Dependency
28
- name: erubis
29
22
  version_requirements: !ruby/object:Gem::Requirement
30
23
  requirements:
31
- - - '>='
24
+ - - ~>
32
25
  - !ruby/object:Gem::Version
33
26
  version: '0'
27
+ - !ruby/object:Gem::Dependency
34
28
  requirement: !ruby/object:Gem::Requirement
35
29
  requirements:
36
- - - '>='
30
+ - - ~>
37
31
  - !ruby/object:Gem::Version
38
32
  version: '0'
33
+ name: erubis
39
34
  prerelease: false
40
35
  type: :runtime
41
- - !ruby/object:Gem::Dependency
42
- name: jmx4r
43
36
  version_requirements: !ruby/object:Gem::Requirement
44
37
  requirements:
45
- - - '>='
38
+ - - ~>
46
39
  - !ruby/object:Gem::Version
47
40
  version: '0'
41
+ - !ruby/object:Gem::Dependency
48
42
  requirement: !ruby/object:Gem::Requirement
49
43
  requirements:
50
- - - '>='
44
+ - - ~>
51
45
  - !ruby/object:Gem::Version
52
46
  version: '0'
47
+ name: jmx4r
53
48
  prerelease: false
54
49
  type: :runtime
55
- - !ruby/object:Gem::Dependency
56
- name: mixlib-cli
57
50
  version_requirements: !ruby/object:Gem::Requirement
58
51
  requirements:
59
- - - '>='
52
+ - - ~>
60
53
  - !ruby/object:Gem::Version
61
54
  version: '0'
55
+ - !ruby/object:Gem::Dependency
62
56
  requirement: !ruby/object:Gem::Requirement
63
57
  requirements:
64
- - - '>='
58
+ - - ~>
65
59
  - !ruby/object:Gem::Version
66
60
  version: '0'
61
+ name: mixlib-cli
67
62
  prerelease: false
68
63
  type: :runtime
69
- - !ruby/object:Gem::Dependency
70
- name: multi_json
71
64
  version_requirements: !ruby/object:Gem::Requirement
72
65
  requirements:
73
- - - '>='
66
+ - - ~>
74
67
  - !ruby/object:Gem::Version
75
68
  version: '0'
69
+ - !ruby/object:Gem::Dependency
76
70
  requirement: !ruby/object:Gem::Requirement
77
71
  requirements:
78
- - - '>='
72
+ - - ~>
79
73
  - !ruby/object:Gem::Version
80
74
  version: '0'
75
+ name: multi_json
81
76
  prerelease: false
82
77
  type: :runtime
83
- - !ruby/object:Gem::Dependency
84
- name: terminal-table
85
78
  version_requirements: !ruby/object:Gem::Requirement
86
79
  requirements:
87
- - - '>='
80
+ - - ~>
88
81
  - !ruby/object:Gem::Version
89
82
  version: '0'
83
+ - !ruby/object:Gem::Dependency
90
84
  requirement: !ruby/object:Gem::Requirement
91
85
  requirements:
92
- - - '>='
86
+ - - ~>
93
87
  - !ruby/object:Gem::Version
94
88
  version: '0'
89
+ name: terminal-table
95
90
  prerelease: false
96
91
  type: :runtime
97
- description: Ruby core extensions and helper libraries
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ~>
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ description: LiquidM ruby core extensions and helper libraries
98
98
  email:
99
99
  - opensource@liquidm.com
100
100
  executables:
@@ -142,11 +142,11 @@ files:
142
142
  - lib/liquid/hash_helper.rb
143
143
  - lib/liquid/health_checks.rb
144
144
  - lib/liquid/javassist-3.15.0-GA.jar
145
- - lib/liquid/jeromq-0.3.3.jar
145
+ - lib/liquid/jeromq-0.3.5-SNAPSHOT.jar
146
146
  - lib/liquid/kafka_2.10-0.8.0.jar
147
147
  - lib/liquid/log4j-1.2.17.jar
148
148
  - lib/liquid/logger.rb
149
- - lib/liquid/mapdb-0.9.3.jar
149
+ - lib/liquid/mapdb-1.1.0-SNAPSHOT.jar
150
150
  - lib/liquid/metrics-annotation-2.2.0.jar
151
151
  - lib/liquid/metrics-core-2.2.0.jar
152
152
  - lib/liquid/metrics-core-3.0.1.jar
@@ -215,7 +215,7 @@ rubyforge_project:
215
215
  rubygems_version: 2.2.2
216
216
  signing_key:
217
217
  specification_version: 4
218
- summary: Ruby core extensions and helper libraries
218
+ summary: A collection of common utilities used in various LiquidM projects
219
219
  test_files:
220
220
  - spec/lib/liquid/ext/enumerable_spec.rb
221
221
  - spec/lib/liquid/weighted_selector_spec.rb
Binary file
Binary file