apollo-commerce 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/MIT-LICENSE +1 -1
- data/app/models/cart.rb +9 -0
- data/app/models/cart_item.rb +5 -0
- data/app/models/product.rb +2 -0
- data/app/views/layouts/application.html.erb +1 -1
- data/config/application.rb +1 -1
- data/config/initializers/session_store.rb +1 -1
- data/config/secrets.yml +2 -2
- data/db/development.sqlite3 +0 -0
- data/db/migrate/20140524092344_create_products.rb +12 -0
- data/db/migrate/20140524092515_create_carts.rb +8 -0
- data/db/migrate/20140524092715_create_cart_items.rb +12 -0
- data/db/schema.rb +39 -0
- data/db/test.sqlite3 +0 -0
- data/lib/tasks/publish.rake +26 -0
- data/test/fixtures/cart_items.yml +11 -0
- data/test/fixtures/carts.yml +11 -0
- data/test/fixtures/products.yml +11 -0
- data/test/models/cart_item_test.rb +7 -0
- data/test/models/cart_test.rb +11 -0
- data/test/models/product_test.rb +5 -0
- metadata +24 -3
- data/README.rdoc +0 -28
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bb3b71bfe42b599ecddfb1c0bd398258b195f77d
|
4
|
+
data.tar.gz: 612cfacbedda181f3c1b47a4ad9df1d5a495067d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f78eff7754e594b3b93d93871c8ffbfb39d17eb2f8c05dd1b57daf8cc9d4c6bd4e9cc7d128249a81cb1e2619044b0bc9d5fcb943fea7872bec6d728f8e5978e4
|
7
|
+
data.tar.gz: af28b3a4bbb533b43af09aa03ca0c5acedd065f970562d50db0addcbb64efbfa5d1260693deb4579d975f0a5b9010d94866359b019b1816cf38e93184e5d75a5
|
data/MIT-LICENSE
CHANGED
data/app/models/cart.rb
ADDED
@@ -1,7 +1,7 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
<html>
|
3
3
|
<head>
|
4
|
-
<title>
|
4
|
+
<title>ApolloCommerce</title>
|
5
5
|
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
|
6
6
|
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
|
7
7
|
<%= csrf_meta_tags %>
|
data/config/application.rb
CHANGED
@@ -6,7 +6,7 @@ require 'rails/all'
|
|
6
6
|
# you've limited to :test, :development, or :production.
|
7
7
|
Bundler.require(*Rails.groups)
|
8
8
|
|
9
|
-
module
|
9
|
+
module ApolloCommerce
|
10
10
|
class Application < Rails::Application
|
11
11
|
# Settings in config/environments/* take precedence over those specified here.
|
12
12
|
# Application configuration should go into files in config/initializers
|
data/config/secrets.yml
CHANGED
@@ -11,10 +11,10 @@
|
|
11
11
|
# if you're sharing your code publicly.
|
12
12
|
|
13
13
|
development:
|
14
|
-
secret_key_base:
|
14
|
+
secret_key_base: 19f90681efc676eb167f1fdfdb726c92997e35e4f6eab74f09de154db9008c6984d3d64bc97548ee55de008dbacfee8e14aafb6b64c91f9d81be4d361ffc425b
|
15
15
|
|
16
16
|
test:
|
17
|
-
secret_key_base:
|
17
|
+
secret_key_base: f3e212c61a3e9cc7a7accb1a093b45b30d44d063d93d3044f1998afd986b2cbab1c03b9b52a0098011d78b2f3b9449403b40cc84e6c3d1708de79bbc992fe0f8
|
18
18
|
|
19
19
|
# Do not keep production secrets in the repository,
|
20
20
|
# instead read values from the environment.
|
Binary file
|
data/db/schema.rb
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
# This file is auto-generated from the current state of the database. Instead
|
3
|
+
# of editing this file, please use the migrations feature of Active Record to
|
4
|
+
# incrementally modify your database, and then regenerate this schema definition.
|
5
|
+
#
|
6
|
+
# Note that this schema.rb definition is the authoritative source for your
|
7
|
+
# database schema. If you need to create the application database on another
|
8
|
+
# system, you should be using db:schema:load, not running all the migrations
|
9
|
+
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
10
|
+
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
11
|
+
#
|
12
|
+
# It's strongly recommended that you check this file into your version control system.
|
13
|
+
|
14
|
+
ActiveRecord::Schema.define(version: 20140524092715) do
|
15
|
+
|
16
|
+
create_table "cart_items", force: true do |t|
|
17
|
+
t.integer "quantity"
|
18
|
+
t.integer "price"
|
19
|
+
t.integer "cart_id"
|
20
|
+
t.integer "product_id"
|
21
|
+
t.datetime "created_at"
|
22
|
+
t.datetime "updated_at"
|
23
|
+
end
|
24
|
+
|
25
|
+
create_table "carts", force: true do |t|
|
26
|
+
t.datetime "created_at"
|
27
|
+
t.datetime "updated_at"
|
28
|
+
end
|
29
|
+
|
30
|
+
create_table "products", force: true do |t|
|
31
|
+
t.string "title"
|
32
|
+
t.text "description"
|
33
|
+
t.string "gtin"
|
34
|
+
t.string "sku"
|
35
|
+
t.datetime "created_at"
|
36
|
+
t.datetime "updated_at"
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
data/db/test.sqlite3
CHANGED
Binary file
|
@@ -0,0 +1,26 @@
|
|
1
|
+
desc 'Publish to GitHub'
|
2
|
+
task :publish => [:test, :yard, :gem, :git] do
|
3
|
+
puts 'published to GitHub'
|
4
|
+
end
|
5
|
+
|
6
|
+
desc 'Build yard docs'
|
7
|
+
task :yard do
|
8
|
+
%x{yardoc}
|
9
|
+
puts 'updated yard'
|
10
|
+
end
|
11
|
+
|
12
|
+
desc 'Git add files, and git commit'
|
13
|
+
task :git do
|
14
|
+
%x{git add --all}
|
15
|
+
%x{git commit}
|
16
|
+
%x{git push origin master}
|
17
|
+
puts 'commited git'
|
18
|
+
end
|
19
|
+
|
20
|
+
desc 'Publish to RubyGems'
|
21
|
+
task :gem do
|
22
|
+
%x{gem build apollo-commerce.gemspec}
|
23
|
+
puts 'Gem built'
|
24
|
+
%x{gem push apollo-commerce*.gem}
|
25
|
+
puts 'Gem published'
|
26
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
|
2
|
+
|
3
|
+
# This model initially had no columns defined. If you add columns to the
|
4
|
+
# model remove the '{}' from the fixture names and add the columns immediately
|
5
|
+
# below each fixture, per the syntax in the comments below
|
6
|
+
#
|
7
|
+
one: {}
|
8
|
+
# column: value
|
9
|
+
#
|
10
|
+
two: {}
|
11
|
+
# column: value
|
@@ -0,0 +1,11 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class CartTest < ActiveSupport::TestCase
|
4
|
+
fixtures :carts, :cart_items
|
5
|
+
|
6
|
+
test 'should calculate total sum' do
|
7
|
+
carts(:one).cart_items << [cart_items(:one), cart_items(:two)]
|
8
|
+
assert_equal carts(:one).total, (cart_items(:one).price.to_i + cart_items(:two).price.to_i)
|
9
|
+
end
|
10
|
+
|
11
|
+
end
|
metadata
CHANGED
@@ -1,16 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: apollo-commerce
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Georg Schlenkhoff
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-24 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Apollo Commerce is the essential e-commerce solution for lean entrepreneurs
|
14
|
+
building on Ruby on Rails
|
14
15
|
email:
|
15
16
|
- georg.schlenkhoff@gmail.com
|
16
17
|
executables: []
|
@@ -18,12 +19,14 @@ extensions: []
|
|
18
19
|
extra_rdoc_files: []
|
19
20
|
files:
|
20
21
|
- MIT-LICENSE
|
21
|
-
- README.rdoc
|
22
22
|
- Rakefile
|
23
23
|
- app/assets/javascripts/application.js
|
24
24
|
- app/assets/stylesheets/application.css
|
25
25
|
- app/controllers/application_controller.rb
|
26
26
|
- app/helpers/application_helper.rb
|
27
|
+
- app/models/cart.rb
|
28
|
+
- app/models/cart_item.rb
|
29
|
+
- app/models/product.rb
|
27
30
|
- app/views/layouts/application.html.erb
|
28
31
|
- config/application.rb
|
29
32
|
- config/boot.rb
|
@@ -42,8 +45,20 @@ files:
|
|
42
45
|
- config/locales/en.yml
|
43
46
|
- config/routes.rb
|
44
47
|
- config/secrets.yml
|
48
|
+
- db/development.sqlite3
|
49
|
+
- db/migrate/20140524092344_create_products.rb
|
50
|
+
- db/migrate/20140524092515_create_carts.rb
|
51
|
+
- db/migrate/20140524092715_create_cart_items.rb
|
52
|
+
- db/schema.rb
|
45
53
|
- db/seeds.rb
|
46
54
|
- db/test.sqlite3
|
55
|
+
- lib/tasks/publish.rake
|
56
|
+
- test/fixtures/cart_items.yml
|
57
|
+
- test/fixtures/carts.yml
|
58
|
+
- test/fixtures/products.yml
|
59
|
+
- test/models/cart_item_test.rb
|
60
|
+
- test/models/cart_test.rb
|
61
|
+
- test/models/product_test.rb
|
47
62
|
- test/test_helper.rb
|
48
63
|
homepage: http://apolloventur.es
|
49
64
|
licenses:
|
@@ -70,5 +85,11 @@ signing_key:
|
|
70
85
|
specification_version: 4
|
71
86
|
summary: Apollo Commerce
|
72
87
|
test_files:
|
88
|
+
- test/fixtures/cart_items.yml
|
89
|
+
- test/fixtures/carts.yml
|
90
|
+
- test/fixtures/products.yml
|
91
|
+
- test/models/cart_item_test.rb
|
92
|
+
- test/models/cart_test.rb
|
93
|
+
- test/models/product_test.rb
|
73
94
|
- test/test_helper.rb
|
74
95
|
has_rdoc:
|
data/README.rdoc
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
== README
|
2
|
-
|
3
|
-
This README would normally document whatever steps are necessary to get the
|
4
|
-
application up and running.
|
5
|
-
|
6
|
-
Things you may want to cover:
|
7
|
-
|
8
|
-
* Ruby version
|
9
|
-
|
10
|
-
* System dependencies
|
11
|
-
|
12
|
-
* Configuration
|
13
|
-
|
14
|
-
* Database creation
|
15
|
-
|
16
|
-
* Database initialization
|
17
|
-
|
18
|
-
* How to run the test suite
|
19
|
-
|
20
|
-
* Services (job queues, cache servers, search engines, etc.)
|
21
|
-
|
22
|
-
* Deployment instructions
|
23
|
-
|
24
|
-
* ...
|
25
|
-
|
26
|
-
|
27
|
-
Please feel free to use a different markup language if you do not plan to run
|
28
|
-
<tt>rake doc:app</tt>.
|