liquor 0.9.5 → 0.9.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: cabd820710ffda20b3cc967b38f162922615e1f3
4
+ data.tar.gz: ce09ef8a23a5eed2e09d47533739428a9ef90ba8
5
+ SHA512:
6
+ metadata.gz: e0faafde65c90d9ba87992878b2235225caf382d674b248c2f1e153fc2deeae61fec888257397e9a426fb2922bc6c69027973fe997103f79a0b1b5229f70e46d
7
+ data.tar.gz: b2c97079c8f8ce35049749dcae24dccc4f640a18c12bcd479938ec703c732761bdc4a4ed18c142526d9e7ed6f3c73fab8cf74504a3630d77f93e2e914e9a211b
@@ -44,7 +44,7 @@ module Liquor
44
44
  def except(record)
45
45
  record, = Drop.unwrap_scope_arguments([ record ])
46
46
 
47
- result = @source.where(@source.arel_table[:id].eq(record).not)
47
+ result = @source.where(@source.arel_table[:id].in(record).not)
48
48
  DropDelegation.wrap_scope(result)
49
49
  end
50
50
 
@@ -36,7 +36,18 @@ module Liquor::Rails
36
36
  export :url, :path, :referer
37
37
 
38
38
  def param(arg, kw={})
39
- @request.params[arg.to_s]
39
+ escape_params(@request.params)[arg.to_s]
40
+ end
41
+
42
+ def escape_params(input)
43
+ case input
44
+ when String
45
+ Rack::Utils.escape_html(input)
46
+ when Array
47
+ input.map &method(:escape_params)
48
+ when Hash
49
+ Hash[input.map { |k, v| [k.to_s, escape_params(v)] }]
50
+ end
40
51
  end
41
52
 
42
53
  export :param
@@ -1,3 +1,3 @@
1
1
  module Liquor
2
- VERSION = "0.9.5"
2
+ VERSION = "0.9.6"
3
3
  end
@@ -125,6 +125,9 @@ describe Liquor::Drop do
125
125
  it "should support except" do
126
126
  res = exec(%|{% for user in: users.except(users.find_by(login: 'xnutsive')) do: %}{{ user.login }},{% end for %}|, users: User.to_drop)
127
127
  res.split(',').sort.should == %w(me dhh).sort
128
+
129
+ res = exec(%|{% for user in: users.except([users.find_by(login: 'xnutsive'), users.find_by(login: 'dhh')]) do: %}{{ user.login }},{% end for %}|, users: User.to_drop)
130
+ res.split(',').sort.should == %w(me).sort
128
131
  end
129
132
 
130
133
  it "should support find_except_by" do
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: liquor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.5
5
- prerelease:
4
+ version: 0.9.6
6
5
  platform: ruby
7
6
  authors:
8
7
  - Peter Zotov
@@ -11,166 +10,146 @@ authors:
11
10
  autorequire:
12
11
  bindir: bin
13
12
  cert_chain: []
14
- date: 2014-03-11 00:00:00.000000000 Z
13
+ date: 2014-05-13 00:00:00.000000000 Z
15
14
  dependencies:
16
15
  - !ruby/object:Gem::Dependency
17
16
  name: rake
18
17
  requirement: !ruby/object:Gem::Requirement
19
- none: false
20
18
  requirements:
21
- - - ! '>='
19
+ - - ">="
22
20
  - !ruby/object:Gem::Version
23
21
  version: '0'
24
22
  type: :development
25
23
  prerelease: false
26
24
  version_requirements: !ruby/object:Gem::Requirement
27
- none: false
28
25
  requirements:
29
- - - ! '>='
26
+ - - ">="
30
27
  - !ruby/object:Gem::Version
31
28
  version: '0'
32
29
  - !ruby/object:Gem::Dependency
33
30
  name: racc
34
31
  requirement: !ruby/object:Gem::Requirement
35
- none: false
36
32
  requirements:
37
- - - ! '>='
33
+ - - ">="
38
34
  - !ruby/object:Gem::Version
39
35
  version: '0'
40
36
  type: :development
41
37
  prerelease: false
42
38
  version_requirements: !ruby/object:Gem::Requirement
43
- none: false
44
39
  requirements:
45
- - - ! '>='
40
+ - - ">="
46
41
  - !ruby/object:Gem::Version
47
42
  version: '0'
48
43
  - !ruby/object:Gem::Dependency
49
44
  name: kramdown
50
45
  requirement: !ruby/object:Gem::Requirement
51
- none: false
52
46
  requirements:
53
- - - ! '>='
47
+ - - ">="
54
48
  - !ruby/object:Gem::Version
55
49
  version: '0'
56
50
  type: :development
57
51
  prerelease: false
58
52
  version_requirements: !ruby/object:Gem::Requirement
59
- none: false
60
53
  requirements:
61
- - - ! '>='
54
+ - - ">="
62
55
  - !ruby/object:Gem::Version
63
56
  version: '0'
64
57
  - !ruby/object:Gem::Dependency
65
58
  name: rspec
66
59
  requirement: !ruby/object:Gem::Requirement
67
- none: false
68
60
  requirements:
69
- - - ! '>='
61
+ - - ">="
70
62
  - !ruby/object:Gem::Version
71
63
  version: '0'
72
64
  type: :development
73
65
  prerelease: false
74
66
  version_requirements: !ruby/object:Gem::Requirement
75
- none: false
76
67
  requirements:
77
- - - ! '>='
68
+ - - ">="
78
69
  - !ruby/object:Gem::Version
79
70
  version: '0'
80
71
  - !ruby/object:Gem::Dependency
81
72
  name: simplecov
82
73
  requirement: !ruby/object:Gem::Requirement
83
- none: false
84
74
  requirements:
85
- - - ! '>='
75
+ - - ">="
86
76
  - !ruby/object:Gem::Version
87
77
  version: '0'
88
78
  type: :development
89
79
  prerelease: false
90
80
  version_requirements: !ruby/object:Gem::Requirement
91
- none: false
92
81
  requirements:
93
- - - ! '>='
82
+ - - ">="
94
83
  - !ruby/object:Gem::Version
95
84
  version: '0'
96
85
  - !ruby/object:Gem::Dependency
97
86
  name: guard-rspec
98
87
  requirement: !ruby/object:Gem::Requirement
99
- none: false
100
88
  requirements:
101
- - - ! '>='
89
+ - - ">="
102
90
  - !ruby/object:Gem::Version
103
91
  version: '0'
104
92
  type: :development
105
93
  prerelease: false
106
94
  version_requirements: !ruby/object:Gem::Requirement
107
- none: false
108
95
  requirements:
109
- - - ! '>='
96
+ - - ">="
110
97
  - !ruby/object:Gem::Version
111
98
  version: '0'
112
99
  - !ruby/object:Gem::Dependency
113
100
  name: rails
114
101
  requirement: !ruby/object:Gem::Requirement
115
- none: false
116
102
  requirements:
117
- - - ! '>='
103
+ - - ">="
118
104
  - !ruby/object:Gem::Version
119
105
  version: '0'
120
106
  type: :development
121
107
  prerelease: false
122
108
  version_requirements: !ruby/object:Gem::Requirement
123
- none: false
124
109
  requirements:
125
- - - ! '>='
110
+ - - ">="
126
111
  - !ruby/object:Gem::Version
127
112
  version: '0'
128
113
  - !ruby/object:Gem::Dependency
129
114
  name: nokogiri
130
115
  requirement: !ruby/object:Gem::Requirement
131
- none: false
132
116
  requirements:
133
- - - ! '>='
117
+ - - ">="
134
118
  - !ruby/object:Gem::Version
135
119
  version: '0'
136
120
  type: :development
137
121
  prerelease: false
138
122
  version_requirements: !ruby/object:Gem::Requirement
139
- none: false
140
123
  requirements:
141
- - - ! '>='
124
+ - - ">="
142
125
  - !ruby/object:Gem::Version
143
126
  version: '0'
144
127
  - !ruby/object:Gem::Dependency
145
128
  name: htmlentities
146
129
  requirement: !ruby/object:Gem::Requirement
147
- none: false
148
130
  requirements:
149
- - - ! '>='
131
+ - - ">="
150
132
  - !ruby/object:Gem::Version
151
133
  version: '0'
152
134
  type: :development
153
135
  prerelease: false
154
136
  version_requirements: !ruby/object:Gem::Requirement
155
- none: false
156
137
  requirements:
157
- - - ! '>='
138
+ - - ">="
158
139
  - !ruby/object:Gem::Version
159
140
  version: '0'
160
141
  - !ruby/object:Gem::Dependency
161
142
  name: sqlite3
162
143
  requirement: !ruby/object:Gem::Requirement
163
- none: false
164
144
  requirements:
165
- - - ! '>='
145
+ - - ">="
166
146
  - !ruby/object:Gem::Version
167
147
  version: '0'
168
148
  type: :development
169
149
  prerelease: false
170
150
  version_requirements: !ruby/object:Gem::Requirement
171
- none: false
172
151
  requirements:
173
- - - ! '>='
152
+ - - ">="
174
153
  - !ruby/object:Gem::Version
175
154
  version: '0'
176
155
  description: Liquor is a template system based on well-defined, strongly dynamically
@@ -183,9 +162,9 @@ executables: []
183
162
  extensions: []
184
163
  extra_rdoc_files: []
185
164
  files:
186
- - .gitignore
187
- - .rspec
188
- - .travis.yml
165
+ - ".gitignore"
166
+ - ".rspec"
167
+ - ".travis.yml"
189
168
  - Gemfile
190
169
  - Guardfile
191
170
  - MIT-LICENSE
@@ -242,27 +221,26 @@ files:
242
221
  - spec/tag_spec.rb
243
222
  homepage: http://github.com/evilmartians/liquor
244
223
  licenses: []
224
+ metadata: {}
245
225
  post_install_message:
246
226
  rdoc_options: []
247
227
  require_paths:
248
228
  - lib
249
229
  required_ruby_version: !ruby/object:Gem::Requirement
250
- none: false
251
230
  requirements:
252
- - - ! '>='
231
+ - - ">="
253
232
  - !ruby/object:Gem::Version
254
233
  version: '1.9'
255
234
  required_rubygems_version: !ruby/object:Gem::Requirement
256
- none: false
257
235
  requirements:
258
- - - ! '>='
236
+ - - ">="
259
237
  - !ruby/object:Gem::Version
260
238
  version: '0'
261
239
  requirements: []
262
240
  rubyforge_project:
263
- rubygems_version: 1.8.23
241
+ rubygems_version: 2.2.2
264
242
  signing_key:
265
- specification_version: 3
243
+ specification_version: 4
266
244
  summary: Liquor is a template system based on well-defined, strongly dynamically typed
267
245
  language which is fun to use and easy to debug.
268
246
  test_files: