-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
sp2410
committed
Mar 18, 2017
0 parents
commit fe2c012
Showing
131 changed files
with
3,678 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
log/*.log | ||
*.sw? | ||
.DS_Store | ||
.bundle | ||
tmp | ||
db/*.sqlite3 |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
stitch-fix-rails-project |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
2.2.2 |
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 |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# Installation | ||
|
||
## Ruby | ||
|
||
We recommend using RVM or RBENV to manage your Ruby environment. System-provided Ruby versions are often several | ||
versions behind what will work for new Rails applications. Upgrading your system Ruby is not recommended, as it is | ||
often very challenging and could break system components. | ||
|
||
### Install RVM (recommended) | ||
|
||
Always check for the latest installation instructions at https://rvm.io/ | ||
|
||
If using a Mac, you may be prompted to install Xcode Developer Tools if you haven't already. Please do so, as it | ||
provides the necessary make tools to compile Ruby and gems with native system extensions. | ||
|
||
### Install a Ruby version | ||
|
||
After RVM is installed and you have reloaded your Terminal windows to allow the `rvm` command to work, check the | ||
file .ruby-version in the unzipped project directory to determine which Ruby version you need to install | ||
and run `rvm install ruby-[version]`. You could also simply `cd` into the project directory in your Terminal window | ||
and RVM should tell you which version it is expecting and how to install it, like so: | ||
|
||
``` | ||
$ cd [unzipped project folder location] | ||
ruby-2.2.2 is not installed. | ||
To install do: 'rvm install ruby-2.2.2' | ||
``` | ||
|
||
If using a Mac, you may be prompted to install Homebrew in order to install necessary dependencies if you don't have | ||
it installed already. | ||
|
||
## Install Bundler and project Ruby Gems | ||
|
||
Bundler helps to manage Ruby Gems, which are packages of Ruby code and are defined by the Gemfile. This is how Ruby on Rails | ||
and related open source code used to create the application are installed. | ||
|
||
Install it by first running: | ||
|
||
``` | ||
gem install bundler | ||
``` | ||
|
||
Be sure you are in the project directory and then install the project Ruby Gems: | ||
|
||
``` | ||
bundle install | ||
``` | ||
|
||
## Running the Application | ||
|
||
### Prepare the Database | ||
|
||
Run the following from the project directory: | ||
|
||
``` | ||
bundle exec rake db:migrate | ||
bundle exec rake db:seed | ||
``` | ||
|
||
### Running the Web Server | ||
|
||
Run the following from the project directory: | ||
|
||
``` | ||
rails server | ||
``` | ||
|
||
You should then be able to view the application using your web browser at http://localhost:3000/ (If that doesn't work, check | ||
the output of the `rails server` command to see if a different port other than 3000 was indicated.) | ||
|
||
## Running Tests | ||
|
||
Run the following from the project directory: | ||
|
||
``` | ||
rake | ||
``` |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
source "http://rubygems.org" | ||
|
||
gem "rails", "~> 4" | ||
gem "sqlite3" | ||
gem "sass-rails" | ||
gem "uglifier" | ||
gem "coffee-rails" | ||
gem "jquery-rails" | ||
gem "bootstrap-sass" | ||
gem "devise" | ||
gem 'public_activity' | ||
|
||
|
||
|
||
|
||
group :test, :development do | ||
gem "rspec-rails" | ||
gem 'tzinfo-data' | ||
gem "factory_girl_rails" | ||
gem "capybara" | ||
gem "database_cleaner" | ||
gem "ruby_css_lint" | ||
gem "selenium-webdriver" | ||
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 |
---|---|---|
@@ -0,0 +1,213 @@ | ||
GEM | ||
remote: http://rubygems.org/ | ||
specs: | ||
actionmailer (4.2.7.1) | ||
actionpack (= 4.2.7.1) | ||
actionview (= 4.2.7.1) | ||
activejob (= 4.2.7.1) | ||
mail (~> 2.5, >= 2.5.4) | ||
rails-dom-testing (~> 1.0, >= 1.0.5) | ||
actionpack (4.2.7.1) | ||
actionview (= 4.2.7.1) | ||
activesupport (= 4.2.7.1) | ||
rack (~> 1.6) | ||
rack-test (~> 0.6.2) | ||
rails-dom-testing (~> 1.0, >= 1.0.5) | ||
rails-html-sanitizer (~> 1.0, >= 1.0.2) | ||
actionview (4.2.7.1) | ||
activesupport (= 4.2.7.1) | ||
builder (~> 3.1) | ||
erubis (~> 2.7.0) | ||
rails-dom-testing (~> 1.0, >= 1.0.5) | ||
rails-html-sanitizer (~> 1.0, >= 1.0.2) | ||
activejob (4.2.7.1) | ||
activesupport (= 4.2.7.1) | ||
globalid (>= 0.3.0) | ||
activemodel (4.2.7.1) | ||
activesupport (= 4.2.7.1) | ||
builder (~> 3.1) | ||
activerecord (4.2.7.1) | ||
activemodel (= 4.2.7.1) | ||
activesupport (= 4.2.7.1) | ||
arel (~> 6.0) | ||
activesupport (4.2.7.1) | ||
i18n (~> 0.7) | ||
json (~> 1.7, >= 1.7.7) | ||
minitest (~> 5.1) | ||
thread_safe (~> 0.3, >= 0.3.4) | ||
tzinfo (~> 1.1) | ||
addressable (2.5.0) | ||
public_suffix (~> 2.0, >= 2.0.2) | ||
arel (6.0.4) | ||
autoprefixer-rails (6.7.2) | ||
execjs | ||
bcrypt (3.1.11-x86-mingw32) | ||
bootstrap-sass (3.3.7) | ||
autoprefixer-rails (>= 5.2.1) | ||
sass (>= 3.3.4) | ||
builder (3.2.3) | ||
capybara (2.12.0) | ||
addressable | ||
mime-types (>= 1.16) | ||
nokogiri (>= 1.3.3) | ||
rack (>= 1.0.0) | ||
rack-test (>= 0.5.4) | ||
xpath (~> 2.0) | ||
childprocess (0.6.1) | ||
ffi (~> 1.0, >= 1.0.11) | ||
coffee-rails (4.2.1) | ||
coffee-script (>= 2.2.0) | ||
railties (>= 4.0.0, < 5.2.x) | ||
coffee-script (2.4.1) | ||
coffee-script-source | ||
execjs | ||
coffee-script-source (1.12.2) | ||
concurrent-ruby (1.0.4) | ||
database_cleaner (1.5.3) | ||
devise (4.2.0) | ||
bcrypt (~> 3.0) | ||
orm_adapter (~> 0.1) | ||
railties (>= 4.1.0, < 5.1) | ||
responders | ||
warden (~> 1.2.3) | ||
diff-lcs (1.3) | ||
erubis (2.7.0) | ||
execjs (2.7.0) | ||
factory_girl (4.8.0) | ||
activesupport (>= 3.0.0) | ||
factory_girl_rails (4.8.0) | ||
factory_girl (~> 4.8.0) | ||
railties (>= 3.0.0) | ||
ffi (1.9.17-x86-mingw32) | ||
globalid (0.3.7) | ||
activesupport (>= 4.1.0) | ||
i18n (0.8.0) | ||
jquery-rails (4.2.2) | ||
rails-dom-testing (>= 1, < 3) | ||
railties (>= 4.2.0) | ||
thor (>= 0.14, < 2.0) | ||
json (1.8.6) | ||
loofah (2.0.3) | ||
nokogiri (>= 1.5.9) | ||
mail (2.6.4) | ||
mime-types (>= 1.16, < 4) | ||
mime-types (3.1) | ||
mime-types-data (~> 3.2015) | ||
mime-types-data (3.2016.0521) | ||
mini_portile2 (2.1.0) | ||
minitest (5.10.1) | ||
nokogiri (1.7.0.1-x86-mingw32) | ||
mini_portile2 (~> 2.1.0) | ||
orm_adapter (0.5.0) | ||
public_activity (1.5.0) | ||
actionpack (>= 3.0.0) | ||
activerecord (>= 3.0) | ||
i18n (>= 0.5.0) | ||
railties (>= 3.0.0) | ||
public_suffix (2.0.5) | ||
rack (1.6.5) | ||
rack-test (0.6.3) | ||
rack (>= 1.0) | ||
rails (4.2.7.1) | ||
actionmailer (= 4.2.7.1) | ||
actionpack (= 4.2.7.1) | ||
actionview (= 4.2.7.1) | ||
activejob (= 4.2.7.1) | ||
activemodel (= 4.2.7.1) | ||
activerecord (= 4.2.7.1) | ||
activesupport (= 4.2.7.1) | ||
bundler (>= 1.3.0, < 2.0) | ||
railties (= 4.2.7.1) | ||
sprockets-rails | ||
rails-deprecated_sanitizer (1.0.3) | ||
activesupport (>= 4.2.0.alpha) | ||
rails-dom-testing (1.0.8) | ||
activesupport (>= 4.2.0.beta, < 5.0) | ||
nokogiri (~> 1.6) | ||
rails-deprecated_sanitizer (>= 1.0.1) | ||
rails-html-sanitizer (1.0.3) | ||
loofah (~> 2.0) | ||
railties (4.2.7.1) | ||
actionpack (= 4.2.7.1) | ||
activesupport (= 4.2.7.1) | ||
rake (>= 0.8.7) | ||
thor (>= 0.18.1, < 2.0) | ||
rake (12.0.0) | ||
responders (2.3.0) | ||
railties (>= 4.2.0, < 5.1) | ||
rspec-core (3.5.4) | ||
rspec-support (~> 3.5.0) | ||
rspec-expectations (3.5.0) | ||
diff-lcs (>= 1.2.0, < 2.0) | ||
rspec-support (~> 3.5.0) | ||
rspec-mocks (3.5.0) | ||
diff-lcs (>= 1.2.0, < 2.0) | ||
rspec-support (~> 3.5.0) | ||
rspec-rails (3.5.2) | ||
actionpack (>= 3.0) | ||
activesupport (>= 3.0) | ||
railties (>= 3.0) | ||
rspec-core (~> 3.5.0) | ||
rspec-expectations (~> 3.5.0) | ||
rspec-mocks (~> 3.5.0) | ||
rspec-support (~> 3.5.0) | ||
rspec-support (3.5.0) | ||
ruby_css_lint (0.1.0) | ||
rubyzip (1.2.1) | ||
sass (3.4.23) | ||
sass-rails (5.0.6) | ||
railties (>= 4.0.0, < 6) | ||
sass (~> 3.1) | ||
sprockets (>= 2.8, < 4.0) | ||
sprockets-rails (>= 2.0, < 4.0) | ||
tilt (>= 1.1, < 3) | ||
selenium-webdriver (3.0.8) | ||
childprocess (~> 0.5) | ||
rubyzip (~> 1.0) | ||
websocket (~> 1.0) | ||
sprockets (3.7.1) | ||
concurrent-ruby (~> 1.0) | ||
rack (> 1, < 3) | ||
sprockets-rails (3.2.0) | ||
actionpack (>= 4.0) | ||
activesupport (>= 4.0) | ||
sprockets (>= 3.0.0) | ||
sqlite3 (1.3.13-x86-mingw32) | ||
thor (0.19.4) | ||
thread_safe (0.3.5) | ||
tilt (2.0.6) | ||
tzinfo (1.2.2) | ||
thread_safe (~> 0.1) | ||
tzinfo-data (1.2016.10) | ||
tzinfo (>= 1.0.0) | ||
uglifier (3.0.4) | ||
execjs (>= 0.3.0, < 3) | ||
warden (1.2.6) | ||
rack (>= 1.0) | ||
websocket (1.2.4) | ||
xpath (2.0.0) | ||
nokogiri (~> 1.3) | ||
|
||
PLATFORMS | ||
x86-mingw32 | ||
|
||
DEPENDENCIES | ||
bootstrap-sass | ||
capybara | ||
coffee-rails | ||
database_cleaner | ||
devise | ||
factory_girl_rails | ||
jquery-rails | ||
public_activity | ||
rails (~> 4) | ||
rspec-rails | ||
ruby_css_lint | ||
sass-rails | ||
selenium-webdriver | ||
sqlite3 | ||
tzinfo-data | ||
uglifier | ||
|
||
BUNDLED WITH | ||
1.14.3 |
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 |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Problem | ||
|
||
We need to clearance inventory from time to time. Certain items don't sell through to our clients, so every month, we collect certain unsold items and sell them to a third party vendor for a portion of their wholesale price. | ||
|
||
This repository is a bare-bones application that meets that need, but it's in need of some enhancements, which we'd like you provide. | ||
|
||
# Vocabulary | ||
|
||
_Items_ refer to individual pieces of clothing. So, if we have two of the exact same type of jeans, we have two items. Items are grouped by _style_, so | ||
the two aforementioned items would have the same style. | ||
|
||
Important data about an item is: | ||
|
||
* size | ||
* color | ||
* status - sellable, not sellable, sold, clearanced | ||
* price sold | ||
* date sold | ||
|
||
A style's important data is: | ||
|
||
* wholesale price | ||
* retail price | ||
* type - pants, shirts, dresses, skirts, other | ||
* name | ||
|
||
The _users_ of this application are warehouse employees (not developers). They have a solid understanding the business process they must carry out and look to our software to support them. | ||
|
||
# Requirements | ||
|
||
This application currently handles the clearance task in a very basic way. A spreadsheet containing a list of item ids is uploaded and those items are clearanced as a batch. Items can only be sold at clearance if their status is 'sellable'. When the item is clearanced, we sell it at 75% of the wholesale price, and record that as "price sold". | ||
|
||
You should be able to play around with the app by uploading the CSV file in this repository. | ||
|
||
We'd like you to make some improvements, specifically: | ||
|
||
- The vendor buying the items on clearance needs to know what they've just purchased, so please provide a report for each batch about what items were clearanced. | ||
- We'd like to avoid requiring that users create a spreadsheet and upload it, and instead handle this process directly in the app. Since they can scan an item's barcode into any text field (as if typed directly by a keyboard), we'd like to try allowing them to create batches and clearancing them simply by entering item IDs. We'd want to support both methods of clearancing batches for the time being. You can assume the barcode scanner works just like a computer keyboard, so if your solution works by entering text with a keyboard, it will be fine for the purposes described here, i.e. don't worry about barcodes. | ||
|
||
# Tech Specs: | ||
|
||
- Rails 4.2 | ||
- Ruby 2.2 | ||
- SQLite preferred, Postgres OK | ||
- Anything can be changed if you think it's needed, including database schema, Rails config, whatever | ||
|
||
# Some other guidance | ||
|
||
This is evaluating your product thinking as well as coding and testing ability. We want to see that you: | ||
|
||
* Have thought about the user experience of the product | ||
* Are willing to refactor when necessary | ||
* Will test at an appropriate level | ||
|
||
Please approach this project as you would a work assignment. If it makes sense to introduce a new feature or a new technology in the context of this assignment, then please do so. However, this is not intended as a general showcase for all the cool things you can pull off. | ||
|
||
If you need to make an assumption about a vague requirement, feel free, just state what it is. |
Oops, something went wrong.