Dex_Rack 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -33,8 +33,9 @@ class Dex_Rack
33
33
  recent page
34
34
  end
35
35
 
36
- get %r!\A/(\d+)\Z! do | id |
37
- r = dex.filter(:id=>id).first
36
+ get '/:id' do | id |
37
+ r = find_id( id )
38
+ pass unless r
38
39
 
39
40
  if r
40
41
  vars= Hash[
@@ -94,6 +95,10 @@ class Dex_Rack
94
95
  @count ||= dex.count
95
96
  end
96
97
 
98
+ def find_id id
99
+ r = dex.filter(:id=>id).first
100
+ end
101
+
97
102
  def list_recent limit, offset
98
103
  dex.limit(limit, offset).to_a.reverse
99
104
  end
@@ -1,5 +1,5 @@
1
1
  require "sinatra/base"
2
2
 
3
3
  class Dex_Rack < Sinatra::Base
4
- VERSION = "0.1.3"
4
+ VERSION = "0.1.4"
5
5
  end
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.1.3
4
+ version: 0.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: