solidus_product_feed 0.1.0 → 1.0.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 +4 -4
- data/.rubocop.yml +150 -0
- data/.travis.yml +16 -6
- data/Gemfile +11 -4
- data/README.md +8 -0
- data/app/controllers/spree/products_controller_decorator.rb +15 -12
- data/app/models/spree/feed_product.rb +39 -0
- data/app/overrides/rss_link.rb +5 -5
- data/app/views/spree/products/index.rss.builder +19 -23
- data/lib/generators/solidus_product_feed/install/install_generator.rb +6 -6
- data/lib/solidus_product_feed/engine.rb +1 -1
- data/lib/solidus_product_feed/version.rb +1 -1
- data/solidus_product_feed.gemspec +6 -3
- data/spec/controllers/products_controller_spec.rb +11 -6
- data/spec/models/spree/feed_product_spec.rb +55 -0
- data/spec/spec_helper.rb +8 -20
- metadata +64 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be2f9f7cc2d18d5a7378987fc39bf1cd8c1d6aeb
|
4
|
+
data.tar.gz: bedae2c876c2da7cc7a7c0fcabcb571d731d196d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44f3c3e13bd3e8edc0bee99561ffa9949fa0c71975b1dd4b4b98d4987b16b3f01d02eeff2d3bdccc3d48eb885e1bea5dd0927696957a2209c1f13b2462a2f1bf
|
7
|
+
data.tar.gz: 0ca8f25a3f15966b8df37d5c697d35f686d7143a06cb9e1331f6777d625a330d7e600189e6c3498270e73d0eb171f54e9a1440f33388f1b401ab9140d8b9d545
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,150 @@
|
|
1
|
+
AllCops:
|
2
|
+
Exclude:
|
3
|
+
- spec/dummy/**/*
|
4
|
+
- script/*
|
5
|
+
- Guardfile
|
6
|
+
- vendor/**/*
|
7
|
+
|
8
|
+
Style/MutableConstant:
|
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
|
data/.travis.yml
CHANGED
@@ -1,11 +1,21 @@
|
|
1
1
|
sudo: false
|
2
|
+
cache: bundler
|
2
3
|
language: ruby
|
3
4
|
rvm:
|
4
|
-
- 2.3.
|
5
|
+
- 2.3.1
|
5
6
|
env:
|
6
7
|
matrix:
|
7
|
-
- SOLIDUS_BRANCH=v1.0
|
8
|
-
- SOLIDUS_BRANCH=v1.1
|
9
|
-
- SOLIDUS_BRANCH=v1.2
|
10
|
-
- SOLIDUS_BRANCH=v1.3
|
11
|
-
- SOLIDUS_BRANCH=
|
8
|
+
- SOLIDUS_BRANCH=v1.0 DB=postgres
|
9
|
+
- SOLIDUS_BRANCH=v1.1 DB=postgres
|
10
|
+
- SOLIDUS_BRANCH=v1.2 DB=postgres
|
11
|
+
- SOLIDUS_BRANCH=v1.3 DB=postgres
|
12
|
+
- SOLIDUS_BRANCH=v1.4 DB=postgres
|
13
|
+
- SOLIDUS_BRANCH=v2.0 DB=postgres
|
14
|
+
- SOLIDUS_BRANCH=master DB=postgres
|
15
|
+
- SOLIDUS_BRANCH=v1.0 DB=mysql
|
16
|
+
- SOLIDUS_BRANCH=v1.1 DB=mysql
|
17
|
+
- SOLIDUS_BRANCH=v1.2 DB=mysql
|
18
|
+
- SOLIDUS_BRANCH=v1.3 DB=mysql
|
19
|
+
- SOLIDUS_BRANCH=v1.4 DB=mysql
|
20
|
+
- SOLIDUS_BRANCH=v2.0 DB=mysql
|
21
|
+
- SOLIDUS_BRANCH=master DB=mysql
|
data/Gemfile
CHANGED
@@ -1,11 +1,18 @@
|
|
1
|
-
source
|
1
|
+
source "https://rubygems.org"
|
2
2
|
|
3
3
|
branch = ENV.fetch('SOLIDUS_BRANCH', 'master')
|
4
|
-
gem
|
4
|
+
gem "solidus", github: "solidusio/solidus", branch: branch
|
5
|
+
gem 'solidus_auth_devise'
|
6
|
+
|
7
|
+
if branch == 'master' || branch >= "v2.0"
|
8
|
+
gem "rails-controller-testing", group: :test
|
9
|
+
end
|
10
|
+
|
11
|
+
gem 'pg'
|
12
|
+
gem 'mysql2'
|
5
13
|
|
6
|
-
# Provides basic authentication functionality for testing parts of your engine
|
7
14
|
group :development, :test do
|
8
|
-
gem
|
15
|
+
gem "pry-rails"
|
9
16
|
end
|
10
17
|
|
11
18
|
gemspec
|
data/README.md
CHANGED
@@ -6,6 +6,14 @@ Solidus Product Feed
|
|
6
6
|
An extension that provides an RSS feed for products. Google Shopper attributes are also implemented.
|
7
7
|
An RSS link is automatically appended to the `<head>` tag in the `layouts/spree_application` file.
|
8
8
|
|
9
|
+
Note on Versions
|
10
|
+
================
|
11
|
+
|
12
|
+
The master branch tracks the 1.0 version of this gem, which has some major changes from it's predecessor `spree_product_feed`.
|
13
|
+
The 1.0 version is cleaner, more extensible, and more correct at the expense of compatibility.
|
14
|
+
|
15
|
+
We also have a [`~> 0.1.0` version](https://github.com/solidusio-contrib/solidus_product_feed/tree/v0.1) which is a direct port of `spree_product_feed` with minimal changes.
|
16
|
+
|
9
17
|
|
10
18
|
Installation
|
11
19
|
===============
|
@@ -1,15 +1,18 @@
|
|
1
|
-
Spree::ProductsController.
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
def check_rss
|
6
|
-
if request.format.rss?
|
7
|
-
@products = Spree::Product.all
|
8
|
-
respond_to do |format|
|
9
|
-
format.rss { render 'spree/products/index.rss', :layout => false }
|
10
|
-
end
|
1
|
+
Spree::ProductsController.prepend(Module.new do
|
2
|
+
class << self
|
3
|
+
def prepended(klass)
|
4
|
+
klass.respond_to :rss, only: :index
|
11
5
|
end
|
12
6
|
end
|
13
7
|
|
14
|
-
|
15
|
-
|
8
|
+
def index
|
9
|
+
load_feed_products if request.format.rss?
|
10
|
+
super
|
11
|
+
end
|
12
|
+
|
13
|
+
private
|
14
|
+
|
15
|
+
def load_feed_products
|
16
|
+
@feed_products = Spree::Product.all.map(&Spree::FeedProduct.method(:new))
|
17
|
+
end
|
18
|
+
end)
|
@@ -0,0 +1,39 @@
|
|
1
|
+
module Spree
|
2
|
+
class FeedProduct
|
3
|
+
attr_reader :product
|
4
|
+
|
5
|
+
def initialize(product)
|
6
|
+
@product = product
|
7
|
+
end
|
8
|
+
|
9
|
+
def id
|
10
|
+
product.id
|
11
|
+
end
|
12
|
+
|
13
|
+
def title
|
14
|
+
product.name
|
15
|
+
end
|
16
|
+
|
17
|
+
def description
|
18
|
+
product.description
|
19
|
+
end
|
20
|
+
|
21
|
+
# Must be selected from https://support.google.com/merchants/answer/1705911
|
22
|
+
def category
|
23
|
+
end
|
24
|
+
|
25
|
+
# Must be "new", "refurbished", or "used".
|
26
|
+
def condition
|
27
|
+
"new"
|
28
|
+
end
|
29
|
+
|
30
|
+
def price
|
31
|
+
Spree::Money.new(product.price)
|
32
|
+
end
|
33
|
+
|
34
|
+
def image_link
|
35
|
+
return unless product.images.any?
|
36
|
+
product.images.first.attachment.url(:large)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
data/app/overrides/rss_link.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
Deface::Override.new(:
|
2
|
-
:
|
3
|
-
:
|
4
|
-
:
|
5
|
-
:
|
1
|
+
Deface::Override.new(virtual_path: 'layouts/spree_application',
|
2
|
+
name: 'product_rss_link',
|
3
|
+
original: '86987c7feaaea3181df195ca520571d801bbbaf3',
|
4
|
+
insert_bottom: "[data-hook='inside_head']",
|
5
|
+
text: '<%= auto_discovery_link_tag(:rss, products_path(:format => :rss), {:title => "#{Spree::Config[:site_title]} Products"}) %>')
|
@@ -1,27 +1,23 @@
|
|
1
|
-
xml.instruct! :xml, :
|
2
|
-
xml.rss(:version=>"2.0", "xmlns:g" => "http://base.google.com/ns/1.0"){
|
3
|
-
xml.channel{
|
4
|
-
xml.title(current_store.name)
|
5
|
-
xml.link("http://#{current_store.url}")
|
6
|
-
xml.description("Find out about new products on http://#{current_store.url} first!")
|
7
|
-
xml.language('en-us')
|
8
|
-
@products.each do |product|
|
9
|
-
xml.item do
|
10
|
-
xml.title(product.name)
|
11
|
-
xml.description((product.images.count > 0 ? link_to(image_tag(product.images.first.attachment.url(:product)), product_url(product)) : '') + simple_format(product.description))
|
12
|
-
xml.author(current_store.url)
|
13
|
-
xml.pubDate((product.available_on || product.created_at).strftime("%a, %d %b %Y %H:%M:%S %z"))
|
14
|
-
xml.link(product_url(product))
|
15
|
-
xml.guid(product.id)
|
1
|
+
xml.instruct! :xml, version: "1.0"
|
16
2
|
|
17
|
-
|
18
|
-
|
19
|
-
|
3
|
+
xml.rss version: "2.0", "xmlns:g" => "http://base.google.com/ns/1.0" do
|
4
|
+
xml.channel do
|
5
|
+
xml.title current_store.name
|
6
|
+
xml.link "http://#{current_store.url}"
|
7
|
+
xml.description "Find out about new products on http://#{current_store.url} first!"
|
8
|
+
xml.language 'en-us'
|
20
9
|
|
21
|
-
|
22
|
-
|
23
|
-
xml.tag!
|
10
|
+
@feed_products.each do |feed_product|
|
11
|
+
xml.item do
|
12
|
+
xml.tag! 'g:id', feed_product.id
|
13
|
+
xml.title feed_product.title
|
14
|
+
xml.description feed_product.description
|
15
|
+
xml.category feed_product.category if feed_product.category
|
16
|
+
xml.link product_url(feed_product.product)
|
17
|
+
xml.tag! 'g:image_link', feed_product.image_link
|
18
|
+
xml.tag! 'g:condition', feed_product.condition
|
19
|
+
xml.tag! 'g:price', feed_product.price.money.format(symbol: false, with_currency: true)
|
24
20
|
end
|
25
21
|
end
|
26
|
-
|
27
|
-
|
22
|
+
end
|
23
|
+
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module SolidusProductFeed
|
2
2
|
module Generators
|
3
3
|
class InstallGenerator < Rails::Generators::Base
|
4
|
-
class_option :auto_run_migrations, :
|
4
|
+
class_option :auto_run_migrations, type: :boolean, default: false
|
5
5
|
|
6
6
|
def add_migrations
|
7
7
|
run 'rake railties:install:migrations FROM=spree_product_feed'
|
@@ -12,12 +12,12 @@ module SolidusProductFeed
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def run_migrations
|
15
|
-
run_migrations = options[:auto_run_migrations] || ['', 'y', 'Y'].include?(ask
|
15
|
+
run_migrations = options[:auto_run_migrations] || ['', 'y', 'Y'].include?(ask('Would you like to run the migrations now? [Y/n]'))
|
16
16
|
if run_migrations
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
17
|
+
run 'rake db:migrate'
|
18
|
+
else
|
19
|
+
puts "Skipping rake db:migrate, don't forget to run it!"
|
20
|
+
end
|
21
21
|
end
|
22
22
|
end
|
23
23
|
end
|
@@ -20,9 +20,12 @@ Gem::Specification.new do |s|
|
|
20
20
|
s.require_path = 'lib'
|
21
21
|
s.requirements << 'none'
|
22
22
|
|
23
|
-
s.add_runtime_dependency '
|
24
|
-
s.add_runtime_dependency 'solidus_backend', ["~> 1.0"]
|
23
|
+
s.add_runtime_dependency 'solidus_backend', [">= 1.0", "< 3"]
|
25
24
|
|
26
|
-
s.add_development_dependency 'rspec-rails',
|
25
|
+
s.add_development_dependency 'rspec-rails', '~> 3.4'
|
26
|
+
s.add_development_dependency 'rubocop', '~> 0.39.0'
|
27
|
+
s.add_development_dependency 'factory_girl_rails'
|
28
|
+
s.add_development_dependency 'pry'
|
29
|
+
s.add_development_dependency 'faker'
|
27
30
|
s.add_development_dependency 'sqlite3'
|
28
31
|
end
|
@@ -1,15 +1,20 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe Spree::ProductsController, type: :controller do
|
4
|
-
|
5
|
-
before { get :index, format: 'rss', use_route: :spree}
|
4
|
+
render_views
|
6
5
|
|
7
|
-
|
8
|
-
|
9
|
-
|
6
|
+
context "GET #index" do
|
7
|
+
subject { spree_get :index, format: 'rss' }
|
8
|
+
|
9
|
+
let!(:product) { create :product, name: "2 Hams", price: 20.00 }
|
10
|
+
|
11
|
+
it { is_expected.to have_http_status :ok }
|
12
|
+
|
13
|
+
it { is_expected.to render_template 'spree/products/index' }
|
10
14
|
|
11
15
|
it 'returns the correct content type' do
|
12
|
-
|
16
|
+
subject
|
17
|
+
expect(response.content_type).to eq 'application/rss+xml'
|
13
18
|
end
|
14
19
|
end
|
15
20
|
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
RSpec.describe Spree::FeedProduct do
|
4
|
+
let(:feed_product) { described_class.new(product) }
|
5
|
+
let(:product) do
|
6
|
+
create :product,
|
7
|
+
name: "2 Hams 20 Dollars",
|
8
|
+
description: "As seen on TV!"
|
9
|
+
end
|
10
|
+
|
11
|
+
describe "#id" do
|
12
|
+
subject { feed_product.id }
|
13
|
+
|
14
|
+
it "delegates to the product's SKU" do
|
15
|
+
expect(subject).to eq product.id
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
describe "#category" do
|
20
|
+
subject { feed_product.category }
|
21
|
+
it { is_expected.to be_nil }
|
22
|
+
end
|
23
|
+
|
24
|
+
describe "#condition" do
|
25
|
+
subject { feed_product.condition }
|
26
|
+
it { is_expected.to eq "new" }
|
27
|
+
end
|
28
|
+
|
29
|
+
describe "#price" do
|
30
|
+
subject { feed_product.price }
|
31
|
+
it { is_expected.to eq Spree::Money.new(19.99, currency: 'USD') }
|
32
|
+
end
|
33
|
+
|
34
|
+
describe "#image_link" do
|
35
|
+
subject { feed_product.image_link }
|
36
|
+
context "when the product has images" do
|
37
|
+
before { Spree::Image.create! viewable: product.master, attachment_file_name: 'hams.png' }
|
38
|
+
it { is_expected.to eq '/spree/products/1/large/hams.png' }
|
39
|
+
end
|
40
|
+
|
41
|
+
context "when the product doesn't have images" do
|
42
|
+
it { is_expected.to be_nil }
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
describe "#description" do
|
47
|
+
subject { feed_product.description }
|
48
|
+
it { is_expected.to eq "As seen on TV!" }
|
49
|
+
end
|
50
|
+
|
51
|
+
describe "#title" do
|
52
|
+
subject { feed_product.title }
|
53
|
+
it { is_expected.to eq "2 Hams 20 Dollars" }
|
54
|
+
end
|
55
|
+
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,29 +1,17 @@
|
|
1
1
|
# Configure Rails Environment
|
2
2
|
ENV["RAILS_ENV"] = "test"
|
3
|
-
require File.expand_path("../dummy/config/environment.rb",
|
3
|
+
require File.expand_path("../dummy/config/environment.rb", __FILE__)
|
4
4
|
require 'rspec/rails'
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
require 'factory_girl_rails'
|
6
|
+
require 'pry'
|
7
|
+
require 'faker' # Required for factories.
|
8
|
+
require 'spree/testing_support/factories'
|
9
|
+
require 'spree/testing_support/controller_requests'
|
9
10
|
|
10
11
|
RSpec.configure do |config|
|
11
|
-
# == Mock Framework
|
12
|
-
#
|
13
|
-
# If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
|
14
|
-
#
|
15
|
-
# config.mock_with :mocha
|
16
|
-
# config.mock_with :flexmock
|
17
|
-
# config.mock_with :rr
|
18
12
|
config.mock_with :rspec
|
19
|
-
|
20
|
-
# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
|
21
|
-
config.fixture_path = "#{::Rails.root}/spec/fixtures"
|
22
|
-
|
23
|
-
# If you're not using ActiveRecord, or you'd prefer not to run each of your
|
24
|
-
# examples within a transaction, remove the following line or assign false
|
25
|
-
# instead of true.
|
26
13
|
config.use_transactional_fixtures = true
|
27
|
-
|
28
14
|
config.include Devise::TestHelpers, type: :controller
|
15
|
+
config.include Spree::TestingSupport::ControllerRequests, type: :controller
|
16
|
+
config.include FactoryGirl::Syntax::Methods
|
29
17
|
end
|
metadata
CHANGED
@@ -1,57 +1,105 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solidus_product_feed
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joshua Nussbaum
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: solidus_backend
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.0'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '3'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: '1.0'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '3'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
34
|
+
name: rspec-rails
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
30
36
|
requirements:
|
31
37
|
- - "~>"
|
32
38
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
34
|
-
type: :
|
39
|
+
version: '3.4'
|
40
|
+
type: :development
|
35
41
|
prerelease: false
|
36
42
|
version_requirements: !ruby/object:Gem::Requirement
|
37
43
|
requirements:
|
38
44
|
- - "~>"
|
39
45
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
46
|
+
version: '3.4'
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
48
|
+
name: rubocop
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|
44
50
|
requirements:
|
45
51
|
- - "~>"
|
46
52
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
53
|
+
version: 0.39.0
|
48
54
|
type: :development
|
49
55
|
prerelease: false
|
50
56
|
version_requirements: !ruby/object:Gem::Requirement
|
51
57
|
requirements:
|
52
58
|
- - "~>"
|
53
59
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
60
|
+
version: 0.39.0
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: factory_girl_rails
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0'
|
68
|
+
type: :development
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0'
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: pry
|
77
|
+
requirement: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - ">="
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '0'
|
82
|
+
type: :development
|
83
|
+
prerelease: false
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0'
|
89
|
+
- !ruby/object:Gem::Dependency
|
90
|
+
name: faker
|
91
|
+
requirement: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - ">="
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '0'
|
96
|
+
type: :development
|
97
|
+
prerelease: false
|
98
|
+
version_requirements: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - ">="
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '0'
|
55
103
|
- !ruby/object:Gem::Dependency
|
56
104
|
name: sqlite3
|
57
105
|
requirement: !ruby/object:Gem::Requirement
|
@@ -75,6 +123,7 @@ extra_rdoc_files: []
|
|
75
123
|
files:
|
76
124
|
- ".gitignore"
|
77
125
|
- ".rspec"
|
126
|
+
- ".rubocop.yml"
|
78
127
|
- ".travis.yml"
|
79
128
|
- Gemfile
|
80
129
|
- Guardfile
|
@@ -94,6 +143,7 @@ files:
|
|
94
143
|
- app/assets/stylesheets/spree/frontend/spree_product_feed.css
|
95
144
|
- app/assets/stylesheets/store/solidus_product_feed.css
|
96
145
|
- app/controllers/spree/products_controller_decorator.rb
|
146
|
+
- app/models/spree/feed_product.rb
|
97
147
|
- app/overrides/rss_link.rb
|
98
148
|
- app/views/spree/products/index.rss.builder
|
99
149
|
- config/routes.rb
|
@@ -105,6 +155,7 @@ files:
|
|
105
155
|
- script/rails
|
106
156
|
- solidus_product_feed.gemspec
|
107
157
|
- spec/controllers/products_controller_spec.rb
|
158
|
+
- spec/models/spree/feed_product_spec.rb
|
108
159
|
- spec/spec_helper.rb
|
109
160
|
homepage:
|
110
161
|
licenses: []
|
@@ -132,4 +183,5 @@ specification_version: 4
|
|
132
183
|
summary: Spree extension that provides an RSS feed for products
|
133
184
|
test_files:
|
134
185
|
- spec/controllers/products_controller_spec.rb
|
186
|
+
- spec/models/spree/feed_product_spec.rb
|
135
187
|
- spec/spec_helper.rb
|