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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3b41e23ca4232364a10edcb30ee1df77239ac6a6
4
- data.tar.gz: 3ac2a1a353eb0d2d6b5130b773ebbdb115847b5b
3
+ metadata.gz: c974cc01f67cfca0ddbf2139e93097dfb45213d4
4
+ data.tar.gz: cd6f74faba0892c17ed5bce5394c714f832c7588
5
5
  SHA512:
6
- metadata.gz: 47ae6a4ab3482c89afdee602d0b6951608e0f885690137815bddd5a20f6d91fa62e868e6f72d445289149117cbf658c41e276dbc7f1f54c78a1714fa836685ca
7
- data.tar.gz: a8219fa078d69a3045bfdab968dc0c327a2c050253e5d779170a2770346e8f602005795ef14ee9d26fedf23f10838fba31df8194774e992f3c16d5e92b30d8bb
6
+ metadata.gz: 9c217028bbe1b3368d612db4293985921e4e4502c2564b0574f2af8c9621bb0abf86ceb694bab9ff2fad4e33022646676d962b88d4c76430e0a539cb4417cc63
7
+ data.tar.gz: 50f73eeaf2728c151cf88932519af67a4836b0a96cd4401d9ff45ee8de3fae597e5e8bb25e25b640ad2497b6aabf0379bc5b93a531766d109f25013698f06c15
@@ -559,7 +559,6 @@ module Spree
559
559
  updater.update_shipment_total
560
560
  persist_totals
561
561
  end
562
- Spree.instrument_method self, :set_shipments_cost
563
562
 
564
563
  def is_risky?
565
564
  self.payments.risky.count > 0
@@ -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
@@ -58,7 +58,6 @@ require 'spree/migrations'
58
58
  require 'spree/core/engine'
59
59
 
60
60
  require 'spree/i18n'
61
- require 'spree/instrumentation'
62
61
  require 'spree/money'
63
62
 
64
63
  require 'spree/permitted_attributes'
@@ -1,5 +1,5 @@
1
1
  module Spree
2
2
  def self.version
3
- "2.4.0.rc1"
3
+ "2.4.0.rc2"
4
4
  end
5
5
  end
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.rc1
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