roda-endpoints 0.3.5 → 0.3.6
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 +4 -4
- data/bin/rake +17 -0
- data/lib/roda/endpoints/endpoint/item.rb +6 -0
- data/lib/roda/endpoints/endpoint/singleton.rb +9 -2
- data/lib/roda/endpoints/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dcdcb92214ed6c54b90225a97a531707af3b8c94
|
4
|
+
data.tar.gz: c134751fc387fc238812df8502e8dc5ca28e3019
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a58ba1961562341dce2cd5558c68f4275e0ab6a39d27a1377e976fbb27e30b7e080ea877daa405c1d704528fa47248955ac01f3c88fd60c4e23e4cf497957db
|
7
|
+
data.tar.gz: 9397db9aa509b22a4f8d10f289bc3afd50b6a1f6121590d41b00e2d9b61d8991b1e7f8c952475d7e652e11f62bf922fa86546d31bc3d665096a0a8d241aa723b
|
data/bin/rake
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
#
|
4
|
+
# This file was generated by Bundler.
|
5
|
+
#
|
6
|
+
# The application 'rake' is installed as part of a gem, and
|
7
|
+
# this file is here to facilitate running it.
|
8
|
+
#
|
9
|
+
|
10
|
+
require 'pathname'
|
11
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile',
|
12
|
+
Pathname.new(__FILE__).realpath)
|
13
|
+
|
14
|
+
require 'rubygems'
|
15
|
+
require 'bundler/setup'
|
16
|
+
|
17
|
+
load Gem.bin_path('rake', 'rake')
|
@@ -26,9 +26,16 @@ class Roda
|
|
26
26
|
# @return [Symbol]
|
27
27
|
attr_reader :finder
|
28
28
|
|
29
|
-
|
29
|
+
def self.id_proc(method = nil, &block)
|
30
|
+
block = proc { public_send(method) } if method
|
31
|
+
@id_proc = block if block_given?
|
32
|
+
@id_proc
|
33
|
+
end
|
34
|
+
|
35
|
+
# @return [Integer?]
|
30
36
|
def id
|
31
|
-
|
37
|
+
return instance_eval(&self.class.id_proc) if self.class.id_proc
|
38
|
+
@id
|
32
39
|
end
|
33
40
|
|
34
41
|
# @return [ROM::Struct]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: roda-endpoints
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Semyonov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02-
|
11
|
+
date: 2017-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-container
|
@@ -327,6 +327,7 @@ files:
|
|
327
327
|
- Rakefile
|
328
328
|
- bin/bundle-audit
|
329
329
|
- bin/console
|
330
|
+
- bin/rake
|
330
331
|
- bin/rspec
|
331
332
|
- bin/rubocop
|
332
333
|
- bin/setup
|