spree_core 2.4.0.rc1 → 2.4.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/spree/order.rb +0 -1
- data/app/models/spree/order_updater.rb +0 -2
- data/lib/spree/core.rb +0 -1
- data/lib/spree/core/version.rb +1 -1
- metadata +1 -2
- data/lib/spree/instrumentation.rb +0 -41
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c974cc01f67cfca0ddbf2139e93097dfb45213d4
|
4
|
+
data.tar.gz: cd6f74faba0892c17ed5bce5394c714f832c7588
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c217028bbe1b3368d612db4293985921e4e4502c2564b0574f2af8c9621bb0abf86ceb694bab9ff2fad4e33022646676d962b88d4c76430e0a539cb4417cc63
|
7
|
+
data.tar.gz: 50f73eeaf2728c151cf88932519af67a4836b0a96cd4401d9ff45ee8de3fae597e5e8bb25e25b640ad2497b6aabf0379bc5b93a531766d109f25013698f06c15
|
data/app/models/spree/order.rb
CHANGED
@@ -24,7 +24,6 @@ module Spree
|
|
24
24
|
run_hooks
|
25
25
|
persist_totals
|
26
26
|
end
|
27
|
-
Spree.instrument_method self, :update
|
28
27
|
|
29
28
|
def run_hooks
|
30
29
|
update_hooks.each { |hook| order.send hook }
|
@@ -112,7 +111,6 @@ module Spree
|
|
112
111
|
updated_at: Time.now,
|
113
112
|
)
|
114
113
|
end
|
115
|
-
Spree.instrument_method self, :persist_totals
|
116
114
|
|
117
115
|
# Updates the +shipment_state+ attribute according to the following logic:
|
118
116
|
#
|
data/lib/spree/core.rb
CHANGED
data/lib/spree/core/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.0.
|
4
|
+
version: 2.4.0.rc2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Schofield
|
@@ -771,7 +771,6 @@ files:
|
|
771
771
|
- lib/spree/i18n.rb
|
772
772
|
- lib/spree/i18n/base.rb
|
773
773
|
- lib/spree/i18n/initializer.rb
|
774
|
-
- lib/spree/instrumentation.rb
|
775
774
|
- lib/spree/migrations.rb
|
776
775
|
- lib/spree/money.rb
|
777
776
|
- lib/spree/permitted_attributes.rb
|
@@ -1,41 +0,0 @@
|
|
1
|
-
module Spree
|
2
|
-
class << self
|
3
|
-
attr_accessor :instrumenter
|
4
|
-
|
5
|
-
delegate :instrument, :instrument_method, to: :instrumenter
|
6
|
-
end
|
7
|
-
|
8
|
-
module Instrumentation
|
9
|
-
class Base
|
10
|
-
def instrument_method klass, method
|
11
|
-
klass.send(:alias_method, :"#{method}_without_instrumentation", method)
|
12
|
-
klass.send(:define_method, method) do |*args|
|
13
|
-
Spree.instrument("#{klass}.#{method}") do
|
14
|
-
send("#{method}_without_instrumentation", *args)
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
class Logger < Base
|
20
|
-
def instrument name
|
21
|
-
Rails.logger.tagged name do
|
22
|
-
ret = nil
|
23
|
-
ms = Benchmark.ms do
|
24
|
-
ret = yield
|
25
|
-
end
|
26
|
-
Rails.logger.info "Finished in #{ms.round(1)}ms"
|
27
|
-
ret
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
31
|
-
class None
|
32
|
-
def instrument name
|
33
|
-
yield
|
34
|
-
end
|
35
|
-
def instrument_method klass, method
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
self.instrumenter = Rails.env.development?? Instrumentation::Logger.new : Instrumentation::None.new
|
41
|
-
end
|