spree_favorite_products 3.0.0 → 3.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -0
  3. data/.rspec +1 -1
  4. data/Gemfile +10 -11
  5. data/README.md +8 -25
  6. data/Rakefile +1 -2
  7. data/app/assets/javascripts/spree/backend/spree_favorite_products.js +0 -0
  8. data/app/assets/javascripts/spree/frontend/spree_favorite_products.js +23 -0
  9. data/app/assets/stylesheets/spree/backend/spree_favorite_products.css +0 -0
  10. data/app/assets/stylesheets/spree/frontend/spree_favorite_products.css +0 -0
  11. data/app/controllers/spree/admin/favorite_products_controller.rb +14 -5
  12. data/app/controllers/spree/admin/products_controller_decorator.rb +6 -0
  13. data/app/controllers/spree/admin/users_controller_decorator.rb +5 -0
  14. data/app/controllers/spree/favorite_products_controller.rb +14 -6
  15. data/app/models/spree/app_configuration_decorator.rb +2 -1
  16. data/app/models/spree/favorite.rb +9 -6
  17. data/app/models/spree/product_decorator.rb +6 -10
  18. data/app/models/spree/user_decorator.rb +5 -5
  19. data/app/overrides/add_favorite_products_per_page_configuration.rb +5 -5
  20. data/app/overrides/add_favorite_products_to_products_tab.rb +4 -4
  21. data/app/overrides/add_favorite_users_tab_to_products.rb +10 -0
  22. data/app/overrides/add_link_to_mark_product_as_favorite.rb +8 -7
  23. data/app/overrides/add_link_to_users_favorite_products.rb +5 -5
  24. data/app/overrides/addd_favorite_products_tab_to_users.rb +10 -0
  25. data/app/views/spree/admin/favorite_products/_users.html.erb +25 -0
  26. data/app/views/spree/admin/favorite_products/index.html.erb +9 -16
  27. data/app/views/spree/admin/products/favorite_users.html.erb +14 -0
  28. data/app/views/spree/admin/users/favorite_products.html.erb +50 -0
  29. data/app/views/spree/favorite_products/destroy.js.erb +1 -1
  30. data/app/views/spree/favorite_products/index.html.erb +6 -6
  31. data/config/locales/bg.yml +13 -0
  32. data/config/locales/en.yml +21 -3
  33. data/config/locales/pl.yml +19 -0
  34. data/config/routes.rb +11 -3
  35. data/db/migrate/20130705080641_create_table_favorites.rb +1 -1
  36. data/db/migrate/20130710105100_rename_favorites_to_spree_favorites.rb +1 -1
  37. data/db/migrate/20160304152800_add_favorites_user_counts_to_product.rb +6 -0
  38. data/lib/generators/spree_favorite_products/install/install_generator.rb +4 -3
  39. data/spec/controllers/spree/admin/favorite_products_controller_spec.rb +31 -41
  40. data/spec/controllers/spree/admin/products_controller_decorator_spec.rb +28 -0
  41. data/spec/controllers/spree/admin/users_controller_decorator_spec.rb +28 -0
  42. data/spec/controllers/spree/favorite_products_controller_spec.rb +25 -33
  43. data/spec/models/spree/app_configuration_decorator_spec.rb +2 -2
  44. data/spec/models/spree/favorite_spec.rb +21 -19
  45. data/spec/models/spree/product_decorator_spec.rb +16 -16
  46. data/spec/models/spree/user_decorator_spec.rb +9 -8
  47. data/spec/spec_helper.rb +21 -0
  48. data/spree_favorite_products.gemspec +9 -5
  49. metadata +80 -7
  50. data/Gemfile.lock +0 -345
@@ -6,38 +6,33 @@ describe Spree::FavoriteProductsController do
6
6
 
7
7
  shared_examples_for "request which requires user authentication" do
8
8
  it "authenticates user" do
9
- controller.should_receive(:authenticate_spree_user!)
9
+ expect(controller).to receive(:authenticate_spree_user!)
10
10
  send_request
11
11
  end
12
12
  end
13
13
 
14
14
  shared_examples_for "request which finds favorite product" do
15
15
  it "finds favorite product" do
16
- @current_user_favorites.should_receive(:where).with(:spree_products => {:id => 'id'})
17
- send_request
18
- end
19
-
20
- it "sets readonly to false" do
21
- @current_user_favorites.should_receive(:readonly).with(false)
16
+ expect(@favorites).to receive(:with_product_id).with('id')
22
17
  send_request
23
18
  end
24
19
 
25
20
  it "assigns @favorite" do
26
21
  send_request
27
- assigns(:favorite).should eq(@favorite)
22
+ expect(assigns(:favorite)).to eq(@favorite)
28
23
  end
29
24
  end
30
25
 
31
26
  describe 'POST create' do
32
27
  def send_request
33
- post :create, :id => 1, :format => :js, :use_route => 'spree'
28
+ post :create, params: { id: 1 }, as: :js
34
29
  end
35
30
 
36
31
  before(:each) do
37
- @favorite = mock_model(Spree::Favorite, :save => true)
32
+ @favorite = mock_model(Spree::Favorite, save: true)
38
33
  allow(controller).to receive(:authenticate_spree_user!).and_return(true)
39
34
  allow(Spree::Favorite).to receive(:new).and_return(@favorite)
40
- @user = mock_model(Spree::User, :favorites => Spree::Favorite, :generate_spree_api_key! => false, :last_incomplete_spree_order => nil)
35
+ @user = mock_model(Spree::User, favorites: Spree::Favorite, generate_spree_api_key!: false, last_incomplete_spree_order: nil)
41
36
  allow(controller).to receive(:spree_current_user).and_return(@user)
42
37
  end
43
38
 
@@ -45,24 +40,24 @@ describe Spree::FavoriteProductsController do
45
40
 
46
41
 
47
42
  it "creates favorite" do
48
- Spree::Favorite.should_receive(:new).with(:product_id => 1)
43
+ expect(Spree::Favorite).to receive(:new).with(product_id: 1)
49
44
  send_request
50
45
  end
51
46
 
52
47
  it "saves favorite" do
53
- @favorite.should_receive(:save)
48
+ expect(@favorite).to receive(:save)
54
49
  send_request
55
50
  end
56
51
 
57
52
  context "when favorite saved successfully" do
58
53
  it "renders create" do
59
54
  send_request
60
- response.should render_template(:create)
55
+ expect(response).to render_template(:create)
61
56
  end
62
57
 
63
58
  it "should assign success message" do
64
59
  send_request
65
- assigns(:message).should eq("Product has been successfully marked as favorite")
60
+ expect(assigns(:message)).to eq("Product has been successfully marked as favorite")
66
61
  end
67
62
  end
68
63
 
@@ -75,19 +70,19 @@ describe Spree::FavoriteProductsController do
75
70
 
76
71
  it "renders create template" do
77
72
  send_request
78
- response.should render_template(:create)
73
+ expect(response).to render_template(:create)
79
74
  end
80
75
 
81
76
  it "should assign error message" do
82
77
  send_request
83
- assigns(:message).should eq("Product already marked as favorite")
78
+ expect(assigns(:message)).to eq("Product already marked as favorite")
84
79
  end
85
80
  end
86
81
  end
87
82
 
88
83
  describe 'GET index' do
89
84
  def send_request
90
- get :index, :page => 'current_page', :use_route => 'spree'
85
+ get :index, params: { page: 'current_page' }
91
86
  end
92
87
 
93
88
  before(:each) do
@@ -95,50 +90,47 @@ describe Spree::FavoriteProductsController do
95
90
  allow(@favorite_products).to receive(:page).and_return(@favorite_products)
96
91
  allow(@favorite_products).to receive(:per).and_return(@favorite_products)
97
92
  allow(Spree::Config).to receive(:favorite_products_per_page).and_return('favorite_products_per_page')
98
- @user = mock_model(Spree::User, :favorite_products => @favorite_products, :generate_spree_api_key! => false, :last_incomplete_spree_order => nil)
93
+ @user = mock_model(Spree::User, favorite_products: @favorite_products, generate_spree_api_key!: false, last_incomplete_spree_order: nil)
99
94
  allow(controller).to receive(:authenticate_spree_user!).and_return(true)
100
95
  allow(controller).to receive(:spree_current_user).and_return(@user)
101
96
  end
102
97
 
103
98
  it "authenticates user" do
104
- controller.should_receive(:authenticate_spree_user!)
99
+ expect(controller).to receive(:authenticate_spree_user!)
105
100
  send_request
106
101
  end
107
102
 
108
103
  it "finds favorite products of current user" do
109
- @user.should_receive(:favorite_products)
104
+ expect(@user).to receive(:favorite_products)
110
105
  send_request
111
106
  end
112
107
 
113
108
  it "paginates favorite products" do
114
- @favorite_products.should_receive(:page).with('current_page')
109
+ expect(@favorite_products).to receive(:page).with('current_page')
115
110
  send_request
116
111
  end
117
112
 
118
113
  it "shows Spree::Config.favorite_products_per_page" do
119
- @favorite_products.should_receive(:per).with('favorite_products_per_page')
114
+ expect(@favorite_products).to receive(:per).with('favorite_products_per_page')
120
115
  send_request
121
116
  end
122
117
 
123
118
  it "assigns @favorite_products" do
124
119
  send_request
125
- assigns(:favorite_products).should eq(@favorite_products)
120
+ expect(assigns(:favorite_products)).to eq(@favorite_products)
126
121
  end
127
122
  end
128
123
 
129
124
  describe 'destroy' do
130
125
  def send_request(params = {})
131
- post :destroy, params.merge({:use_route => 'spree', :method => :delete, :format => :js, :id => 'id'})
126
+ post :destroy, params: params.merge({method: :delete, id: 'id'}), as: :js
132
127
  end
133
128
 
134
129
  before do
135
130
  @favorite = mock_model(Spree::Favorite)
136
- @current_user_favorites = double('spree_favorites')
137
- allow(@current_user_favorites).to receive(:where).and_return([@favorite])
138
- allow(@current_user_favorites).to receive(:readonly).and_return(@current_user_favorites)
139
131
  @favorites = double('spree_favorites')
140
- allow(@favorites).to receive(:joins).with(:product).and_return(@current_user_favorites)
141
- @user = mock_model(Spree::User, :favorites => @favorites, :generate_spree_api_key! => false, :last_incomplete_spree_order => nil)
132
+ allow(@favorites).to receive(:with_product_id).and_return([@favorite])
133
+ @user = mock_model(Spree::User, favorites: @favorites, generate_spree_api_key!: false, last_incomplete_spree_order: nil)
142
134
  allow(controller).to receive(:authenticate_spree_user!).and_return(true)
143
135
  allow(controller).to receive(:spree_current_user).and_return(@user)
144
136
  end
@@ -152,7 +144,7 @@ describe Spree::FavoriteProductsController do
152
144
  end
153
145
 
154
146
  it 'destroys' do
155
- @favorite.should_receive(:destroy)
147
+ expect(@favorite).to receive(:destroy)
156
148
  send_request
157
149
  end
158
150
 
@@ -163,7 +155,7 @@ describe Spree::FavoriteProductsController do
163
155
 
164
156
  it "sets @success to true" do
165
157
  send_request
166
- assigns(:success).should eq(true)
158
+ expect(assigns(:success)).to eq(true)
167
159
  end
168
160
  end
169
161
 
@@ -174,7 +166,7 @@ describe Spree::FavoriteProductsController do
174
166
 
175
167
  it 'sets @success to false' do
176
168
  send_request
177
- assigns(:success).should eq(false)
169
+ expect(assigns(:success)).to eq(false)
178
170
  end
179
171
  end
180
172
  end
@@ -1,3 +1,3 @@
1
1
  describe Spree::AppConfiguration do
2
- it { Spree::Config.favorite_products_per_page.should eq 10 }
3
- end
2
+ it { expect(Spree::Config.favorite_products_per_page).to eq 10 }
3
+ end
@@ -1,30 +1,32 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Spree::Favorite do
4
- it { should belong_to(:product) }
5
- it { should belong_to(:user) }
6
- it { should validate_uniqueness_of(:product_id).scoped_to(:user_id).with_message("already marked as favorite") }
7
- it { should validate_presence_of(:user_id) }
8
- it { should validate_presence_of(:product_id) }
4
+ it { is_expected.to belong_to(:product) }
5
+ it { is_expected.to belong_to(:user) }
6
+ it { is_expected.to validate_uniqueness_of(:product_id).scoped_to(:user_id).with_message("already marked as favorite") }
7
+ it { is_expected.to validate_presence_of(:user).with_message(:required) }
8
+ it { is_expected.to validate_presence_of(:product).with_message(:required) }
9
9
 
10
- context "when product_id is present" do
10
+ describe ".with_product_id" do
11
11
  before(:each) do
12
- @favorite = Spree::Favorite.new :product_id => 'invalid product id'
12
+ shipping_category = Spree::ShippingCategory.create! name: 'shipping_category'
13
+ @favorite_product1 = Spree::Product.create! name: 'favorite_product1', price: 100, shipping_category_id: shipping_category.id
14
+ @favorite_product2 = Spree::Product.create! name: 'favorite_product2', price: 100, shipping_category_id: shipping_category.id
15
+ @product1 = Spree::Product.create! name: 'product1', price: 100, shipping_category_id: shipping_category.id
16
+ @product2 = Spree::Product.create! name: 'product2', price: 100, shipping_category_id: shipping_category.id
17
+ @user1 = Spree::User.create! email: 'user1@example.com', password: 'example', password_confirmation: "example"
18
+ @user2 = Spree::User.create! email: 'user2@example.com', password: "example", password_confirmation: 'example'
19
+ @favorite1 = @user1.favorites.create! product_id: @favorite_product1.id
20
+ @favorite2 = @user2.favorites.create! product_id: @favorite_product1.id
21
+ @favorite3 = @user2.favorites.create! product_id: @favorite_product2.id
13
22
  end
14
- it "checks for the presence of product" do
15
- @favorite.valid?
16
- @favorite.errors[:product].should eq(["is invalid"])
17
- end
18
- end
19
23
 
20
- context "when product_id is not present" do
21
- before(:each) do
22
- @favorite = Spree::Favorite.new
24
+ it "expects to list favorites with given product id" do
25
+ expect(Spree::Favorite.with_product_id(@favorite_product1.id)).to include(@favorite1, @favorite2)
23
26
  end
24
27
 
25
- it "does not validate the presence of product" do
26
- @favorite.valid?
27
- @favorite.errors[:product].should eq([])
28
+ it "expects not to list favorites with other product id" do
29
+ expect(Spree::Favorite.with_product_id(@favorite_product1.id)).not_to include(@favorite3)
28
30
  end
29
31
  end
30
- end
32
+ end
@@ -2,41 +2,41 @@ require 'spec_helper'
2
2
 
3
3
  describe Spree::Product do
4
4
  before(:each) do
5
- shipping_category = Spree::ShippingCategory.create! :name => 'shipping_category'
6
- @favorite_product1 = Spree::Product.create! :name => 'favorite_product1', :price => 100, :shipping_category_id => shipping_category.id
7
- @favorite_product2 = Spree::Product.create! :name => 'favorite_product2', :price => 100, :shipping_category_id => shipping_category.id
8
- @product1 = Spree::Product.create! :name => 'product1', :price => 100, :shipping_category_id => shipping_category.id
9
- @product2 = Spree::Product.create! :name => 'product2', :price => 100, :shipping_category_id => shipping_category.id
10
- @user1 = Spree::User.create! :email => 'user1@example.com', :password => 'example', :password_confirmation => "example"
11
- @user2 = Spree::User.create! :email => 'user2@example.com', :password => "example", :password_confirmation => 'example'
12
- @user1.favorites.create! :product_id => @favorite_product1.id
13
- @user2.favorites.create! :product_id => @favorite_product1.id
14
- @user2.favorites.create! :product_id => @favorite_product2.id
5
+ shipping_category = Spree::ShippingCategory.create! name: 'shipping_category'
6
+ @favorite_product1 = Spree::Product.create! name: 'favorite_product1', price: 100, shipping_category_id: shipping_category.id
7
+ @favorite_product2 = Spree::Product.create! name: 'favorite_product2', price: 100, shipping_category_id: shipping_category.id
8
+ @product1 = Spree::Product.create! name: 'product1', price: 100, shipping_category_id: shipping_category.id
9
+ @product2 = Spree::Product.create! name: 'product2', price: 100, shipping_category_id: shipping_category.id
10
+ @user1 = Spree::User.create! email: 'user1@example.com', password: 'example', password_confirmation: "example"
11
+ @user2 = Spree::User.create! email: 'user2@example.com', password: "example", password_confirmation: 'example'
12
+ @user1.favorites.create! product_id: @favorite_product1.id
13
+ @user2.favorites.create! product_id: @favorite_product1.id
14
+ @user2.favorites.create! product_id: @favorite_product2.id
15
15
  end
16
16
 
17
17
 
18
- it { should have_many(:favorites).dependent(:destroy) }
19
- it { should have_many(:favorite_users).through(:favorites).class_name('Spree::User') }
18
+ it { is_expected.to have_many(:favorites).dependent(:destroy) }
19
+ it { is_expected.to have_many(:favorite_users).through(:favorites).class_name('Spree::User') }
20
20
 
21
21
  describe "Spree::Product.favorite" do
22
22
 
23
23
 
24
24
  it "returns favorite products" do
25
- Spree::Product.favorite.should =~ [@favorite_product1, @favorite_product2]
25
+ expect(Spree::Product.favorite).to match_array([@favorite_product1, @favorite_product2])
26
26
  end
27
27
  end
28
28
 
29
29
  describe ".order_by_favorite_users_count" do
30
30
  context 'when order not passed' do
31
31
  it "returns products ordered by users_count in descending order" do
32
- Spree::Product.favorite.order_by_favorite_users_count.should eq([@favorite_product1, @favorite_product2])
32
+ expect(Spree::Product.favorite.order_by_favorite_users_count).to eq([@favorite_product1, @favorite_product2])
33
33
  end
34
34
  end
35
35
 
36
36
  context 'when asc order passed' do
37
37
  it "returns products ordered by users_count in ascending order" do
38
- Spree::Product.favorite.order_by_favorite_users_count(true).should eq([@favorite_product2, @favorite_product1])
38
+ expect(Spree::Product.favorite.order_by_favorite_users_count(true)).to eq([@favorite_product2, @favorite_product1])
39
39
  end
40
40
  end
41
41
  end
42
- end
42
+ end
@@ -2,25 +2,26 @@ require 'spec_helper'
2
2
 
3
3
  describe Spree::User do
4
4
  before(:each) do
5
- @user = Spree::User.create! :email => 'test@example.com', :password => 'spree123'
6
- @product1 = Spree::Product.create! :name => 'product1', :price => 100, :shipping_category_id => 1
7
- @product2 = Spree::Product.create! :name => 'product2', :price => 100, :shipping_category_id => 1
5
+ @user = Spree::User.create! email: 'test@example.com', password: 'spree123'
6
+ shipping_category = Spree::ShippingCategory.create! name: 'shipping_category'
7
+ @product1 = Spree::Product.create! name: 'product1', price: 100, shipping_category_id: shipping_category.id
8
+ @product2 = Spree::Product.create! name: 'product2', price: 100, shipping_category_id: shipping_category.id
8
9
  favorite = Spree::Favorite.new
9
10
  favorite.product_id = @product1.id
10
11
  favorite.user_id = @user.id
11
12
  favorite.save!
12
13
  end
13
14
 
14
- it { should have_many(:favorites).dependent(:destroy) }
15
- it { should have_many(:favorite_products).through(:favorites).class_name('Spree::Product') }
15
+ it { is_expected.to have_many(:favorites).dependent(:destroy) }
16
+ it { is_expected.to have_many(:favorite_products).through(:favorites).class_name('Spree::Product') }
16
17
 
17
18
  describe "has_favorite_product?" do
18
19
  context "when product in user's favorite products" do
19
- it { @user.has_favorite_product?(@product1.id).should be_true }
20
+ it { expect(@user.has_favorite_product?(@product1.id)).to be_truthy }
20
21
  end
21
22
 
22
23
  context 'when product is not in users favorite products' do
23
- it { @user.has_favorite_product?(@product2.id).should be_false }
24
+ it { expect(@user.has_favorite_product?(@product2.id)).to be_falsey }
24
25
  end
25
26
  end
26
- end
27
+ end
@@ -29,6 +29,7 @@ Dir[File.join(File.dirname(__FILE__), 'support/**/*.rb')].each { |f| require f }
29
29
  require 'spree/testing_support/controller_requests'
30
30
  require 'spree/testing_support/authorization_helpers'
31
31
  require 'spree/testing_support/url_helpers'
32
+ require 'spree/testing_support/preferences'
32
33
 
33
34
  # Requires factories defined in lib/spree_favorite_products/factories.rb
34
35
  # require 'spree_favorite_products/factories'
@@ -43,6 +44,7 @@ RSpec.configure do |config|
43
44
  # visit spree.admin_path
44
45
  # current_path.should eql(spree.products_path)
45
46
  config.include Spree::TestingSupport::UrlHelpers
47
+ config.include Devise::Test::ControllerHelpers, type: :controller
46
48
 
47
49
  # == Mock Framework
48
50
  #
@@ -79,5 +81,24 @@ RSpec.configure do |config|
79
81
  DatabaseCleaner.clean
80
82
  end
81
83
 
84
+ config.include Spree::TestingSupport::Preferences
85
+ config.include Spree::TestingSupport::ControllerRequests, type: :controller
86
+ config.include Spree::Core::Engine.routes.url_helpers
87
+
82
88
  config.fail_fast = ENV['FAIL_FAST'] || false
89
+ config.infer_spec_type_from_file_location!
90
+ config.expose_current_running_example_as :example
91
+ end
92
+
93
+ Shoulda::Matchers.configure do |config|
94
+ config.integrate do |with|
95
+ # Choose a test framework:
96
+ with.test_framework :rspec
97
+ # Choose one or more libraries:
98
+ with.library :active_record
99
+ with.library :active_model
100
+ with.library :action_controller
101
+ # Or, choose the following (which implies all of the above):
102
+ # with.library :rails
103
+ end
83
104
  end
@@ -2,20 +2,24 @@
2
2
  Gem::Specification.new do |s|
3
3
  s.platform = Gem::Platform::RUBY
4
4
  s.name = 'spree_favorite_products'
5
- s.version = '3.0.0'
5
+ s.version = '3.2.0'
6
6
  s.summary = 'Favorite Products in Spree'
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
- s.required_ruby_version = '>= 2.0.0'
8
+ s.required_ruby_version = '>= 2.1.0'
9
9
 
10
- s.author = 'Mohit Bansal'
10
+ s.author = ['Mohit Bansal', 'Anurag Bharadwaj', '+ vinsol team']
11
11
  s.email = 'info@vinsol.com'
12
12
  s.homepage = 'http://vinsol.com'
13
13
  s.license = "MIT"
14
14
 
15
15
  s.files = `git ls-files`.split("\n")
16
- #s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
16
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
17
17
  s.require_path = 'lib'
18
18
  s.requirements << 'none'
19
19
 
20
- s.add_dependency 'spree_core', '~> 3.0.0'
20
+ s.add_dependency 'spree_core', '~> 3.2.0'
21
+ s.add_development_dependency 'coffee-rails', '~> 4.2.1'
22
+ s.add_development_dependency 'sass-rails', '~> 5.0'
23
+ s.add_development_dependency 'mysql2'
24
+ s.add_development_dependency 'sqlite3'
21
25
  end
metadata CHANGED
@@ -1,14 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_favorite_products
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mohit Bansal
8
+ - Anurag Bharadwaj
9
+ - "+ vinsol team"
8
10
  autorequire:
9
11
  bindir: bin
10
12
  cert_chain: []
11
- date: 2015-12-02 00:00:00.000000000 Z
13
+ date: 2017-06-19 00:00:00.000000000 Z
12
14
  dependencies:
13
15
  - !ruby/object:Gem::Dependency
14
16
  name: spree_core
@@ -16,14 +18,70 @@ dependencies:
16
18
  requirements:
17
19
  - - "~>"
18
20
  - !ruby/object:Gem::Version
19
- version: 3.0.0
21
+ version: 3.2.0
20
22
  type: :runtime
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
23
25
  requirements:
24
26
  - - "~>"
25
27
  - !ruby/object:Gem::Version
26
- version: 3.0.0
28
+ version: 3.2.0
29
+ - !ruby/object:Gem::Dependency
30
+ name: coffee-rails
31
+ requirement: !ruby/object:Gem::Requirement
32
+ requirements:
33
+ - - "~>"
34
+ - !ruby/object:Gem::Version
35
+ version: 4.2.1
36
+ type: :development
37
+ prerelease: false
38
+ version_requirements: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - "~>"
41
+ - !ruby/object:Gem::Version
42
+ version: 4.2.1
43
+ - !ruby/object:Gem::Dependency
44
+ name: sass-rails
45
+ requirement: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - "~>"
48
+ - !ruby/object:Gem::Version
49
+ version: '5.0'
50
+ type: :development
51
+ prerelease: false
52
+ version_requirements: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - "~>"
55
+ - !ruby/object:Gem::Version
56
+ version: '5.0'
57
+ - !ruby/object:Gem::Dependency
58
+ name: mysql2
59
+ requirement: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - ">="
62
+ - !ruby/object:Gem::Version
63
+ version: '0'
64
+ type: :development
65
+ prerelease: false
66
+ version_requirements: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ version: '0'
71
+ - !ruby/object:Gem::Dependency
72
+ name: sqlite3
73
+ requirement: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ type: :development
79
+ prerelease: false
80
+ version_requirements: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - ">="
83
+ - !ruby/object:Gem::Version
84
+ version: '0'
27
85
  description: 'This extension adds the following features: 1. Adds a link Mark as favorite
28
86
  on product detail page. 2. Favorite Products tab on header 3. Favorite Products
29
87
  tab in admin section'
@@ -36,17 +94,22 @@ files:
36
94
  - ".rspec"
37
95
  - ".travis.yml"
38
96
  - Gemfile
39
- - Gemfile.lock
40
97
  - LICENSE
41
98
  - README.md
42
99
  - Rakefile
43
100
  - Versionfile
44
101
  - app/.DS_Store
45
102
  - app/assets/javascripts/admin/spree_favorite_products.js
103
+ - app/assets/javascripts/spree/backend/spree_favorite_products.js
104
+ - app/assets/javascripts/spree/frontend/spree_favorite_products.js
46
105
  - app/assets/javascripts/store/spree_favorite_products.js
47
106
  - app/assets/stylesheets/admin/spree_favorite_products.css
107
+ - app/assets/stylesheets/spree/backend/spree_favorite_products.css
108
+ - app/assets/stylesheets/spree/frontend/spree_favorite_products.css
48
109
  - app/assets/stylesheets/store/spree_favorite_products.css
49
110
  - app/controllers/spree/admin/favorite_products_controller.rb
111
+ - app/controllers/spree/admin/products_controller_decorator.rb
112
+ - app/controllers/spree/admin/users_controller_decorator.rb
50
113
  - app/controllers/spree/favorite_products_controller.rb
51
114
  - app/models/spree/app_configuration_decorator.rb
52
115
  - app/models/spree/favorite.rb
@@ -55,24 +118,34 @@ files:
55
118
  - app/overrides/.DS_Store
56
119
  - app/overrides/add_favorite_products_per_page_configuration.rb
57
120
  - app/overrides/add_favorite_products_to_products_tab.rb
121
+ - app/overrides/add_favorite_users_tab_to_products.rb
58
122
  - app/overrides/add_link_to_mark_product_as_favorite.rb
59
123
  - app/overrides/add_link_to_users_favorite_products.rb
124
+ - app/overrides/addd_favorite_products_tab_to_users.rb
60
125
  - app/views/spree/.DS_Store
126
+ - app/views/spree/admin/favorite_products/_users.html.erb
61
127
  - app/views/spree/admin/favorite_products/index.html.erb
62
128
  - app/views/spree/admin/favorite_products/users.html.erb
129
+ - app/views/spree/admin/products/favorite_users.html.erb
130
+ - app/views/spree/admin/users/favorite_products.html.erb
63
131
  - app/views/spree/favorite_products/create.js.erb
64
132
  - app/views/spree/favorite_products/destroy.js.erb
65
133
  - app/views/spree/favorite_products/index.html.erb
134
+ - config/locales/bg.yml
66
135
  - config/locales/en.yml
136
+ - config/locales/pl.yml
67
137
  - config/routes.rb
68
138
  - db/migrate/20130705080641_create_table_favorites.rb
69
139
  - db/migrate/20130710105100_rename_favorites_to_spree_favorites.rb
140
+ - db/migrate/20160304152800_add_favorites_user_counts_to_product.rb
70
141
  - lib/generators/spree_favorite_products/install/install_generator.rb
71
142
  - lib/spree_favorite_products.rb
72
143
  - lib/spree_favorite_products/engine.rb
73
144
  - lib/spree_favorite_products/factories.rb
74
145
  - script/rails
75
146
  - spec/controllers/spree/admin/favorite_products_controller_spec.rb
147
+ - spec/controllers/spree/admin/products_controller_decorator_spec.rb
148
+ - spec/controllers/spree/admin/users_controller_decorator_spec.rb
76
149
  - spec/controllers/spree/favorite_products_controller_spec.rb
77
150
  - spec/models/spree/app_configuration_decorator_spec.rb
78
151
  - spec/models/spree/favorite_spec.rb
@@ -92,7 +165,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
92
165
  requirements:
93
166
  - - ">="
94
167
  - !ruby/object:Gem::Version
95
- version: 2.0.0
168
+ version: 2.1.0
96
169
  required_rubygems_version: !ruby/object:Gem::Requirement
97
170
  requirements:
98
171
  - - ">="
@@ -101,7 +174,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
101
174
  requirements:
102
175
  - none
103
176
  rubyforge_project:
104
- rubygems_version: 2.4.5
177
+ rubygems_version: 2.5.1
105
178
  signing_key:
106
179
  specification_version: 4
107
180
  summary: Favorite Products in Spree