spree_analytics_trackers 2.1.0 → 2.1.1

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
  SHA256:
3
- metadata.gz: 502cf1fa8e70cb9ceb4e1b24ec08c257cb5314249e5ab3403aa61ae463fb69fc
4
- data.tar.gz: 4c44fd4f1c8172a51499a1e4bcef65538e185ad2c8ace20728a05c28e8347542
3
+ metadata.gz: 39824346c7fd7f4f0369de8f15513e63cb3c3c490ea1ff746ab2022e644c0316
4
+ data.tar.gz: 6df1197ae57739e09de6f7abc91e3f3b44bec114efa608fa1b97c1f0e2b3a6d4
5
5
  SHA512:
6
- metadata.gz: 7824a5e18c3a7d0cd5afdb714f5ef4f727acfbc13e542ad7d33451b5478db03a530ae17dacb48a2dfc799084b3fd4a266417a6c6dfa2dd58d6d98a01c4625c2e
7
- data.tar.gz: 54f3aeb09eb35e8c0a285778b5e2c91a57dcdd5971b618343a006fcc8a5dbaf7073fbcf902d540c52788d630848992f8e83ff4ec5511dde26295ea64a9ffa959
6
+ metadata.gz: 196444a2a5020015e889c7f8a4f09180338372a900b4f44e0af2c0637cca747ae00249a9afab3d8c7f67c6edb68821ee86bd59b181641b25121d630440ccd773
7
+ data.tar.gz: 73956ab392e0802b1256aac939ea280b846a7464d2fbfaeba5d4bf386622e750fc81cd936226cece3984b1badf8d00679301251609433cb13e37d02121362cad
@@ -0,0 +1,11 @@
1
+ module SpreeAnalyticsTrackers
2
+ module CheckoutControllerDecorator
3
+ def self.included(base)
4
+ base.helper 'spree/trackers'
5
+ end
6
+ end
7
+ end
8
+
9
+ if defined?(Spree::CheckoutController)
10
+ ::Spree::CheckoutController.include(::SpreeAnalyticsTrackers::CheckoutControllerDecorator)
11
+ end
@@ -2,9 +2,8 @@ module SpreeAnalyticsTrackers
2
2
  module StoreControllerDecorator
3
3
  def self.included(base)
4
4
  base.include ::Spree::BaseHelper
5
- base.include ::Spree::TrackersHelper
6
-
7
- base.helper_method *::Spree::TrackersHelper.public_instance_methods
5
+
6
+ base.helper 'spree/trackers'
8
7
  end
9
8
  end
10
9
  end
@@ -0,0 +1,11 @@
1
+ module SpreeAnalyticsTrackers
2
+ module UserConfirmationsControllerDecorator
3
+ def self.included(base)
4
+ base.helper 'spree/trackers'
5
+ end
6
+ end
7
+ end
8
+
9
+ if defined?(Spree::UserConfirmationsController)
10
+ ::Spree::UserConfirmationsController.include(::SpreeAnalyticsTrackers::UserConfirmationsControllerDecorator)
11
+ end
@@ -0,0 +1,11 @@
1
+ module SpreeAnalyticsTrackers
2
+ module UserPasswordsControllerDecorator
3
+ def self.included(base)
4
+ base.helper 'spree/trackers'
5
+ end
6
+ end
7
+ end
8
+
9
+ if defined?(Spree::UserPasswordsController)
10
+ ::Spree::UserPasswordsController.include(::SpreeAnalyticsTrackers::UserPasswordsControllerDecorator)
11
+ end
@@ -0,0 +1,11 @@
1
+ module SpreeAnalyticsTrackers
2
+ module UserRegistrationsControllerDecorator
3
+ def self.included(base)
4
+ base.helper 'spree/trackers'
5
+ end
6
+ end
7
+ end
8
+
9
+ if defined?(Spree::UserRegistrationsController)
10
+ ::Spree::UserRegistrationsController.include(::SpreeAnalyticsTrackers::UserRegistrationsControllerDecorator)
11
+ end
@@ -0,0 +1,11 @@
1
+ module SpreeAnalyticsTrackers
2
+ module UserSessionsControllerDecorator
3
+ def self.included(base)
4
+ base.helper 'spree/trackers'
5
+ end
6
+ end
7
+ end
8
+
9
+ if defined?(Spree::UserSessionsController)
10
+ ::Spree::UserSessionsController.include(::SpreeAnalyticsTrackers::UserSessionsControllerDecorator)
11
+ end
@@ -1,17 +1,11 @@
1
1
  module SpreeAnalyticsTrackers
2
+ VERSION = '2.1.1'.freeze
3
+
2
4
  module_function
3
5
 
4
6
  # Returns the version of the currently loaded SpreeAnalyticsTrackers as a
5
7
  # <tt>Gem::Version</tt>.
6
8
  def version
7
- Gem::Version.new VERSION::STRING
8
- end
9
-
10
- module VERSION
11
- MAJOR = 2
12
- MINOR = 1
13
- TINY = 0
14
-
15
- STRING = [MAJOR, MINOR, TINY].compact.join('.')
9
+ Gem::Version.new VERSION
16
10
  end
17
11
  end
@@ -0,0 +1,15 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'Visiting Checkout page', type: :feature, js: true do
4
+ let(:mug) { create(:product, name: 'RoR Mug') }
5
+ let(:user) { create(:user) }
6
+
7
+ before do
8
+ allow_any_instance_of(Spree::OrdersController).to receive_messages(try_spree_current_user: user)
9
+ end
10
+
11
+ it 'is available' do
12
+ add_to_cart(mug)
13
+ expect { visit spree.checkout_path }.not_to raise_error
14
+ end
15
+ end
@@ -0,0 +1,7 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'Visiting Login page', type: :feature, js: true do
4
+ it 'is available' do
5
+ expect { visit spree.login_path }.not_to raise_error
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'Visiting Registation page', type: :feature, js: true do
4
+ it 'is available' do
5
+ expect { visit spree.recover_password_path }.not_to raise_error
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'Visiting Registation page', type: :feature, js: true do
4
+ it 'is available' do
5
+ expect { visit spree.signup_path }.not_to raise_error
6
+ end
7
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_analytics_trackers
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Spark Solutions
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-18 00:00:00.000000000 Z
11
+ date: 2021-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: spree_core
@@ -111,7 +111,12 @@ files:
111
111
  - app/assets/javascripts/spree/frontend/add_to_cart_analytics.js
112
112
  - app/assets/javascripts/spree/frontend/remove_from_cart_analytics.js
113
113
  - app/controllers/spree/admin/trackers_controller.rb
114
+ - app/controllers/spree_analytics_trackers/checkout_controller_decorator.rb
114
115
  - app/controllers/spree_analytics_trackers/store_controller_decorator.rb
116
+ - app/controllers/spree_analytics_trackers/user_confirmations_controller_decorator.rb
117
+ - app/controllers/spree_analytics_trackers/user_passwords_controller_decorator.rb
118
+ - app/controllers/spree_analytics_trackers/user_registrations_controller_decorator.rb
119
+ - app/controllers/spree_analytics_trackers/user_sessions_controller_decorator.rb
115
120
  - app/helpers/spree/trackers_helper.rb
116
121
  - app/models/spree/tracker.rb
117
122
  - app/models/spree_analytics_trackers/user_decorator.rb
@@ -164,7 +169,11 @@ files:
164
169
  - lib/spree_analytics_trackers/factories.rb
165
170
  - lib/spree_analytics_trackers/version.rb
166
171
  - spec/features/admin/configuration/analytics_tracker_spec.rb
172
+ - spec/features/checkout_spec.rb
167
173
  - spec/features/products_spec.rb
174
+ - spec/features/user_login_spec.rb
175
+ - spec/features/user_password_recovery_spec.rb
176
+ - spec/features/user_registration_spec.rb
168
177
  - spec/fixtures/thinking-cat.jpg
169
178
  - spec/models/spree/tracker_spec.rb
170
179
  - spec/presenters/spree_analytics_trackers/segment/order_presenter_spec.rb
@@ -197,7 +206,11 @@ specification_version: 4
197
206
  summary: Adds analytics trackers functionality to Spree
198
207
  test_files:
199
208
  - spec/features/admin/configuration/analytics_tracker_spec.rb
209
+ - spec/features/checkout_spec.rb
200
210
  - spec/features/products_spec.rb
211
+ - spec/features/user_login_spec.rb
212
+ - spec/features/user_password_recovery_spec.rb
213
+ - spec/features/user_registration_spec.rb
201
214
  - spec/fixtures/thinking-cat.jpg
202
215
  - spec/models/spree/tracker_spec.rb
203
216
  - spec/presenters/spree_analytics_trackers/segment/order_presenter_spec.rb