Skip to content

Commit 1e433b3

Browse files
committed
Sass and app rename
1 parent d5d47e3 commit 1e433b3

File tree

12 files changed

+25
-49
lines changed

12 files changed

+25
-49
lines changed

Diff for: .components

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
:mock: rr
55
:script: jquery
66
:renderer: erb
7-
:stylesheet: less
7+
:stylesheet: sass

Diff for: Gemfile

+1-3
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@ gem 'activerecord', :require => 'active_record'
55
gem 'activerecord-postgres-array'
66
gem 'bcrypt-ruby', :require => 'bcrypt'
77
gem 'erubis', '~> 2.7.0'
8-
gem 'less'
98
gem 'pg'
10-
gem 'rack-less'
119
gem 'rake'
10+
gem 'sass'
1211
gem 'sinatra-flash', :require => 'sinatra/flash'
13-
gem 'therubyracer'
1412
gem 'thin'
1513

1614
# Padrino Stable Gem

Diff for: Gemfile.lock

+3-15
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,13 @@ GEM
1717
arel (3.0.2)
1818
bcrypt-ruby (3.0.1)
1919
builder (3.0.4)
20-
commonjs (0.2.6)
2120
daemons (1.1.9)
2221
erubis (2.7.0)
2322
eventmachine (1.0.0)
2423
http_router (0.10.2)
2524
rack (>= 1.0.0)
2625
url_mount (~> 0.2.1)
2726
i18n (0.6.1)
28-
less (2.2.2)
29-
commonjs (~> 0.2.6)
30-
libv8 (3.11.8.9)
3127
mail (2.3.3)
3228
i18n (>= 0.4.0)
3329
mime-types (~> 1.16)
@@ -64,17 +60,14 @@ GEM
6460
padrino-core (= 0.10.7)
6561
pg (0.14.1)
6662
polyglot (0.3.3)
67-
rack (1.4.1)
68-
rack-less (3.0.2)
69-
less (~> 2.0)
70-
rack (~> 1.0)
63+
rack (1.4.2)
7164
rack-protection (1.3.2)
7265
rack
7366
rack-test (0.6.2)
7467
rack (>= 1.0)
7568
rake (10.0.3)
76-
ref (1.0.2)
7769
rr (1.0.4)
70+
sass (3.2.5)
7871
shotgun (0.9)
7972
rack (>= 1.0)
8073
sinatra (1.3.3)
@@ -83,9 +76,6 @@ GEM
8376
tilt (~> 1.3, >= 1.3.3)
8477
sinatra-flash (0.3.0)
8578
sinatra (>= 1.0.0)
86-
therubyracer (0.11.1)
87-
libv8 (~> 3.11.8.7)
88-
ref
8979
thin (1.5.0)
9080
daemons (>= 1.0.9)
9181
eventmachine (>= 0.12.6)
@@ -107,15 +97,13 @@ DEPENDENCIES
10797
activerecord-postgres-array
10898
bcrypt-ruby
10999
erubis (~> 2.7.0)
110-
less
111100
minitest
112101
padrino
113102
pg
114-
rack-less
115103
rack-test
116104
rake
117105
rr
106+
sass
118107
shotgun
119108
sinatra-flash
120-
therubyracer
121109
thin

Diff for: app/app.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
class Onefact < Padrino::Application
2-
register LessInitializer
1+
class QuizPopsicle < Padrino::Application
2+
register SassInitializer
33
use ActiveRecord::ConnectionAdapters::ConnectionManagement
44
register Padrino::Rendering
55
register Padrino::Mailer

Diff for: app/controllers.rb

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Onefact.controllers do
1+
QuizPopsicle.controllers do
22
layout :main
33

44
# /
@@ -72,5 +72,4 @@
7272
@user = User.where(:name => params[:name]).first
7373
render :user
7474
end
75-
7675
end

Diff for: app/helpers.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Helper methods defined here can be accessed in any controller or view in the application
22

3-
Onefact.helpers do
3+
QuizPopsicle.helpers do
44
# def simple_helper_method
55
# ...
66
# end

Diff for: app/mailers.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@
3333
# and then all delivered mail will use these settings unless otherwise specified.
3434
#
3535

36-
Onefact.mailer :notifier do
36+
QuizPopsicle.mailer :notifier do
3737
# Message definitions here...
3838
end

Diff for: app/stylesheets/test.sass

Whitespace-only changes.

Diff for: config/apps.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
#
2828
Padrino.configure_apps do
2929
# enable :sessions
30-
set :session_secret, '7d72dcfaf8858383c07990acfb4486f6f926aa83a772759ea9bdde7d90befc92'
30+
set :session_secret, '6106be7965a6740a963141327efb4875809866efb584d32dbf32332e57d41364'
3131
end
3232

3333
# Mounts the core application for this project
34-
Padrino.mount("Onefact").to('/')
34+
Padrino.mount("QuizPopsicle").to('/')

Diff for: config/database.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
# Database config for relational db.
33
init = Time.now
44
connections = {
5-
:development => "postgres://localhost/onefact",
6-
:test => "postgres://postgres@localhost/onefact_test",
5+
:development => "postgres://localhost/quizpopsicle",
6+
:test => "postgres://postgres@localhost/quizpopsicle_test",
77
:production => ENV['DATABASE_URL']
88
}
99

Diff for: lib/less_init.rb

-20
This file was deleted.

Diff for: lib/sass_init.rb

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module SassInitializer
2+
def self.registered(app)
3+
# Enables support for SASS template reloading in rack applications.
4+
# See http://nex-3.com/posts/88-sass-supports-rack for more details.
5+
# Store SASS files (by default) within 'app/stylesheets'
6+
require 'sass/plugin/rack'
7+
Sass::Plugin.options[:template_location] = Padrino.root("app/stylesheets")
8+
Sass::Plugin.options[:css_location] = Padrino.root("public/stylesheets")
9+
app.use Sass::Plugin::Rack
10+
end
11+
end

0 commit comments

Comments
 (0)