e4commerce 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +141 -0
- data/Gemfile +10 -0
- data/Gemfile.lock +73 -0
- data/LICENSE.md +21 -0
- data/LICENSE.txt +21 -0
- data/Rakefile +12 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/e4commerce/.gitignore +21 -0
- data/e4commerce/Gemfile +53 -0
- data/e4commerce/README.md +24 -0
- data/e4commerce/Rakefile +6 -0
- data/e4commerce/app/assets/config/manifest.js +3 -0
- data/e4commerce/app/assets/images/.keep +0 -0
- data/e4commerce/app/assets/javascripts/application.js +16 -0
- data/e4commerce/app/assets/javascripts/cable.js +13 -0
- data/e4commerce/app/assets/javascripts/channels/.keep +0 -0
- data/e4commerce/app/assets/stylesheets/application.css +15 -0
- data/e4commerce/app/channels/application_cable/channel.rb +4 -0
- data/e4commerce/app/channels/application_cable/connection.rb +4 -0
- data/e4commerce/app/controllers/application_controller.rb +3 -0
- data/e4commerce/app/controllers/concerns/.keep +0 -0
- data/e4commerce/app/helpers/application_helper.rb +2 -0
- data/e4commerce/app/jobs/application_job.rb +2 -0
- data/e4commerce/app/mailers/application_mailer.rb +4 -0
- data/e4commerce/app/models/application_record.rb +3 -0
- data/e4commerce/app/models/concerns/.keep +0 -0
- data/e4commerce/app/views/layouts/application.html.erb +14 -0
- data/e4commerce/app/views/layouts/mailer.html.erb +13 -0
- data/e4commerce/app/views/layouts/mailer.text.erb +1 -0
- data/e4commerce/bin/bundle +3 -0
- data/e4commerce/bin/rails +4 -0
- data/e4commerce/bin/rake +4 -0
- data/e4commerce/bin/setup +34 -0
- data/e4commerce/bin/update +29 -0
- data/e4commerce/config/application.rb +15 -0
- data/e4commerce/config/boot.rb +3 -0
- data/e4commerce/config/cable.yml +9 -0
- data/e4commerce/config/database.yml +25 -0
- data/e4commerce/config/environment.rb +5 -0
- data/e4commerce/config/environments/development.rb +54 -0
- data/e4commerce/config/environments/production.rb +86 -0
- data/e4commerce/config/environments/test.rb +42 -0
- data/e4commerce/config/initializers/application_controller_renderer.rb +6 -0
- data/e4commerce/config/initializers/assets.rb +11 -0
- data/e4commerce/config/initializers/backtrace_silencers.rb +7 -0
- data/e4commerce/config/initializers/cookies_serializer.rb +5 -0
- data/e4commerce/config/initializers/filter_parameter_logging.rb +4 -0
- data/e4commerce/config/initializers/inflections.rb +16 -0
- data/e4commerce/config/initializers/mime_types.rb +4 -0
- data/e4commerce/config/initializers/new_framework_defaults.rb +26 -0
- data/e4commerce/config/initializers/session_store.rb +3 -0
- data/e4commerce/config/initializers/wrap_parameters.rb +14 -0
- data/e4commerce/config/locales/en.yml +23 -0
- data/e4commerce/config/puma.rb +47 -0
- data/e4commerce/config/routes.rb +3 -0
- data/e4commerce/config/secrets.yml +22 -0
- data/e4commerce/config/spring.rb +6 -0
- data/e4commerce/config.ru +5 -0
- data/e4commerce/db/seeds.rb +7 -0
- data/e4commerce/lib/assets/.keep +0 -0
- data/e4commerce/lib/tasks/.keep +0 -0
- data/e4commerce/log/.keep +0 -0
- data/e4commerce/public/404.html +67 -0
- data/e4commerce/public/422.html +67 -0
- data/e4commerce/public/500.html +66 -0
- data/e4commerce/public/apple-touch-icon-precomposed.png +0 -0
- data/e4commerce/public/apple-touch-icon.png +0 -0
- data/e4commerce/public/favicon.ico +0 -0
- data/e4commerce/public/robots.txt +5 -0
- data/e4commerce/test/controllers/.keep +0 -0
- data/e4commerce/test/fixtures/.keep +0 -0
- data/e4commerce/test/fixtures/files/.keep +0 -0
- data/e4commerce/test/helpers/.keep +0 -0
- data/e4commerce/test/integration/.keep +0 -0
- data/e4commerce/test/mailers/.keep +0 -0
- data/e4commerce/test/models/.keep +0 -0
- data/e4commerce/test/test_helper.rb +10 -0
- data/e4commerce/tmp/.keep +0 -0
- data/e4commerce/vendor/assets/javascripts/.keep +0 -0
- data/e4commerce/vendor/assets/stylesheets/.keep +0 -0
- data/e4commerce.gemspec +25 -0
- data/lib/e4commerce/payment.rb +1 -4
- data/lib/e4commerce/product.rb +1 -2
- data/lib/e4commerce/version.rb +1 -1
- data/lib/e4commerce.rb +2 -2
- metadata +83 -1
@@ -0,0 +1,66 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>We're sorry, but something went wrong (500)</title>
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
+
<style>
|
7
|
+
.rails-default-error-page {
|
8
|
+
background-color: #EFEFEF;
|
9
|
+
color: #2E2F30;
|
10
|
+
text-align: center;
|
11
|
+
font-family: arial, sans-serif;
|
12
|
+
margin: 0;
|
13
|
+
}
|
14
|
+
|
15
|
+
.rails-default-error-page div.dialog {
|
16
|
+
width: 95%;
|
17
|
+
max-width: 33em;
|
18
|
+
margin: 4em auto 0;
|
19
|
+
}
|
20
|
+
|
21
|
+
.rails-default-error-page div.dialog > div {
|
22
|
+
border: 1px solid #CCC;
|
23
|
+
border-right-color: #999;
|
24
|
+
border-left-color: #999;
|
25
|
+
border-bottom-color: #BBB;
|
26
|
+
border-top: #B00100 solid 4px;
|
27
|
+
border-top-left-radius: 9px;
|
28
|
+
border-top-right-radius: 9px;
|
29
|
+
background-color: white;
|
30
|
+
padding: 7px 12% 0;
|
31
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
32
|
+
}
|
33
|
+
|
34
|
+
.rails-default-error-page h1 {
|
35
|
+
font-size: 100%;
|
36
|
+
color: #730E15;
|
37
|
+
line-height: 1.5em;
|
38
|
+
}
|
39
|
+
|
40
|
+
.rails-default-error-page div.dialog > p {
|
41
|
+
margin: 0 0 1em;
|
42
|
+
padding: 1em;
|
43
|
+
background-color: #F7F7F7;
|
44
|
+
border: 1px solid #CCC;
|
45
|
+
border-right-color: #999;
|
46
|
+
border-left-color: #999;
|
47
|
+
border-bottom-color: #999;
|
48
|
+
border-bottom-left-radius: 4px;
|
49
|
+
border-bottom-right-radius: 4px;
|
50
|
+
border-top-color: #DADADA;
|
51
|
+
color: #666;
|
52
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
53
|
+
}
|
54
|
+
</style>
|
55
|
+
</head>
|
56
|
+
|
57
|
+
<body class="rails-default-error-page">
|
58
|
+
<!-- This file lives in public/500.html -->
|
59
|
+
<div class="dialog">
|
60
|
+
<div>
|
61
|
+
<h1>We're sorry, but something went wrong.</h1>
|
62
|
+
</div>
|
63
|
+
<p>If you are the application owner check the logs for more information.</p>
|
64
|
+
</div>
|
65
|
+
</body>
|
66
|
+
</html>
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,10 @@
|
|
1
|
+
ENV['RAILS_ENV'] ||= 'test'
|
2
|
+
require File.expand_path('../../config/environment', __FILE__)
|
3
|
+
require 'rails/test_help'
|
4
|
+
|
5
|
+
class ActiveSupport::TestCase
|
6
|
+
# Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
|
7
|
+
fixtures :all
|
8
|
+
|
9
|
+
# Add more helper methods to be used by all tests here...
|
10
|
+
end
|
File without changes
|
File without changes
|
File without changes
|
data/e4commerce.gemspec
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'e4commerce/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "e4commerce"
|
8
|
+
spec.version = E4commerce::VERSION
|
9
|
+
spec.authors = ["Miguel Pimentel"]
|
10
|
+
spec.email = ["miguelpimentel2013@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{"Provide e-commerce structure and different payment methods"}
|
13
|
+
spec.homepage = "https://github.com/miguelpimentel/e4commerce"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
17
|
+
f.match(%r{^(test|spec|features)/})
|
18
|
+
end
|
19
|
+
spec.bindir = "exe"
|
20
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
21
|
+
spec.require_paths = ["lib"]
|
22
|
+
|
23
|
+
spec.add_development_dependency "bundler", "~> 1.14"
|
24
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
25
|
+
end
|
data/lib/e4commerce/payment.rb
CHANGED
@@ -1,14 +1,11 @@
|
|
1
1
|
module E4commerce
|
2
2
|
|
3
|
-
a = E4commerce::4CPayment.new
|
4
|
-
|
5
3
|
require "abstraction"
|
6
4
|
require "active_record"
|
7
5
|
|
8
6
|
#class E4CPayment < ActiveRecord::Base ~> Rails project, need database
|
9
|
-
class E4CPayment < ActiveRecord::Base
|
7
|
+
class E4CPayment < ActiveRecord::Base
|
10
8
|
abstract
|
11
|
-
|
12
9
|
attr_accessor :product_list
|
13
10
|
attr_accessor :total
|
14
11
|
|
data/lib/e4commerce/product.rb
CHANGED
@@ -3,10 +3,8 @@ module E4commerce
|
|
3
3
|
require "abstraction"
|
4
4
|
require "active_record"
|
5
5
|
|
6
|
-
|
7
6
|
# class E4CProduct < ActiveRecord::Base -> Rails project, need database
|
8
7
|
class E4CProduct < ActiveRecord::Base
|
9
|
-
|
10
8
|
abstract
|
11
9
|
|
12
10
|
attr_accessor :title
|
@@ -20,6 +18,7 @@ module E4commerce
|
|
20
18
|
@brand = brand
|
21
19
|
@unit_price = unit_price
|
22
20
|
end
|
21
|
+
|
23
22
|
end
|
24
23
|
|
25
24
|
end
|
data/lib/e4commerce/version.rb
CHANGED
data/lib/e4commerce.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: e4commerce
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Pimentel
|
@@ -45,7 +45,89 @@ executables: []
|
|
45
45
|
extensions: []
|
46
46
|
extra_rdoc_files: []
|
47
47
|
files:
|
48
|
+
- ".gitignore"
|
49
|
+
- Gemfile
|
50
|
+
- Gemfile.lock
|
51
|
+
- LICENSE.md
|
52
|
+
- LICENSE.txt
|
48
53
|
- README.md
|
54
|
+
- Rakefile
|
55
|
+
- bin/console
|
56
|
+
- bin/setup
|
57
|
+
- e4commerce.gemspec
|
58
|
+
- e4commerce/.gitignore
|
59
|
+
- e4commerce/Gemfile
|
60
|
+
- e4commerce/README.md
|
61
|
+
- e4commerce/Rakefile
|
62
|
+
- e4commerce/app/assets/config/manifest.js
|
63
|
+
- e4commerce/app/assets/images/.keep
|
64
|
+
- e4commerce/app/assets/javascripts/application.js
|
65
|
+
- e4commerce/app/assets/javascripts/cable.js
|
66
|
+
- e4commerce/app/assets/javascripts/channels/.keep
|
67
|
+
- e4commerce/app/assets/stylesheets/application.css
|
68
|
+
- e4commerce/app/channels/application_cable/channel.rb
|
69
|
+
- e4commerce/app/channels/application_cable/connection.rb
|
70
|
+
- e4commerce/app/controllers/application_controller.rb
|
71
|
+
- e4commerce/app/controllers/concerns/.keep
|
72
|
+
- e4commerce/app/helpers/application_helper.rb
|
73
|
+
- e4commerce/app/jobs/application_job.rb
|
74
|
+
- e4commerce/app/mailers/application_mailer.rb
|
75
|
+
- e4commerce/app/models/application_record.rb
|
76
|
+
- e4commerce/app/models/concerns/.keep
|
77
|
+
- e4commerce/app/views/layouts/application.html.erb
|
78
|
+
- e4commerce/app/views/layouts/mailer.html.erb
|
79
|
+
- e4commerce/app/views/layouts/mailer.text.erb
|
80
|
+
- e4commerce/bin/bundle
|
81
|
+
- e4commerce/bin/rails
|
82
|
+
- e4commerce/bin/rake
|
83
|
+
- e4commerce/bin/setup
|
84
|
+
- e4commerce/bin/update
|
85
|
+
- e4commerce/config.ru
|
86
|
+
- e4commerce/config/application.rb
|
87
|
+
- e4commerce/config/boot.rb
|
88
|
+
- e4commerce/config/cable.yml
|
89
|
+
- e4commerce/config/database.yml
|
90
|
+
- e4commerce/config/environment.rb
|
91
|
+
- e4commerce/config/environments/development.rb
|
92
|
+
- e4commerce/config/environments/production.rb
|
93
|
+
- e4commerce/config/environments/test.rb
|
94
|
+
- e4commerce/config/initializers/application_controller_renderer.rb
|
95
|
+
- e4commerce/config/initializers/assets.rb
|
96
|
+
- e4commerce/config/initializers/backtrace_silencers.rb
|
97
|
+
- e4commerce/config/initializers/cookies_serializer.rb
|
98
|
+
- e4commerce/config/initializers/filter_parameter_logging.rb
|
99
|
+
- e4commerce/config/initializers/inflections.rb
|
100
|
+
- e4commerce/config/initializers/mime_types.rb
|
101
|
+
- e4commerce/config/initializers/new_framework_defaults.rb
|
102
|
+
- e4commerce/config/initializers/session_store.rb
|
103
|
+
- e4commerce/config/initializers/wrap_parameters.rb
|
104
|
+
- e4commerce/config/locales/en.yml
|
105
|
+
- e4commerce/config/puma.rb
|
106
|
+
- e4commerce/config/routes.rb
|
107
|
+
- e4commerce/config/secrets.yml
|
108
|
+
- e4commerce/config/spring.rb
|
109
|
+
- e4commerce/db/seeds.rb
|
110
|
+
- e4commerce/lib/assets/.keep
|
111
|
+
- e4commerce/lib/tasks/.keep
|
112
|
+
- e4commerce/log/.keep
|
113
|
+
- e4commerce/public/404.html
|
114
|
+
- e4commerce/public/422.html
|
115
|
+
- e4commerce/public/500.html
|
116
|
+
- e4commerce/public/apple-touch-icon-precomposed.png
|
117
|
+
- e4commerce/public/apple-touch-icon.png
|
118
|
+
- e4commerce/public/favicon.ico
|
119
|
+
- e4commerce/public/robots.txt
|
120
|
+
- e4commerce/test/controllers/.keep
|
121
|
+
- e4commerce/test/fixtures/.keep
|
122
|
+
- e4commerce/test/fixtures/files/.keep
|
123
|
+
- e4commerce/test/helpers/.keep
|
124
|
+
- e4commerce/test/integration/.keep
|
125
|
+
- e4commerce/test/mailers/.keep
|
126
|
+
- e4commerce/test/models/.keep
|
127
|
+
- e4commerce/test/test_helper.rb
|
128
|
+
- e4commerce/tmp/.keep
|
129
|
+
- e4commerce/vendor/assets/javascripts/.keep
|
130
|
+
- e4commerce/vendor/assets/stylesheets/.keep
|
49
131
|
- lib/e4commerce.rb
|
50
132
|
- lib/e4commerce/notifications_controller.rb
|
51
133
|
- lib/e4commerce/payment.rb
|