solidus 1.0.0.pre

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.
Files changed (6) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +304 -0
  3. data/lib/sandbox.sh +38 -0
  4. data/lib/solidus.rb +15 -0
  5. data/lib/spree.rb +1 -0
  6. metadata +119 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: c9879605ee40d8de5832f4cf58d178cd9ae82a98
4
+ data.tar.gz: e47654128e3ba531ac63dae14a09a5fa9179c24b
5
+ SHA512:
6
+ metadata.gz: 9bd502c1df6943f11d479a6277a9e2417ffec80349983b2124d0b6a884ac5d105cbcf113d7e6ab2d88d56322fff64bf52dd119e060ddcc7eefaa920013bacad5
7
+ data.tar.gz: 3331411f2259665886a62005f45be06212fe71395a591b49c79a11535dcd88de69954fd96233ed87b993bf7feee608e87612ce73de74ffb72d3f59d1d45d9f4b
@@ -0,0 +1,304 @@
1
+
2
+ ![](https://raw.githubusercontent.com/solidusio/solidus/master/solidus.png)
3
+
4
+ Summary
5
+ -------
6
+
7
+ Solidus is a complete open source e-commerce solution built with Ruby on Rails. It
8
+ is a fork of Spree.
9
+
10
+ Solidus actually consists of several different gems, each of which are maintained
11
+ in a single repository and documented in a single set of
12
+ [online documentation](http://docs.solidus.io/). By requiring the
13
+ solidus gem you automatically require all of the necessary gem dependencies which are:
14
+
15
+ * solidus\_api (RESTful API)
16
+ * solidus\_frontend (User-facing components)
17
+ * solidus\_backend (Admin area)
18
+ * solidus\_core (Models & Mailers, the basic components of Solidus that it can't run without)
19
+ * solidus\_sample (Sample data)
20
+
21
+ All of the gems are designed to work together to provide a fully functional
22
+ e-commerce platform. It is also possible, however, to use only the pieces you
23
+ are interested in. For example, you could use just the barebones solidus\_core
24
+ gem and perhaps combine it with your own custom frontend instead of using
25
+ solidus\_frontend.
26
+
27
+ [![Circle CI](https://circleci.com/gh/solidusio/solidus/tree/master.svg?style=shield)](https://circleci.com/gh/solidusio/solidus/tree/master)
28
+ [![Gem](https://img.shields.io/gem/v/solidus.svg)](https://rubygems.org/gems/solidus)
29
+ [![License](http://img.shields.io/badge/license-BSD-yellowgreen.svg)](LICENSE.md)
30
+
31
+ Getting started
32
+ ---------------
33
+
34
+ To add solidus, begin with a rails 4.2 application. Add the following to your
35
+ Gemfile.
36
+
37
+ ```ruby
38
+ gem 'solidus'
39
+ gem 'solidus_auth_devise'
40
+ ```
41
+
42
+ Run the `bundle` command to install.
43
+
44
+ After installing gems, you'll have to run the generators to create necessary
45
+ configuration files and migrations.
46
+
47
+ ```
48
+ bundle exec rails g spree:install
49
+ bundle exec rake railties:install:migrations
50
+ ```
51
+
52
+ Run migrations to create the new models in the database.
53
+
54
+ ```
55
+ bundle exec rake db:migrate
56
+ ```
57
+
58
+
59
+ Using stable builds and bleeding edge
60
+ -------------
61
+
62
+ To use a stable build of Spree, you can manually add Spree to your
63
+ Rails application. To use the 2-4-stable branch of Spree, add this line to
64
+ your Gemfile.
65
+
66
+ ```ruby
67
+ gem 'solidus'
68
+ ```
69
+
70
+ Alternatively, if you want to use the bleeding edge version of Solidus, use this
71
+ line:
72
+
73
+ ```ruby
74
+ gem 'solidus', github: 'solidusio/solidus'
75
+ ```
76
+
77
+ **Note: The master branch is not guaranteed to ever be in a fully functioning
78
+ state. It is unwise to use this branch in a production system you care deeply
79
+ about.**
80
+
81
+ If you wish to have authentication included also, you will need to add the
82
+ `solidus_auth_devise` gem as well.
83
+
84
+ ```ruby
85
+ gem 'solidus_auth_devise'
86
+ ```
87
+
88
+ Once you've done that, then you can install these gems using this command:
89
+
90
+ ```shell
91
+ bundle install
92
+ ```
93
+
94
+ Use the install generator to set up Solidus:
95
+
96
+ ```shell
97
+ rails g spree:install --sample=false --seed=false
98
+ ```
99
+
100
+ At this point, if you are using solidus\_auth\_devise you will need to change this
101
+ line in `config/initializers/spree.rb`:
102
+
103
+ ```ruby
104
+ Spree.user_class = "Spree::LegacyUser"
105
+ ```
106
+
107
+ To this:
108
+
109
+ ```ruby
110
+ Spree.user_class = "Spree::User"
111
+ ```
112
+
113
+ You can avoid running migrations or generating seed and sample data by passing
114
+ in these flags:
115
+
116
+ ```shell
117
+ rails g spree:install --migrate=false --sample=false --seed=false
118
+ ```
119
+
120
+ You can always perform the steps later by using these commands.
121
+
122
+ ```shell
123
+ bundle exec rake railties:install:migrations
124
+ bundle exec rake db:migrate
125
+ bundle exec rake db:seed
126
+ bundle exec rake spree_sample:load
127
+ ```
128
+
129
+ Browse Store
130
+ ------------
131
+
132
+ http://localhost:nnnn
133
+
134
+ Browse Admin Interface
135
+ ----------------------
136
+
137
+ http://localhost:nnnn/admin
138
+
139
+ Working with the edge source (latest and greatest features)
140
+ -----------------------------------------------------------
141
+
142
+ The source code is essentially a collection of gems. Solidus is meant to be run
143
+ within the context of Rails application. You can easily create a sandbox
144
+ application inside of your cloned source directory for testing purposes.
145
+
146
+
147
+ 1. Clone the Git repo
148
+
149
+ ```shell
150
+ git clone git://github.com/solidusio/solidus.git
151
+ cd solidus
152
+ ```
153
+
154
+ 2. Install the gem dependencies
155
+
156
+ ```shell
157
+ bundle install
158
+ ```
159
+
160
+ 3. Create a sandbox Rails application for testing purposes (and automatically
161
+ perform all necessary database setup)
162
+
163
+ ```shell
164
+ bundle exec rake sandbox
165
+ ```
166
+
167
+ 4. Start the server
168
+
169
+ ```shell
170
+ cd sandbox
171
+ rails server
172
+ ```
173
+
174
+ Performance
175
+ -----------
176
+
177
+ You may notice that your Solidus store runs slowly in development mode. This is
178
+ a side-effect of how Rails works in development mode which is to continuously reload
179
+ your Ruby objects on each request. The introduction of the asset pipeline in
180
+ Rails 3.1 made default performance in development mode significantly worse. There
181
+ are, however, a few tricks to speeding up performance in development mode.
182
+
183
+ First, in your `config/development.rb`:
184
+
185
+ ```ruby
186
+ config.assets.debug = false
187
+ ```
188
+
189
+ You can precompile your assets as follows:
190
+
191
+ ```shell
192
+ RAILS_ENV=development bundle exec rake assets:precompile
193
+ ```
194
+
195
+ If you want to remove precompiled assets (recommended before you commit to Git
196
+ and push your changes) use the following rake task:
197
+
198
+ ```shell
199
+ RAILS_ENV=development bundle exec rake assets:clean
200
+ ```
201
+
202
+ Use Dedicated Solidus Devise Authentication
203
+ -------------------------------------------
204
+ Add the following to your Gemfile
205
+
206
+ ```ruby
207
+ gem 'solidus_auth_devise', github: 'solidusio/solidus_auth_devise'
208
+ ```
209
+
210
+ Then run `bundle install`. Authentication will then work exactly as it did in
211
+ previous versions of Spree.
212
+
213
+ If you're installing this in a new Solidus application, you'll need to install
214
+ and run the migrations with
215
+
216
+ ```shell
217
+ bundle exec rake spree_auth:install:migrations
218
+ bundle exec rake db:migrate
219
+ ```
220
+
221
+ change the following line in `config/initializers/spree.rb`
222
+ ```ruby
223
+ Spree.user_class = 'Spree::LegacyUser'
224
+ ```
225
+ to
226
+ ```ruby
227
+ Spree.user_class = 'Spree::User'
228
+ ```
229
+
230
+ In order to set up the admin user for the application you should then run:
231
+
232
+ ```shell
233
+ bundle exec rake spree_auth:admin:create
234
+ ```
235
+
236
+ Running Tests
237
+ -------------
238
+
239
+ We use CircleCI to run the tests for Solidus.
240
+
241
+ You can see the build statuses at [https://circleci.com/gh/solidusio/solidus](https://circleci.com/gh/solidusio/solidus)
242
+
243
+ ---
244
+
245
+ Each gem contains its own series of tests, and for each directory, you need to
246
+ do a quick one-time creation of a test application and then you can use it to run
247
+ the tests. For example, to run the tests for the core project.
248
+ ```shell
249
+ cd core
250
+ bundle exec rake test_app
251
+ bundle exec rspec spec
252
+ ```
253
+
254
+ If you would like to run specs against a particular database you may specify the
255
+ dummy apps database, which defaults to sqlite3.
256
+ ```shell
257
+ DB=postgres bundle exec rake test_app
258
+ ```
259
+
260
+ If you want to run specs for only a single spec file
261
+ ```shell
262
+ bundle exec rspec spec/models/spree/state_spec.rb
263
+ ```
264
+
265
+ If you want to run a particular line of spec
266
+ ```shell
267
+ bundle exec rspec spec/models/spree/state_spec.rb:7
268
+ ```
269
+
270
+ You can also enable fail fast in order to stop tests at the first failure
271
+ ```shell
272
+ FAIL_FAST=true bundle exec rspec spec/models/state_spec.rb
273
+ ```
274
+
275
+ If you want to run the simplecov code coverage report
276
+ ```shell
277
+ COVERAGE=true bundle exec rspec spec
278
+ ```
279
+
280
+ If you're working on multiple facets of Solidus to test,
281
+ please ensure that you have a postgres user:
282
+
283
+ ```shell
284
+ createuser -s -r postgres
285
+ ```
286
+
287
+ And also ensure that you have [PhantomJS](http://phantomjs.org/) installed as well:
288
+
289
+ ```shell
290
+ brew update && brew install phantomjs
291
+ ```
292
+
293
+ To execute all the tests, you may want to run this command at the
294
+ root of the Solidus project to generate test applications and run
295
+ specs for all the facets:
296
+ ```shell
297
+ bash build.sh
298
+ ```
299
+
300
+ Contributing
301
+ ------------
302
+
303
+ Solidus is an open source project and we encourage contributions. Please read
304
+ [CONTRIBUTING.md](CONTRIBUTING.md) before contributing.
@@ -0,0 +1,38 @@
1
+ #!/bin/sh
2
+ # Used in the sandbox rake task in Rakefile
3
+
4
+ case "$DB" in
5
+ postgres)
6
+ RAILSDB="postgresql"
7
+ ;;
8
+ mysql)
9
+ RAILSDB="mysql"
10
+ ;;
11
+ *)
12
+ RAILSDB="sqlite3"
13
+ ;;
14
+ esac
15
+
16
+ rm -rf ./sandbox
17
+ bundle exec rails new sandbox --skip-bundle --database="$RAILSDB"
18
+ if [ ! -d "sandbox" ]; then
19
+ echo 'sandbox rails application failed'
20
+ exit 1
21
+ fi
22
+
23
+ cd ./sandbox
24
+ echo "gem 'solidus', :path => '..'" >> Gemfile
25
+ echo "gem 'solidus_auth_devise'" >> Gemfile
26
+
27
+ cat <<RUBY >> Gemfile
28
+ group :test, :development do
29
+ platforms :mri do
30
+ gem 'pry-byebug'
31
+ end
32
+ end
33
+ RUBY
34
+
35
+ bundle install --gemfile Gemfile
36
+ bundle exec rake db:drop db:create
37
+ bundle exec rails g spree:install --auto-accept --user_class=Spree::User --enforce_available_locales=true
38
+ bundle exec rails g spree:auth:install
@@ -0,0 +1,15 @@
1
+ require 'solidus_core'
2
+ require 'solidus_api'
3
+ require 'solidus_backend'
4
+ require 'solidus_frontend'
5
+ require 'solidus_sample'
6
+
7
+ begin
8
+ require 'protected_attributes'
9
+ puts "*" * 75
10
+ puts "[FATAL] Spree does not work with the protected_attributes gem installed!"
11
+ puts "You MUST remove this gem from your Gemfile. It is incompatible with Spree."
12
+ puts "*" * 75
13
+ exit
14
+ rescue LoadError
15
+ end
@@ -0,0 +1 @@
1
+ require 'solidus'
metadata ADDED
@@ -0,0 +1,119 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: solidus
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0.pre
5
+ platform: ruby
6
+ authors:
7
+ - Solidus Team
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-06-29 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: solidus_core
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '='
18
+ - !ruby/object:Gem::Version
19
+ version: 1.0.0.pre
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '='
25
+ - !ruby/object:Gem::Version
26
+ version: 1.0.0.pre
27
+ - !ruby/object:Gem::Dependency
28
+ name: solidus_api
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '='
32
+ - !ruby/object:Gem::Version
33
+ version: 1.0.0.pre
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '='
39
+ - !ruby/object:Gem::Version
40
+ version: 1.0.0.pre
41
+ - !ruby/object:Gem::Dependency
42
+ name: solidus_backend
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '='
46
+ - !ruby/object:Gem::Version
47
+ version: 1.0.0.pre
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '='
53
+ - !ruby/object:Gem::Version
54
+ version: 1.0.0.pre
55
+ - !ruby/object:Gem::Dependency
56
+ name: solidus_frontend
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '='
60
+ - !ruby/object:Gem::Version
61
+ version: 1.0.0.pre
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '='
67
+ - !ruby/object:Gem::Version
68
+ version: 1.0.0.pre
69
+ - !ruby/object:Gem::Dependency
70
+ name: solidus_sample
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '='
74
+ - !ruby/object:Gem::Version
75
+ version: 1.0.0.pre
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '='
81
+ - !ruby/object:Gem::Version
82
+ version: 1.0.0.pre
83
+ description: 'Spree is an open source e-commerce framework for Ruby on Rails. Join
84
+ us on the spree-user google group or in #spree on IRC'
85
+ email: contact@solidus.io
86
+ executables: []
87
+ extensions: []
88
+ extra_rdoc_files: []
89
+ files:
90
+ - README.md
91
+ - lib/sandbox.sh
92
+ - lib/solidus.rb
93
+ - lib/spree.rb
94
+ homepage: http://solidus.io
95
+ licenses:
96
+ - BSD-3
97
+ metadata: {}
98
+ post_install_message:
99
+ rdoc_options: []
100
+ require_paths:
101
+ - lib
102
+ required_ruby_version: !ruby/object:Gem::Requirement
103
+ requirements:
104
+ - - ">="
105
+ - !ruby/object:Gem::Version
106
+ version: 2.1.0
107
+ required_rubygems_version: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - ">="
110
+ - !ruby/object:Gem::Version
111
+ version: 1.8.23
112
+ requirements:
113
+ - none
114
+ rubyforge_project:
115
+ rubygems_version: 2.2.0
116
+ signing_key:
117
+ specification_version: 4
118
+ summary: Full-stack e-commerce framework for Ruby on Rails.
119
+ test_files: []