Skip to content

Commit f6519cc

Browse files
committed
first commit
0 parents  commit f6519cc

File tree

22 files changed

+583
-0
lines changed

22 files changed

+583
-0
lines changed

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.bundle
2+
.config
3+
.yardoc
4+
tmp
5+
.idea
6+
.yardoc
7+
.sass-cache
8+
.DS_Store
9+
compiled

Gemfile

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
source 'https://rubygems.org'
2+
3+
gem 'volt', '0.9.6'
4+
5+
# volt uses mongo as the default data store.
6+
gem 'volt-mongo', '~> 0.1.0'
7+
8+
# The following gem's are optional for themeing
9+
# Twitter bootstrap
10+
gem 'volt-bootstrap', '~> 0.1.0'
11+
12+
# Simple theme for bootstrap, remove to theme yourself.
13+
gem 'volt-bootstrap_jumbotron_theme', '~> 0.1.0'
14+
15+
# User templates for login, signup, and logout menu.
16+
gem 'volt-user_templates', '~> 0.4.0'
17+
18+
# Add ability to send e-mail from apps.
19+
gem 'volt-mailer', '~> 0.1.1'
20+
21+
# Use rbnacl for message bus encrpytion
22+
# (optional, if you don't need encryption, disable in app.rb and remove)
23+
#
24+
# Message Bus encryption is not supported on Windows at the moment.
25+
platform :ruby, :jruby do
26+
gem 'rbnacl', require: false
27+
gem 'rbnacl-libsodium', require: false
28+
end
29+
30+
group :test do
31+
# Testing dependencies
32+
gem 'rspec', '~> 3.2.0'
33+
gem 'opal-rspec', '~> 0.4.2'
34+
gem 'capybara', '~> 2.4.4'
35+
gem 'selenium-webdriver', '~> 2.47.1'
36+
gem 'chromedriver-helper', '~> 1.0.0'
37+
gem 'poltergeist', '~> 1.6.0'
38+
end
39+
40+
# Server for MRI
41+
platform :mri, :mingw, :x64_mingw do
42+
# The implementation of ReadWriteLock in Volt uses concurrent ruby and ext helps performance.
43+
gem 'concurrent-ruby-ext', '~> 0.8.0'
44+
45+
# Thin is the default volt server, Puma is also supported
46+
gem 'thin', '~> 1.6.0'
47+
end
48+
49+
group :production do
50+
# Asset compilation gems, they will be required when needed.
51+
gem 'csso-rails', '~> 0.3.4', require: false
52+
gem 'uglifier', '>= 2.4.0', require: false
53+
54+
# Image compression gem for precompiling assets
55+
gem 'image_optim'
56+
57+
# Provides precompiled binaries for image compression
58+
gem 'image_optim_pack'
59+
end

Gemfile.lock

Lines changed: 186 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,186 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
archive-zip (0.7.0)
5+
io-like (~> 0.3.0)
6+
bcrypt (3.1.10)
7+
bson (3.2.6)
8+
capybara (2.4.4)
9+
mime-types (>= 1.16)
10+
nokogiri (>= 1.3.3)
11+
rack (>= 1.0.0)
12+
rack-test (>= 0.5.4)
13+
xpath (~> 2.0)
14+
childprocess (0.5.9)
15+
ffi (~> 1.0, >= 1.0.11)
16+
chromedriver-helper (1.0.0)
17+
archive-zip (~> 0.7.0)
18+
nokogiri (~> 1.6)
19+
cliver (0.3.2)
20+
coderay (1.1.0)
21+
concurrent-ruby (0.8.0)
22+
ref (~> 1.0, >= 1.0.5)
23+
concurrent-ruby-ext (0.8.0)
24+
concurrent-ruby (~> 0.8.0)
25+
configurations (2.0.0)
26+
csso-rails (0.3.4)
27+
execjs (>= 1)
28+
daemons (1.2.3)
29+
diff-lcs (1.2.5)
30+
eventmachine (1.0.9.1)
31+
execjs (2.6.0)
32+
exifr (1.2.4)
33+
faye-websocket (0.10.2)
34+
eventmachine (>= 0.12.0)
35+
websocket-driver (>= 0.5.1)
36+
ffi (1.9.10)
37+
fspath (2.1.1)
38+
hike (1.2.3)
39+
image_optim (0.22.0)
40+
exifr (~> 1.2, >= 1.2.2)
41+
fspath (~> 2.1)
42+
image_size (~> 1.3)
43+
in_threads (~> 1.3)
44+
progress (~> 3.0, >= 3.0.1)
45+
image_optim_pack (0.2.1.20160119)
46+
fspath (~> 2.1)
47+
image_optim (~> 0.19)
48+
image_size (1.4.2)
49+
in_threads (1.3.1)
50+
io-like (0.3.0)
51+
json (1.8.3)
52+
listen (3.0.6)
53+
rb-fsevent (>= 0.9.3)
54+
rb-inotify (>= 0.9.7)
55+
mail (2.6.3)
56+
mime-types (>= 1.16, < 3)
57+
method_source (0.8.2)
58+
mime-types (2.99)
59+
mini_portile2 (2.0.0)
60+
mongo (2.1.2)
61+
bson (~> 3.0)
62+
multi_json (1.11.2)
63+
nokogiri (1.6.7.2)
64+
mini_portile2 (~> 2.0.0.rc2)
65+
opal (0.8.1)
66+
hike (~> 1.2)
67+
sourcemap (~> 0.1.0)
68+
sprockets (~> 3.1)
69+
tilt (>= 1.4)
70+
opal-rspec (0.4.3)
71+
opal (>= 0.7.0, < 0.9)
72+
poltergeist (1.6.0)
73+
capybara (~> 2.1)
74+
cliver (~> 0.3.1)
75+
multi_json (~> 1.0)
76+
websocket-driver (>= 0.2.0)
77+
pony (1.11)
78+
mail (>= 2.0)
79+
progress (3.1.1)
80+
pry (0.10.3)
81+
coderay (~> 1.1.0)
82+
method_source (~> 0.8.1)
83+
slop (~> 3.4)
84+
rack (1.5.5)
85+
rack-test (0.6.3)
86+
rack (>= 1.0)
87+
rb-fsevent (0.9.7)
88+
rb-inotify (0.9.7)
89+
ffi (>= 0.5.0)
90+
rbnacl (3.3.0)
91+
ffi
92+
rbnacl-libsodium (1.0.8)
93+
rbnacl (~> 3.0, >= 3.0.1)
94+
ref (1.0.5)
95+
rspec (3.2.0)
96+
rspec-core (~> 3.2.0)
97+
rspec-expectations (~> 3.2.0)
98+
rspec-mocks (~> 3.2.0)
99+
rspec-core (3.2.3)
100+
rspec-support (~> 3.2.0)
101+
rspec-expectations (3.2.1)
102+
diff-lcs (>= 1.2.0, < 2.0)
103+
rspec-support (~> 3.2.0)
104+
rspec-mocks (3.2.1)
105+
diff-lcs (>= 1.2.0, < 2.0)
106+
rspec-support (~> 3.2.0)
107+
rspec-support (3.2.2)
108+
rubyzip (1.1.7)
109+
sass (3.4.21)
110+
selenium-webdriver (2.47.1)
111+
childprocess (~> 0.5)
112+
multi_json (~> 1.0)
113+
rubyzip (~> 1.0)
114+
websocket (~> 1.0)
115+
slop (3.6.0)
116+
sourcemap (0.1.1)
117+
sprockets (3.4.1)
118+
rack (> 1, < 3)
119+
sprockets-helpers (1.2.1)
120+
sprockets (>= 2.2)
121+
thin (1.6.4)
122+
daemons (~> 1.0, >= 1.0.9)
123+
eventmachine (~> 1.0, >= 1.0.4)
124+
rack (~> 1.0)
125+
thor (0.19.1)
126+
tilt (2.0.2)
127+
uglifier (2.7.2)
128+
execjs (>= 0.3.0)
129+
json (>= 1.8.0)
130+
volt (0.9.6)
131+
bcrypt (~> 3.1.9)
132+
bundler (>= 1.5)
133+
concurrent-ruby (= 0.8.0)
134+
configurations (~> 2.0.0.pre)
135+
faye-websocket (~> 0.10.0)
136+
listen (~> 3.0.1)
137+
opal (>= 0.8.0, < 0.9)
138+
pry (~> 0.10.1)
139+
rack (~> 1.5.0)
140+
sass (~> 3.4.15)
141+
sprockets-helpers (~> 1.2.1)
142+
thor (~> 0.19.0)
143+
volt-bootstrap (0.1.0)
144+
volt-bootstrap_jumbotron_theme (0.1.0)
145+
volt-fields (0.1.3)
146+
volt-mailer (0.1.2)
147+
pony (~> 1.11)
148+
volt-mongo (0.1.4)
149+
mongo (~> 2.1.2)
150+
volt-user_templates (0.4.0)
151+
volt-fields (~> 0.1.0)
152+
volt-mailer (~> 0.1.0)
153+
websocket (1.2.2)
154+
websocket-driver (0.6.3)
155+
websocket-extensions (>= 0.1.0)
156+
websocket-extensions (0.1.2)
157+
xpath (2.0.0)
158+
nokogiri (~> 1.3)
159+
160+
PLATFORMS
161+
ruby
162+
163+
DEPENDENCIES
164+
capybara (~> 2.4.4)
165+
chromedriver-helper (~> 1.0.0)
166+
concurrent-ruby-ext (~> 0.8.0)
167+
csso-rails (~> 0.3.4)
168+
image_optim
169+
image_optim_pack
170+
opal-rspec (~> 0.4.2)
171+
poltergeist (~> 1.6.0)
172+
rbnacl
173+
rbnacl-libsodium
174+
rspec (~> 3.2.0)
175+
selenium-webdriver (~> 2.47.1)
176+
thin (~> 1.6.0)
177+
uglifier (>= 2.4.0)
178+
volt (= 0.9.6)
179+
volt-bootstrap (~> 0.1.0)
180+
volt-bootstrap_jumbotron_theme (~> 0.1.0)
181+
volt-mailer (~> 0.1.1)
182+
volt-mongo (~> 0.1.0)
183+
volt-user_templates (~> 0.4.0)
184+
185+
BUNDLED WITH
186+
1.10.6

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Place your app's docs here.
2+
3+
## New to Volt?
4+
Be sure to read the volt docs at http://voltframework.com/docs

app/main/assets/css/app.css.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// Place your apps css here

app/main/config/dependencies.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Specify which components you wish to include when
2+
# the "home" component loads.
3+
4+
# bootstrap css framework
5+
component 'bootstrap'
6+
7+
# a default theme for the bootstrap framework
8+
component 'bootstrap_jumbotron_theme'
9+
10+
# provides templates for login, signup, and logout
11+
component 'user_templates'
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Place any code you want to run when the component is included on the client
2+
# or server.
3+
4+
# To include code only on the client use:
5+
# if RUBY_PLATFORM == 'opal'
6+
#
7+
# To include code only on the server, use:
8+
# unless RUBY_PLATFORM == 'opal'
9+
# ^^ this will not send compile in code in the conditional to the client.
10+
# ^^ this include code required in the conditional.

app/main/config/routes.rb

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# See https://github.com/voltrb/volt#routes for more info on routes
2+
3+
client '/about', action: 'about'
4+
5+
# Routes for login and signup, provided by user_templates component gem
6+
client '/signup', component: 'user_templates', controller: 'signup'
7+
client '/login', component: 'user_templates', controller: 'login', action: 'index'
8+
client '/password_reset', component: 'user_templates', controller: 'password_reset', action: 'index'
9+
client '/forgot', component: 'user_templates', controller: 'login', action: 'forgot'
10+
client '/account', component: 'user_templates', controller: 'account', action: 'index'
11+
12+
# The main route, this should be last. It will match any params not
13+
# previously matched.
14+
client '/', {}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# By default Volt generates this controller for your Main component
2+
module Main
3+
class MainController < Volt::ModelController
4+
def index
5+
# Add code for when the index view is loaded
6+
end
7+
8+
def about
9+
# Add code for when the about view is loaded
10+
end
11+
12+
private
13+
14+
# The main template contains a #template binding that shows another
15+
# template. This is the path to that template. It may change based
16+
# on the params._component, params._controller, and params._action values.
17+
def main_path
18+
"#{params._component || 'main'}/#{params._controller || 'main'}/#{params._action || 'index'}"
19+
end
20+
21+
# Determine if the current nav component is the active one by looking
22+
# at the first part of the url against the href attribute.
23+
def active_tab?
24+
url.path.split('/')[1] == attrs.href.split('/')[1]
25+
end
26+
end
27+
end

app/main/models/user.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# By default Volt generates this User model which inherits from Volt::User,
2+
# you can rename this if you want.
3+
class User < Volt::User
4+
# login_field is set to :email by default and can be changed to :username
5+
# in config/app.rb
6+
field login_field
7+
field :name
8+
9+
validate login_field, unique: true, length: 8
10+
validate :email, email: true
11+
12+
end

0 commit comments

Comments
 (0)