lotus-router 0.2.0 → 0.2.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: df4ff4f67074d725ad10fc58dcdf1f647ad91255
4
- data.tar.gz: 6d4fdaa8a6817a4acff0c9ccd0d2499205f4c0fb
3
+ metadata.gz: 4f107f75de95beb2c60e374aa29060d63aca3d70
4
+ data.tar.gz: deae89af0716937eedbbf8fcc8b515fc72740e26
5
5
  SHA512:
6
- metadata.gz: a9c7db01db9f64ff99083a34e610f56151264474b95619361bf143748d1298c84d97eef44212843c1de10c40e016d76d00f086fe17e3df1d2dcee8c62308a499
7
- data.tar.gz: 73788060a4bc7b8062e4a0508bbe427bd32314cc4b5c003f04e8dc3674723ba2364aa00c3a70ec7a06428330b058e2e5ef60923c5c5cb49e74c0bc5f7808ae41
6
+ metadata.gz: 484220d7305ec7efcd59e4453a03d45d306b643761f5dd2df5c06f7b5a06e6a06bb414d6921c0c0089b6e868620f7cd268184412ce5d62c36af39a2ea544597d
7
+ data.tar.gz: bd6aa7be6fcbfb0adb483d912757a68a46e3a71dcc0961d3efa72906db6bfeab042e9d382c7aa7d7e8bb7be105d5d2ffaeea300671794f8770df6a3b6a83778f
data/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
1
  # Lotus::Router
2
2
  Rack compatible HTTP router for Ruby
3
3
 
4
+ ## v0.2.1 - 2015-01-30
5
+ ### Added
6
+ - [Alfonso Uceda Pompa] Lotus::Action compat: invoke `.call` if defined, otherwise fall back to `#call`.
7
+
4
8
  ## v0.2.0 - 2014-12-23
5
9
  ### Added
6
10
  - [Luca Guidi & Alfonso Uceda Pompa] Introduced routes inspector for CLI
data/LICENSE.md CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2014 Luca Guidi
1
+ Copyright © 2014-2015 Luca Guidi
2
2
 
3
3
  MIT License
4
4
 
data/README.md CHANGED
@@ -539,4 +539,4 @@ Thanks to Joshua Hull ([@joshbuddy](https://github.com/joshbuddy)) for his
539
539
 
540
540
  ## Copyright
541
541
 
542
- Copyright 2014 Luca Guidi – Released under MIT License
542
+ Copyright © 2014-2015 Luca Guidi – Released under MIT License
@@ -1,5 +1,6 @@
1
1
  module Lotus
2
2
  class Router
3
- VERSION = '0.2.0'.freeze
3
+ # @since 0.1.0
4
+ VERSION = '0.2.1'.freeze
4
5
  end
5
6
  end
@@ -183,11 +183,14 @@ module Lotus
183
183
  end
184
184
 
185
185
  def constantize(string)
186
- begin
187
- ClassEndpoint.new(Utils::Class.load!(string, @namespace))
188
- rescue NameError
189
- LazyEndpoint.new(string, @namespace)
186
+ klass = Utils::Class.load!(string, @namespace)
187
+ if klass.respond_to?(:call)
188
+ Endpoint.new(klass)
189
+ else
190
+ ClassEndpoint.new(klass)
190
191
  end
192
+ rescue NameError
193
+ LazyEndpoint.new(string, @namespace)
191
194
  end
192
195
 
193
196
  def classify(string)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lotus-router
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luca Guidi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-23 00:00:00.000000000 Z
11
+ date: 2015-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http_router
@@ -134,7 +134,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
134
134
  version: '0'
135
135
  requirements: []
136
136
  rubyforge_project:
137
- rubygems_version: 2.2.2
137
+ rubygems_version: 2.4.5
138
138
  signing_key:
139
139
  specification_version: 4
140
140
  summary: Rack compatible HTTP router for Ruby and Lotus