solidus_product_feed 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.circleci/config.yml +35 -0
- data/.gem_release.yml +5 -0
- data/.github/stale.yml +17 -0
- data/.gitignore +10 -2
- data/.rspec +2 -1
- data/.rubocop.yml +3 -149
- data/.rubocop_todo.yml +50 -0
- data/CHANGELOG.md +63 -0
- data/Gemfile +28 -9
- data/LICENSE +2 -2
- data/README.md +71 -26
- data/Rakefile +4 -19
- data/app/decorators/controllers/solidus_product_feed/spree/products_controller_decorator.rb +25 -0
- data/app/models/spree/feed_product.rb +39 -10
- data/app/overrides/rss_link.rb +2 -0
- data/app/views/spree/products/index.rss.builder +10 -12
- data/bin/console +17 -0
- data/bin/r +13 -0
- data/bin/rails +15 -0
- data/bin/rake +7 -0
- data/bin/sandbox +84 -0
- data/bin/sandbox_rails +18 -0
- data/bin/setup +8 -0
- data/config/locales/en.yml +5 -0
- data/config/routes.rb +3 -1
- data/lib/generators/solidus_product_feed/install/install_generator.rb +6 -8
- data/lib/solidus_product_feed.rb +42 -1
- data/lib/solidus_product_feed/engine.rb +9 -10
- data/lib/solidus_product_feed/factories.rb +4 -0
- data/lib/solidus_product_feed/version.rb +3 -1
- data/lib/spree_product_feed.rb +2 -0
- data/solidus_product_feed.gemspec +36 -30
- data/spec/controllers/products_controller_spec.rb +14 -2
- data/spec/models/spree/feed_product_spec.rb +10 -1
- data/spec/spec_helper.rb +23 -13
- data/spec/support/devise.rb +5 -0
- metadata +53 -92
- data/.travis.yml +0 -21
- data/Guardfile +0 -10
- data/app/assets/javascripts/admin/solidus_product_feed.js +0 -1
- data/app/assets/javascripts/spree/backend/solidus_product_feed.js +0 -0
- data/app/assets/javascripts/spree/backend/spree_product_feed.js +0 -0
- data/app/assets/javascripts/spree/frontend/solidus_product_feed.js +0 -0
- data/app/assets/javascripts/spree/frontend/spree_product_feed.js +0 -0
- data/app/assets/javascripts/store/solidus_product_feed.js +0 -1
- data/app/assets/stylesheets/admin/solidus_product_feed.css +0 -3
- data/app/assets/stylesheets/spree/backend/solidus_product_feed.css +0 -0
- data/app/assets/stylesheets/spree/backend/spree_product_feed.css +0 -0
- data/app/assets/stylesheets/spree/frontend/solidus_product_feed.css +0 -0
- data/app/assets/stylesheets/spree/frontend/spree_product_feed.css +0 -0
- data/app/assets/stylesheets/store/solidus_product_feed.css +0 -3
- data/app/controllers/spree/products_controller_decorator.rb +0 -18
- data/script/rails +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: ce324fceb2c25c2e9099d69ba76e0b03ea5dd00ff02447a87b12d662dc694aa6
|
4
|
+
data.tar.gz: 2bf5fd20d9dcdf286391e33fe4376118e49e86341ad5a6cdf871a4f1f6d76da6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2bd0231bb2fa56111602ee89dc001ad6303868812626700edf908ab52793b40d74249098a436c8174a26a5a3349473817c406fb9579d6602dce3ad64129913b5
|
7
|
+
data.tar.gz: db7f8948fd6bf0952cce55e5356ccd0cd857a6c2d25f1f445889535a69dcc4910590d1b418af57e09044f3b1a676d556b605e9f451264977c2364739d6d20141
|
@@ -0,0 +1,35 @@
|
|
1
|
+
version: 2.1
|
2
|
+
|
3
|
+
orbs:
|
4
|
+
# Always take the latest version of the orb, this allows us to
|
5
|
+
# run specs against Solidus supported versions only without the need
|
6
|
+
# to change this configuration every time a Solidus version is released
|
7
|
+
# or goes EOL.
|
8
|
+
solidusio_extensions: solidusio/extensions@volatile
|
9
|
+
|
10
|
+
jobs:
|
11
|
+
run-specs-with-postgres:
|
12
|
+
executor: solidusio_extensions/postgres
|
13
|
+
steps:
|
14
|
+
- solidusio_extensions/run-tests
|
15
|
+
run-specs-with-mysql:
|
16
|
+
executor: solidusio_extensions/mysql
|
17
|
+
steps:
|
18
|
+
- solidusio_extensions/run-tests
|
19
|
+
|
20
|
+
workflows:
|
21
|
+
"Run specs on supported Solidus versions":
|
22
|
+
jobs:
|
23
|
+
- run-specs-with-postgres
|
24
|
+
- run-specs-with-mysql
|
25
|
+
"Weekly run specs against master":
|
26
|
+
triggers:
|
27
|
+
- schedule:
|
28
|
+
cron: "0 0 * * 4" # every Thursday
|
29
|
+
filters:
|
30
|
+
branches:
|
31
|
+
only:
|
32
|
+
- master
|
33
|
+
jobs:
|
34
|
+
- run-specs-with-postgres
|
35
|
+
- run-specs-with-mysql
|
data/.gem_release.yml
ADDED
data/.github/stale.yml
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
# Number of days of inactivity before an issue becomes stale
|
2
|
+
daysUntilStale: 60
|
3
|
+
# Number of days of inactivity before a stale issue is closed
|
4
|
+
daysUntilClose: 7
|
5
|
+
# Issues with these labels will never be considered stale
|
6
|
+
exemptLabels:
|
7
|
+
- pinned
|
8
|
+
- security
|
9
|
+
# Label to use when marking an issue as stale
|
10
|
+
staleLabel: wontfix
|
11
|
+
# Comment to post when marking an issue as stale. Set to `false` to disable
|
12
|
+
markComment: >
|
13
|
+
This issue has been automatically marked as stale because it has not had
|
14
|
+
recent activity. It will be closed if no further activity occurs. Thank you
|
15
|
+
for your contributions.
|
16
|
+
# Comment to post when closing a stale issue. Set to `false` to disable
|
17
|
+
closeComment: false
|
data/.gitignore
CHANGED
@@ -1,12 +1,20 @@
|
|
1
|
+
*.gem
|
1
2
|
\#*
|
2
3
|
*~
|
3
4
|
.#*
|
4
5
|
.DS_Store
|
5
6
|
.idea
|
6
7
|
.project
|
8
|
+
.sass-cache
|
9
|
+
coverage
|
10
|
+
Gemfile.lock
|
7
11
|
tmp
|
8
12
|
nbproject
|
13
|
+
pkg
|
9
14
|
*.swp
|
10
15
|
spec/dummy
|
11
|
-
|
12
|
-
|
16
|
+
spec/examples.txt
|
17
|
+
/sandbox
|
18
|
+
.rvmrc
|
19
|
+
.ruby-version
|
20
|
+
.ruby-gemset
|
data/.rspec
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
--
|
1
|
+
--color
|
2
|
+
--require spec_helper
|
data/.rubocop.yml
CHANGED
@@ -1,150 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
- spec/dummy/**/*
|
4
|
-
- script/*
|
5
|
-
- Guardfile
|
6
|
-
- vendor/**/*
|
1
|
+
require:
|
2
|
+
- solidus_dev_support/rubocop
|
7
3
|
|
8
|
-
|
9
|
-
Enabled: false
|
10
|
-
|
11
|
-
# Relaxed.Ruby.Style
|
12
|
-
|
13
|
-
Style/Alias:
|
14
|
-
Enabled: false
|
15
|
-
StyleGuide: http://relaxed.ruby.style/#stylealias
|
16
|
-
|
17
|
-
Style/BeginBlock:
|
18
|
-
Enabled: false
|
19
|
-
StyleGuide: http://relaxed.ruby.style/#stylebeginblock
|
20
|
-
|
21
|
-
Style/BlockDelimiters:
|
22
|
-
Enabled: false
|
23
|
-
StyleGuide: http://relaxed.ruby.style/#styleblockdelimiters
|
24
|
-
|
25
|
-
Style/Documentation:
|
26
|
-
Enabled: false
|
27
|
-
StyleGuide: http://relaxed.ruby.style/#styledocumentation
|
28
|
-
|
29
|
-
Style/DotPosition:
|
30
|
-
Enabled: false
|
31
|
-
StyleGuide: http://relaxed.ruby.style/#styledotposition
|
32
|
-
|
33
|
-
Style/DoubleNegation:
|
34
|
-
Enabled: false
|
35
|
-
StyleGuide: http://relaxed.ruby.style/#styledoublenegation
|
36
|
-
|
37
|
-
Style/EndBlock:
|
38
|
-
Enabled: false
|
39
|
-
StyleGuide: http://relaxed.ruby.style/#styleendblock
|
40
|
-
|
41
|
-
Style/FormatString:
|
42
|
-
Enabled: false
|
43
|
-
StyleGuide: http://relaxed.ruby.style/#styleformatstring
|
44
|
-
|
45
|
-
Style/IfUnlessModifier:
|
46
|
-
Enabled: false
|
47
|
-
StyleGuide: http://relaxed.ruby.style/#styleifunlessmodifier
|
48
|
-
|
49
|
-
Style/Lambda:
|
50
|
-
Enabled: false
|
51
|
-
StyleGuide: http://relaxed.ruby.style/#stylelambda
|
52
|
-
|
53
|
-
Style/ModuleFunction:
|
54
|
-
Enabled: false
|
55
|
-
StyleGuide: http://relaxed.ruby.style/#stylemodulefunction
|
56
|
-
|
57
|
-
Style/MultilineBlockChain:
|
58
|
-
Enabled: false
|
59
|
-
StyleGuide: http://relaxed.ruby.style/#stylemultilineblockchain
|
60
|
-
|
61
|
-
Style/NegatedIf:
|
62
|
-
Enabled: false
|
63
|
-
StyleGuide: http://relaxed.ruby.style/#stylenegatedif
|
64
|
-
|
65
|
-
Style/NegatedWhile:
|
66
|
-
Enabled: false
|
67
|
-
StyleGuide: http://relaxed.ruby.style/#stylenegatedwhile
|
68
|
-
|
69
|
-
Style/ParallelAssignment:
|
70
|
-
Enabled: false
|
71
|
-
StyleGuide: http://relaxed.ruby.style/#styleparallelassignment
|
72
|
-
|
73
|
-
Style/PercentLiteralDelimiters:
|
74
|
-
Enabled: false
|
75
|
-
StyleGuide: http://relaxed.ruby.style/#stylepercentliteraldelimiters
|
76
|
-
|
77
|
-
Style/PerlBackrefs:
|
78
|
-
Enabled: false
|
79
|
-
StyleGuide: http://relaxed.ruby.style/#styleperlbackrefs
|
80
|
-
|
81
|
-
Style/Semicolon:
|
82
|
-
Enabled: false
|
83
|
-
StyleGuide: http://relaxed.ruby.style/#stylesemicolon
|
84
|
-
|
85
|
-
Style/SignalException:
|
86
|
-
Enabled: false
|
87
|
-
StyleGuide: http://relaxed.ruby.style/#stylesignalexception
|
88
|
-
|
89
|
-
Style/SingleLineBlockParams:
|
90
|
-
Enabled: false
|
91
|
-
StyleGuide: http://relaxed.ruby.style/#stylesinglelineblockparams
|
92
|
-
|
93
|
-
Style/SingleLineMethods:
|
94
|
-
Enabled: false
|
95
|
-
StyleGuide: http://relaxed.ruby.style/#stylesinglelinemethods
|
96
|
-
|
97
|
-
Style/SpaceBeforeBlockBraces:
|
98
|
-
Enabled: false
|
99
|
-
StyleGuide: http://relaxed.ruby.style/#stylespacebeforeblockbraces
|
100
|
-
|
101
|
-
Style/SpaceInsideParens:
|
102
|
-
Enabled: false
|
103
|
-
StyleGuide: http://relaxed.ruby.style/#stylespaceinsideparens
|
104
|
-
|
105
|
-
Style/SpecialGlobalVars:
|
106
|
-
Enabled: false
|
107
|
-
StyleGuide: http://relaxed.ruby.style/#stylespecialglobalvars
|
108
|
-
|
109
|
-
Style/StringLiterals:
|
110
|
-
Enabled: false
|
111
|
-
StyleGuide: http://relaxed.ruby.style/#stylestringliterals
|
112
|
-
|
113
|
-
Style/WhileUntilModifier:
|
114
|
-
Enabled: false
|
115
|
-
StyleGuide: http://relaxed.ruby.style/#stylewhileuntilmodifier
|
116
|
-
|
117
|
-
Lint/AmbiguousRegexpLiteral:
|
118
|
-
Enabled: false
|
119
|
-
StyleGuide: http://relaxed.ruby.style/#lintambiguousregexpliteral
|
120
|
-
|
121
|
-
Lint/AssignmentInCondition:
|
122
|
-
Enabled: false
|
123
|
-
StyleGuide: http://relaxed.ruby.style/#lintassignmentincondition
|
124
|
-
|
125
|
-
Metrics/AbcSize:
|
126
|
-
Enabled: false
|
127
|
-
|
128
|
-
Metrics/BlockNesting:
|
129
|
-
Enabled: false
|
130
|
-
|
131
|
-
Metrics/ClassLength:
|
132
|
-
Enabled: false
|
133
|
-
|
134
|
-
Metrics/ModuleLength:
|
135
|
-
Enabled: false
|
136
|
-
|
137
|
-
Metrics/CyclomaticComplexity:
|
138
|
-
Enabled: false
|
139
|
-
|
140
|
-
Metrics/LineLength:
|
141
|
-
Enabled: false
|
142
|
-
|
143
|
-
Metrics/MethodLength:
|
144
|
-
Enabled: false
|
145
|
-
|
146
|
-
Metrics/ParameterLists:
|
147
|
-
Enabled: false
|
148
|
-
|
149
|
-
Metrics/PerceivedComplexity:
|
150
|
-
Enabled: false
|
4
|
+
inherit_from: .rubocop_todo.yml
|
data/.rubocop_todo.yml
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
# This configuration was generated by
|
2
|
+
# `rubocop --auto-gen-config`
|
3
|
+
# on 2020-01-23 16:16:15 +0100 using RuboCop version 0.76.0.
|
4
|
+
# The point is for the user to remove these configuration records
|
5
|
+
# one by one as the offenses are removed from the code base.
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
8
|
+
|
9
|
+
# Offense count: 1
|
10
|
+
Lint/InterpolationCheck:
|
11
|
+
Exclude:
|
12
|
+
- 'app/overrides/rss_link.rb'
|
13
|
+
|
14
|
+
# Offense count: 1
|
15
|
+
# Cop supports --auto-correct.
|
16
|
+
Lint/RedundantCopDisableDirective:
|
17
|
+
Exclude:
|
18
|
+
- 'solidus_product_feed.gemspec'
|
19
|
+
|
20
|
+
# Offense count: 2
|
21
|
+
# Configuration parameters: Prefixes.
|
22
|
+
# Prefixes: when, with, without
|
23
|
+
RSpec/ContextWording:
|
24
|
+
Exclude:
|
25
|
+
- 'spec/controllers/products_controller_spec.rb'
|
26
|
+
|
27
|
+
# Offense count: 1
|
28
|
+
# Configuration parameters: CustomTransform, IgnoreMethods.
|
29
|
+
RSpec/FilePath:
|
30
|
+
Exclude:
|
31
|
+
- 'spec/controllers/products_controller_spec.rb'
|
32
|
+
|
33
|
+
# Offense count: 2
|
34
|
+
RSpec/LetSetup:
|
35
|
+
Exclude:
|
36
|
+
- 'spec/controllers/products_controller_spec.rb'
|
37
|
+
|
38
|
+
# Offense count: 3
|
39
|
+
# Configuration parameters: IgnoreSharedExamples.
|
40
|
+
RSpec/NamedSubject:
|
41
|
+
Exclude:
|
42
|
+
- 'spec/controllers/products_controller_spec.rb'
|
43
|
+
- 'spec/models/spree/feed_product_spec.rb'
|
44
|
+
|
45
|
+
# Offense count: 4
|
46
|
+
# Cop supports --auto-correct.
|
47
|
+
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
48
|
+
# URISchemes: http, https
|
49
|
+
Metrics/LineLength:
|
50
|
+
Max: 152
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,63 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
## [Unreleased](https://github.com/solidusio-contrib/solidus_product_feed/tree/HEAD)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/solidusio-contrib/solidus_product_feed/compare/v1.0.0...HEAD)
|
6
|
+
|
7
|
+
**Closed issues:**
|
8
|
+
|
9
|
+
- Dependabot couldn't find a Gemfile-local for this project [\#49](https://github.com/solidusio-contrib/solidus_product_feed/issues/49)
|
10
|
+
- Dependabot can't resolve your Ruby dependency files [\#47](https://github.com/solidusio-contrib/solidus_product_feed/issues/47)
|
11
|
+
- Dependabot can't resolve your Ruby dependency files [\#46](https://github.com/solidusio-contrib/solidus_product_feed/issues/46)
|
12
|
+
- Dependabot can't resolve your Ruby dependency files [\#45](https://github.com/solidusio-contrib/solidus_product_feed/issues/45)
|
13
|
+
- Dependabot can't resolve your Ruby dependency files [\#44](https://github.com/solidusio-contrib/solidus_product_feed/issues/44)
|
14
|
+
- Dependabot can't resolve your Ruby dependency files [\#43](https://github.com/solidusio-contrib/solidus_product_feed/issues/43)
|
15
|
+
- Dependabot can't resolve your Ruby dependency files [\#42](https://github.com/solidusio-contrib/solidus_product_feed/issues/42)
|
16
|
+
- Dependabot can't resolve your Ruby dependency files [\#41](https://github.com/solidusio-contrib/solidus_product_feed/issues/41)
|
17
|
+
- Dependabot can't resolve your Ruby dependency files [\#40](https://github.com/solidusio-contrib/solidus_product_feed/issues/40)
|
18
|
+
|
19
|
+
**Merged pull requests:**
|
20
|
+
|
21
|
+
- Update gem to the latest version of solidus\_dev\_support [\#55](https://github.com/solidusio-contrib/solidus_product_feed/pull/55) ([aldesantis](https://github.com/aldesantis))
|
22
|
+
- Relax solidus\_support dependency [\#53](https://github.com/solidusio-contrib/solidus_product_feed/pull/53) ([kennyadsl](https://github.com/kennyadsl))
|
23
|
+
- Fix Dependabot looking for Gemfile-local [\#51](https://github.com/solidusio-contrib/solidus_product_feed/pull/51) ([aldesantis](https://github.com/aldesantis))
|
24
|
+
- Upgrade the extension using solidus\_dev\_support [\#48](https://github.com/solidusio-contrib/solidus_product_feed/pull/48) ([blocknotes](https://github.com/blocknotes))
|
25
|
+
- Verify Request Format [\#39](https://github.com/solidusio-contrib/solidus_product_feed/pull/39) ([mamhoff](https://github.com/mamhoff))
|
26
|
+
- Adopt solidus\_extension\_dev\_tools [\#38](https://github.com/solidusio-contrib/solidus_product_feed/pull/38) ([aldesantis](https://github.com/aldesantis))
|
27
|
+
- Adopt CircleCI instead of Travis [\#31](https://github.com/solidusio-contrib/solidus_product_feed/pull/31) ([aldesantis](https://github.com/aldesantis))
|
28
|
+
- Update Ruby and Solidus versions [\#30](https://github.com/solidusio-contrib/solidus_product_feed/pull/30) ([aldesantis](https://github.com/aldesantis))
|
29
|
+
- Update travis and rakefile [\#29](https://github.com/solidusio-contrib/solidus_product_feed/pull/29) ([jtapia](https://github.com/jtapia))
|
30
|
+
- Add support for latest Solidus versions [\#27](https://github.com/solidusio-contrib/solidus_product_feed/pull/27) ([jtapia](https://github.com/jtapia))
|
31
|
+
- Dynamic schema [\#26](https://github.com/solidusio-contrib/solidus_product_feed/pull/26) ([aldesantis](https://github.com/aldesantis))
|
32
|
+
- Make feed headers configurable [\#25](https://github.com/solidusio-contrib/solidus_product_feed/pull/25) ([aldesantis](https://github.com/aldesantis))
|
33
|
+
- Add brand and MPN tags for Google Merchant feed [\#24](https://github.com/solidusio-contrib/solidus_product_feed/pull/24) ([aldesantis](https://github.com/aldesantis))
|
34
|
+
- Remove Solidus v2.3 from Travis config \(EOL\) [\#23](https://github.com/solidusio-contrib/solidus_product_feed/pull/23) ([aitbw](https://github.com/aitbw))
|
35
|
+
- Extension maintenance [\#22](https://github.com/solidusio-contrib/solidus_product_feed/pull/22) ([aitbw](https://github.com/aitbw))
|
36
|
+
- Fix specs [\#20](https://github.com/solidusio-contrib/solidus_product_feed/pull/20) ([kennyadsl](https://github.com/kennyadsl))
|
37
|
+
- Remove versions past EOL from .travis.yml [\#19](https://github.com/solidusio-contrib/solidus_product_feed/pull/19) ([jacobherrington](https://github.com/jacobherrington))
|
38
|
+
- Add Solidus 2.7 to .travis.yml [\#18](https://github.com/solidusio-contrib/solidus_product_feed/pull/18) ([jacobherrington](https://github.com/jacobherrington))
|
39
|
+
- Use ffaker instead of faker [\#17](https://github.com/solidusio-contrib/solidus_product_feed/pull/17) ([jhawthorn](https://github.com/jhawthorn))
|
40
|
+
|
41
|
+
## [v1.0.0](https://github.com/solidusio-contrib/solidus_product_feed/tree/v1.0.0) (2016-08-24)
|
42
|
+
|
43
|
+
[Full Changelog](https://github.com/solidusio-contrib/solidus_product_feed/compare/v0.1.0...v1.0.0)
|
44
|
+
|
45
|
+
**Merged pull requests:**
|
46
|
+
|
47
|
+
- Add support for Solidus 2.0 and Rails 5 [\#12](https://github.com/solidusio-contrib/solidus_product_feed/pull/12) ([jhawthorn](https://github.com/jhawthorn))
|
48
|
+
- Bring the feed more in line with the spec [\#10](https://github.com/solidusio-contrib/solidus_product_feed/pull/10) ([jarednorman](https://github.com/jarednorman))
|
49
|
+
- Add a note on versions [\#9](https://github.com/solidusio-contrib/solidus_product_feed/pull/9) ([jhawthorn](https://github.com/jhawthorn))
|
50
|
+
- Extract feed logic to class [\#7](https://github.com/solidusio-contrib/solidus_product_feed/pull/7) ([jarednorman](https://github.com/jarednorman))
|
51
|
+
|
52
|
+
## [v0.1.0](https://github.com/solidusio-contrib/solidus_product_feed/tree/v0.1.0) (2016-05-10)
|
53
|
+
|
54
|
+
[Full Changelog](https://github.com/solidusio-contrib/solidus_product_feed/compare/ab9d93c2af70a24bfb2a7ab75f3fdf33ddaef3aa...v0.1.0)
|
55
|
+
|
56
|
+
**Merged pull requests:**
|
57
|
+
|
58
|
+
- Rename to solidus\_product\_feed [\#4](https://github.com/solidusio-contrib/solidus_product_feed/pull/4) ([Sinetheta](https://github.com/Sinetheta))
|
59
|
+
- Upgrade 2-4-stable to Solidus [\#3](https://github.com/solidusio-contrib/solidus_product_feed/pull/3) ([Sinetheta](https://github.com/Sinetheta))
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
|
data/Gemfile
CHANGED
@@ -1,18 +1,37 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
source 'https://rubygems.org'
|
4
|
+
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
2
5
|
|
3
6
|
branch = ENV.fetch('SOLIDUS_BRANCH', 'master')
|
4
|
-
gem
|
7
|
+
gem 'solidus', github: 'solidusio/solidus', branch: branch
|
8
|
+
|
9
|
+
# Needed to help Bundler figure out how to resolve dependencies,
|
10
|
+
# otherwise it takes forever to resolve them.
|
11
|
+
# See https://github.com/bundler/bundler/issues/6677
|
12
|
+
gem 'rails', '>0.a'
|
13
|
+
|
14
|
+
# Provides basic authentication functionality for testing parts of your engine
|
5
15
|
gem 'solidus_auth_devise'
|
6
16
|
|
7
|
-
|
8
|
-
|
17
|
+
case ENV['DB']
|
18
|
+
when 'mysql'
|
19
|
+
gem 'mysql2'
|
20
|
+
when 'postgresql'
|
21
|
+
gem 'pg'
|
22
|
+
else
|
23
|
+
gem 'sqlite3'
|
9
24
|
end
|
10
25
|
|
11
|
-
|
12
|
-
gem '
|
13
|
-
|
14
|
-
group :development, :test do
|
15
|
-
gem "pry-rails"
|
26
|
+
group :test do
|
27
|
+
gem 'rails-controller-testing'
|
16
28
|
end
|
17
29
|
|
18
30
|
gemspec
|
31
|
+
|
32
|
+
# Use a local Gemfile to include development dependencies that might not be
|
33
|
+
# relevant for the project or for other contributors, e.g. pry-byebug.
|
34
|
+
#
|
35
|
+
# We use `send` instead of calling `eval_gemfile` to work around an issue with
|
36
|
+
# how Dependabot parses projects: https://github.com/dependabot/dependabot-core/issues/1658.
|
37
|
+
send(:eval_gemfile, 'Gemfile-local') if File.exist? 'Gemfile-local'
|
data/LICENSE
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Copyright (c) 2011
|
1
|
+
Copyright (c) 2011 Joshua Nussbaum and other contributors
|
2
2
|
All rights reserved.
|
3
3
|
|
4
4
|
Redistribution and use in source and binary forms, with or without modification,
|
@@ -9,7 +9,7 @@ are permitted provided that the following conditions are met:
|
|
9
9
|
* Redistributions in binary form must reproduce the above copyright notice,
|
10
10
|
this list of conditions and the following disclaimer in the documentation
|
11
11
|
and/or other materials provided with the distribution.
|
12
|
-
* Neither the name
|
12
|
+
* Neither the name Solidus nor the names of its contributors may be used to
|
13
13
|
endorse or promote products derived from this software without specific
|
14
14
|
prior written permission.
|
15
15
|
|
data/README.md
CHANGED
@@ -1,44 +1,89 @@
|
|
1
|
-
Solidus Product Feed
|
2
|
-
================
|
1
|
+
# Solidus Product Feed
|
3
2
|
|
4
|
-
[](https://circleci.com/gh/solidusio-contrib/solidus_product_feed)
|
5
4
|
|
6
|
-
An extension that provides an RSS feed for products. Google
|
7
|
-
An RSS link is automatically appended to the `<head>` tag in the
|
5
|
+
An extension that provides an RSS feed for products. Google Merchant Feed attributes are also
|
6
|
+
implemented. An RSS link is automatically appended to the `<head>` tag in the
|
7
|
+
`layouts/spree_application` file.
|
8
8
|
|
9
|
-
|
10
|
-
================
|
9
|
+
## Installation
|
11
10
|
|
12
|
-
|
13
|
-
The 1.0 version is cleaner, more extensible, and more correct at the expense of compatibility.
|
11
|
+
Add the gem to your `Gemfile`:
|
14
12
|
|
15
|
-
|
13
|
+
```ruby
|
14
|
+
gem 'solidus_product_feed'
|
15
|
+
````
|
16
16
|
|
17
|
+
Install the gem:
|
17
18
|
|
18
|
-
|
19
|
-
|
19
|
+
```console
|
20
|
+
$ bundle install
|
21
|
+
```
|
20
22
|
|
21
|
-
|
23
|
+
You're done! You can now see your RSS feed at `/products.rss`.
|
22
24
|
|
23
|
-
|
25
|
+
## Usage
|
24
26
|
|
25
|
-
|
27
|
+
The feed ships with sensible defaults for your products, but customization is very easy.
|
26
28
|
|
27
|
-
|
29
|
+
### Headers
|
28
30
|
|
29
|
-
|
31
|
+
You can easily change the feed's headers by putting the following in your Rails initializer:
|
30
32
|
|
31
|
-
|
32
|
-
|
33
|
+
```ruby
|
34
|
+
SolidusProductFeed.configure do |config|
|
35
|
+
config.title = 'My Awesome Store'
|
36
|
+
config.link = 'https://www.awesomestore.com'
|
37
|
+
config.description = 'Find out about new products on https://www.awesomestore.com first!'
|
38
|
+
config.language = 'en-us'
|
39
|
+
end
|
40
|
+
```
|
33
41
|
|
34
|
-
|
42
|
+
Note that you can also pass a Proc for each of these options. The Proc will be passed the view
|
43
|
+
context as its only argument, so that you can use all your helpers:
|
35
44
|
|
36
|
-
|
37
|
-
|
45
|
+
```ruby
|
46
|
+
SolidusProductFeed.configure do |config|
|
47
|
+
config.title = -> (view) { view.current_store.name }
|
48
|
+
config.link = -> (view) { "http://#{view.current_store.url}" }
|
49
|
+
config.description = -> (view) { "Find out about new products on http://#{view.current_store.url} first!" }
|
50
|
+
config.language = -> (view) { view.lang_from_store(current_store.language) }
|
51
|
+
end
|
52
|
+
```
|
38
53
|
|
39
|
-
|
54
|
+
### Item schema
|
40
55
|
|
41
|
-
|
42
|
-
|
56
|
+
If you need to alter the XML schema of a product (e.g. to add/remove a tag), you can do it by
|
57
|
+
subclassing `Spree::FeedProduct` in your app and overriding the `schema` method:
|
43
58
|
|
44
|
-
|
59
|
+
```ruby
|
60
|
+
module AwesomeStore
|
61
|
+
class FeedProduct < Spree::FeedProduct
|
62
|
+
def schema
|
63
|
+
super.merge('g:brand' => 'Awesome Store Inc.')
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
```
|
68
|
+
|
69
|
+
Then set your custom class in an initializer:
|
70
|
+
|
71
|
+
```ruby
|
72
|
+
SolidusProductFeed.configure do |config|
|
73
|
+
config.feed_product_class = 'AwesomeStore::FeedProduct'
|
74
|
+
end
|
75
|
+
```
|
76
|
+
|
77
|
+
If you want to change the value of an existing tag, you can also simply override the corresponding
|
78
|
+
tag method (`link`, `price` etc.). Check the [source code](https://github.com/solidusio-contrib/solidus_product_feed/blob/master/app/models/spree/feed_product.rb)
|
79
|
+
for more details.
|
80
|
+
|
81
|
+
## Testing
|
82
|
+
|
83
|
+
Be sure to add the `rspec-rails` gem to your Gemfile and then create a dummy test app for the specs
|
84
|
+
to run against.
|
85
|
+
|
86
|
+
```console
|
87
|
+
$ bundle exec rake test app
|
88
|
+
$ bundle exec rspec spec
|
89
|
+
```
|