spree_core 1.2.0.rc1 → 1.2.0.rc2
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.
- data/app/helpers/spree/base_helper.rb +5 -1
- data/lib/generators/spree/install/install_generator.rb +1 -0
- data/lib/generators/spree/install/templates/config/initializers/spree.rb +1 -1
- data/lib/spree/core/testing_support/common_rake.rb +3 -2
- data/lib/spree/core/testing_support/factories/user_factory.rb +2 -2
- data/lib/spree/core/version.rb +1 -1
- metadata +4 -4
@@ -95,7 +95,11 @@ module Spree
|
|
95
95
|
link_to image_tag(image_path), root_path
|
96
96
|
end
|
97
97
|
|
98
|
-
def flash_messages
|
98
|
+
def flash_messages(opts = {})
|
99
|
+
flash.reject do |msg_type, text|
|
100
|
+
opts[:ignore_types] && opts[:ignore_types].include?(msg_type)
|
101
|
+
end
|
102
|
+
|
99
103
|
flash.each do |msg_type, text|
|
100
104
|
concat(content_tag :div, text, :class => "flash #{msg_type}") unless msg_type == :commerce_tracking
|
101
105
|
end
|
@@ -9,6 +9,7 @@ module Spree
|
|
9
9
|
class_option :seed, :type => :boolean, :default => true, :banner => 'load seed data (migrations must be run)'
|
10
10
|
class_option :sample, :type => :boolean, :default => true, :banner => 'load sample data (migrations must be run)'
|
11
11
|
class_option :auto_accept, :type => :boolean
|
12
|
+
class_option :user_class, :type => :string
|
12
13
|
class_option :admin_email, :type => :string
|
13
14
|
class_option :admin_password, :type => :string
|
14
15
|
class_option :lib_name, :type => :string, :default => 'spree'
|
@@ -4,11 +4,12 @@ end
|
|
4
4
|
|
5
5
|
desc "Generates a dummy app for testing"
|
6
6
|
namespace :common do
|
7
|
-
task :test_app do
|
7
|
+
task :test_app, :user_class do |t, args|
|
8
|
+
args.with_defaults(:user_class => "Spree::LegacyUser")
|
8
9
|
require "#{ENV['LIB_NAME']}"
|
9
10
|
|
10
11
|
Spree::DummyGenerator.start ["--lib_name=#{ENV['LIB_NAME']}", "--database=#{ENV['DB_NAME']}", "--quiet"]
|
11
|
-
Spree::InstallGenerator.start ["--lib_name=#{ENV['LIB_NAME']}", "--auto-accept", "--migrate=false", "--seed=false", "--sample=false", "--quiet"]
|
12
|
+
Spree::InstallGenerator.start ["--lib_name=#{ENV['LIB_NAME']}", "--auto-accept", "--migrate=false", "--seed=false", "--sample=false", "--quiet", "--user_class=#{args[:user_class]}"]
|
12
13
|
|
13
14
|
puts "Setting up dummy database..."
|
14
15
|
cmd = "bundle exec rake db:drop db:create db:migrate db:test:prepare"
|
@@ -3,12 +3,12 @@ FactoryGirl.define do
|
|
3
3
|
"xxxx#{Time.now.to_i}#{rand(1000)}#{n}xxxxxxxxxxxxx"
|
4
4
|
end
|
5
5
|
|
6
|
-
factory :user, :class => Spree
|
6
|
+
factory :user, :class => Spree.user_class do
|
7
7
|
email { Faker::Internet.email }
|
8
8
|
login { email }
|
9
9
|
password 'secret'
|
10
10
|
password_confirmation 'secret'
|
11
|
-
authentication_token { FactoryGirl.generate(:user_authentication_token) } if Spree
|
11
|
+
authentication_token { FactoryGirl.generate(:user_authentication_token) } if Spree.user_class.attribute_method? :authentication_token
|
12
12
|
end
|
13
13
|
|
14
14
|
factory :admin_user, :parent => :user do
|
data/lib/spree/core/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.0.
|
4
|
+
version: 1.2.0.rc2
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-08-
|
12
|
+
date: 2012-08-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: acts_as_list
|
@@ -194,7 +194,7 @@ dependencies:
|
|
194
194
|
requirements:
|
195
195
|
- - ~>
|
196
196
|
- !ruby/object:Gem::Version
|
197
|
-
version: 3.2.
|
197
|
+
version: 3.2.8
|
198
198
|
type: :runtime
|
199
199
|
prerelease: false
|
200
200
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -202,7 +202,7 @@ dependencies:
|
|
202
202
|
requirements:
|
203
203
|
- - ~>
|
204
204
|
- !ruby/object:Gem::Version
|
205
|
-
version: 3.2.
|
205
|
+
version: 3.2.8
|
206
206
|
- !ruby/object:Gem::Dependency
|
207
207
|
name: kaminari
|
208
208
|
requirement: !ruby/object:Gem::Requirement
|