mercator_icecat 0.0.1 → 0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.rdoc +11 -0
- data/app/controllers/admin/metadata_controller.rb +14 -0
- data/app/models/mercator_icecat/access.rb +48 -0
- data/app/models/mercator_icecat/metadatum.rb +393 -0
- data/app/models/product_extensions.rb +28 -0
- data/app/views/layouts/mercator_icecat/application.html.erb +10 -11
- data/app/views/taglibs/admin/metadatum.dryml +117 -0
- data/config/routes.rb +4 -1
- data/db/migrate/20131219141435_create_toners.rb +42 -0
- data/db/migrate/20140411135444_change_icecat_metadata.rb +25 -0
- data/db/migrate/20140413123018_add_index_to_prod_id_in_icecat_metadata.rb +9 -0
- data/db/migrate/20140414141008_add_icacat_id_to_product_group.rb +9 -0
- data/db/migrate/20140415111836_add_icecat_id_to_property.rb +9 -0
- data/db/migrate/20140415112033_add_indices_for_icecat_id.rb +13 -0
- data/db/migrate/20140415122523_change_indices.rb +11 -0
- data/db/migrate/20140416065410_add_index_to_icecat_product_id.rb +15 -0
- data/lib/mercator_icecat/engine.rb +10 -1
- data/lib/mercator_icecat/version.rb +2 -2
- data/lib/string_extensions.rb +30 -0
- data/lib/tasks/mercator_icecat_tasks.rake +191 -4
- data/spec/controllers/mercator_icecat/metadata_controller_spec.rb +5 -0
- data/spec/factories/metadatum.rb +18 -0
- data/spec/models/mercator_icecat/metadatum_spec.rb +11 -0
- data/spec/models/product_spec.rb +5 -0
- metadata +79 -85
- data/app/helpers/mercator_icecat/application_helper.rb +0 -4
- data/test/dummy/README.rdoc +0 -28
- data/test/dummy/Rakefile +0 -6
- data/test/dummy/app/assets/javascripts/application.js +0 -13
- data/test/dummy/app/assets/stylesheets/application.css +0 -13
- data/test/dummy/app/controllers/application_controller.rb +0 -5
- data/test/dummy/app/helpers/application_helper.rb +0 -2
- data/test/dummy/app/views/layouts/application.html.erb +0 -14
- data/test/dummy/bin/bundle +0 -3
- data/test/dummy/bin/rails +0 -4
- data/test/dummy/bin/rake +0 -4
- data/test/dummy/config.ru +0 -4
- data/test/dummy/config/application.rb +0 -23
- data/test/dummy/config/boot.rb +0 -5
- data/test/dummy/config/database.yml +0 -25
- data/test/dummy/config/environment.rb +0 -5
- data/test/dummy/config/environments/development.rb +0 -29
- data/test/dummy/config/environments/production.rb +0 -80
- data/test/dummy/config/environments/test.rb +0 -36
- data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/test/dummy/config/initializers/filter_parameter_logging.rb +0 -4
- data/test/dummy/config/initializers/inflections.rb +0 -16
- data/test/dummy/config/initializers/mime_types.rb +0 -5
- data/test/dummy/config/initializers/secret_token.rb +0 -12
- data/test/dummy/config/initializers/session_store.rb +0 -3
- data/test/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/test/dummy/config/locales/en.yml +0 -23
- data/test/dummy/config/routes.rb +0 -4
- data/test/dummy/public/404.html +0 -58
- data/test/dummy/public/422.html +0 -58
- data/test/dummy/public/500.html +0 -57
- data/test/dummy/public/favicon.ico +0 -0
- data/test/integration/navigation_test.rb +0 -10
- data/test/mercator_icecat_test.rb +0 -7
- data/test/test_helper.rb +0 -15
@@ -0,0 +1,18 @@
|
|
1
|
+
# Read about factories at https://github.com/thoughtbot/factory_girl
|
2
|
+
|
3
|
+
FactoryGirl.define do
|
4
|
+
factory :metadatum, :class => 'MercatorIcecat::Metadatum' do
|
5
|
+
path "export/freexml.int/INT/20879456.xml"
|
6
|
+
icecat_updated_at "2014-03-26 12:11:12"
|
7
|
+
quality "ICECAT"
|
8
|
+
supplier_id 1
|
9
|
+
icecat_product_id 20879456
|
10
|
+
prod_id "F0Z52EA"
|
11
|
+
product_number "255 G2"
|
12
|
+
cat_id 151
|
13
|
+
on_market 1
|
14
|
+
model_name "255 G2"
|
15
|
+
product_view 132
|
16
|
+
product
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe MercatorIcecat::Metadatum do
|
4
|
+
it "is valid with path, icecat_updated_at, quality, supplier_id,
|
5
|
+
icecat_product_id, prod_id, product_number, cat_id, on_market, model_name,
|
6
|
+
product_view, product" do
|
7
|
+
expect(build(:metadatum)).to be_valid
|
8
|
+
end
|
9
|
+
|
10
|
+
it {should belong_to(:product)}
|
11
|
+
end
|
metadata
CHANGED
@@ -1,29 +1,71 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mercator_icecat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: '0.1'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefan Haslinger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 4.0
|
19
|
+
version: '4.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 4.0
|
26
|
+
version: '4.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: saxerator
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: try_to
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: factory_girl_rails
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
27
69
|
description: MercatorIcecat interfaces between Mercator and the Icecat Product Catalog
|
28
70
|
in the realm of product properties, attributes, data sheets, images and product
|
29
71
|
relations.
|
@@ -33,53 +75,36 @@ executables: []
|
|
33
75
|
extensions: []
|
34
76
|
extra_rdoc_files: []
|
35
77
|
files:
|
36
|
-
-
|
37
|
-
-
|
78
|
+
- LICENSE
|
79
|
+
- README.rdoc
|
80
|
+
- Rakefile
|
38
81
|
- app/assets/javascripts/mercator_icecat/application.js
|
39
82
|
- app/assets/stylesheets/mercator_icecat/application.css
|
83
|
+
- app/controllers/admin/metadata_controller.rb
|
84
|
+
- app/controllers/mercator_icecat/application_controller.rb
|
85
|
+
- app/models/mercator_icecat/access.rb
|
86
|
+
- app/models/mercator_icecat/metadatum.rb
|
87
|
+
- app/models/product_extensions.rb
|
40
88
|
- app/views/layouts/mercator_icecat/application.html.erb
|
89
|
+
- app/views/taglibs/admin/metadatum.dryml
|
41
90
|
- config/routes.rb
|
42
|
-
-
|
91
|
+
- db/migrate/20131219141435_create_toners.rb
|
92
|
+
- db/migrate/20140411135444_change_icecat_metadata.rb
|
93
|
+
- db/migrate/20140413123018_add_index_to_prod_id_in_icecat_metadata.rb
|
94
|
+
- db/migrate/20140414141008_add_icacat_id_to_product_group.rb
|
95
|
+
- db/migrate/20140415111836_add_icecat_id_to_property.rb
|
96
|
+
- db/migrate/20140415112033_add_indices_for_icecat_id.rb
|
97
|
+
- db/migrate/20140415122523_change_indices.rb
|
98
|
+
- db/migrate/20140416065410_add_index_to_icecat_product_id.rb
|
43
99
|
- lib/mercator_icecat.rb
|
44
|
-
- lib/mercator_icecat/version.rb
|
45
100
|
- lib/mercator_icecat/engine.rb
|
46
|
-
-
|
47
|
-
-
|
48
|
-
-
|
49
|
-
-
|
50
|
-
-
|
51
|
-
-
|
52
|
-
-
|
53
|
-
- test/dummy/bin/bundle
|
54
|
-
- test/dummy/bin/rails
|
55
|
-
- test/dummy/bin/rake
|
56
|
-
- test/dummy/config/database.yml
|
57
|
-
- test/dummy/config/locales/en.yml
|
58
|
-
- test/dummy/config/application.rb
|
59
|
-
- test/dummy/config/routes.rb
|
60
|
-
- test/dummy/config/initializers/backtrace_silencers.rb
|
61
|
-
- test/dummy/config/initializers/session_store.rb
|
62
|
-
- test/dummy/config/initializers/mime_types.rb
|
63
|
-
- test/dummy/config/initializers/inflections.rb
|
64
|
-
- test/dummy/config/initializers/secret_token.rb
|
65
|
-
- test/dummy/config/initializers/wrap_parameters.rb
|
66
|
-
- test/dummy/config/initializers/filter_parameter_logging.rb
|
67
|
-
- test/dummy/config/environments/test.rb
|
68
|
-
- test/dummy/config/environments/development.rb
|
69
|
-
- test/dummy/config/environments/production.rb
|
70
|
-
- test/dummy/config/environment.rb
|
71
|
-
- test/dummy/config/boot.rb
|
72
|
-
- test/dummy/Rakefile
|
73
|
-
- test/dummy/README.rdoc
|
74
|
-
- test/dummy/public/favicon.ico
|
75
|
-
- test/dummy/public/404.html
|
76
|
-
- test/dummy/public/422.html
|
77
|
-
- test/dummy/public/500.html
|
78
|
-
- test/dummy/app/helpers/application_helper.rb
|
79
|
-
- test/dummy/app/controllers/application_controller.rb
|
80
|
-
- test/dummy/app/assets/javascripts/application.js
|
81
|
-
- test/dummy/app/assets/stylesheets/application.css
|
82
|
-
- test/dummy/app/views/layouts/application.html.erb
|
101
|
+
- lib/mercator_icecat/version.rb
|
102
|
+
- lib/string_extensions.rb
|
103
|
+
- lib/tasks/mercator_icecat_tasks.rake
|
104
|
+
- spec/controllers/mercator_icecat/metadata_controller_spec.rb
|
105
|
+
- spec/factories/metadatum.rb
|
106
|
+
- spec/models/mercator_icecat/metadatum_spec.rb
|
107
|
+
- spec/models/product_spec.rb
|
83
108
|
homepage: http://mercator.informatom.com
|
84
109
|
licenses: []
|
85
110
|
metadata: {}
|
@@ -89,54 +114,23 @@ require_paths:
|
|
89
114
|
- lib
|
90
115
|
required_ruby_version: !ruby/object:Gem::Requirement
|
91
116
|
requirements:
|
92
|
-
- -
|
117
|
+
- - ">="
|
93
118
|
- !ruby/object:Gem::Version
|
94
119
|
version: '0'
|
95
120
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
96
121
|
requirements:
|
97
|
-
- -
|
122
|
+
- - ">="
|
98
123
|
- !ruby/object:Gem::Version
|
99
124
|
version: '0'
|
100
125
|
requirements: []
|
101
126
|
rubyforge_project:
|
102
|
-
rubygems_version: 2.
|
127
|
+
rubygems_version: 2.2.2
|
103
128
|
signing_key:
|
104
129
|
specification_version: 4
|
105
130
|
summary: MercatorIcecat provides an Icecat Importer for the Mesonic Guided Selling
|
106
131
|
Application.
|
107
132
|
test_files:
|
108
|
-
-
|
109
|
-
-
|
110
|
-
-
|
111
|
-
-
|
112
|
-
- test/dummy/bin/bundle
|
113
|
-
- test/dummy/bin/rails
|
114
|
-
- test/dummy/bin/rake
|
115
|
-
- test/dummy/config/database.yml
|
116
|
-
- test/dummy/config/locales/en.yml
|
117
|
-
- test/dummy/config/application.rb
|
118
|
-
- test/dummy/config/routes.rb
|
119
|
-
- test/dummy/config/initializers/backtrace_silencers.rb
|
120
|
-
- test/dummy/config/initializers/session_store.rb
|
121
|
-
- test/dummy/config/initializers/mime_types.rb
|
122
|
-
- test/dummy/config/initializers/inflections.rb
|
123
|
-
- test/dummy/config/initializers/secret_token.rb
|
124
|
-
- test/dummy/config/initializers/wrap_parameters.rb
|
125
|
-
- test/dummy/config/initializers/filter_parameter_logging.rb
|
126
|
-
- test/dummy/config/environments/test.rb
|
127
|
-
- test/dummy/config/environments/development.rb
|
128
|
-
- test/dummy/config/environments/production.rb
|
129
|
-
- test/dummy/config/environment.rb
|
130
|
-
- test/dummy/config/boot.rb
|
131
|
-
- test/dummy/Rakefile
|
132
|
-
- test/dummy/README.rdoc
|
133
|
-
- test/dummy/public/favicon.ico
|
134
|
-
- test/dummy/public/404.html
|
135
|
-
- test/dummy/public/422.html
|
136
|
-
- test/dummy/public/500.html
|
137
|
-
- test/dummy/app/helpers/application_helper.rb
|
138
|
-
- test/dummy/app/controllers/application_controller.rb
|
139
|
-
- test/dummy/app/assets/javascripts/application.js
|
140
|
-
- test/dummy/app/assets/stylesheets/application.css
|
141
|
-
- test/dummy/app/views/layouts/application.html.erb
|
142
|
-
has_rdoc:
|
133
|
+
- spec/controllers/mercator_icecat/metadata_controller_spec.rb
|
134
|
+
- spec/factories/metadatum.rb
|
135
|
+
- spec/models/mercator_icecat/metadatum_spec.rb
|
136
|
+
- spec/models/product_spec.rb
|
data/test/dummy/README.rdoc
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
== README
|
2
|
-
|
3
|
-
This README would normally document whatever steps are necessary to get the
|
4
|
-
application up and running.
|
5
|
-
|
6
|
-
Things you may want to cover:
|
7
|
-
|
8
|
-
* Ruby version
|
9
|
-
|
10
|
-
* System dependencies
|
11
|
-
|
12
|
-
* Configuration
|
13
|
-
|
14
|
-
* Database creation
|
15
|
-
|
16
|
-
* Database initialization
|
17
|
-
|
18
|
-
* How to run the test suite
|
19
|
-
|
20
|
-
* Services (job queues, cache servers, search engines, etc.)
|
21
|
-
|
22
|
-
* Deployment instructions
|
23
|
-
|
24
|
-
* ...
|
25
|
-
|
26
|
-
|
27
|
-
Please feel free to use a different markup language if you do not plan to run
|
28
|
-
<tt>rake doc:app</tt>.
|
data/test/dummy/Rakefile
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
-
// listed below.
|
3
|
-
//
|
4
|
-
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
-
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
6
|
-
//
|
7
|
-
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
-
// compiled file.
|
9
|
-
//
|
10
|
-
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
|
11
|
-
// about supported directives.
|
12
|
-
//
|
13
|
-
//= require_tree .
|
@@ -1,13 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
-
* listed below.
|
4
|
-
*
|
5
|
-
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
-
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
7
|
-
*
|
8
|
-
* You're free to add application-wide styles to this file and they'll appear at the top of the
|
9
|
-
* compiled file, but it's generally better to create a new file per style scope.
|
10
|
-
*
|
11
|
-
*= require_self
|
12
|
-
*= require_tree .
|
13
|
-
*/
|
@@ -1,14 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>Dummy</title>
|
5
|
-
<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
|
6
|
-
<%= javascript_include_tag "application", "data-turbolinks-track" => true %>
|
7
|
-
<%= csrf_meta_tags %>
|
8
|
-
</head>
|
9
|
-
<body>
|
10
|
-
|
11
|
-
<%= yield %>
|
12
|
-
|
13
|
-
</body>
|
14
|
-
</html>
|
data/test/dummy/bin/bundle
DELETED
data/test/dummy/bin/rails
DELETED
data/test/dummy/bin/rake
DELETED
data/test/dummy/config.ru
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
require File.expand_path('../boot', __FILE__)
|
2
|
-
|
3
|
-
require 'rails/all'
|
4
|
-
|
5
|
-
Bundler.require(*Rails.groups)
|
6
|
-
require "mercator_icecat"
|
7
|
-
|
8
|
-
module Dummy
|
9
|
-
class Application < Rails::Application
|
10
|
-
# Settings in config/environments/* take precedence over those specified here.
|
11
|
-
# Application configuration should go into files in config/initializers
|
12
|
-
# -- all .rb files in that directory are automatically loaded.
|
13
|
-
|
14
|
-
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
15
|
-
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
16
|
-
# config.time_zone = 'Central Time (US & Canada)'
|
17
|
-
|
18
|
-
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
19
|
-
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
20
|
-
# config.i18n.default_locale = :de
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
data/test/dummy/config/boot.rb
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
# SQLite version 3.x
|
2
|
-
# gem install sqlite3
|
3
|
-
#
|
4
|
-
# Ensure the SQLite 3 gem is defined in your Gemfile
|
5
|
-
# gem 'sqlite3'
|
6
|
-
development:
|
7
|
-
adapter: sqlite3
|
8
|
-
database: db/development.sqlite3
|
9
|
-
pool: 5
|
10
|
-
timeout: 5000
|
11
|
-
|
12
|
-
# Warning: The database defined as "test" will be erased and
|
13
|
-
# re-generated from your development database when you run "rake".
|
14
|
-
# Do not set this db to the same as development or production.
|
15
|
-
test:
|
16
|
-
adapter: sqlite3
|
17
|
-
database: db/test.sqlite3
|
18
|
-
pool: 5
|
19
|
-
timeout: 5000
|
20
|
-
|
21
|
-
production:
|
22
|
-
adapter: sqlite3
|
23
|
-
database: db/production.sqlite3
|
24
|
-
pool: 5
|
25
|
-
timeout: 5000
|