liquid-ext 2.0.3 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +0 -1
  3. data/Gemfile.lock +17 -25
  4. data/bin/liquid +2 -2
  5. data/lib/liquid/benchmark.rb +1 -1
  6. data/lib/liquid/boot.rb +53 -41
  7. data/lib/liquid/cli.rb +1 -6
  8. data/lib/liquid/configuration.rb +105 -122
  9. data/lib/liquid/{generator.rb → console.rb} +8 -1
  10. data/lib/liquid/ext/string.rb +8 -0
  11. data/lib/liquid/ext/thread.rb +6 -0
  12. data/lib/liquid/guava-16.0.1.jar +0 -0
  13. data/lib/liquid/health_checks.rb +4 -10
  14. data/lib/liquid/jeromq-0.3.3.jar +0 -0
  15. data/lib/liquid/kafka_2.10-0.8.0.jar +0 -0
  16. data/lib/liquid/log4j-1.2.17.jar +0 -0
  17. data/lib/liquid/logger.rb +122 -0
  18. data/lib/liquid/metrics/logger_reporter.rb +3 -6
  19. data/lib/liquid/metrics/reporter.rb +25 -13
  20. data/lib/liquid/metrics/tracker_reporter.rb +33 -0
  21. data/lib/liquid/metrics-annotation-2.2.0.jar +0 -0
  22. data/lib/liquid/metrics-core-2.2.0.jar +0 -0
  23. data/lib/liquid/metrics-core-3.0.1.jar +0 -0
  24. data/lib/liquid/metrics-healthchecks-3.0.1.jar +0 -0
  25. data/lib/liquid/metrics.rb +20 -21
  26. data/lib/liquid/router.rb +0 -1
  27. data/lib/liquid/scala-library-2.10.3.jar +0 -0
  28. data/lib/liquid/slf4j-api-1.7.6.jar +0 -0
  29. data/lib/liquid/slf4j-log4j12-1.7.6.jar +0 -0
  30. data/lib/liquid/snappy-java-1.1.1-M1.jar +0 -0
  31. data/lib/liquid/templates/config.yml.tt +0 -1
  32. data/lib/liquid/timing.rb +2 -10
  33. data/lib/liquid/tracker/base.rb +26 -0
  34. data/lib/liquid/tracker/blackhole_tracker.rb +15 -0
  35. data/lib/liquid/tracker/file_tracker.rb +21 -0
  36. data/lib/liquid/tracker/json_serializer.rb +13 -0
  37. data/lib/liquid/tracker/kafka_tracker.rb +41 -0
  38. data/lib/liquid/tracker/logger_tracker.rb +17 -0
  39. data/lib/liquid/tracker.rb +14 -0
  40. data/lib/liquid/transaction_id.rb +2 -2
  41. data/lib/liquid/trove-3.0.3.jar +0 -0
  42. data/lib/liquid/zmq.rb +89 -0
  43. data/liquid-ext.gemspec +1 -2
  44. data/spec/lib/liquid/router_spec.rb +6 -8
  45. data/spec/lib/liquid/weighted_selector_spec.rb +3 -1
  46. metadata +29 -34
  47. data/Jarfile +0 -2
  48. data/Jarfile.lock +0 -14
@@ -54,23 +54,21 @@ describe Router do
54
54
  describe '.handle' do
55
55
  let(:handler) { double('MockHandler') }
56
56
  let(:request) { double('request') }
57
- let(:url_re_1) { 'http://ad.madvertise.de/uchte/(.*?)' }
58
- let(:url_re_2) { 'http://ad.madvertise.de/muchte/(.*?)' }
59
- let(:block) { Proc.new {|match, env| handler.handle(match, env) } }
57
+ let(:url_re_1) { 'http://ad.madvertise.de/muchte/(.*?)' }
58
+ let(:block) { Proc.new { |match, env| handler.handle(match, env) } }
60
59
 
61
60
  before do
62
- router.add url_re_1, [:foo] { }
63
- router.add url_re_2, [:bar], &block
61
+ router.add url_re_1, [:foo], &block
64
62
  router.route %r(/new_adx_bidrequest/([\w.-]+)), GeneralRequestHandler, :site_token
65
63
  end
66
64
 
67
65
  it 'is not matching' do
68
- router.handle("http://ad.madvertise.de/muchtel", request).should == false
66
+ router.handle("http://ad.madvertise.de/muchtel", request).should == nil
69
67
  end
70
68
 
71
69
  it 'is matching' do
72
- handler.should_receive(:handle)
73
- router.handle("http://ad.madvertise.de/muchte/foo", request).should == true
70
+ handler.should_receive(:handle).and_return("bar")
71
+ router.handle("http://ad.madvertise.de/muchte/foo", request).should == "bar"
74
72
  end
75
73
  end
76
74
  end
@@ -35,10 +35,12 @@ describe WeightedSelector do
35
35
 
36
36
  before do
37
37
  subject.add 'a', 2
38
+ subject.add 'b', 2
39
+ subject.add 'c', 0
38
40
  end
39
41
 
40
42
  it do
41
- ['a'].should include subject.pick_one
43
+ ['a', 'b'].should include subject.pick_one
42
44
  end
43
45
 
44
46
  end
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: liquid-ext
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3
5
- prerelease:
4
+ version: 3.0.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - LiquidM, Inc.
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-02-14 00:00:00.000000000 Z
11
+ date: 2014-02-25 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: activesupport
@@ -18,13 +17,11 @@ dependencies:
18
17
  - - '>='
19
18
  - !ruby/object:Gem::Version
20
19
  version: '0'
21
- none: false
22
20
  requirement: !ruby/object:Gem::Requirement
23
21
  requirements:
24
22
  - - '>='
25
23
  - !ruby/object:Gem::Version
26
24
  version: '0'
27
- none: false
28
25
  prerelease: false
29
26
  type: :runtime
30
27
  - !ruby/object:Gem::Dependency
@@ -34,29 +31,11 @@ dependencies:
34
31
  - - '>='
35
32
  - !ruby/object:Gem::Version
36
33
  version: '0'
37
- none: false
38
34
  requirement: !ruby/object:Gem::Requirement
39
35
  requirements:
40
36
  - - '>='
41
37
  - !ruby/object:Gem::Version
42
38
  version: '0'
43
- none: false
44
- prerelease: false
45
- type: :runtime
46
- - !ruby/object:Gem::Dependency
47
- name: liquid-logging
48
- version_requirements: !ruby/object:Gem::Requirement
49
- requirements:
50
- - - '>='
51
- - !ruby/object:Gem::Version
52
- version: 2.0.0
53
- none: false
54
- requirement: !ruby/object:Gem::Requirement
55
- requirements:
56
- - - '>='
57
- - !ruby/object:Gem::Version
58
- version: 2.0.0
59
- none: false
60
39
  prerelease: false
61
40
  type: :runtime
62
41
  - !ruby/object:Gem::Dependency
@@ -66,13 +45,11 @@ dependencies:
66
45
  - - '>='
67
46
  - !ruby/object:Gem::Version
68
47
  version: '0'
69
- none: false
70
48
  requirement: !ruby/object:Gem::Requirement
71
49
  requirements:
72
50
  - - '>='
73
51
  - !ruby/object:Gem::Version
74
52
  version: '0'
75
- none: false
76
53
  prerelease: false
77
54
  type: :runtime
78
55
  - !ruby/object:Gem::Dependency
@@ -82,13 +59,11 @@ dependencies:
82
59
  - - '>='
83
60
  - !ruby/object:Gem::Version
84
61
  version: '0'
85
- none: false
86
62
  requirement: !ruby/object:Gem::Requirement
87
63
  requirements:
88
64
  - - '>='
89
65
  - !ruby/object:Gem::Version
90
66
  version: '0'
91
- none: false
92
67
  prerelease: false
93
68
  type: :runtime
94
69
  description: Ruby core extensions and helper libraries
@@ -105,8 +80,6 @@ files:
105
80
  - .yardopts
106
81
  - Gemfile
107
82
  - Gemfile.lock
108
- - Jarfile
109
- - Jarfile.lock
110
83
  - LICENSE
111
84
  - README.md
112
85
  - Rakefile
@@ -115,6 +88,7 @@ files:
115
88
  - lib/liquid/boot.rb
116
89
  - lib/liquid/cli.rb
117
90
  - lib/liquid/configuration.rb
91
+ - lib/liquid/console.rb
118
92
  - lib/liquid/environment.rb
119
93
  - lib/liquid/ext/array.rb
120
94
  - lib/liquid/ext/enumerable.rb
@@ -125,14 +99,27 @@ files:
125
99
  - lib/liquid/ext/string.rb
126
100
  - lib/liquid/ext/thread.rb
127
101
  - lib/liquid/from_file.rb
128
- - lib/liquid/generator.rb
102
+ - lib/liquid/guava-16.0.1.jar
129
103
  - lib/liquid/hash_helper.rb
130
104
  - lib/liquid/health_checks.rb
105
+ - lib/liquid/jeromq-0.3.3.jar
106
+ - lib/liquid/kafka_2.10-0.8.0.jar
107
+ - lib/liquid/log4j-1.2.17.jar
108
+ - lib/liquid/logger.rb
109
+ - lib/liquid/metrics-annotation-2.2.0.jar
110
+ - lib/liquid/metrics-core-2.2.0.jar
111
+ - lib/liquid/metrics-core-3.0.1.jar
112
+ - lib/liquid/metrics-healthchecks-3.0.1.jar
131
113
  - lib/liquid/metrics.rb
132
114
  - lib/liquid/metrics/logger_reporter.rb
133
115
  - lib/liquid/metrics/reporter.rb
116
+ - lib/liquid/metrics/tracker_reporter.rb
134
117
  - lib/liquid/priority_selector.rb
135
118
  - lib/liquid/router.rb
119
+ - lib/liquid/scala-library-2.10.3.jar
120
+ - lib/liquid/slf4j-api-1.7.6.jar
121
+ - lib/liquid/slf4j-log4j12-1.7.6.jar
122
+ - lib/liquid/snappy-java-1.1.1-M1.jar
136
123
  - lib/liquid/tasks.rb
137
124
  - lib/liquid/tasks/protoc.rake
138
125
  - lib/liquid/tasks/reek.rake
@@ -149,8 +136,17 @@ files:
149
136
  - lib/liquid/templates/gitignore.tt
150
137
  - lib/liquid/templates/server.rb.tt
151
138
  - lib/liquid/timing.rb
139
+ - lib/liquid/tracker.rb
140
+ - lib/liquid/tracker/base.rb
141
+ - lib/liquid/tracker/blackhole_tracker.rb
142
+ - lib/liquid/tracker/file_tracker.rb
143
+ - lib/liquid/tracker/json_serializer.rb
144
+ - lib/liquid/tracker/kafka_tracker.rb
145
+ - lib/liquid/tracker/logger_tracker.rb
152
146
  - lib/liquid/transaction_id.rb
147
+ - lib/liquid/trove-3.0.3.jar
153
148
  - lib/liquid/weighted_selector.rb
149
+ - lib/liquid/zmq.rb
154
150
  - liquid-ext.gemspec
155
151
  - spec/lib/liquid/ext/enumerable_spec.rb
156
152
  - spec/lib/liquid/router_spec.rb
@@ -159,6 +155,7 @@ files:
159
155
  homepage: https://github.com/liquidm/ext
160
156
  licenses:
161
157
  - MIT
158
+ metadata: {}
162
159
  post_install_message:
163
160
  rdoc_options: []
164
161
  require_paths:
@@ -168,18 +165,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
168
165
  - - '>='
169
166
  - !ruby/object:Gem::Version
170
167
  version: '0'
171
- none: false
172
168
  required_rubygems_version: !ruby/object:Gem::Requirement
173
169
  requirements:
174
170
  - - '>='
175
171
  - !ruby/object:Gem::Version
176
172
  version: '0'
177
- none: false
178
173
  requirements: []
179
174
  rubyforge_project:
180
- rubygems_version: 1.8.24
175
+ rubygems_version: 2.2.2
181
176
  signing_key:
182
- specification_version: 3
177
+ specification_version: 4
183
178
  summary: Ruby core extensions and helper libraries
184
179
  test_files:
185
180
  - spec/lib/liquid/ext/enumerable_spec.rb
data/Jarfile DELETED
@@ -1,2 +0,0 @@
1
- jar 'com.codahale.metrics:metrics-core:3.0.1'
2
- jar 'com.codahale.metrics:metrics-healthchecks:3.0.1'
data/Jarfile.lock DELETED
@@ -1,14 +0,0 @@
1
- ---
2
- version: 0.7.5
3
- groups:
4
- default:
5
- dependencies:
6
- - com.codahale.metrics:metrics-core:jar:3.0.1
7
- - com.codahale.metrics:metrics-healthchecks:jar:3.0.1
8
- - org.slf4j:slf4j-api:jar:1.7.5
9
- artifacts:
10
- - jar:com.codahale.metrics:metrics-core:jar:3.0.1:
11
- transitive: {}
12
- - jar:com.codahale.metrics:metrics-healthchecks:jar:3.0.1:
13
- transitive:
14
- org.slf4j:slf4j-api:jar:1.7.5: {}