sinatra-tag-helpers 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MGVlNzVlZWYzMTRmMWIxZTlmNDIwNmRjMTM0Yjc1YWQ3NzZjMDhlMg==
4
+ MGEyZDNmNmY2NTgyYmZhMWY4YTE4MjQ3ZGYzODhmZWQwNWJiMGZjZQ==
5
5
  data.tar.gz: !binary |-
6
- ODFhMmRmOThjZWM0MjZjOWExYTEyZjc3Mzc5ZDg5NjI0ZTFkMGJiYw==
6
+ NWQyY2U0MTJjYTg4MjE4N2Q5YTFiYWUyYTBiMDEyZWViMTQ3YWQxNw==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- MDllZTg1NjQ3OGQwZjk5YmQxZGRkNTBhOWE3M2NhNTMxMjdlODg4ZmQ4Nzcz
10
- YWUxMDJkMDRlNjBhMTA3NzJkZDFhYzY4YjFiZDI2ZTk3OTkwOWY4MWNjMDYx
11
- YzIzOGRiNThiNWJkZTYxYWQ3MmU1ZjY5ZWViMDUwNjNjYTk0MmY=
9
+ YWM5MGMxMTU4ZjkyNTEyNTVmODVmMzNmZWI0YmY4MjYwMmE5ZGUyZDUzZTg0
10
+ ZmRiNmY3NjYzNWI0NDgxYzIwM2M3Yzc0NzAxM2MzYjhmMjc3MzllZTQ4NTJk
11
+ YjIxZDY5MGU0NTg5NDkzZWIxODg1MTk1MGM2ZjFmOWUzNmU2OWM=
12
12
  data.tar.gz: !binary |-
13
- YTNmMjMxNDE4ZWE0N2Q4MTE1YmJkOTViODNlNzZhMGVmMDE4MjE2YWM3YWQ3
14
- NTVkMTk5MTA0NTI1NzA1ZDBjNzZhZGU2YzMyZmQ0NzgzMWE5YTQ2NjNlNjE5
15
- ODMxZjBmNzE2MDE2MWU1Y2MwNzE0ZTEzOWI2ZjRiZGM0MWZhNTc=
13
+ YjVjZDkxMWI5Y2U0MzQwZDQ2MjU4NTU2ZTMyNDdlNDg0ZWI2ZDNjYzBkYjg0
14
+ NWNmMTRjMjBiOWIwNGMyNTZjN2Q3YWY3NTYwZWFiOWVkN2Y4ZjRlMmU1ZTlm
15
+ ZTQwOTVkNjU1MDUxYjFmMDMyM2Y4NjM0MDdmNDM5N2M2M2JjM2I=
@@ -154,7 +154,13 @@ module Sinatra
154
154
  # </select>
155
155
  #
156
156
  def select_for(param, options, attributes = {})
157
- select = ["<select #{ to_attributes(attributes) } name='#{ param }' id='#{ param }' size='1'>"]
157
+ attributes = {
158
+ :name => param,
159
+ :id => param,
160
+ :size => 1
161
+ }.merge(attributes)
162
+
163
+ select = ["<select #{ to_attributes(attributes) }>"]
158
164
 
159
165
  options.collect do |key, val|
160
166
  select.push option_for(param, :key => key, :value => val, :default => attributes[:default])
@@ -173,13 +179,13 @@ module Sinatra
173
179
 
174
180
  if range.last > range.first
175
181
  # top down
176
- range.last.downto(range.first) do |r|
177
- options[r] = r
182
+ range.last.downto(range.first) do |element|
183
+ options[element] = element
178
184
  end
179
185
  else
180
186
  # bottom up
181
- range.last.upto(range.first) do |r|
182
- options[r] = r
187
+ range.last.upto(range.first) do |element|
188
+ options[element] = element
183
189
  end
184
190
  end
185
191
 
@@ -196,4 +202,6 @@ module Sinatra
196
202
  select_for(param, options, attributes)
197
203
  end
198
204
  end
205
+
206
+ helpers TagHelpers
199
207
  end
@@ -1,5 +1,5 @@
1
1
  module Sinatra
2
2
  module TagHelpers
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinatra-tag-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evan Lecklider