workarea-magento_migrator 1.0.0.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +23 -0
- data/.ruby-gemset +1 -0
- data/Gemfile +16 -0
- data/LICENSE +52 -0
- data/README.md +56 -0
- data/Rakefile +57 -0
- data/app/assets/images/workarea/admin/magento_data_migration/.keep +0 -0
- data/app/assets/images/workarea/storefront/magento_data_migration/.keep +0 -0
- data/app/assets/javascripts/workarea/admin/magento_data_migration/.keep +0 -0
- data/app/assets/javascripts/workarea/storefront/magento_data_migration/.keep +0 -0
- data/app/assets/stylesheets/workarea/admin/magento_data_migration/.keep +0 -0
- data/app/assets/stylesheets/workarea/storefront/magento_data_migration/.keep +0 -0
- data/app/controllers/.keep +0 -0
- data/app/helpers/.keep +0 -0
- data/app/mailers/.keep +0 -0
- data/app/models/.keep +0 -0
- data/app/models/workarea/magento_customer.rb +10 -0
- data/app/models/workarea/user.decorator +20 -0
- data/app/views/.keep +0 -0
- data/bin/magento_migrator +21 -0
- data/bin/rails +25 -0
- data/config/data/catalog_category.yml +55 -0
- data/config/data/catalog_product.yml +51 -0
- data/config/initializers/workarea.rb +3 -0
- data/config/routes.rb +2 -0
- data/data/categories.json +28460 -0
- data/data/content_pages.json +7566 -0
- data/data/taxons.json +1336 -0
- data/dump.rdb +0 -0
- data/fields_for_magento_modules.md +30 -0
- data/lib/field-mapping/fields_for_magento_customer_module.md +30 -0
- data/lib/field-mapping/fields_for_workarea_customer_module.md +23 -0
- data/lib/sql/magento_customer.sql +26 -0
- data/lib/sql/magento_products.sql +147 -0
- data/lib/tasks/catalog_catagories.rake +21 -0
- data/lib/tasks/customers.rake +9 -0
- data/lib/tasks/products.rake +8 -0
- data/lib/tasks/workarea/import_magento_content.rake +14 -0
- data/lib/workarea/magento_migrator/catalog_category.rb +238 -0
- data/lib/workarea/magento_migrator/catalog_product.rb +38 -0
- data/lib/workarea/magento_migrator/engine.rb +10 -0
- data/lib/workarea/magento_migrator/magento_base.rb +119 -0
- data/lib/workarea/magento_migrator/sql_connection.rb +76 -0
- data/lib/workarea/magento_migrator/version.rb +5 -0
- data/lib/workarea/magento_migrator.rb +19 -0
- data/test/dummy/.ruby-version +1 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/config/manifest.js +3 -0
- data/test/dummy/app/assets/images/.keep +0 -0
- data/test/dummy/app/assets/javascripts/application.js +14 -0
- data/test/dummy/app/assets/stylesheets/application.css +15 -0
- data/test/dummy/app/controllers/application_controller.rb +2 -0
- data/test/dummy/app/controllers/concerns/.keep +0 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/jobs/application_job.rb +2 -0
- data/test/dummy/app/mailers/application_mailer.rb +4 -0
- data/test/dummy/app/models/concerns/.keep +0 -0
- data/test/dummy/app/views/layouts/application.html.erb +15 -0
- data/test/dummy/app/views/layouts/mailer.html.erb +13 -0
- data/test/dummy/app/views/layouts/mailer.text.erb +1 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/bin/setup +25 -0
- data/test/dummy/bin/update +25 -0
- data/test/dummy/config/application.rb +34 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +52 -0
- data/test/dummy/config/environments/production.rb +83 -0
- data/test/dummy/config/environments/test.rb +45 -0
- data/test/dummy/config/initializers/application_controller_renderer.rb +8 -0
- data/test/dummy/config/initializers/assets.rb +12 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/content_security_policy.rb +25 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +5 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +4 -0
- data/test/dummy/config/initializers/workarea.rb +5 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +9 -0
- data/test/dummy/config/locales/en.yml +33 -0
- data/test/dummy/config/puma.rb +34 -0
- data/test/dummy/config/routes.rb +5 -0
- data/test/dummy/config/spring.rb +6 -0
- data/test/dummy/config.ru +5 -0
- data/test/dummy/db/seeds.rb +2 -0
- data/test/dummy/lib/assets/.keep +0 -0
- data/test/dummy/log/.keep +0 -0
- data/test/teaspoon_env.rb +6 -0
- data/test/test_helper.rb +10 -0
- data/test/workarea/magento_migrator/catalog_product_test.rb +13 -0
- data/workarea-magento_migrator.gemspec +23 -0
- metadata +178 -0
@@ -0,0 +1,25 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Define an application-wide content security policy
|
4
|
+
# For further information see the following documentation
|
5
|
+
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
|
6
|
+
|
7
|
+
# Rails.application.config.content_security_policy do |policy|
|
8
|
+
# policy.default_src :self, :https
|
9
|
+
# policy.font_src :self, :https, :data
|
10
|
+
# policy.img_src :self, :https, :data
|
11
|
+
# policy.object_src :none
|
12
|
+
# policy.script_src :self, :https
|
13
|
+
# policy.style_src :self, :https
|
14
|
+
|
15
|
+
# # Specify URI for violation reports
|
16
|
+
# # policy.report_uri "/csp-violation-report-endpoint"
|
17
|
+
# end
|
18
|
+
|
19
|
+
# If you are using UJS then enable automatic nonce generation
|
20
|
+
# Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) }
|
21
|
+
|
22
|
+
# Report CSP violations to a specified URI
|
23
|
+
# For further information see the following documentation:
|
24
|
+
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only
|
25
|
+
# Rails.application.config.content_security_policy_report_only = true
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Add new inflection rules using the following format. Inflections
|
4
|
+
# are locale specific, and you may define rules for as many different
|
5
|
+
# locales as you wish. All of these examples are active by default:
|
6
|
+
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
7
|
+
# inflect.plural /^(ox)$/i, '\1en'
|
8
|
+
# inflect.singular /^(ox)en/i, '\1'
|
9
|
+
# inflect.irregular 'person', 'people'
|
10
|
+
# inflect.uncountable %w( fish sheep )
|
11
|
+
# end
|
12
|
+
|
13
|
+
# These inflection rules are supported but not enabled by default:
|
14
|
+
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
15
|
+
# inflect.acronym 'RESTful'
|
16
|
+
# end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# This file contains settings for ActionController::ParamsWrapper which
|
4
|
+
# is enabled by default.
|
5
|
+
|
6
|
+
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
7
|
+
ActiveSupport.on_load(:action_controller) do
|
8
|
+
wrap_parameters format: [:json]
|
9
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# Files in the config/locales directory are used for internationalization
|
2
|
+
# and are automatically loaded by Rails. If you want to use locales other
|
3
|
+
# than English, add the necessary files in this directory.
|
4
|
+
#
|
5
|
+
# To use the locales, use `I18n.t`:
|
6
|
+
#
|
7
|
+
# I18n.t 'hello'
|
8
|
+
#
|
9
|
+
# In views, this is aliased to just `t`:
|
10
|
+
#
|
11
|
+
# <%= t('hello') %>
|
12
|
+
#
|
13
|
+
# To use a different locale, set it with `I18n.locale`:
|
14
|
+
#
|
15
|
+
# I18n.locale = :es
|
16
|
+
#
|
17
|
+
# This would use the information in config/locales/es.yml.
|
18
|
+
#
|
19
|
+
# The following keys must be escaped otherwise they will not be retrieved by
|
20
|
+
# the default I18n backend:
|
21
|
+
#
|
22
|
+
# true, false, on, off, yes, no
|
23
|
+
#
|
24
|
+
# Instead, surround them with single quotes.
|
25
|
+
#
|
26
|
+
# en:
|
27
|
+
# 'true': 'foo'
|
28
|
+
#
|
29
|
+
# To learn more, please read the Rails Internationalization guide
|
30
|
+
# available at http://guides.rubyonrails.org/i18n.html.
|
31
|
+
|
32
|
+
en:
|
33
|
+
hello: "Hello world"
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# Puma can serve each request in a thread from an internal thread pool.
|
2
|
+
# The `threads` method setting takes two numbers: a minimum and maximum.
|
3
|
+
# Any libraries that use thread pools should be configured to match
|
4
|
+
# the maximum value specified for Puma. Default is set to 5 threads for minimum
|
5
|
+
# and maximum; this matches the default thread size of Active Record.
|
6
|
+
#
|
7
|
+
threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }
|
8
|
+
threads threads_count, threads_count
|
9
|
+
|
10
|
+
# Specifies the `port` that Puma will listen on to receive requests; default is 3000.
|
11
|
+
#
|
12
|
+
port ENV.fetch("PORT") { 3000 }
|
13
|
+
|
14
|
+
# Specifies the `environment` that Puma will run in.
|
15
|
+
#
|
16
|
+
environment ENV.fetch("RAILS_ENV") { "development" }
|
17
|
+
|
18
|
+
# Specifies the number of `workers` to boot in clustered mode.
|
19
|
+
# Workers are forked webserver processes. If using threads and workers together
|
20
|
+
# the concurrency of the application would be max `threads` * `workers`.
|
21
|
+
# Workers do not work on JRuby or Windows (both of which do not support
|
22
|
+
# processes).
|
23
|
+
#
|
24
|
+
# workers ENV.fetch("WEB_CONCURRENCY") { 2 }
|
25
|
+
|
26
|
+
# Use the `preload_app!` method when specifying a `workers` number.
|
27
|
+
# This directive tells Puma to first boot the application and load code
|
28
|
+
# before forking the application. This takes advantage of Copy On Write
|
29
|
+
# process behavior so workers use less memory.
|
30
|
+
#
|
31
|
+
# preload_app!
|
32
|
+
|
33
|
+
# Allow puma to be restarted by `rails restart` command.
|
34
|
+
plugin :tmp_restart
|
File without changes
|
File without changes
|
data/test/test_helper.rb
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
# Configure Rails Environment
|
2
|
+
ENV['RAILS_ENV'] = 'test'
|
3
|
+
|
4
|
+
require File.expand_path("../../test/dummy/config/environment.rb", __FILE__)
|
5
|
+
require 'rails/test_help'
|
6
|
+
require 'workarea/test_help'
|
7
|
+
|
8
|
+
# Filter out Minitest backtrace while allowing backtrace from other libraries
|
9
|
+
# to be shown.
|
10
|
+
Minitest.backtrace_filter = Minitest::BacktraceFilter.new
|
@@ -0,0 +1,23 @@
|
|
1
|
+
$:.push File.expand_path("lib", __dir__)
|
2
|
+
|
3
|
+
# Maintain your gem's version:
|
4
|
+
require "workarea/magento_migrator/version"
|
5
|
+
|
6
|
+
# Describe your gem and declare its dependencies:
|
7
|
+
Gem::Specification.new do |spec|
|
8
|
+
spec.name = "workarea-magento_migrator"
|
9
|
+
spec.version = Workarea::MagentoMigrator::VERSION
|
10
|
+
spec.authors = ["Gajendra Jena"]
|
11
|
+
spec.email = ["gajendra.j@trikatechnologies.com"]
|
12
|
+
spec.homepage = ""
|
13
|
+
spec.summary = "Magento Data Migration to Workarea"
|
14
|
+
spec.description = "Magento 1.9.x Data Migration plugin for the Workarea platform."
|
15
|
+
spec.license = "Business Software License"
|
16
|
+
|
17
|
+
spec.files = `git ls-files`.split("\n")
|
18
|
+
|
19
|
+
spec.add_dependency 'workarea', '~> 3.5.4'
|
20
|
+
spec.add_dependency 'mysql2', '~> 0.5.3'
|
21
|
+
spec.add_dependency 'eventmachine', '~> 1.2.7'
|
22
|
+
|
23
|
+
end
|
metadata
ADDED
@@ -0,0 +1,178 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: workarea-magento_migrator
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0.pre
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Gajendra Jena
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-02-23 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: workarea
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 3.5.4
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 3.5.4
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: mysql2
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.5.3
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.5.3
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: eventmachine
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 1.2.7
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 1.2.7
|
55
|
+
description: Magento 1.9.x Data Migration plugin for the Workarea platform.
|
56
|
+
email:
|
57
|
+
- gajendra.j@trikatechnologies.com
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- ".gitignore"
|
63
|
+
- ".ruby-gemset"
|
64
|
+
- Gemfile
|
65
|
+
- LICENSE
|
66
|
+
- README.md
|
67
|
+
- Rakefile
|
68
|
+
- app/assets/images/workarea/admin/magento_data_migration/.keep
|
69
|
+
- app/assets/images/workarea/storefront/magento_data_migration/.keep
|
70
|
+
- app/assets/javascripts/workarea/admin/magento_data_migration/.keep
|
71
|
+
- app/assets/javascripts/workarea/storefront/magento_data_migration/.keep
|
72
|
+
- app/assets/stylesheets/workarea/admin/magento_data_migration/.keep
|
73
|
+
- app/assets/stylesheets/workarea/storefront/magento_data_migration/.keep
|
74
|
+
- app/controllers/.keep
|
75
|
+
- app/helpers/.keep
|
76
|
+
- app/mailers/.keep
|
77
|
+
- app/models/.keep
|
78
|
+
- app/models/workarea/magento_customer.rb
|
79
|
+
- app/models/workarea/user.decorator
|
80
|
+
- app/views/.keep
|
81
|
+
- bin/magento_migrator
|
82
|
+
- bin/rails
|
83
|
+
- config/data/catalog_category.yml
|
84
|
+
- config/data/catalog_product.yml
|
85
|
+
- config/initializers/workarea.rb
|
86
|
+
- config/routes.rb
|
87
|
+
- data/categories.json
|
88
|
+
- data/content_pages.json
|
89
|
+
- data/taxons.json
|
90
|
+
- dump.rdb
|
91
|
+
- fields_for_magento_modules.md
|
92
|
+
- lib/field-mapping/fields_for_magento_customer_module.md
|
93
|
+
- lib/field-mapping/fields_for_workarea_customer_module.md
|
94
|
+
- lib/sql/magento_customer.sql
|
95
|
+
- lib/sql/magento_products.sql
|
96
|
+
- lib/tasks/catalog_catagories.rake
|
97
|
+
- lib/tasks/customers.rake
|
98
|
+
- lib/tasks/products.rake
|
99
|
+
- lib/tasks/workarea/import_magento_content.rake
|
100
|
+
- lib/workarea/magento_migrator.rb
|
101
|
+
- lib/workarea/magento_migrator/catalog_category.rb
|
102
|
+
- lib/workarea/magento_migrator/catalog_product.rb
|
103
|
+
- lib/workarea/magento_migrator/engine.rb
|
104
|
+
- lib/workarea/magento_migrator/magento_base.rb
|
105
|
+
- lib/workarea/magento_migrator/sql_connection.rb
|
106
|
+
- lib/workarea/magento_migrator/version.rb
|
107
|
+
- test/dummy/.ruby-version
|
108
|
+
- test/dummy/Rakefile
|
109
|
+
- test/dummy/app/assets/config/manifest.js
|
110
|
+
- test/dummy/app/assets/images/.keep
|
111
|
+
- test/dummy/app/assets/javascripts/application.js
|
112
|
+
- test/dummy/app/assets/stylesheets/application.css
|
113
|
+
- test/dummy/app/controllers/application_controller.rb
|
114
|
+
- test/dummy/app/controllers/concerns/.keep
|
115
|
+
- test/dummy/app/helpers/application_helper.rb
|
116
|
+
- test/dummy/app/jobs/application_job.rb
|
117
|
+
- test/dummy/app/mailers/application_mailer.rb
|
118
|
+
- test/dummy/app/models/concerns/.keep
|
119
|
+
- test/dummy/app/views/layouts/application.html.erb
|
120
|
+
- test/dummy/app/views/layouts/mailer.html.erb
|
121
|
+
- test/dummy/app/views/layouts/mailer.text.erb
|
122
|
+
- test/dummy/bin/bundle
|
123
|
+
- test/dummy/bin/rails
|
124
|
+
- test/dummy/bin/rake
|
125
|
+
- test/dummy/bin/setup
|
126
|
+
- test/dummy/bin/update
|
127
|
+
- test/dummy/config.ru
|
128
|
+
- test/dummy/config/application.rb
|
129
|
+
- test/dummy/config/boot.rb
|
130
|
+
- test/dummy/config/environment.rb
|
131
|
+
- test/dummy/config/environments/development.rb
|
132
|
+
- test/dummy/config/environments/production.rb
|
133
|
+
- test/dummy/config/environments/test.rb
|
134
|
+
- test/dummy/config/initializers/application_controller_renderer.rb
|
135
|
+
- test/dummy/config/initializers/assets.rb
|
136
|
+
- test/dummy/config/initializers/backtrace_silencers.rb
|
137
|
+
- test/dummy/config/initializers/content_security_policy.rb
|
138
|
+
- test/dummy/config/initializers/cookies_serializer.rb
|
139
|
+
- test/dummy/config/initializers/filter_parameter_logging.rb
|
140
|
+
- test/dummy/config/initializers/inflections.rb
|
141
|
+
- test/dummy/config/initializers/mime_types.rb
|
142
|
+
- test/dummy/config/initializers/workarea.rb
|
143
|
+
- test/dummy/config/initializers/wrap_parameters.rb
|
144
|
+
- test/dummy/config/locales/en.yml
|
145
|
+
- test/dummy/config/puma.rb
|
146
|
+
- test/dummy/config/routes.rb
|
147
|
+
- test/dummy/config/spring.rb
|
148
|
+
- test/dummy/db/seeds.rb
|
149
|
+
- test/dummy/lib/assets/.keep
|
150
|
+
- test/dummy/log/.keep
|
151
|
+
- test/teaspoon_env.rb
|
152
|
+
- test/test_helper.rb
|
153
|
+
- test/workarea/magento_migrator/catalog_product_test.rb
|
154
|
+
- workarea-magento_migrator.gemspec
|
155
|
+
homepage: ''
|
156
|
+
licenses:
|
157
|
+
- Business Software License
|
158
|
+
metadata: {}
|
159
|
+
post_install_message:
|
160
|
+
rdoc_options: []
|
161
|
+
require_paths:
|
162
|
+
- lib
|
163
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
164
|
+
requirements:
|
165
|
+
- - ">="
|
166
|
+
- !ruby/object:Gem::Version
|
167
|
+
version: '0'
|
168
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
169
|
+
requirements:
|
170
|
+
- - ">"
|
171
|
+
- !ruby/object:Gem::Version
|
172
|
+
version: 1.3.1
|
173
|
+
requirements: []
|
174
|
+
rubygems_version: 3.0.6
|
175
|
+
signing_key:
|
176
|
+
specification_version: 4
|
177
|
+
summary: Magento Data Migration to Workarea
|
178
|
+
test_files: []
|