spree_favorite_products 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.rspec +1 -0
- data/.travis.yml +6 -0
- data/Gemfile +10 -1
- data/LICENSE +1 -1
- data/README.md +7 -2
- data/Rakefile +1 -0
- data/app/controllers/spree/favorite_products_controller.rb +10 -7
- data/app/models/spree/app_configuration_decorator.rb +3 -0
- data/app/models/spree/user_decorator.rb +4 -0
- data/app/overrides/add_favorite_products_per_page_configuration.rb +16 -0
- data/app/overrides/add_link_to_mark_product_as_favorite.rb +7 -1
- data/app/views/spree/favorite_products/create.js.erb +3 -0
- data/app/views/spree/favorite_products/destroy.js.erb +8 -3
- data/app/views/spree/favorite_products/index.html.erb +3 -1
- data/config/locales/en.yml +5 -0
- data/lib/generators/spree_favorite_products/install/install_generator.rb +2 -2
- data/spec/controllers/spree/admin/favorite_products_controller_spec.rb +4 -2
- data/spec/controllers/spree/favorite_products_controller_spec.rb +56 -63
- data/spec/models/spree/app_configuration_decorator_spec.rb +3 -0
- data/spec/models/spree/product_decorator_spec.rb +5 -4
- data/spec/models/spree/user_decorator_spec.rb +22 -0
- data/spec/spec_helper.rb +3 -3
- data/spree_favorite_products.gemspec +1 -1
- metadata +56 -34
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
data/.travis.yml
ADDED
data/Gemfile
CHANGED
@@ -1,6 +1,15 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
|
3
3
|
# Provides basic authentication functionality for testing parts of your engine
|
4
|
-
gem '
|
4
|
+
gem 'spree', '2.0.3'
|
5
|
+
gem 'rails', '3.2.15'
|
6
|
+
gem 'spree_auth_devise', github: 'spree/spree_auth_devise', branch: '2-0-stable'
|
7
|
+
gem 'mysql2'
|
5
8
|
|
9
|
+
group :test do
|
10
|
+
gem 'rspec-rails', '~> 2.10'
|
11
|
+
gem 'shoulda-matchers', '2.2.0'
|
12
|
+
gem 'simplecov', :require => false
|
13
|
+
gem 'database_cleaner'
|
14
|
+
end
|
6
15
|
gemspec
|
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
SpreeFavoriteProducts
|
1
|
+
SpreeFavoriteProducts [![Code Climate](https://codeclimate.com/github/vinsol/spree_favorite_products.png)](https://codeclimate.com/github/vinsol/spree_favorite_products) [![Build Status](https://travis-ci.org/vinsol/spree_favorite_products.png?branch=master)](https://travis-ci.org/vinsol/spree_favorite_products)
|
2
2
|
=====================
|
3
3
|
|
4
4
|
This extension adds the following features:
|
@@ -40,4 +40,9 @@ Simply add this require statement to your spec_helper:
|
|
40
40
|
require 'spree_favorite_products/factories'
|
41
41
|
```
|
42
42
|
|
43
|
-
|
43
|
+
Credits
|
44
|
+
-------
|
45
|
+
|
46
|
+
[![vinsol.com: Ruby on Rails, iOS and Android developers](http://vinsol.com/vin_logo.png "Ruby on Rails, iOS and Android developers")](http://vinsol.com)
|
47
|
+
|
48
|
+
Copyright (c) 2014 [vinsol.com](http://vinsol.com "Ruby on Rails, iOS and Android developers"), released under the New MIT License
|
data/Rakefile
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
module Spree
|
2
2
|
class FavoriteProductsController < Spree::StoreController
|
3
3
|
|
4
|
-
before_filter :authenticate_spree_user
|
4
|
+
before_filter :authenticate_spree_user!
|
5
|
+
before_filter :find_favorite_product, :only => :destroy
|
5
6
|
|
6
7
|
def index
|
7
|
-
@favorite_products = spree_current_user.favorite_products
|
8
|
+
@favorite_products = spree_current_user.favorite_products.page(params[:page]).per(Spree::Config.favorite_products_per_page)
|
8
9
|
end
|
9
10
|
|
10
11
|
def create
|
@@ -20,12 +21,14 @@ module Spree
|
|
20
21
|
end
|
21
22
|
|
22
23
|
def destroy
|
23
|
-
if @
|
24
|
-
@
|
25
|
-
@success = @favorite_product.try(:destroy)
|
26
|
-
else
|
27
|
-
@success = false
|
24
|
+
if @favorite
|
25
|
+
@success = @favorite.destroy
|
28
26
|
end
|
29
27
|
end
|
28
|
+
|
29
|
+
private
|
30
|
+
def find_favorite_product
|
31
|
+
@favorite = spree_current_user.favorites.joins(:product).where(:spree_products => {:id => params[:id]}).first
|
32
|
+
end
|
30
33
|
end
|
31
34
|
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
Deface::Override.new(
|
2
|
+
:virtual_path => 'spree/admin/general_settings/edit',
|
3
|
+
:name => 'add_favorite_products_per_page_configuration',
|
4
|
+
:insert_after => "#preferences .row",
|
5
|
+
:text => %Q{
|
6
|
+
<div class="row">
|
7
|
+
<fieldset class="no-border-bottom">
|
8
|
+
<legend align="center"><%= Spree.t(:favorite_products_settings) %></legend>
|
9
|
+
<div class="field">
|
10
|
+
<%= label_tag :favorite_products_per_page, Spree.t(:favorite_products_per_page) %><br>
|
11
|
+
<%= text_field_tag :favorite_products_per_page, Spree::Config[:favorite_products_per_page], :size => 3 %>
|
12
|
+
</div>
|
13
|
+
</fieldset>
|
14
|
+
</div>
|
15
|
+
}
|
16
|
+
)
|
@@ -2,5 +2,11 @@ Deface::Override.new(
|
|
2
2
|
:virtual_path => 'spree/products/show',
|
3
3
|
:name => 'add_link_to_mark_product_as_favorite',
|
4
4
|
:insert_after => "div[itemprop='description']",
|
5
|
-
:text =>
|
5
|
+
:text => %Q{
|
6
|
+
<% if spree_user_signed_in? && spree_current_user.has_favorite_product?(@product.id) %>
|
7
|
+
<%= link_to Spree.t(:unmark_as_favorite), favorite_product_path(:id => @product.id), :method => :delete, :remote => true, :class => 'favorite_link' %>
|
8
|
+
<% else %>
|
9
|
+
<%= link_to Spree.t(:mark_as_favorite), favorite_products_path(:id => @product.id), :method => :post, :remote => spree_user_signed_in?, :class => 'favorite_link' %>
|
10
|
+
<% end %>
|
11
|
+
}
|
6
12
|
)
|
@@ -1,6 +1,11 @@
|
|
1
1
|
<% if @success %>
|
2
|
-
$(
|
3
|
-
|
2
|
+
if($('.favorite_link').length) {
|
3
|
+
$('.favorite_link').attr('href', '<%= favorite_products_path(:id => @favorite.product_id) %>').data('method', 'post').text('<%= Spree.t(:mark_as_favorite) %>');
|
4
|
+
alert('Successfully unmarked as favorite');
|
5
|
+
} else {
|
6
|
+
$("#favorite_product_<%= @favorite.product_id%>").remove();
|
7
|
+
alert("Successfully removed favorite product from your list");
|
8
|
+
}
|
4
9
|
<% else %>
|
5
|
-
alert("Could not remove product form your list")
|
10
|
+
alert("Could not remove product form your list");
|
6
11
|
<% end %>
|
@@ -14,7 +14,7 @@
|
|
14
14
|
<tr class="<%= cycle('even', 'odd') %>" id="favorite_product_<%= product.id %>">
|
15
15
|
<td class="favorite-product-image"><%= link_to small_image(product), product_path(product) %></td>
|
16
16
|
<td class="favorite-product-name"><%= product.name %></td>
|
17
|
-
<td class="favorite-product-remove"><%= link_to 'Remove', favorite_product_path(product), :method => :delete, :remote => true %>
|
17
|
+
<td class="favorite-product-remove"><%= link_to 'Remove', favorite_product_path(:id => product.id), :method => :delete, :remote => true %>
|
18
18
|
</tr>
|
19
19
|
<% end %>
|
20
20
|
</tbody>
|
@@ -22,4 +22,6 @@
|
|
22
22
|
<% else %>
|
23
23
|
<p><%= Spree.t(:you_have_no_favorite_products_yet) %></p>
|
24
24
|
<% end %>
|
25
|
+
|
26
|
+
<%= paginate @favorite_products %>
|
25
27
|
</div>
|
data/config/locales/en.yml
CHANGED
@@ -5,8 +5,8 @@ module SpreeFavoriteProducts
|
|
5
5
|
class_option :auto_run_migrations, :type => :boolean, :default => false
|
6
6
|
|
7
7
|
def add_javascripts
|
8
|
-
append_file 'app/assets/javascripts/store/all.js', "//= require store/spree_favorite_products\n"
|
9
|
-
append_file 'app/assets/javascripts/admin/all.js', "//= require admin/spree_favorite_products\n"
|
8
|
+
append_file 'app/assets/javascripts/store/all.js', "\n//= require store/spree_favorite_products\n"
|
9
|
+
append_file 'app/assets/javascripts/admin/all.js', "\n//= require admin/spree_favorite_products\n"
|
10
10
|
end
|
11
11
|
|
12
12
|
def add_stylesheets
|
@@ -46,7 +46,9 @@ describe Spree::Admin::FavoriteProductsController do
|
|
46
46
|
|
47
47
|
describe "#users" do
|
48
48
|
before do
|
49
|
-
|
49
|
+
@users = [@user]
|
50
|
+
@users.stub(:page).and_return(@users)
|
51
|
+
product.stub(:favorite_users).and_return(@users)
|
50
52
|
@products = [product]
|
51
53
|
Spree::Product.stub(:where).with(:id => product.id).and_return(@products)
|
52
54
|
end
|
@@ -60,7 +62,7 @@ describe Spree::Admin::FavoriteProductsController do
|
|
60
62
|
end
|
61
63
|
|
62
64
|
it 'fetches the users who marked the product as favorite' do
|
63
|
-
product.should_receive(:favorite_users).and_return(
|
65
|
+
product.should_receive(:favorite_users).and_return(@users)
|
64
66
|
end
|
65
67
|
|
66
68
|
after do
|
@@ -9,6 +9,18 @@ describe Spree::FavoriteProductsController do
|
|
9
9
|
end
|
10
10
|
end
|
11
11
|
|
12
|
+
shared_examples_for "request which finds favorite product" do
|
13
|
+
it "finds favorite product" do
|
14
|
+
@current_user_favorites.should_receive(:where).with(:spree_products => {:id => 'permalink'})
|
15
|
+
send_request
|
16
|
+
end
|
17
|
+
|
18
|
+
it "assigns @favorite" do
|
19
|
+
send_request
|
20
|
+
assigns(:favorite).should eq(@favorite)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
12
24
|
describe 'POST create' do
|
13
25
|
def send_request
|
14
26
|
post :create, :id => 1, :format => :js, :use_route => 'spree'
|
@@ -67,12 +79,15 @@ describe Spree::FavoriteProductsController do
|
|
67
79
|
|
68
80
|
describe 'GET index' do
|
69
81
|
def send_request
|
70
|
-
get :index, :use_route => 'spree'
|
82
|
+
get :index, :page => 'current_page', :use_route => 'spree'
|
71
83
|
end
|
72
84
|
|
73
85
|
before(:each) do
|
74
|
-
@
|
75
|
-
@
|
86
|
+
@favorite_products = double('favorite_products')
|
87
|
+
@favorite_products.stub(:page).and_return(@favorite_products)
|
88
|
+
@favorite_products.stub(:per).and_return(@favorite_products)
|
89
|
+
Spree::Config.stub(:favorite_products_per_page).and_return('favorite_products_per_page')
|
90
|
+
@user = mock_model(Spree::User, :favorite_products => @favorite_products, :generate_spree_api_key! => false, :last_incomplete_spree_order => nil)
|
76
91
|
controller.stub(:authenticate_spree_user!).and_return(true)
|
77
92
|
controller.stub(:spree_current_user).and_return(@user)
|
78
93
|
end
|
@@ -89,93 +104,71 @@ describe Spree::FavoriteProductsController do
|
|
89
104
|
|
90
105
|
it "assigns @favorite_products" do
|
91
106
|
send_request
|
92
|
-
assigns(:favorite_products).should eq(
|
107
|
+
assigns(:favorite_products).should eq(@favorite_products)
|
108
|
+
end
|
109
|
+
|
110
|
+
it "paginates favorite products" do
|
111
|
+
@favorite_products.should_receive(:page).with('current_page')
|
112
|
+
send_request
|
113
|
+
end
|
114
|
+
|
115
|
+
it "shows Spree::Config.favorite_products_per_page" do
|
116
|
+
@favorite_products.should_receive(:per).with('favorite_products_per_page')
|
117
|
+
send_request
|
93
118
|
end
|
94
119
|
end
|
95
120
|
|
96
121
|
describe 'destroy' do
|
97
122
|
def send_request(params = {})
|
98
|
-
post :destroy, params.merge({:use_route => 'spree', :method => :delete, :format => :js})
|
123
|
+
post :destroy, params.merge({:use_route => 'spree', :method => :delete, :format => :js, :id => 'permalink'})
|
99
124
|
end
|
100
125
|
|
101
126
|
before do
|
102
|
-
@
|
103
|
-
@
|
104
|
-
@
|
127
|
+
@favorite = mock_model(Spree::Favorite)
|
128
|
+
@current_user_favorites = double('spree_favorites')
|
129
|
+
@current_user_favorites.stub(:where).and_return([@favorite])
|
130
|
+
@favorites = double('spree_favorites')
|
131
|
+
@favorites.stub(:joins).with(:product).and_return(@current_user_favorites)
|
132
|
+
@user = mock_model(Spree::User, :favorites => @favorites, :generate_spree_api_key! => false, :last_incomplete_spree_order => nil)
|
105
133
|
controller.stub(:authenticate_spree_user!).and_return(true)
|
106
134
|
controller.stub(:spree_current_user).and_return(@user)
|
107
135
|
end
|
108
136
|
|
109
137
|
it_behaves_like "request which requires user authentication"
|
138
|
+
it_behaves_like "request which finds favorite product"
|
110
139
|
|
111
|
-
context 'when favorite
|
112
|
-
before do
|
113
|
-
|
114
|
-
Spree::Favorite.stub(:where).with("user_id = ? and product_id = ?", @user.id, 100).and_return([@favorite_product])
|
115
|
-
end
|
116
|
-
|
117
|
-
it 'assigns its id to product_id' do
|
118
|
-
send_request(:id => @product.permalink)
|
119
|
-
assigns(:product_id).should eq(100)
|
140
|
+
context 'when @favorite exist' do
|
141
|
+
before(:each) do
|
142
|
+
controller.instance_variable_set(:@favorite, @favorite)
|
120
143
|
end
|
121
144
|
|
122
|
-
it '
|
123
|
-
|
124
|
-
|
145
|
+
it 'destroys' do
|
146
|
+
@favorite.should_receive(:destroy)
|
147
|
+
send_request
|
125
148
|
end
|
126
149
|
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
end
|
131
|
-
|
132
|
-
context 'and is destroyed successfully' do
|
133
|
-
before do
|
134
|
-
@favorite_product.stub(:destroy).and_return(true)
|
150
|
+
context 'when destroyed successfully' do
|
151
|
+
before(:each) do
|
152
|
+
@favorite.stub(:destroy).and_return(true)
|
135
153
|
end
|
136
154
|
|
137
|
-
it
|
138
|
-
send_request
|
139
|
-
assigns(:success).should
|
140
|
-
end
|
155
|
+
it "sets @success to true" do
|
156
|
+
send_request
|
157
|
+
assigns(:success).should eq(true)
|
158
|
+
end
|
141
159
|
end
|
142
160
|
|
143
|
-
context '
|
144
|
-
before do
|
145
|
-
@
|
161
|
+
context 'when not destroyed' do
|
162
|
+
before(:each) do
|
163
|
+
@favorite.stub(:destroy).and_return(false)
|
146
164
|
end
|
147
165
|
|
148
|
-
it '
|
149
|
-
send_request
|
150
|
-
assigns(:success).should
|
166
|
+
it 'sets @success to false' do
|
167
|
+
send_request
|
168
|
+
assigns(:success).should eq(false)
|
151
169
|
end
|
152
170
|
end
|
153
171
|
end
|
154
172
|
|
155
|
-
context 'when favorite product entry for the requested product does not exit' do
|
156
|
-
before do
|
157
|
-
Spree::Product.stub(:where).with(:permalink => @product.permalink).and_return([])
|
158
|
-
end
|
159
|
-
|
160
|
-
it 'does not assign any id to product_id' do
|
161
|
-
send_request(:id => @product.permalink)
|
162
|
-
assigns(:product_id).should be_nil
|
163
|
-
end
|
164
|
-
|
165
|
-
it 'assigns favorite product object to favorite_product' do
|
166
|
-
send_request(:id => @product.permalink)
|
167
|
-
assigns(:favorite_product).should be_nil
|
168
|
-
end
|
169
|
-
|
170
|
-
it 'calls for destroy on the favorite_product' do
|
171
|
-
send_request(:id => @product.permalink)
|
172
|
-
@favorite_product.should_not_receive(:destroy)
|
173
|
-
end
|
174
|
-
|
175
|
-
it 'assigns false to success' do
|
176
|
-
send_request(:id => @product.permalink)
|
177
|
-
assigns(:success).should be_false
|
178
|
-
end
|
179
|
-
end
|
180
173
|
end
|
181
174
|
end
|
@@ -6,10 +6,11 @@ describe Spree::Product do
|
|
6
6
|
|
7
7
|
describe "Spree::Product.favorite" do
|
8
8
|
before(:each) do
|
9
|
-
|
10
|
-
@
|
11
|
-
@
|
12
|
-
@
|
9
|
+
shipping_category = Spree::ShippingCategory.create! :name => 'shipping_category'
|
10
|
+
@favorite_product1 = Spree::Product.create! :name => 'favorite_product1', :price => 100, :shipping_category_id => shipping_category.id
|
11
|
+
@favorite_product2 = Spree::Product.create! :name => 'favorite_product2', :price => 100, :shipping_category_id => shipping_category.id
|
12
|
+
@product1 = Spree::Product.create! :name => 'product1', :price => 100, :shipping_category_id => shipping_category.id
|
13
|
+
@product2 = Spree::Product.create! :name => 'product2', :price => 100, :shipping_category_id => shipping_category.id
|
13
14
|
@user1 = Spree::User.create! :email => 'user1@example.com', :password => 'example', :password_confirmation => "example"
|
14
15
|
@user2 = Spree::User.create! :email => 'user2@example.com', :password => "example", :password_confirmation => 'example'
|
15
16
|
@user1.favorites.create! :product_id => @favorite_product1.id
|
@@ -1,6 +1,28 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe Spree::User do
|
4
|
+
|
5
|
+
before(:each) do
|
6
|
+
@user = Spree::User.create! :email => 'test@example.com', :password => 'spree123'
|
7
|
+
@product1 = Spree::Product.create! :name => 'product1', :price => 100, :shipping_category_id => 1
|
8
|
+
@product2 = Spree::Product.create! :name => 'product2', :price => 100, :shipping_category_id => 1
|
9
|
+
favorite = Spree::Favorite.new
|
10
|
+
favorite.product_id = @product1.id
|
11
|
+
favorite.user_id = @user.id
|
12
|
+
favorite.save!
|
13
|
+
end
|
14
|
+
|
4
15
|
it { should have_many(:favorites) }
|
5
16
|
it { should have_many(:favorite_products).through(:favorites).class_name('Spree::Product') }
|
17
|
+
|
18
|
+
|
19
|
+
describe "has_favorite_product?" do
|
20
|
+
context "when product in user's favorite products" do
|
21
|
+
it { @user.has_favorite_product?(@product1.id).should be_true }
|
22
|
+
end
|
23
|
+
|
24
|
+
context 'when product is not in users favorite products' do
|
25
|
+
it { @user.has_favorite_product?(@product2.id).should be_false }
|
26
|
+
end
|
27
|
+
end
|
6
28
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -23,16 +23,16 @@ require 'ffaker'
|
|
23
23
|
Dir[File.join(File.dirname(__FILE__), 'support/**/*.rb')].each { |f| require f }
|
24
24
|
|
25
25
|
# Requires factories defined in spree_core
|
26
|
-
require 'spree/testing_support/factories'
|
26
|
+
# require 'spree/testing_support/factories'
|
27
27
|
require 'spree/testing_support/controller_requests'
|
28
28
|
require 'spree/testing_support/authorization_helpers'
|
29
29
|
require 'spree/testing_support/url_helpers'
|
30
30
|
|
31
31
|
# Requires factories defined in lib/spree_favorite_products/factories.rb
|
32
|
-
require 'spree_favorite_products/factories'
|
32
|
+
# require 'spree_favorite_products/factories'
|
33
33
|
|
34
34
|
RSpec.configure do |config|
|
35
|
-
config.include FactoryGirl::Syntax::Methods
|
35
|
+
# config.include FactoryGirl::Syntax::Methods
|
36
36
|
|
37
37
|
# == URL Helpers
|
38
38
|
#
|
@@ -2,7 +2,7 @@
|
|
2
2
|
Gem::Specification.new do |s|
|
3
3
|
s.platform = Gem::Platform::RUBY
|
4
4
|
s.name = 'spree_favorite_products'
|
5
|
-
s.version = '1.0.
|
5
|
+
s.version = '1.0.1'
|
6
6
|
s.summary = 'users can mark product as favorite'
|
7
7
|
s.description = 'This extension adds the following features: 1. Adds a link Mark as favorite on product detail page. 2. Favorite Products tab on header 3. Favorite Products tab in admin section'
|
8
8
|
s.required_ruby_version = '>= 1.9.3'
|
metadata
CHANGED
@@ -1,40 +1,49 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_favorite_products
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
|
+
segments:
|
7
|
+
- 1
|
8
|
+
- 0
|
9
|
+
- 1
|
10
|
+
version: 1.0.1
|
6
11
|
platform: ruby
|
7
|
-
authors:
|
12
|
+
authors:
|
8
13
|
- Mohit Bansal
|
9
14
|
autorequire:
|
10
15
|
bindir: bin
|
11
16
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
17
|
+
|
18
|
+
date: 2014-03-07 00:00:00 Z
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
15
21
|
name: spree_core
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
|
-
requirements:
|
19
|
-
- - ~>
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version: 2.0.3
|
22
|
-
type: :runtime
|
23
22
|
prerelease: false
|
24
|
-
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
24
|
none: false
|
26
|
-
requirements:
|
25
|
+
requirements:
|
27
26
|
- - ~>
|
28
|
-
- !ruby/object:Gem::Version
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 9
|
29
|
+
segments:
|
30
|
+
- 2
|
31
|
+
- 0
|
32
|
+
- 3
|
29
33
|
version: 2.0.3
|
30
|
-
|
31
|
-
|
32
|
-
|
34
|
+
type: :runtime
|
35
|
+
version_requirements: *id001
|
36
|
+
description: "This extension adds the following features: 1. Adds a link Mark as favorite on product detail page. 2. Favorite Products tab on header 3. Favorite Products tab in admin section"
|
33
37
|
email: info@vinsol.com
|
34
38
|
executables: []
|
39
|
+
|
35
40
|
extensions: []
|
41
|
+
|
36
42
|
extra_rdoc_files: []
|
37
|
-
|
43
|
+
|
44
|
+
files:
|
45
|
+
- .rspec
|
46
|
+
- .travis.yml
|
38
47
|
- Gemfile
|
39
48
|
- LICENSE
|
40
49
|
- README.md
|
@@ -47,10 +56,12 @@ files:
|
|
47
56
|
- app/assets/stylesheets/store/spree_favorite_products.css
|
48
57
|
- app/controllers/spree/admin/favorite_products_controller.rb
|
49
58
|
- app/controllers/spree/favorite_products_controller.rb
|
59
|
+
- app/models/spree/app_configuration_decorator.rb
|
50
60
|
- app/models/spree/favorite.rb
|
51
61
|
- app/models/spree/product_decorator.rb
|
52
62
|
- app/models/spree/user_decorator.rb
|
53
63
|
- app/overrides/.DS_Store
|
64
|
+
- app/overrides/add_favorite_products_per_page_configuration.rb
|
54
65
|
- app/overrides/add_favorite_products_tab.rb
|
55
66
|
- app/overrides/add_link_to_mark_product_as_favorite.rb
|
56
67
|
- app/overrides/add_link_to_users_favorite_products.rb
|
@@ -71,35 +82,46 @@ files:
|
|
71
82
|
- script/rails
|
72
83
|
- spec/controllers/spree/admin/favorite_products_controller_spec.rb
|
73
84
|
- spec/controllers/spree/favorite_products_controller_spec.rb
|
85
|
+
- spec/models/spree/app_configuration_decorator_spec.rb
|
74
86
|
- spec/models/spree/favorite_spec.rb
|
75
87
|
- spec/models/spree/product_decorator_spec.rb
|
76
88
|
- spec/models/spree/user_decorator_spec.rb
|
77
89
|
- spec/spec_helper.rb
|
78
90
|
- spree_favorite_products.gemspec
|
79
91
|
homepage: http://vinsol.com
|
80
|
-
licenses:
|
92
|
+
licenses:
|
81
93
|
- MIT
|
82
94
|
post_install_message:
|
83
95
|
rdoc_options: []
|
84
|
-
|
96
|
+
|
97
|
+
require_paths:
|
85
98
|
- lib
|
86
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
99
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
87
100
|
none: false
|
88
|
-
requirements:
|
89
|
-
- -
|
90
|
-
- !ruby/object:Gem::Version
|
101
|
+
requirements:
|
102
|
+
- - ">="
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
hash: 53
|
105
|
+
segments:
|
106
|
+
- 1
|
107
|
+
- 9
|
108
|
+
- 3
|
91
109
|
version: 1.9.3
|
92
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
110
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
93
111
|
none: false
|
94
|
-
requirements:
|
95
|
-
- -
|
96
|
-
- !ruby/object:Gem::Version
|
97
|
-
|
98
|
-
|
112
|
+
requirements:
|
113
|
+
- - ">="
|
114
|
+
- !ruby/object:Gem::Version
|
115
|
+
hash: 3
|
116
|
+
segments:
|
117
|
+
- 0
|
118
|
+
version: "0"
|
119
|
+
requirements:
|
99
120
|
- none
|
100
121
|
rubyforge_project:
|
101
|
-
rubygems_version: 1.8.
|
122
|
+
rubygems_version: 1.8.24
|
102
123
|
signing_key:
|
103
124
|
specification_version: 3
|
104
125
|
summary: users can mark product as favorite
|
105
126
|
test_files: []
|
127
|
+
|