spree_analytics_trackers 1.0.1 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.bundle/config +2 -0
- data/.rubocop.yml +2 -0
- data/.travis.yml +30 -15
- data/Appraisals +3 -9
- data/LICENSE +1 -1
- data/README.md +7 -3
- data/app/assets/javascripts/spree/frontend/add_to_cart_analytics.js +50 -0
- data/app/assets/javascripts/spree/frontend/remove_from_cart_analytics.js +34 -0
- data/app/controllers/spree/admin/trackers_controller.rb +8 -0
- data/app/controllers/spree_analytics_trackers/checkout_controller_decorator.rb +11 -0
- data/app/controllers/spree_analytics_trackers/store_controller_decorator.rb +13 -0
- data/app/controllers/spree_analytics_trackers/user_confirmations_controller_decorator.rb +11 -0
- data/app/controllers/spree_analytics_trackers/user_passwords_controller_decorator.rb +11 -0
- data/app/controllers/spree_analytics_trackers/user_registrations_controller_decorator.rb +11 -0
- data/app/controllers/spree_analytics_trackers/user_sessions_controller_decorator.rb +11 -0
- data/app/helpers/spree/trackers_helper.rb +79 -16
- data/app/models/spree/tracker.rb +11 -5
- data/app/models/spree_analytics_trackers/user_decorator.rb +9 -0
- data/app/overrides/add_analytics_to_admin_sidebar.rb +2 -3
- data/app/overrides/add_cart_viewed_to_orders_edit.rb +1 -1
- data/app/overrides/add_checkout_step_viewed_to_checkout_edit.rb +11 -3
- data/app/overrides/add_google_analytics_page_view_to_spree_application.rb +10 -0
- data/app/overrides/add_google_analytics_to_spree_application.rb +4 -4
- data/app/overrides/add_google_purchase_to_orders_show.rb +1 -1
- data/app/overrides/add_product_list_filtered_to_taxons_show.rb +1 -1
- data/app/overrides/add_product_list_viewed_to_products_list.rb +1 -1
- data/app/overrides/add_product_viewed_to_products_show.rb +2 -2
- data/app/overrides/add_products_searched_to_products_list.rb +2 -2
- data/app/overrides/add_segment_initializer_to_layout.rb +3 -3
- data/app/overrides/add_segment_page_viewed_to_layout.rb +10 -0
- data/app/presenters/spree_analytics_trackers/base_presenter.rb +14 -0
- data/app/presenters/spree_analytics_trackers/segment/order_presenter.rb +32 -0
- data/app/presenters/spree_analytics_trackers/segment/product_presenter.rb +40 -0
- data/app/views/spree/admin/shared/_analytics_sidebar_menu.html.erb +3 -5
- data/app/views/spree/admin/trackers/_form.html.erb +13 -7
- data/app/views/spree/admin/trackers/index.html.erb +6 -8
- data/app/views/spree/shared/trackers/google_analytics/_checkout_step_viewed.js.erb +19 -0
- data/app/views/spree/shared/trackers/google_analytics/_initializer.js.erb +25 -0
- data/app/views/spree/shared/trackers/google_analytics/_page_viewed.js.erb +13 -0
- data/app/views/spree/shared/trackers/google_analytics/_purchase.js.erb +22 -0
- data/app/views/spree/shared/trackers/segment/_cart_viewed.js.erb +24 -19
- data/app/views/spree/shared/trackers/segment/_checkout_step_viewed.js.erb +20 -11
- data/app/views/spree/shared/trackers/segment/_initializer.js.erb +2 -3
- data/app/views/spree/shared/trackers/segment/_order_complete.js.erb +8 -45
- data/app/views/spree/shared/trackers/segment/_page_viewed.js.erb +7 -0
- data/app/views/spree/shared/trackers/segment/_product_list_filtered.js.erb +19 -28
- data/app/views/spree/shared/trackers/segment/_product_list_viewed.js.erb +17 -20
- data/app/views/spree/shared/trackers/segment/_product_viewed.js.erb +12 -6
- data/app/views/spree/shared/trackers/segment/_products_searched.js.erb +7 -9
- data/config/locales/en.yml +0 -2
- data/config/locales/zh-TW.yml +19 -0
- data/db/migrate/20200721163729_add_store_id_to_spree_trackers.rb +14 -0
- data/gemfiles/{spree_3_5.gemfile → spree_4_1.gemfile} +2 -2
- data/gemfiles/spree_master.gemfile +0 -1
- data/lib/generators/spree_analytics_trackers/install/install_generator.rb +8 -0
- data/lib/spree_analytics_trackers.rb +1 -0
- data/lib/spree_analytics_trackers/factories.rb +1 -0
- data/lib/spree_analytics_trackers/version.rb +3 -9
- data/spec/features/admin/configuration/analytics_tracker_spec.rb +18 -7
- data/spec/features/checkout_spec.rb +15 -0
- data/spec/features/products_spec.rb +315 -0
- data/spec/features/user_login_spec.rb +7 -0
- data/spec/features/user_password_recovery_spec.rb +7 -0
- data/spec/features/user_registration_spec.rb +7 -0
- data/spec/fixtures/thinking-cat.jpg +0 -0
- data/spec/models/spree/tracker_spec.rb +15 -0
- data/spec/presenters/spree_analytics_trackers/segment/order_presenter_spec.rb +34 -0
- data/spec/spec_helper.rb +7 -82
- data/spec/support/custom_products.rb +26 -0
- data/spree_analytics_trackers.gemspec +4 -17
- metadata +56 -212
- data/app/controllers/spree/store_controller_decorator.rb +0 -5
- data/app/models/spree/line_item_decorator.rb +0 -6
- data/app/models/spree/order_decorator.rb +0 -7
- data/app/models/spree/product_decorator.rb +0 -11
- data/app/models/spree/user_decorator.rb +0 -5
- data/app/overrides/add_google_checkout_to_checkout_edit.rb +0 -9
- data/app/overrides/add_product_added_to_orders_edit.rb +0 -10
- data/app/views/spree/shared/_google_add_items.html.erb +0 -13
- data/app/views/spree/shared/_google_analytics.html.erb +0 -18
- data/app/views/spree/shared/_google_checkout.html.erb +0 -14
- data/app/views/spree/shared/_google_purchase.html.erb +0 -19
- data/app/views/spree/shared/trackers/segment/_product_added.js.erb +0 -9
- data/gemfiles/spree_3_7.gemfile +0 -9
Binary file
|
@@ -13,5 +13,20 @@ describe Spree::Tracker, type: :model do
|
|
13
13
|
tracker.clear_cache
|
14
14
|
expect(Spree::Tracker.current).to be_nil
|
15
15
|
end
|
16
|
+
|
17
|
+
context 'multi-store' do
|
18
|
+
let(:default_store) { Spree::Store.default }
|
19
|
+
let(:euro_store) { create(:store, code: :eu, name: 'eurozone') }
|
20
|
+
let!(:default_tracker) { create(:tracker, store: default_store, engine: :google_analytics) }
|
21
|
+
let!(:euro_tracker) { create(:tracker, store: euro_store, engine: :google_analytics) }
|
22
|
+
|
23
|
+
it 'returns default tracker from default store' do
|
24
|
+
expect(Spree::Tracker.current).to eq(default_tracker)
|
25
|
+
end
|
26
|
+
|
27
|
+
it 'returns tracker from a specified store' do
|
28
|
+
expect(Spree::Tracker.current(:google_analytics, euro_store)).to eq(euro_tracker)
|
29
|
+
end
|
30
|
+
end
|
16
31
|
end
|
17
32
|
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe SpreeAnalyticsTrackers::Segment::OrderPresenter, type: :presenter do
|
4
|
+
let(:order) { create(:order_with_line_items) }
|
5
|
+
|
6
|
+
subject { described_class.new(order) }
|
7
|
+
|
8
|
+
describe '#to_json' do
|
9
|
+
let(:result) do
|
10
|
+
{
|
11
|
+
order_id: order.number.to_s,
|
12
|
+
total: order.total&.to_f,
|
13
|
+
shipping: order.shipment_total&.to_f,
|
14
|
+
tax: order.additional_tax_total&.to_f,
|
15
|
+
discount: order.promo_total&.to_f,
|
16
|
+
coupon: order.promo_code,
|
17
|
+
currency: order.currency,
|
18
|
+
products: order.line_items.map{ |line_item|
|
19
|
+
{
|
20
|
+
product_id: line_item.product_id&.to_s,
|
21
|
+
sku: line_item.sku&.to_s,
|
22
|
+
name: line_item.name,
|
23
|
+
price: line_item.price&.to_f,
|
24
|
+
quantity: line_item.quantity
|
25
|
+
}
|
26
|
+
}
|
27
|
+
}.to_json
|
28
|
+
end
|
29
|
+
|
30
|
+
it 'returns serialized object' do
|
31
|
+
expect(subject.to_json).to eq(result)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,93 +1,18 @@
|
|
1
|
-
# Run Coverage report
|
2
|
-
require 'simplecov'
|
3
|
-
SimpleCov.start do
|
4
|
-
add_filter 'spec/dummy'
|
5
|
-
add_group 'Controllers', 'app/controllers'
|
6
|
-
add_group 'Helpers', 'app/helpers'
|
7
|
-
add_group 'Mailers', 'app/mailers'
|
8
|
-
add_group 'Models', 'app/models'
|
9
|
-
add_group 'Views', 'app/views'
|
10
|
-
add_group 'Libraries', 'lib'
|
11
|
-
end
|
12
|
-
|
13
1
|
# Configure Rails Environment
|
14
2
|
ENV['RAILS_ENV'] = 'test'
|
15
3
|
|
16
|
-
require File.expand_path('../dummy/config/environment.rb',
|
4
|
+
require File.expand_path('../dummy/config/environment.rb', __FILE__)
|
17
5
|
|
18
|
-
require 'rspec/
|
19
|
-
require 'database_cleaner'
|
20
|
-
require 'ffaker'
|
6
|
+
require 'spree_dev_tools/rspec/spec_helper'
|
21
7
|
|
22
8
|
# Requires supporting ruby files with custom matchers and macros, etc,
|
23
9
|
# in spec/support/ and its subdirectories.
|
24
|
-
Dir[File.join(File.dirname(__FILE__), 'support/**/*.rb')].each { |f| require f }
|
25
|
-
|
26
|
-
# Requires factories and other useful helpers defined in spree_core.
|
27
|
-
require 'spree/testing_support/authorization_helpers'
|
28
|
-
require 'spree/testing_support/capybara_ext'
|
29
|
-
require 'spree/testing_support/controller_requests'
|
30
|
-
require 'spree/testing_support/factories'
|
31
|
-
require 'spree/testing_support/url_helpers'
|
10
|
+
Dir[File.join(File.dirname(__FILE__), 'support/**/*.rb')].sort.each { |f| require f }
|
32
11
|
|
33
|
-
# Requires factories defined in lib/spree_analytics_trackers/factories.rb
|
34
12
|
require 'spree_analytics_trackers/factories'
|
35
13
|
|
36
|
-
|
37
|
-
config.include FactoryBot::Syntax::Methods
|
38
|
-
|
39
|
-
# Infer an example group's spec type from the file location.
|
40
|
-
config.infer_spec_type_from_file_location!
|
41
|
-
|
42
|
-
# == URL Helpers
|
43
|
-
#
|
44
|
-
# Allows access to Spree's routes in specs:
|
45
|
-
#
|
46
|
-
# visit spree.admin_path
|
47
|
-
# current_path.should eql(spree.products_path)
|
48
|
-
config.include Spree::TestingSupport::UrlHelpers
|
49
|
-
|
50
|
-
# == Requests support
|
51
|
-
#
|
52
|
-
# Adds convenient methods to request Spree's controllers
|
53
|
-
# spree_get :index
|
54
|
-
config.include Spree::TestingSupport::ControllerRequests, type: :controller
|
55
|
-
|
56
|
-
# == Mock Framework
|
57
|
-
#
|
58
|
-
# If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
|
59
|
-
#
|
60
|
-
# config.mock_with :mocha
|
61
|
-
# config.mock_with :flexmock
|
62
|
-
# config.mock_with :rr
|
63
|
-
config.mock_with :rspec
|
64
|
-
config.color = true
|
14
|
+
require 'spree/testing_support/image_helpers'
|
65
15
|
|
66
|
-
|
67
|
-
config.
|
68
|
-
|
69
|
-
# Capybara javascript drivers require transactional fixtures set to false, and we use DatabaseCleaner
|
70
|
-
# to cleanup after each test instead. Without transactional fixtures set to false the records created
|
71
|
-
# to setup a test will be unavailable to the browser, which runs under a separate server instance.
|
72
|
-
config.use_transactional_fixtures = false
|
73
|
-
|
74
|
-
# Ensure Suite is set to use transactions for speed.
|
75
|
-
config.before :suite do
|
76
|
-
DatabaseCleaner.strategy = :transaction
|
77
|
-
DatabaseCleaner.clean_with :truncation
|
78
|
-
end
|
79
|
-
|
80
|
-
# Before each spec check if it is a Javascript test and switch between using database transactions or not where necessary.
|
81
|
-
config.before :each do
|
82
|
-
DatabaseCleaner.strategy = RSpec.current_example.metadata[:js] ? :truncation : :transaction
|
83
|
-
DatabaseCleaner.start
|
84
|
-
end
|
85
|
-
|
86
|
-
# After each spec clean the database.
|
87
|
-
config.after :each do
|
88
|
-
DatabaseCleaner.clean
|
89
|
-
end
|
90
|
-
|
91
|
-
config.fail_fast = ENV['FAIL_FAST'] || false
|
92
|
-
config.order = "random"
|
93
|
-
end
|
16
|
+
RSpec.configure do |config|
|
17
|
+
config.include Spree::TestingSupport::ImageHelpers
|
18
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
shared_context 'custom products' do
|
2
|
+
before do
|
3
|
+
taxonomy = FactoryBot.create(:taxonomy, name: 'Categories')
|
4
|
+
root = taxonomy.root
|
5
|
+
clothing_taxon = FactoryBot.create(:taxon, name: 'Clothing', parent_id: root.id)
|
6
|
+
trending_taxon = FactoryBot.create(:taxon, name: 'Trending')
|
7
|
+
bags_taxon = FactoryBot.create(:taxon, name: 'Bags', parent_id: root.id)
|
8
|
+
mugs_taxon = FactoryBot.create(:taxon, name: 'Mugs', parent_id: root.id)
|
9
|
+
|
10
|
+
taxonomy = FactoryBot.create(:taxonomy, name: 'Brands')
|
11
|
+
root = taxonomy.root
|
12
|
+
apache_taxon = FactoryBot.create(:taxon, name: 'Apache', parent_id: root.id)
|
13
|
+
rails_taxon = FactoryBot.create(:taxon, name: 'Ruby on Rails', parent_id: root.id)
|
14
|
+
ruby_taxon = FactoryBot.create(:taxon, name: 'Ruby', parent_id: root.id)
|
15
|
+
|
16
|
+
FactoryBot.create(:custom_product, name: 'Ruby on Rails Ringer T-Shirt', price: '159.99', taxons: [rails_taxon, clothing_taxon])
|
17
|
+
FactoryBot.create(:custom_product, name: 'Ruby on Rails Mug', price: '55.99', taxons: [rails_taxon, mugs_taxon, trending_taxon])
|
18
|
+
FactoryBot.create(:custom_product, name: 'Ruby on Rails Tote', price: '55.99', taxons: [rails_taxon, bags_taxon, trending_taxon])
|
19
|
+
FactoryBot.create(:custom_product, name: 'Ruby on Rails Bag', price: '102.99', taxons: [rails_taxon, bags_taxon])
|
20
|
+
FactoryBot.create(:custom_product, name: 'Ruby on Rails Baseball Jersey', price: '190.99', taxons: [rails_taxon, clothing_taxon])
|
21
|
+
FactoryBot.create(:custom_product, name: 'Ruby on Rails Stein', price: '156.99', taxons: [rails_taxon, mugs_taxon])
|
22
|
+
FactoryBot.create(:custom_product, name: 'Ruby on Rails Jr. Spaghetti', price: '190.99', taxons: [rails_taxon, clothing_taxon])
|
23
|
+
FactoryBot.create(:custom_product, name: 'Ruby Baseball Jersey', price: '250.99', taxons: [ruby_taxon, clothing_taxon])
|
24
|
+
FactoryBot.create(:custom_product, name: 'Apache Baseball Jersey', price: '250.99', taxons: [apache_taxon, clothing_taxon])
|
25
|
+
end
|
26
|
+
end
|
@@ -9,7 +9,7 @@ Gem::Specification.new do |s|
|
|
9
9
|
s.version = SpreeAnalyticsTrackers.version
|
10
10
|
s.summary = 'Adds analytics trackers functionality to Spree'
|
11
11
|
s.description = 'Supports Google Analytics '
|
12
|
-
s.required_ruby_version = '>= 2.
|
12
|
+
s.required_ruby_version = '>= 2.5.0'
|
13
13
|
|
14
14
|
s.author = 'Spark Solutions'
|
15
15
|
s.email = 'we@sparksolutions.co'
|
@@ -21,24 +21,11 @@ Gem::Specification.new do |s|
|
|
21
21
|
s.require_path = 'lib'
|
22
22
|
s.requirements << 'none'
|
23
23
|
|
24
|
-
spree_version = '>=
|
24
|
+
spree_version = '>= 4.1.0', '< 5.0'
|
25
25
|
s.add_dependency 'spree_core', spree_version
|
26
26
|
s.add_dependency 'spree_backend', spree_version
|
27
27
|
s.add_dependency 'spree_extension'
|
28
|
+
s.add_dependency 'deface', '~> 1.0'
|
28
29
|
|
29
|
-
s.add_development_dependency '
|
30
|
-
s.add_development_dependency 'capybara'
|
31
|
-
s.add_development_dependency 'capybara-screenshot'
|
32
|
-
s.add_development_dependency 'chromedriver-helper'
|
33
|
-
s.add_development_dependency 'coffee-rails'
|
34
|
-
s.add_development_dependency 'database_cleaner'
|
35
|
-
s.add_development_dependency 'factory_bot', '~> 4.7'
|
36
|
-
s.add_development_dependency 'ffaker'
|
37
|
-
s.add_development_dependency 'mysql2'
|
38
|
-
s.add_development_dependency 'pg'
|
39
|
-
s.add_development_dependency 'rspec-rails'
|
40
|
-
s.add_development_dependency 'sass-rails'
|
41
|
-
s.add_development_dependency 'selenium-webdriver'
|
42
|
-
s.add_development_dependency 'simplecov'
|
43
|
-
s.add_development_dependency 'sqlite3', '~> 1.3.6'
|
30
|
+
s.add_development_dependency 'spree_dev_tools'
|
44
31
|
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: 1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Spark Solutions
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: spree_core
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 4.1.0
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: '5.0'
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
29
|
+
version: 4.1.0
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: '5.0'
|
@@ -36,7 +36,7 @@ dependencies:
|
|
36
36
|
requirements:
|
37
37
|
- - ">="
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version:
|
39
|
+
version: 4.1.0
|
40
40
|
- - "<"
|
41
41
|
- !ruby/object:Gem::Version
|
42
42
|
version: '5.0'
|
@@ -46,7 +46,7 @@ dependencies:
|
|
46
46
|
requirements:
|
47
47
|
- - ">="
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version:
|
49
|
+
version: 4.1.0
|
50
50
|
- - "<"
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: '5.0'
|
@@ -65,105 +65,21 @@ dependencies:
|
|
65
65
|
- !ruby/object:Gem::Version
|
66
66
|
version: '0'
|
67
67
|
- !ruby/object:Gem::Dependency
|
68
|
-
name:
|
69
|
-
requirement: !ruby/object:Gem::Requirement
|
70
|
-
requirements:
|
71
|
-
- - ">="
|
72
|
-
- !ruby/object:Gem::Version
|
73
|
-
version: '0'
|
74
|
-
type: :development
|
75
|
-
prerelease: false
|
76
|
-
version_requirements: !ruby/object:Gem::Requirement
|
77
|
-
requirements:
|
78
|
-
- - ">="
|
79
|
-
- !ruby/object:Gem::Version
|
80
|
-
version: '0'
|
81
|
-
- !ruby/object:Gem::Dependency
|
82
|
-
name: capybara
|
83
|
-
requirement: !ruby/object:Gem::Requirement
|
84
|
-
requirements:
|
85
|
-
- - ">="
|
86
|
-
- !ruby/object:Gem::Version
|
87
|
-
version: '0'
|
88
|
-
type: :development
|
89
|
-
prerelease: false
|
90
|
-
version_requirements: !ruby/object:Gem::Requirement
|
91
|
-
requirements:
|
92
|
-
- - ">="
|
93
|
-
- !ruby/object:Gem::Version
|
94
|
-
version: '0'
|
95
|
-
- !ruby/object:Gem::Dependency
|
96
|
-
name: capybara-screenshot
|
97
|
-
requirement: !ruby/object:Gem::Requirement
|
98
|
-
requirements:
|
99
|
-
- - ">="
|
100
|
-
- !ruby/object:Gem::Version
|
101
|
-
version: '0'
|
102
|
-
type: :development
|
103
|
-
prerelease: false
|
104
|
-
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
requirements:
|
106
|
-
- - ">="
|
107
|
-
- !ruby/object:Gem::Version
|
108
|
-
version: '0'
|
109
|
-
- !ruby/object:Gem::Dependency
|
110
|
-
name: chromedriver-helper
|
111
|
-
requirement: !ruby/object:Gem::Requirement
|
112
|
-
requirements:
|
113
|
-
- - ">="
|
114
|
-
- !ruby/object:Gem::Version
|
115
|
-
version: '0'
|
116
|
-
type: :development
|
117
|
-
prerelease: false
|
118
|
-
version_requirements: !ruby/object:Gem::Requirement
|
119
|
-
requirements:
|
120
|
-
- - ">="
|
121
|
-
- !ruby/object:Gem::Version
|
122
|
-
version: '0'
|
123
|
-
- !ruby/object:Gem::Dependency
|
124
|
-
name: coffee-rails
|
125
|
-
requirement: !ruby/object:Gem::Requirement
|
126
|
-
requirements:
|
127
|
-
- - ">="
|
128
|
-
- !ruby/object:Gem::Version
|
129
|
-
version: '0'
|
130
|
-
type: :development
|
131
|
-
prerelease: false
|
132
|
-
version_requirements: !ruby/object:Gem::Requirement
|
133
|
-
requirements:
|
134
|
-
- - ">="
|
135
|
-
- !ruby/object:Gem::Version
|
136
|
-
version: '0'
|
137
|
-
- !ruby/object:Gem::Dependency
|
138
|
-
name: database_cleaner
|
139
|
-
requirement: !ruby/object:Gem::Requirement
|
140
|
-
requirements:
|
141
|
-
- - ">="
|
142
|
-
- !ruby/object:Gem::Version
|
143
|
-
version: '0'
|
144
|
-
type: :development
|
145
|
-
prerelease: false
|
146
|
-
version_requirements: !ruby/object:Gem::Requirement
|
147
|
-
requirements:
|
148
|
-
- - ">="
|
149
|
-
- !ruby/object:Gem::Version
|
150
|
-
version: '0'
|
151
|
-
- !ruby/object:Gem::Dependency
|
152
|
-
name: factory_bot
|
68
|
+
name: deface
|
153
69
|
requirement: !ruby/object:Gem::Requirement
|
154
70
|
requirements:
|
155
71
|
- - "~>"
|
156
72
|
- !ruby/object:Gem::Version
|
157
|
-
version: '
|
158
|
-
type: :
|
73
|
+
version: '1.0'
|
74
|
+
type: :runtime
|
159
75
|
prerelease: false
|
160
76
|
version_requirements: !ruby/object:Gem::Requirement
|
161
77
|
requirements:
|
162
78
|
- - "~>"
|
163
79
|
- !ruby/object:Gem::Version
|
164
|
-
version: '
|
80
|
+
version: '1.0'
|
165
81
|
- !ruby/object:Gem::Dependency
|
166
|
-
name:
|
82
|
+
name: spree_dev_tools
|
167
83
|
requirement: !ruby/object:Gem::Requirement
|
168
84
|
requirements:
|
169
85
|
- - ">="
|
@@ -176,164 +92,76 @@ dependencies:
|
|
176
92
|
- - ">="
|
177
93
|
- !ruby/object:Gem::Version
|
178
94
|
version: '0'
|
179
|
-
- !ruby/object:Gem::Dependency
|
180
|
-
name: mysql2
|
181
|
-
requirement: !ruby/object:Gem::Requirement
|
182
|
-
requirements:
|
183
|
-
- - ">="
|
184
|
-
- !ruby/object:Gem::Version
|
185
|
-
version: '0'
|
186
|
-
type: :development
|
187
|
-
prerelease: false
|
188
|
-
version_requirements: !ruby/object:Gem::Requirement
|
189
|
-
requirements:
|
190
|
-
- - ">="
|
191
|
-
- !ruby/object:Gem::Version
|
192
|
-
version: '0'
|
193
|
-
- !ruby/object:Gem::Dependency
|
194
|
-
name: pg
|
195
|
-
requirement: !ruby/object:Gem::Requirement
|
196
|
-
requirements:
|
197
|
-
- - ">="
|
198
|
-
- !ruby/object:Gem::Version
|
199
|
-
version: '0'
|
200
|
-
type: :development
|
201
|
-
prerelease: false
|
202
|
-
version_requirements: !ruby/object:Gem::Requirement
|
203
|
-
requirements:
|
204
|
-
- - ">="
|
205
|
-
- !ruby/object:Gem::Version
|
206
|
-
version: '0'
|
207
|
-
- !ruby/object:Gem::Dependency
|
208
|
-
name: rspec-rails
|
209
|
-
requirement: !ruby/object:Gem::Requirement
|
210
|
-
requirements:
|
211
|
-
- - ">="
|
212
|
-
- !ruby/object:Gem::Version
|
213
|
-
version: '0'
|
214
|
-
type: :development
|
215
|
-
prerelease: false
|
216
|
-
version_requirements: !ruby/object:Gem::Requirement
|
217
|
-
requirements:
|
218
|
-
- - ">="
|
219
|
-
- !ruby/object:Gem::Version
|
220
|
-
version: '0'
|
221
|
-
- !ruby/object:Gem::Dependency
|
222
|
-
name: sass-rails
|
223
|
-
requirement: !ruby/object:Gem::Requirement
|
224
|
-
requirements:
|
225
|
-
- - ">="
|
226
|
-
- !ruby/object:Gem::Version
|
227
|
-
version: '0'
|
228
|
-
type: :development
|
229
|
-
prerelease: false
|
230
|
-
version_requirements: !ruby/object:Gem::Requirement
|
231
|
-
requirements:
|
232
|
-
- - ">="
|
233
|
-
- !ruby/object:Gem::Version
|
234
|
-
version: '0'
|
235
|
-
- !ruby/object:Gem::Dependency
|
236
|
-
name: selenium-webdriver
|
237
|
-
requirement: !ruby/object:Gem::Requirement
|
238
|
-
requirements:
|
239
|
-
- - ">="
|
240
|
-
- !ruby/object:Gem::Version
|
241
|
-
version: '0'
|
242
|
-
type: :development
|
243
|
-
prerelease: false
|
244
|
-
version_requirements: !ruby/object:Gem::Requirement
|
245
|
-
requirements:
|
246
|
-
- - ">="
|
247
|
-
- !ruby/object:Gem::Version
|
248
|
-
version: '0'
|
249
|
-
- !ruby/object:Gem::Dependency
|
250
|
-
name: simplecov
|
251
|
-
requirement: !ruby/object:Gem::Requirement
|
252
|
-
requirements:
|
253
|
-
- - ">="
|
254
|
-
- !ruby/object:Gem::Version
|
255
|
-
version: '0'
|
256
|
-
type: :development
|
257
|
-
prerelease: false
|
258
|
-
version_requirements: !ruby/object:Gem::Requirement
|
259
|
-
requirements:
|
260
|
-
- - ">="
|
261
|
-
- !ruby/object:Gem::Version
|
262
|
-
version: '0'
|
263
|
-
- !ruby/object:Gem::Dependency
|
264
|
-
name: sqlite3
|
265
|
-
requirement: !ruby/object:Gem::Requirement
|
266
|
-
requirements:
|
267
|
-
- - "~>"
|
268
|
-
- !ruby/object:Gem::Version
|
269
|
-
version: 1.3.6
|
270
|
-
type: :development
|
271
|
-
prerelease: false
|
272
|
-
version_requirements: !ruby/object:Gem::Requirement
|
273
|
-
requirements:
|
274
|
-
- - "~>"
|
275
|
-
- !ruby/object:Gem::Version
|
276
|
-
version: 1.3.6
|
277
95
|
description: 'Supports Google Analytics '
|
278
96
|
email: we@sparksolutions.co
|
279
97
|
executables: []
|
280
98
|
extensions: []
|
281
99
|
extra_rdoc_files: []
|
282
100
|
files:
|
101
|
+
- ".bundle/config"
|
283
102
|
- ".gitignore"
|
284
103
|
- ".rspec"
|
104
|
+
- ".rubocop.yml"
|
285
105
|
- ".travis.yml"
|
286
106
|
- Appraisals
|
287
107
|
- Gemfile
|
288
108
|
- LICENSE
|
289
109
|
- README.md
|
290
110
|
- Rakefile
|
111
|
+
- app/assets/javascripts/spree/frontend/add_to_cart_analytics.js
|
112
|
+
- app/assets/javascripts/spree/frontend/remove_from_cart_analytics.js
|
291
113
|
- app/controllers/spree/admin/trackers_controller.rb
|
292
|
-
- app/controllers/
|
114
|
+
- app/controllers/spree_analytics_trackers/checkout_controller_decorator.rb
|
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
|
293
120
|
- app/helpers/spree/trackers_helper.rb
|
294
|
-
- app/models/spree/line_item_decorator.rb
|
295
|
-
- app/models/spree/order_decorator.rb
|
296
|
-
- app/models/spree/product_decorator.rb
|
297
121
|
- app/models/spree/tracker.rb
|
298
|
-
- app/models/
|
122
|
+
- app/models/spree_analytics_trackers/user_decorator.rb
|
299
123
|
- app/overrides/add_analytics_to_admin_sidebar.rb
|
300
124
|
- app/overrides/add_cart_viewed_to_orders_edit.rb
|
301
125
|
- app/overrides/add_checkout_step_viewed_to_checkout_edit.rb
|
126
|
+
- app/overrides/add_google_analytics_page_view_to_spree_application.rb
|
302
127
|
- app/overrides/add_google_analytics_to_spree_application.rb
|
303
|
-
- app/overrides/add_google_checkout_to_checkout_edit.rb
|
304
128
|
- app/overrides/add_google_purchase_to_orders_show.rb
|
305
129
|
- app/overrides/add_order_complete_to_orders_show.rb
|
306
|
-
- app/overrides/add_product_added_to_orders_edit.rb
|
307
130
|
- app/overrides/add_product_list_filtered_to_taxons_show.rb
|
308
131
|
- app/overrides/add_product_list_viewed_to_products_list.rb
|
309
132
|
- app/overrides/add_product_viewed_to_products_show.rb
|
310
133
|
- app/overrides/add_products_searched_to_products_list.rb
|
311
134
|
- app/overrides/add_segment_initializer_to_layout.rb
|
135
|
+
- app/overrides/add_segment_page_viewed_to_layout.rb
|
136
|
+
- app/presenters/spree_analytics_trackers/base_presenter.rb
|
137
|
+
- app/presenters/spree_analytics_trackers/segment/order_presenter.rb
|
138
|
+
- app/presenters/spree_analytics_trackers/segment/product_presenter.rb
|
312
139
|
- app/views/spree/admin/shared/_analytics_sidebar_menu.html.erb
|
313
140
|
- app/views/spree/admin/trackers/_form.html.erb
|
314
141
|
- app/views/spree/admin/trackers/edit.html.erb
|
315
142
|
- app/views/spree/admin/trackers/index.html.erb
|
316
143
|
- app/views/spree/admin/trackers/new.html.erb
|
317
|
-
- app/views/spree/shared/
|
318
|
-
- app/views/spree/shared/
|
319
|
-
- app/views/spree/shared/
|
320
|
-
- app/views/spree/shared/
|
144
|
+
- app/views/spree/shared/trackers/google_analytics/_checkout_step_viewed.js.erb
|
145
|
+
- app/views/spree/shared/trackers/google_analytics/_initializer.js.erb
|
146
|
+
- app/views/spree/shared/trackers/google_analytics/_page_viewed.js.erb
|
147
|
+
- app/views/spree/shared/trackers/google_analytics/_purchase.js.erb
|
321
148
|
- app/views/spree/shared/trackers/segment/_cart_viewed.js.erb
|
322
149
|
- app/views/spree/shared/trackers/segment/_checkout_step_viewed.js.erb
|
323
150
|
- app/views/spree/shared/trackers/segment/_initializer.js.erb
|
324
151
|
- app/views/spree/shared/trackers/segment/_order_complete.js.erb
|
325
|
-
- app/views/spree/shared/trackers/segment/
|
152
|
+
- app/views/spree/shared/trackers/segment/_page_viewed.js.erb
|
326
153
|
- app/views/spree/shared/trackers/segment/_product_list_filtered.js.erb
|
327
154
|
- app/views/spree/shared/trackers/segment/_product_list_viewed.js.erb
|
328
155
|
- app/views/spree/shared/trackers/segment/_product_viewed.js.erb
|
329
156
|
- app/views/spree/shared/trackers/segment/_products_searched.js.erb
|
330
157
|
- bin/rails
|
331
158
|
- config/locales/en.yml
|
159
|
+
- config/locales/zh-TW.yml
|
332
160
|
- config/routes.rb
|
333
161
|
- db/migrate/20171013160337_create_spree_trackers.rb
|
162
|
+
- db/migrate/20200721163729_add_store_id_to_spree_trackers.rb
|
334
163
|
- gemfiles/.bundle/config
|
335
|
-
- gemfiles/
|
336
|
-
- gemfiles/spree_3_7.gemfile
|
164
|
+
- gemfiles/spree_4_1.gemfile
|
337
165
|
- gemfiles/spree_master.gemfile
|
338
166
|
- lib/generators/spree_analytics_trackers/install/install_generator.rb
|
339
167
|
- lib/spree_analytics_trackers.rb
|
@@ -341,14 +169,22 @@ files:
|
|
341
169
|
- lib/spree_analytics_trackers/factories.rb
|
342
170
|
- lib/spree_analytics_trackers/version.rb
|
343
171
|
- spec/features/admin/configuration/analytics_tracker_spec.rb
|
172
|
+
- spec/features/checkout_spec.rb
|
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
|
177
|
+
- spec/fixtures/thinking-cat.jpg
|
344
178
|
- spec/models/spree/tracker_spec.rb
|
179
|
+
- spec/presenters/spree_analytics_trackers/segment/order_presenter_spec.rb
|
345
180
|
- spec/spec_helper.rb
|
181
|
+
- spec/support/custom_products.rb
|
346
182
|
- spree_analytics_trackers.gemspec
|
347
183
|
homepage: https://github.com/spree-contrib/spree_analytics_trackers
|
348
184
|
licenses:
|
349
185
|
- BSD-3-Clause
|
350
186
|
metadata: {}
|
351
|
-
post_install_message:
|
187
|
+
post_install_message:
|
352
188
|
rdoc_options: []
|
353
189
|
require_paths:
|
354
190
|
- lib
|
@@ -356,7 +192,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
356
192
|
requirements:
|
357
193
|
- - ">="
|
358
194
|
- !ruby/object:Gem::Version
|
359
|
-
version: 2.
|
195
|
+
version: 2.5.0
|
360
196
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
361
197
|
requirements:
|
362
198
|
- - ">="
|
@@ -364,11 +200,19 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
364
200
|
version: '0'
|
365
201
|
requirements:
|
366
202
|
- none
|
367
|
-
rubygems_version: 3.
|
368
|
-
signing_key:
|
203
|
+
rubygems_version: 3.1.4
|
204
|
+
signing_key:
|
369
205
|
specification_version: 4
|
370
206
|
summary: Adds analytics trackers functionality to Spree
|
371
207
|
test_files:
|
372
208
|
- spec/features/admin/configuration/analytics_tracker_spec.rb
|
209
|
+
- spec/features/checkout_spec.rb
|
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
|
214
|
+
- spec/fixtures/thinking-cat.jpg
|
373
215
|
- spec/models/spree/tracker_spec.rb
|
216
|
+
- spec/presenters/spree_analytics_trackers/segment/order_presenter_spec.rb
|
374
217
|
- spec/spec_helper.rb
|
218
|
+
- spec/support/custom_products.rb
|