Dex_Rack 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  require "sinatra/base"
2
2
 
3
3
  class Dex_Rack < Sinatra::Base
4
- VERSION = "0.2.2"
4
+ VERSION = "0.2.3"
5
5
  end
@@ -26,10 +26,12 @@ div.content! {
26
26
  unless vars[:table_keys].empty?
27
27
  table {
28
28
  vars[:table_keys].each { |k|
29
- tr {
30
- td.key k.inspect
31
- td.val vars[:record][k]
32
- }
29
+ if vars[:record][k]
30
+ tr {
31
+ td.key k.inspect
32
+ td.val vars[:record][k]
33
+ }
34
+ end
33
35
  }
34
36
  }
35
37
  end
@@ -101,6 +101,13 @@ describe "get /:id" do
101
101
  renders 200, %r">code:1:2:3"
102
102
  end
103
103
 
104
+ it "does not render any fields that are nil" do
105
+ target = "invisibily"
106
+ id = Dex.insert(except("rand"), target=>nil)
107
+ get "/#{id}"
108
+ last_response.body.should.not.match %r!#{target}!
109
+ end
110
+
104
111
  end # === get /:id
105
112
 
106
113
  describe "get /:id/toggle" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: Dex_Rack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: