lib/spree_cmd/installer.rb in spree_cmd-1.2.5 vs lib/spree_cmd/installer.rb in spree_cmd-1.3.0.rc1
- old
+ new
@@ -58,20 +58,21 @@
@spree_gem_options[:version] = version.to_s
end
end
def ask_questions
- @install_default_gateways = ask_with_default('Would you like to install the default gateways?')
+ @install_default_gateways = ask_with_default('Would you like to install the default gateways? (Recommended)')
@install_default_auth = ask_with_default('Would you like to install the default authentication system?')
- unless @install_default_auth
+
+ if @install_default_auth
+ @user_class = "Spree::User"
+ else
@user_class = ask("What is the name of the class representing users within your application? [User]")
if @user_class.blank?
@user_class = "User"
end
- else
- @user_class = "Spree::User"
- end
+ end
if options[:skip_install_data]
@run_migrations = false
@load_seed_data = false
@load_sample_data = false
@@ -91,16 +92,15 @@
inside @app_path do
gem :spree, @spree_gem_options
if @install_default_gateways
- gem :spree_usa_epay
- gem :spree_skrill
+ gem :spree_gateway, :github => "spree/spree_gateway"
end
if @install_default_auth
- gem :spree_auth_devise, :github => "spree/spree_auth_devise", :branch => "1-2-stable"
+ gem :spree_auth_devise, :github => "spree/spree_auth_devise", :branch => "edge"
end
run 'bundle install', :capture => true
end
end
@@ -123,10 +123,10 @@
def gem(name, gem_options={})
say_status :gemfile, name
parts = ["'#{name}'"]
parts << ["'#{gem_options.delete(:version)}'"] if gem_options[:version]
gem_options.each { |key, value| parts << ":#{key} => '#{value}'" }
- append_file 'Gemfile', "\ngem #{parts.join(', ')}", :verbose => false
+ append_file 'Gemfile', "gem #{parts.join(', ')}\n", :verbose => false
end
def ask_with_default(message, default = 'yes')
return true if options[:auto_accept]