funneler 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/funneler.rb +6 -3
- data/lib/funneler/funnel.rb +4 -1
- data/lib/funneler/funnel_factory.rb +4 -2
- data/lib/funneler/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a3bf09541da9e35cff85dda980d8e997359390b
|
4
|
+
data.tar.gz: a1ddccb9db1fe53ee2deca111f870da829f192ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8a83dc3f510b91358e01ed93e9db539f82f15008585d50fa83bd0ee172c9883ec254c80813462ae50ca5378bbdf8901b8dbada1936c429293e06ac6c8c69b6c
|
7
|
+
data.tar.gz: cfdf91dbc145f71d3159c454d72713ce48a616841a80dfdf5cf5ac2ffe0d1378b84b20d92eaa2b3a4260bd33995657451b17680f9d71bfd9fd79c0b16047bd8a
|
data/Gemfile.lock
CHANGED
data/lib/funneler.rb
CHANGED
@@ -30,14 +30,17 @@ module Funneler
|
|
30
30
|
raise InvalidTokenError, "Invalid token '#{token}': #{e.message}"
|
31
31
|
end
|
32
32
|
|
33
|
-
def build(route_generator:, params: {}, expires_in_days: nil)
|
33
|
+
def build(route_generator:, params: {}, expires_in_days: nil, meta: {})
|
34
34
|
Funneler::FunnelFactory.build(route_generator: route_generator,
|
35
35
|
params: params,
|
36
|
+
meta: meta,
|
36
37
|
expires_in_days: expires_in_days)
|
37
38
|
end
|
38
39
|
|
39
|
-
def from_routes(routes: {})
|
40
|
-
Funnel.new('routes' => routes,
|
40
|
+
def from_routes(routes: {}, meta: {})
|
41
|
+
Funnel.new('routes' => routes,
|
42
|
+
'current_page_index' => 0,
|
43
|
+
'meta' => meta)
|
41
44
|
end
|
42
45
|
|
43
46
|
def from_url(url:)
|
data/lib/funneler/funnel.rb
CHANGED
@@ -2,11 +2,13 @@ module Funneler
|
|
2
2
|
class FunnelFactory
|
3
3
|
|
4
4
|
class << self
|
5
|
-
def build(route_generator:, params: {}, expires_in_days: nil)
|
5
|
+
def build(route_generator:, params: {}, expires_in_days: nil, meta: {})
|
6
6
|
return nil unless route_generator.respond_to?(:call)
|
7
7
|
|
8
8
|
routes = route_generator.call(params)
|
9
|
-
Funnel.new('routes' => routes,
|
9
|
+
Funnel.new('routes' => routes,
|
10
|
+
'expires_in_days' => expires_in_days,
|
11
|
+
'meta' => meta)
|
10
12
|
end
|
11
13
|
end
|
12
14
|
end
|
data/lib/funneler/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: funneler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Stawarz
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-12-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|