forked from joshnuss/spree_stock_notifications
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request joshnuss#4 from farneman/3-0-stable
Updated for Spree 3.0 stable branch
- Loading branch information
Showing
7 changed files
with
40 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
source 'https://rubygems.org' | ||
|
||
# Provides basic authentication functionality for testing parts of your engine | ||
gem 'spree_auth_devise', github: 'spree/spree_auth_devise', branch: '2-2-stable' | ||
gem 'spree_auth_devise', github: 'spree/spree_auth_devise', branch: '3-0-stable' | ||
|
||
gemspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 11 additions & 7 deletions
18
lib/generators/spree_stock_notifications/install/templates/spree_stock_notifications.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
Spree.config do |config| | ||
# create a list of admin emails | ||
admin_role = Spree::Role.find_by_name('admin') | ||
admin_emails = admin_role.users.map(&:email).join(',') | ||
# ==> Stock Notifications List | ||
# Supply a comma-separated list of emails to get notifications: | ||
# config.stock_notifications_list = "jack@example.com,jill@example.com" | ||
|
||
# set comma separated list of emails | ||
config.stock_notifications_list = admin_emails | ||
# In a typical Spree app this can be accomplished with the following: | ||
# admin_role = Spree::Role.find_by_name('admin') | ||
# admin_emails = admin_role.users.map(&:email).join(',') | ||
# config.stock_notifications_list = admin_emails | ||
|
||
# when stock level reaches the "low stock threshold", admins will be notified. Default is 1 | ||
config.low_stock_threshold = 2 | ||
# ==> Low Stock Threshold | ||
# When stock level reaches the "low stock threshold", admins will be | ||
# notified. Default is 1. | ||
# config.low_stock_threshold = 1 | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
require "spec_helper" | ||
|
||
describe StockMailer do | ||
pending "add some examples to (or delete) #{__FILE__}" | ||
describe StockMailer, :type => :mailer do | ||
skip "add some examples to (or delete) #{__FILE__}" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters