spree 1.0.0.rc1 → 1.0.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of spree might be problematic. Click here for more details.
data/README.md
CHANGED
@@ -21,11 +21,31 @@ however, to use only the pieces you are interested in. So for example, you coul
|
|
21
21
|
and perhaps combine it with your own custom authorization scheme instead of using spree_auth.
|
22
22
|
|
23
23
|
[![Build Status](https://secure.travis-ci.org/spree/spree.png)](http://travis-ci.org/spree/spree)
|
24
|
+
[![Dependency Status](https://gemnasium.com/spree/spree.png)](https://gemnasium.com/spree/spree)
|
25
|
+
|
26
|
+
Installation
|
27
|
+
------------
|
28
|
+
|
29
|
+
The fastest way to get started is by using the spree command line tool
|
30
|
+
available in the spree gem. It will add Spree to an existing Rails
|
31
|
+
application.
|
32
|
+
|
33
|
+
$ gem install spree
|
34
|
+
$ rails new my_store
|
35
|
+
$ spree install my_store
|
36
|
+
|
37
|
+
This will add the Spree gem, create intitializers, copy migrations and
|
38
|
+
optionally generate sample products and orders.
|
39
|
+
|
40
|
+
To auto accept all prompts while running the install generator, pass -A as an option
|
41
|
+
|
42
|
+
$ spree install my_store -A
|
24
43
|
|
25
44
|
Using the Gem
|
26
45
|
-------------
|
27
46
|
|
28
|
-
|
47
|
+
You can manually add Spree to your Rails 3.x application. Add Spree to
|
48
|
+
your Gemfile.
|
29
49
|
|
30
50
|
gem 'spree'
|
31
51
|
|
@@ -33,18 +53,16 @@ Update your bundle
|
|
33
53
|
|
34
54
|
$ bundle install
|
35
55
|
|
36
|
-
Use the install generator to
|
37
|
-
|
56
|
+
Use the install generator to copy migrations, intializers and generate
|
57
|
+
sample data.
|
38
58
|
|
39
|
-
$ rails g spree:
|
59
|
+
$ rails g spree:install
|
40
60
|
|
41
|
-
|
61
|
+
You can avoid running migrations or generating seed and sample data
|
42
62
|
|
43
|
-
|
63
|
+
$ rails g spree:install --migrate=false --sample=false --seed=false
|
44
64
|
|
45
|
-
|
46
|
-
generator you can manually run migrations and load basic data with the following
|
47
|
-
commands
|
65
|
+
You can always perform the steps later.
|
48
66
|
|
49
67
|
$ bundle exec rake db:migrate
|
50
68
|
$ bundle exec rake db:seed
|
@@ -80,7 +98,7 @@ Working with the edge source (latest and greatest features)
|
|
80
98
|
The source code is essentially a collection of gems. Spree is meant to be run within the context of Rails application. You can easily create a sandbox application inside of your cloned source directory for testing purposes.
|
81
99
|
|
82
100
|
|
83
|
-
1. Clone the
|
101
|
+
1. Clone the Git repo
|
84
102
|
|
85
103
|
git clone git://github.com/spree/spree.git spree
|
86
104
|
cd spree
|
@@ -89,7 +107,7 @@ The source code is essentially a collection of gems. Spree is meant to be run w
|
|
89
107
|
|
90
108
|
bundle install
|
91
109
|
|
92
|
-
3. Create a sandbox
|
110
|
+
3. Create a sandbox Rails application for testing purposes (and automatically perform all necessary database setup)
|
93
111
|
|
94
112
|
bundle exec rake sandbox
|
95
113
|
|
@@ -105,11 +123,11 @@ You may noticed that your Spree store runs slowly in development mode. This is
|
|
105
123
|
|
106
124
|
You can recompile your assets as follows:
|
107
125
|
|
108
|
-
|
126
|
+
$ bundle exec rake assets:precompile RAILS_ENV=development
|
109
127
|
|
110
|
-
If you want to remove precompiled assets (recommended before you commit to
|
128
|
+
If you want to remove precompiled assets (recommended before you commit to Git and push your changes) use the following rake task:
|
111
129
|
|
112
|
-
|
130
|
+
$ bundle exec rake assets:clean
|
113
131
|
|
114
132
|
|
115
133
|
|
@@ -119,7 +137,7 @@ Running Tests
|
|
119
137
|
If you want to run all the tests across all the gems then
|
120
138
|
|
121
139
|
$ cd spree
|
122
|
-
$ bundle exec rake
|
140
|
+
$ bundle exec rake
|
123
141
|
|
124
142
|
Each gem contains its own series of tests, and for each directory, you need to do a quick one-time
|
125
143
|
creation of a test application and then you can use it to run the tests. For example, to run the
|
@@ -128,8 +146,16 @@ tests for the core project.
|
|
128
146
|
$ cd core
|
129
147
|
$ bundle exec rake test_app
|
130
148
|
|
131
|
-
|
149
|
+
If you're working on multiple facets of Spree, you may want
|
150
|
+
to run this command at the root of the Spree project to
|
151
|
+
generate test applications for all the facets:
|
132
152
|
|
153
|
+
$ bundle exec rake test_app
|
154
|
+
|
155
|
+
You can run all of the tests inside a facet by also running
|
156
|
+
this command:
|
157
|
+
|
158
|
+
$ cd core
|
133
159
|
$ bundle exec rake
|
134
160
|
|
135
161
|
If you want to run specs for only a single spec file
|
metadata
CHANGED
@@ -1,180 +1,123 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0.rc2
|
5
5
|
prerelease: 6
|
6
|
-
segments:
|
7
|
-
- 1
|
8
|
-
- 0
|
9
|
-
- 0
|
10
|
-
- rc
|
11
|
-
- 1
|
12
|
-
version: 1.0.0.rc1
|
13
6
|
platform: ruby
|
14
|
-
authors:
|
7
|
+
authors:
|
15
8
|
- Sean Schofield
|
16
9
|
autorequire:
|
17
|
-
bindir:
|
10
|
+
bindir: bin
|
18
11
|
cert_chain: []
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
- !ruby/object:Gem::Dependency
|
23
|
-
version_requirements: &id001 !ruby/object:Gem::Requirement
|
24
|
-
none: false
|
25
|
-
requirements:
|
26
|
-
- - "="
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
hash: 15424055
|
29
|
-
segments:
|
30
|
-
- 1
|
31
|
-
- 0
|
32
|
-
- 0
|
33
|
-
- rc
|
34
|
-
- 1
|
35
|
-
version: 1.0.0.rc1
|
36
|
-
requirement: *id001
|
37
|
-
type: :runtime
|
38
|
-
prerelease: false
|
12
|
+
date: 2012-01-14 00:00:00.000000000Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
39
15
|
name: spree_core
|
40
|
-
|
41
|
-
version_requirements: &id002 !ruby/object:Gem::Requirement
|
16
|
+
requirement: &70170393207540 !ruby/object:Gem::Requirement
|
42
17
|
none: false
|
43
|
-
requirements:
|
44
|
-
- -
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
|
47
|
-
segments:
|
48
|
-
- 1
|
49
|
-
- 0
|
50
|
-
- 0
|
51
|
-
- rc
|
52
|
-
- 1
|
53
|
-
version: 1.0.0.rc1
|
54
|
-
requirement: *id002
|
18
|
+
requirements:
|
19
|
+
- - =
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 1.0.0.rc2
|
55
22
|
type: :runtime
|
56
23
|
prerelease: false
|
24
|
+
version_requirements: *70170393207540
|
25
|
+
- !ruby/object:Gem::Dependency
|
57
26
|
name: spree_auth
|
58
|
-
|
59
|
-
version_requirements: &id003 !ruby/object:Gem::Requirement
|
27
|
+
requirement: &70170393207100 !ruby/object:Gem::Requirement
|
60
28
|
none: false
|
61
|
-
requirements:
|
62
|
-
- -
|
63
|
-
- !ruby/object:Gem::Version
|
64
|
-
|
65
|
-
segments:
|
66
|
-
- 1
|
67
|
-
- 0
|
68
|
-
- 0
|
69
|
-
- rc
|
70
|
-
- 1
|
71
|
-
version: 1.0.0.rc1
|
72
|
-
requirement: *id003
|
29
|
+
requirements:
|
30
|
+
- - =
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 1.0.0.rc2
|
73
33
|
type: :runtime
|
74
34
|
prerelease: false
|
35
|
+
version_requirements: *70170393207100
|
36
|
+
- !ruby/object:Gem::Dependency
|
75
37
|
name: spree_api
|
76
|
-
|
77
|
-
version_requirements: &id004 !ruby/object:Gem::Requirement
|
38
|
+
requirement: &70170393206660 !ruby/object:Gem::Requirement
|
78
39
|
none: false
|
79
|
-
requirements:
|
80
|
-
- -
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
|
83
|
-
segments:
|
84
|
-
- 1
|
85
|
-
- 0
|
86
|
-
- 0
|
87
|
-
- rc
|
88
|
-
- 1
|
89
|
-
version: 1.0.0.rc1
|
90
|
-
requirement: *id004
|
40
|
+
requirements:
|
41
|
+
- - =
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: 1.0.0.rc2
|
91
44
|
type: :runtime
|
92
45
|
prerelease: false
|
46
|
+
version_requirements: *70170393206660
|
47
|
+
- !ruby/object:Gem::Dependency
|
93
48
|
name: spree_dash
|
94
|
-
|
95
|
-
version_requirements: &id005 !ruby/object:Gem::Requirement
|
49
|
+
requirement: &70170393206220 !ruby/object:Gem::Requirement
|
96
50
|
none: false
|
97
|
-
requirements:
|
98
|
-
- -
|
99
|
-
- !ruby/object:Gem::Version
|
100
|
-
|
101
|
-
segments:
|
102
|
-
- 1
|
103
|
-
- 0
|
104
|
-
- 0
|
105
|
-
- rc
|
106
|
-
- 1
|
107
|
-
version: 1.0.0.rc1
|
108
|
-
requirement: *id005
|
51
|
+
requirements:
|
52
|
+
- - =
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 1.0.0.rc2
|
109
55
|
type: :runtime
|
110
56
|
prerelease: false
|
57
|
+
version_requirements: *70170393206220
|
58
|
+
- !ruby/object:Gem::Dependency
|
111
59
|
name: spree_sample
|
112
|
-
|
113
|
-
version_requirements: &id006 !ruby/object:Gem::Requirement
|
60
|
+
requirement: &70170393205700 !ruby/object:Gem::Requirement
|
114
61
|
none: false
|
115
|
-
requirements:
|
116
|
-
- -
|
117
|
-
- !ruby/object:Gem::Version
|
118
|
-
|
119
|
-
segments:
|
120
|
-
- 1
|
121
|
-
- 0
|
122
|
-
- 0
|
123
|
-
- rc
|
124
|
-
- 1
|
125
|
-
version: 1.0.0.rc1
|
126
|
-
requirement: *id006
|
62
|
+
requirements:
|
63
|
+
- - =
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: 1.0.0.rc2
|
127
66
|
type: :runtime
|
128
67
|
prerelease: false
|
68
|
+
version_requirements: *70170393205700
|
69
|
+
- !ruby/object:Gem::Dependency
|
129
70
|
name: spree_promo
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
-
|
71
|
+
requirement: &70170393205240 !ruby/object:Gem::Requirement
|
72
|
+
none: false
|
73
|
+
requirements:
|
74
|
+
- - =
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: 1.0.0.rc2
|
77
|
+
type: :runtime
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: *70170393205240
|
80
|
+
- !ruby/object:Gem::Dependency
|
81
|
+
name: spree_cmd
|
82
|
+
requirement: &70170393204520 !ruby/object:Gem::Requirement
|
83
|
+
none: false
|
84
|
+
requirements:
|
85
|
+
- - =
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: 1.0.0.rc2
|
88
|
+
type: :runtime
|
89
|
+
prerelease: false
|
90
|
+
version_requirements: *70170393204520
|
91
|
+
description: ! 'Spree is an open source e-commerce framework for Ruby on Rails. Join
|
92
|
+
us on the spree-user google group or in #spree on IRC'
|
93
|
+
email: sean@spreecommerce.com
|
94
|
+
executables: []
|
134
95
|
extensions: []
|
135
|
-
|
136
96
|
extra_rdoc_files: []
|
137
|
-
|
138
|
-
files:
|
97
|
+
files:
|
139
98
|
- README.md
|
140
|
-
- lib/generators/spree/install/install_generator.rb
|
141
|
-
- lib/generators/spree/install/templates/config/initializers/spree.rb
|
142
99
|
- lib/generators/spree/site/site_generator.rb
|
143
|
-
- lib/spree/bin/spree
|
144
|
-
- lib/spree/cli.rb
|
145
100
|
- lib/spree/url_helpers.rb
|
146
101
|
- lib/spree.rb
|
147
102
|
homepage: http://spreecommerce.com
|
148
103
|
licenses: []
|
149
|
-
|
150
104
|
post_install_message:
|
151
105
|
rdoc_options: []
|
152
|
-
|
153
|
-
require_paths:
|
106
|
+
require_paths:
|
154
107
|
- lib
|
155
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
108
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
156
109
|
none: false
|
157
|
-
requirements:
|
158
|
-
- -
|
159
|
-
- !ruby/object:Gem::Version
|
160
|
-
hash: 57
|
161
|
-
segments:
|
162
|
-
- 1
|
163
|
-
- 8
|
164
|
-
- 7
|
110
|
+
requirements:
|
111
|
+
- - ! '>='
|
112
|
+
- !ruby/object:Gem::Version
|
165
113
|
version: 1.8.7
|
166
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
114
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
167
115
|
none: false
|
168
|
-
requirements:
|
169
|
-
- -
|
170
|
-
- !ruby/object:Gem::Version
|
171
|
-
hash: 23
|
172
|
-
segments:
|
173
|
-
- 1
|
174
|
-
- 3
|
175
|
-
- 6
|
116
|
+
requirements:
|
117
|
+
- - ! '>='
|
118
|
+
- !ruby/object:Gem::Version
|
176
119
|
version: 1.3.6
|
177
|
-
requirements:
|
120
|
+
requirements:
|
178
121
|
- none
|
179
122
|
rubyforge_project:
|
180
123
|
rubygems_version: 1.8.10
|
@@ -182,4 +125,3 @@ signing_key:
|
|
182
125
|
specification_version: 3
|
183
126
|
summary: Full-stack e-commerce framework for Ruby on Rails.
|
184
127
|
test_files: []
|
185
|
-
|
@@ -1,198 +0,0 @@
|
|
1
|
-
require 'rails/generators'
|
2
|
-
require 'highline/import'
|
3
|
-
require 'bundler'
|
4
|
-
require 'bundler/cli'
|
5
|
-
|
6
|
-
module Spree
|
7
|
-
class InstallGenerator < Rails::Generators::Base
|
8
|
-
argument :after_bundle_only, :type => :string, :default => "false"
|
9
|
-
|
10
|
-
class_option :auto_accept, :type => :boolean, :default => false, :aliases => '-A', :desc => "Answer yes to all prompts"
|
11
|
-
class_option :skip_install_data, :type => :boolean, :default => false
|
12
|
-
class_option :lib_name, :default => 'spree'
|
13
|
-
class_option :test_app, :type => :boolean, :default => false
|
14
|
-
|
15
|
-
def self.source_paths
|
16
|
-
paths = self.superclass.source_paths
|
17
|
-
paths << File.expand_path('../templates', "../../#{__FILE__}")
|
18
|
-
paths << File.expand_path('../templates', "../#{__FILE__}")
|
19
|
-
paths << File.expand_path('../templates', __FILE__)
|
20
|
-
paths.flatten
|
21
|
-
end
|
22
|
-
|
23
|
-
def ask_questions
|
24
|
-
@install_blue_theme = ask_with_default("Would you like to install the default blue theme?")
|
25
|
-
@install_default_gateways = ask_with_default("Would you like to install the default gateways?")
|
26
|
-
|
27
|
-
if options[:skip_install_data]
|
28
|
-
@run_migrations = false
|
29
|
-
@load_seed_data = false
|
30
|
-
@load_sample_data = false
|
31
|
-
else
|
32
|
-
@run_migrations = ask_with_default("Would you like to run the migrations?")
|
33
|
-
if @run_migrations
|
34
|
-
@load_seed_data = ask_with_default("Would you like to load the seed data?")
|
35
|
-
@load_sample_data = ask_with_default("Would you like to load the sample data?")
|
36
|
-
else
|
37
|
-
@load_seed_data = false
|
38
|
-
@load_sample_data = false
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
|
-
def add_files
|
44
|
-
template 'config/initializers/spree.rb', 'config/initializers/spree.rb'
|
45
|
-
end
|
46
|
-
|
47
|
-
def config_spree_yml
|
48
|
-
create_file "config/spree.yml" do
|
49
|
-
settings = { 'version' => Spree.version }
|
50
|
-
|
51
|
-
settings.to_yaml
|
52
|
-
end
|
53
|
-
end
|
54
|
-
|
55
|
-
def remove_unneeded_files
|
56
|
-
remove_file "public/index.html"
|
57
|
-
end
|
58
|
-
|
59
|
-
def additional_tweaks
|
60
|
-
return unless File.exists? 'public/robots.txt'
|
61
|
-
append_file "public/robots.txt", <<-ROBOTS
|
62
|
-
User-agent: *
|
63
|
-
Disallow: /checkouts
|
64
|
-
Disallow: /orders
|
65
|
-
Disallow: /countries
|
66
|
-
Disallow: /line_items
|
67
|
-
Disallow: /password_resets
|
68
|
-
Disallow: /states
|
69
|
-
Disallow: /user_sessions
|
70
|
-
Disallow: /users
|
71
|
-
ROBOTS
|
72
|
-
end
|
73
|
-
|
74
|
-
def create_overrides_directory
|
75
|
-
empty_directory "app/overrides"
|
76
|
-
end
|
77
|
-
|
78
|
-
def configure_application
|
79
|
-
application <<-APP
|
80
|
-
|
81
|
-
config.to_prepare do
|
82
|
-
# Load application's model / class decorators
|
83
|
-
Dir.glob(File.join(File.dirname(__FILE__), "../app/**/*_decorator*.rb")) do |c|
|
84
|
-
Rails.configuration.cache_classes ? require(c) : load(c)
|
85
|
-
end
|
86
|
-
|
87
|
-
# Load application's view overrides
|
88
|
-
Dir.glob(File.join(File.dirname(__FILE__), "../app/overrides/*.rb")) do |c|
|
89
|
-
Rails.configuration.cache_classes ? require(c) : load(c)
|
90
|
-
end
|
91
|
-
end
|
92
|
-
APP
|
93
|
-
|
94
|
-
append_file "config/environment.rb", "\nActiveRecord::Base.include_root_in_json = true\n"
|
95
|
-
end
|
96
|
-
|
97
|
-
def install_gems
|
98
|
-
return if options[:test_app]
|
99
|
-
gems = {}
|
100
|
-
|
101
|
-
if @install_blue_theme
|
102
|
-
gems['spree_blue_theme'] = { :git => 'git@github.com:spree/spree_blue_theme.git',
|
103
|
-
:ref => '10666404ccb3ed4a4cc9cbe41e822ab2bb55112e' }
|
104
|
-
end
|
105
|
-
|
106
|
-
if @install_default_gateways
|
107
|
-
gems['spree_usa_epay'] = { :git => 'git@github.com:spree/spree_usa_epay.git',
|
108
|
-
:ref => '01db40c31e6933c7744403ce13536a34167165eb' }
|
109
|
-
|
110
|
-
gems['spree_skrill'] = { :git => 'git@github.com:spree/spree_skrill.git',
|
111
|
-
:ref => '6743bcbd0146d1c7145d6befc648005d8d0cf79a' }
|
112
|
-
end
|
113
|
-
|
114
|
-
unless gems.empty?
|
115
|
-
gems.each do |name, options|
|
116
|
-
gem name, options
|
117
|
-
end
|
118
|
-
bundle_command :update
|
119
|
-
end
|
120
|
-
end
|
121
|
-
|
122
|
-
def include_seed_data
|
123
|
-
append_file "db/seeds.rb", <<-SEEDS
|
124
|
-
\n
|
125
|
-
Spree::Core::Engine.load_seed if defined?(Spree::Core)
|
126
|
-
Spree::Auth::Engine.load_seed if defined?(Spree::Auth)
|
127
|
-
SEEDS
|
128
|
-
end
|
129
|
-
|
130
|
-
def install_migrations
|
131
|
-
say_status :copying, "migrations"
|
132
|
-
silence_stream(STDOUT) do
|
133
|
-
silence_warnings { rake 'railties:install:migrations' }
|
134
|
-
end
|
135
|
-
end
|
136
|
-
|
137
|
-
def run_migrations
|
138
|
-
if @run_migrations
|
139
|
-
say_status :running, "migrations"
|
140
|
-
rake('db:migrate')
|
141
|
-
else
|
142
|
-
say_status :skipping, "migrations (don't forget to run rake db:migrate)"
|
143
|
-
end
|
144
|
-
end
|
145
|
-
|
146
|
-
def populate_seed_data
|
147
|
-
if @load_seed_data
|
148
|
-
say_status :loading, "seed data"
|
149
|
-
rake('db:seed AUTO_ACCEPT=true')
|
150
|
-
else
|
151
|
-
say_status :skipping, "seed data (you can always run rake db:seed)"
|
152
|
-
end
|
153
|
-
end
|
154
|
-
|
155
|
-
def load_sample_data
|
156
|
-
if @load_sample_data
|
157
|
-
say_status :loading, "sample data"
|
158
|
-
rake('spree_sample:load')
|
159
|
-
else
|
160
|
-
say_status :skipping, "sample data (you can always run rake spree_sample:load)"
|
161
|
-
end
|
162
|
-
end
|
163
|
-
|
164
|
-
def notify_about_routes
|
165
|
-
insert_into_file File.join('config', 'routes.rb'), :after => "Application.routes.draw do\n" do
|
166
|
-
" # Mount Spree's routes\n mount Spree::Core::Engine, :at => '/'\n"
|
167
|
-
end
|
168
|
-
|
169
|
-
unless options[:quiet]
|
170
|
-
puts "*" * 50
|
171
|
-
puts "We added the following line to your application's config/routes.rb file:"
|
172
|
-
puts " "
|
173
|
-
puts " mount Spree::Core::Engine, :at => '/'"
|
174
|
-
end
|
175
|
-
end
|
176
|
-
|
177
|
-
private
|
178
|
-
|
179
|
-
def ask_with_default(message, default='yes')
|
180
|
-
return true if options[:auto_accept]
|
181
|
-
|
182
|
-
valid = false
|
183
|
-
until valid
|
184
|
-
response = ask "#{message} (y/n) [#{default}]"
|
185
|
-
response = default if response.empty?
|
186
|
-
valid = (response =~ /\Ay(?:es)?|no?\Z/i)
|
187
|
-
end
|
188
|
-
response.downcase[0] == ?y
|
189
|
-
end
|
190
|
-
|
191
|
-
# Copied from https://github.com/rails/rails/blob/b1ceffd7b224c397d8ba5344b9c1438dd62f8325/railties/lib/rails/generators/app_base.rb#L189
|
192
|
-
def bundle_command(command)
|
193
|
-
say_status :run, "bundle #{command}"
|
194
|
-
Bundler::CLI.new.send(command)
|
195
|
-
end
|
196
|
-
|
197
|
-
end
|
198
|
-
end
|
data/lib/spree/bin/spree
DELETED
data/lib/spree/cli.rb
DELETED
@@ -1,52 +0,0 @@
|
|
1
|
-
require "rubygems"
|
2
|
-
require "spree/core/version"
|
3
|
-
require "thor"
|
4
|
-
require 'generators/spree/extension/extension_generator'
|
5
|
-
#require 'spree/application'
|
6
|
-
#require 'spree/test'
|
7
|
-
|
8
|
-
module Spree
|
9
|
-
class CLI < Thor
|
10
|
-
def self.basename
|
11
|
-
"spree"
|
12
|
-
end
|
13
|
-
|
14
|
-
map "-v" => "version"
|
15
|
-
map "--version" => "version"
|
16
|
-
|
17
|
-
desc "version", "print the current version"
|
18
|
-
def version
|
19
|
-
shell.say "Spree #{Spree.version}", :green
|
20
|
-
end
|
21
|
-
|
22
|
-
desc "extension NAME", "create a new extension with the given name"
|
23
|
-
method_option "name", :type => :string
|
24
|
-
def extension(name)
|
25
|
-
invoke "spree:extension:generate", [options[:name] || name]
|
26
|
-
end
|
27
|
-
|
28
|
-
#desc "app NAME", "creates a new rails app configured to use Spree"
|
29
|
-
#method_option "name", :type => :string
|
30
|
-
#method_option "sample", :type => :boolean, :default => false
|
31
|
-
#method_option "bootstrap", :type => :boolean, :default => false
|
32
|
-
#method_option "clean", :type => :boolean, :default => false
|
33
|
-
#method_option "dir", :type => :string, :default => '.'
|
34
|
-
#def app(name)
|
35
|
-
#invoke "spree:application:generate", [options[:name] || name, options]
|
36
|
-
#end
|
37
|
-
|
38
|
-
#desc "sandbox", "create a sandbox rails app complete with sample data"
|
39
|
-
#def sandbox(name="sandbox")
|
40
|
-
#invoke "spree:application:generate", [options[:name] || name, {:clean => true, :sample => true,
|
41
|
-
#:bootstrap => true}]
|
42
|
-
#end
|
43
|
-
|
44
|
-
#desc "test_app", "create a rails app suitable for Spree testing"
|
45
|
-
#method_option "dir", :type => :string, :default => '.'
|
46
|
-
#def test_app(name="test_app")
|
47
|
-
##invoke "spree:application:generate", [options[:name] || name, {:clean => true, :dir => options[:dir]}]
|
48
|
-
#invoke "spree:test:generate", [options[:dir]]
|
49
|
-
#end
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|