liquid-ext 1.2.2 → 1.2.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: b8beca07cec7266234754555b0911f169f6eb48f
4
+ data.tar.gz: e1f6bd1f5c418e30dcf2a652fe52b5958bebbf4d
5
+ SHA512:
6
+ metadata.gz: 22ee3714156a839af71b8293a1161c86c6e372cd3542b4cd9a0c76826ca26da5275b2ae7096c60a75b82a820b8d0cf98c5692609a079bbca5a40e121aef067de
7
+ data.tar.gz: 1bf2a2f09f979628a667b9c95aaf0fa1085f03d0dfc97cb3e187cd17d98a4e60918716727ce1b4028c892b3ad2e5b2e58c4670ca23b78d62f34f76023fe0f779
data/lib/liquid/boot.rb CHANGED
@@ -52,6 +52,13 @@ if RUBY_PLATFORM == 'java'
52
52
  # do nothing
53
53
  end
54
54
 
55
+ begin
56
+ require 'lock_jar'
57
+ LockJar.load
58
+ rescue LoadError
59
+ # do nothing
60
+ end
61
+
55
62
  # some java libraries cannot be found on maven central, so we load all bundled
56
63
  # jar files here for convenience
57
64
  if defined?(ROOT)
@@ -0,0 +1,16 @@
1
+ # encoding: utf-8
2
+
3
+ class PrioritySelector
4
+
5
+ def add(element, priority)
6
+ if @priority.nil? || priority > @priority || (priority == @priority && [true, false].sample)
7
+ @element = element
8
+ @priority = priority
9
+ end
10
+ end
11
+
12
+ def pick
13
+ @element
14
+ end
15
+
16
+ end
data/lib/liquid/router.rb CHANGED
@@ -41,6 +41,5 @@ class Router
41
41
 
42
42
  def handle(path, request)
43
43
  @cache[path].call(request) if @cache[path]
44
- return !! @cache[path]
45
44
  end
46
45
  end
@@ -42,4 +42,8 @@ class WeightedSelector
42
42
  pick_one_with_index[0] unless empty?
43
43
  end
44
44
 
45
+ def pick
46
+ pick_one
47
+ end
48
+
45
49
  end
data/liquid-ext.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "liquid-ext"
5
- spec.version = "1.2.2"
5
+ spec.version = "1.2.4"
6
6
  spec.authors = ["LiquidM, Inc."]
7
7
  spec.email = ["opensource@liquidm.com"]
8
8
  spec.description = %q{Ruby core extensions and helper libraries}
metadata CHANGED
@@ -1,128 +1,113 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: liquid-ext
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
5
- prerelease:
4
+ version: 1.2.4
6
5
  platform: ruby
7
6
  authors:
8
7
  - LiquidM, Inc.
9
- autorequire:
8
+ autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-12-18 00:00:00.000000000 Z
11
+ date: 2014-01-20 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: activesupport
16
- version_requirements: !ruby/object:Gem::Requirement
17
- requirements:
18
- - - '>='
19
- - !ruby/object:Gem::Version
20
- version: '0'
21
- none: false
22
15
  requirement: !ruby/object:Gem::Requirement
23
16
  requirements:
24
- - - '>='
17
+ - - ">="
25
18
  - !ruby/object:Gem::Version
26
19
  version: '0'
27
- none: false
28
- prerelease: false
29
20
  type: :runtime
30
- - !ruby/object:Gem::Dependency
31
- name: erubis
21
+ prerelease: false
32
22
  version_requirements: !ruby/object:Gem::Requirement
33
23
  requirements:
34
- - - '>='
24
+ - - ">="
35
25
  - !ruby/object:Gem::Version
36
26
  version: '0'
37
- none: false
27
+ - !ruby/object:Gem::Dependency
28
+ name: erubis
38
29
  requirement: !ruby/object:Gem::Requirement
39
30
  requirements:
40
- - - '>='
31
+ - - ">="
41
32
  - !ruby/object:Gem::Version
42
33
  version: '0'
43
- none: false
44
- prerelease: false
45
34
  type: :runtime
46
- - !ruby/object:Gem::Dependency
47
- name: ffi
35
+ prerelease: false
48
36
  version_requirements: !ruby/object:Gem::Requirement
49
37
  requirements:
50
- - - '>='
38
+ - - ">="
51
39
  - !ruby/object:Gem::Version
52
40
  version: '0'
53
- none: false
41
+ - !ruby/object:Gem::Dependency
42
+ name: ffi
54
43
  requirement: !ruby/object:Gem::Requirement
55
44
  requirements:
56
- - - '>='
45
+ - - ">="
57
46
  - !ruby/object:Gem::Version
58
47
  version: '0'
59
- none: false
60
- prerelease: false
61
48
  type: :runtime
62
- - !ruby/object:Gem::Dependency
63
- name: liquid-logging
49
+ prerelease: false
64
50
  version_requirements: !ruby/object:Gem::Requirement
65
51
  requirements:
66
- - - '>='
52
+ - - ">="
67
53
  - !ruby/object:Gem::Version
68
- version: 2.0.0
69
- none: false
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: liquid-logging
70
57
  requirement: !ruby/object:Gem::Requirement
71
58
  requirements:
72
- - - '>='
59
+ - - ">="
73
60
  - !ruby/object:Gem::Version
74
61
  version: 2.0.0
75
- none: false
76
- prerelease: false
77
62
  type: :runtime
78
- - !ruby/object:Gem::Dependency
79
- name: metriks
63
+ prerelease: false
80
64
  version_requirements: !ruby/object:Gem::Requirement
81
65
  requirements:
82
- - - '>='
66
+ - - ">="
83
67
  - !ruby/object:Gem::Version
84
- version: '0'
85
- none: false
68
+ version: 2.0.0
69
+ - !ruby/object:Gem::Dependency
70
+ name: metriks
86
71
  requirement: !ruby/object:Gem::Requirement
87
72
  requirements:
88
- - - '>='
73
+ - - ">="
89
74
  - !ruby/object:Gem::Version
90
75
  version: '0'
91
- none: false
92
- prerelease: false
93
76
  type: :runtime
94
- - !ruby/object:Gem::Dependency
95
- name: mixlib-cli
77
+ prerelease: false
96
78
  version_requirements: !ruby/object:Gem::Requirement
97
79
  requirements:
98
- - - '>='
80
+ - - ">="
99
81
  - !ruby/object:Gem::Version
100
82
  version: '0'
101
- none: false
83
+ - !ruby/object:Gem::Dependency
84
+ name: mixlib-cli
102
85
  requirement: !ruby/object:Gem::Requirement
103
86
  requirements:
104
- - - '>='
87
+ - - ">="
105
88
  - !ruby/object:Gem::Version
106
89
  version: '0'
107
- none: false
108
- prerelease: false
109
90
  type: :runtime
110
- - !ruby/object:Gem::Dependency
111
- name: terminal-table
91
+ prerelease: false
112
92
  version_requirements: !ruby/object:Gem::Requirement
113
93
  requirements:
114
- - - '>='
94
+ - - ">="
115
95
  - !ruby/object:Gem::Version
116
96
  version: '0'
117
- none: false
97
+ - !ruby/object:Gem::Dependency
98
+ name: terminal-table
118
99
  requirement: !ruby/object:Gem::Requirement
119
100
  requirements:
120
- - - '>='
101
+ - - ">="
121
102
  - !ruby/object:Gem::Version
122
103
  version: '0'
123
- none: false
124
- prerelease: false
125
104
  type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
126
111
  description: Ruby core extensions and helper libraries
127
112
  email:
128
113
  - opensource@liquidm.com
@@ -131,9 +116,9 @@ executables:
131
116
  extensions: []
132
117
  extra_rdoc_files: []
133
118
  files:
134
- - .gitignore
135
- - .travis.yml
136
- - .yardopts
119
+ - ".gitignore"
120
+ - ".travis.yml"
121
+ - ".yardopts"
137
122
  - Gemfile
138
123
  - LICENSE
139
124
  - README.md
@@ -157,6 +142,7 @@ files:
157
142
  - lib/liquid/gc_stats.rb
158
143
  - lib/liquid/generator.rb
159
144
  - lib/liquid/hash_helper.rb
145
+ - lib/liquid/priority_selector.rb
160
146
  - lib/liquid/proc_stat.rb
161
147
  - lib/liquid/router.rb
162
148
  - lib/liquid/statistics.rb
@@ -187,31 +173,30 @@ files:
187
173
  homepage: https://github.com/liquidm/ext
188
174
  licenses:
189
175
  - MIT
190
- post_install_message:
176
+ metadata: {}
177
+ post_install_message:
191
178
  rdoc_options: []
192
179
  require_paths:
193
180
  - lib
194
181
  required_ruby_version: !ruby/object:Gem::Requirement
195
182
  requirements:
196
- - - '>='
183
+ - - ">="
197
184
  - !ruby/object:Gem::Version
198
185
  version: '0'
199
- none: false
200
186
  required_rubygems_version: !ruby/object:Gem::Requirement
201
187
  requirements:
202
- - - '>='
188
+ - - ">="
203
189
  - !ruby/object:Gem::Version
204
190
  version: '0'
205
- none: false
206
191
  requirements: []
207
- rubyforge_project:
208
- rubygems_version: 1.8.24
209
- signing_key:
210
- specification_version: 3
192
+ rubyforge_project:
193
+ rubygems_version: 2.2.0
194
+ signing_key:
195
+ specification_version: 4
211
196
  summary: Ruby core extensions and helper libraries
212
197
  test_files:
213
198
  - spec/lib/liquid/ext/enumerable_spec.rb
214
199
  - spec/lib/liquid/router_spec.rb
215
200
  - spec/lib/liquid/weighted_selector_spec.rb
216
201
  - spec/spec_helper.rb
217
- has_rdoc:
202
+ has_rdoc: