salestation 0.1.5 → 0.2.0
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/lib/salestation/app.rb +7 -2
- data/lib/salestation/app/request.rb +16 -5
- data/salestation.gemspec +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: 63b4fc4253f91d5699ccbea25cb7b1e5779c8dde
|
4
|
+
data.tar.gz: 44e2f3e5b744e3b7805e4a719765ac4af2b946d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5e47733fa247b54a1335c3a5b1ea965105ee87ca3146ce6d41b2bb824008f0059cdd85051f8853c9b2ee1078b329d5162e755123832a0d3aef2d89b2ae7f5b6
|
7
|
+
data.tar.gz: c2ced111b6f2308e84c0d23976ba16bd0fce8d186953e5022e8005cedcabf3c33e6a8dc1c241a340f12d2d340656d77a1075150f5e3be0cbcab3713cd471f0c2
|
data/lib/salestation/app.rb
CHANGED
@@ -22,8 +22,13 @@ module Salestation
|
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
25
|
-
def create_request(input)
|
26
|
-
Request.create(
|
25
|
+
def create_request(input, span: nil)
|
26
|
+
Request.create(
|
27
|
+
env: @environment,
|
28
|
+
input: input,
|
29
|
+
initialize_hook: method(:initialize_hook),
|
30
|
+
span: span
|
31
|
+
)
|
27
32
|
end
|
28
33
|
|
29
34
|
def register_listener(hook_type, listener)
|
@@ -1,18 +1,28 @@
|
|
1
1
|
module Salestation
|
2
2
|
class App
|
3
3
|
class Request
|
4
|
-
def self.create(env:, input:, initialize_hook: nil)
|
5
|
-
new(
|
4
|
+
def self.create(env:, input:, initialize_hook: nil, span: nil)
|
5
|
+
new(
|
6
|
+
env: env,
|
7
|
+
input: input,
|
8
|
+
initialize_hook: initialize_hook,
|
9
|
+
span: span
|
10
|
+
).to_success
|
6
11
|
end
|
7
12
|
|
8
|
-
attr_reader :env, :input
|
13
|
+
attr_reader :env, :input, :span
|
9
14
|
|
10
15
|
def with_input(input_additions)
|
11
16
|
replace_input(input.merge(input_additions))
|
12
17
|
end
|
13
18
|
|
14
19
|
def replace_input(new_input)
|
15
|
-
self.class.new(
|
20
|
+
self.class.new(
|
21
|
+
env: env,
|
22
|
+
input: new_input,
|
23
|
+
initialize_hook: @initialize_hook,
|
24
|
+
span: span
|
25
|
+
).to_success
|
16
26
|
end
|
17
27
|
|
18
28
|
def to_success
|
@@ -33,10 +43,11 @@ module Salestation
|
|
33
43
|
|
34
44
|
private
|
35
45
|
|
36
|
-
def initialize(env:, input:, initialize_hook:)
|
46
|
+
def initialize(env:, input:, initialize_hook: nil, span: nil)
|
37
47
|
@env = env
|
38
48
|
@input = input
|
39
49
|
@initialize_hook = initialize_hook
|
50
|
+
@span = span
|
40
51
|
end
|
41
52
|
end
|
42
53
|
end
|
data/salestation.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: salestation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SaleMove TechMovers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-04-
|
11
|
+
date: 2017-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|