Permalink
Browse files

remove assetpack

  • Loading branch information...
1 parent c6094e5 commit 8348332aeb9c183ac37dd6fd40263e9bbbf1b9d6 @interstateone committed Sep 10, 2012
Showing with 9 additions and 20 deletions.
  1. +0 −1 Gemfile
  2. +0 −7 Gemfile.lock
  3. +6 −9 app/standards.rb
  4. +2 −2 app/views/app.erb
  5. +1 −1 app/views/layout.erb
View
1 Gemfile
@@ -28,7 +28,6 @@ gem 'execjs'
gem 'rest-client', :require => 'rest_client'
gem 'newrelic_rpm', "3.4.1"
gem 'rake'
-gem 'sinatra-assetpack', :require => 'sinatra/assetpack'
group :production do
gem 'therubyracer', '0.11.0beta5'
View
7 Gemfile.lock
@@ -96,7 +96,6 @@ GEM
rest-client
zip
zip
- jsmin (1.0.1)
json (1.7.5)
json_pure (1.7.5)
less (2.2.2)
@@ -143,11 +142,6 @@ GEM
rack (~> 1.3, >= 1.3.6)
rack-protection (~> 1.2)
tilt (~> 1.3, >= 1.3.3)
- sinatra-assetpack (0.0.11)
- jsmin
- rack-test
- sinatra
- tilt (>= 1.3.0)
sinatra-flash (0.3.0)
sinatra (>= 1.0.0)
stringex (1.4.0)
@@ -202,7 +196,6 @@ DEPENDENCIES
rspec
shotgun
sinatra
- sinatra-assetpack
sinatra-flash
therubyracer (= 0.11.0beta5)
thin
View
15 app/standards.rb
@@ -11,17 +11,14 @@ class Standards < Sinatra::Base
include Colorist
require_relative 'workers/emailworker'
register Sinatra::Flash
- register Sinatra::AssetPack
- assets do
- serve '/js', from: 'public/js'
- serve '/css', from: 'public/css'
- serve '/img', from: 'public/img'
-
- js :app, '/js/main-built.js', []
- css :app, '/css/styles.css', []
+ if memcache_servers = ENV["MEMCACHE_SERVERS"]
+ use Rack::Cache,
+ :verbose => true,
+ :metastore => Dalli::Client.new,
+ :entitystore => 'file:tmp/cache/rack/body'
+ set :static_cache_control, [:public, {:max_age => 60*60*24*7}]
end
-
use Rack::Deflater
set :public_folder, 'public'
View
4 app/views/app.erb
@@ -9,7 +9,7 @@
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
- <%= css :app if ENV['RACK_ENV'] == 'production' %>
+ <%= '<link href="/css/styles.css" rel="stylesheet">' if ENV['RACK_ENV'] == 'production' %>
<%= '<link rel="stylesheet/less" type="text/css" href="/less/bootstrap.less">' if ENV['RACK_ENV'] != 'production' %>
<%= '<script src="/js/lib/less.js" type="text/javascript"></script>' if ENV['RACK_ENV'] != 'production' %>
@@ -64,7 +64,7 @@
<!-- Javascript -->
<%= yield %>
<%= '<script data-main="/js/main.js" src="/js/lib/require.js"></script>' if ENV['RACK_ENV'] != 'production' %>
- <%= js :app if ENV['RACK_ENV'] == 'production' %>
+ <%= '<script src="/js/main-built.js"></script>' if ENV['RACK_ENV'] == 'production' %>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-30914801-1']);
View
2 app/views/layout.erb
@@ -9,7 +9,7 @@
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
- <%= css :app if ENV['RACK_ENV'] == 'production' %>
+ <%= '<link href="/css/styles.css" rel="stylesheet">' if ENV['RACK_ENV'] == 'production' %>
<%= '<link rel="stylesheet/less" type="text/css" href="/less/bootstrap.less">' if ENV['RACK_ENV'] != 'production' %>
<%= '<script src="/js/lib/less.js" type="text/javascript"></script>' if ENV['RACK_ENV'] != 'production' %>

0 comments on commit 8348332

Please sign in to comment.