Skip to content

Commit 4a3eae8

Browse files
committed
Clearup gems, speed up boot time.
1 parent 0b78301 commit 4a3eae8

File tree

18 files changed

+175
-211
lines changed

18 files changed

+175
-211
lines changed

Gemfile

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ end
1616
gem 'carrierwave', '0.6.2'
1717
gem 'carrierwave-mongoid', '0.2.0', :require => 'carrierwave/mongoid'
1818
gem 'carrierwave-upyun', '0.1.3'
19-
gem 'mini_magick','3.3'
19+
gem 'mini_magick','3.3', :require => false
2020

2121
# Mongoid 辅助插件
2222
gem "mongoid", "2.4.8"
@@ -35,10 +35,7 @@ gem 'bootstrap-will_paginate', '0.0.3'
3535

3636
# 三方平台 OAuth 验证登陆
3737
gem "omniauth", "~> 1.0.1"
38-
gem 'omniauth-openid', "~> 1.0.1"
3938
gem "omniauth-github", "~> 1.0.0"
40-
gem "omniauth-twitter", "~> 0.0.7"
41-
gem "omniauth-douban", :git => "git://github.com/ballantyne/omniauth-douban.git"
4239

4340
# permission
4441
gem "cancan", "~> 1.6.7"
@@ -51,7 +48,6 @@ gem "redis-objects", "0.5.2"
5148

5249
# Markdown 格式
5350
gem "redcarpet", "~> 2.0.0"
54-
gem 'hpricot', '~> 0.8.5'
5551
gem "pygments.rb", '~> 0.2.4'
5652

5753
# YAML 配置信息
@@ -65,26 +61,20 @@ gem "resque_mailer", '2.0.2'
6561

6662
# AWS Simple Email Server
6763
gem "aws-ses", "~> 0.4.3"
68-
gem 'mail_view', :git => 'git://github.com/37signals/mail_view.git'
69-
70-
# 用于组合小图片
71-
gem "sprite-factory", "1.4.1"
7264

7365
# 分享功能
7466
gem "social-share-button", "~> 0.0.3"
7567

7668
# 表单 last commit: 2011-12-03
77-
gem 'simple_form', :git => "git://github.com/plataformatec/simple_form.git"
69+
gem 'simple_form', "2.0.2"
7870
gem 'bootstrap-rails', :require => 'bootstrap-rails', :git => 'git://github.com/xdite/bootstrap-rails.git'
7971

8072
# 全文搜索
8173
gem 'sunspot_rails', "~> 1.3.2"
8274
gem 'sunspot_solr'
8375

84-
gem 'daemon-spawn'
85-
8676
# 禁用 assets 日志
87-
gem 'quiet_assets', :git => 'git://github.com/AgilionApps/quiet_assets.git'
77+
gem 'quiet_assets', "1.0.1"
8878

8979
# Github API
9080
gem 'ruby-github'
@@ -93,13 +83,14 @@ gem 'ruby-github'
9383
gem 'grape', :git => 'git://github.com/intridea/grape.git', :branch => 'frontier'
9484

9585
group :development, :test do
96-
gem 'capistrano', '2.9.0'
97-
gem 'chunky_png', "1.2.5"
86+
gem 'capistrano', '2.9.0', :require => false
87+
# 用于组合小图片
88+
gem "sprite-factory", "1.4.1", :require => false
89+
gem 'chunky_png', "1.2.5", :require => false
9890
gem "memcache-client", "1.8.5"
99-
gem 'rspec-rails', '~> 2.8.1'
91+
gem 'rspec-rails', '~> 2.10.0'
10092
gem 'factory_girl_rails'
10193
gem 'thin'
102-
gem "simplecov", :require => false
10394
gem "rspec-cells"
10495
gem "capybara"
10596
gem "sunspot-rails-tester"

Gemfile.lock

Lines changed: 21 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,3 @@
1-
GIT
2-
remote: git://github.com/37signals/mail_view.git
3-
revision: a99c2fc242fbb271a739a0934c59d4d66d3cf9c7
4-
specs:
5-
mail_view (1.0.1)
6-
tilt
7-
8-
GIT
9-
remote: git://github.com/AgilionApps/quiet_assets.git
10-
revision: b699ee6c8aac59dc2e1405e98aef82802e8b8098
11-
specs:
12-
quiet_assets (0.0.1)
13-
14-
GIT
15-
remote: git://github.com/ballantyne/omniauth-douban.git
16-
revision: 7affc4a09216f1c82a271a691ade3ba990e20a24
17-
specs:
18-
omniauth-douban (1.0.0.rc2)
19-
multi_json
20-
omniauth (~> 1.0.0.rc2)
21-
omniauth-oauth (~> 1.0.0.rc2)
22-
231
GIT
242
remote: git://github.com/intridea/grape.git
253
revision: d24bd2f758544244ac65f19c69b94f0ffc34e71b
@@ -32,14 +10,6 @@ GIT
3210
rack
3311
rack-mount
3412

35-
GIT
36-
remote: git://github.com/plataformatec/simple_form.git
37-
revision: da92c45953e907aed0fbb1e38477d845a7c3bc11
38-
specs:
39-
simple_form (2.0.0.rc)
40-
actionpack (~> 3.0)
41-
activemodel (~> 3.0)
42-
4313
GIT
4414
remote: git://github.com/xdite/bootstrap-rails.git
4515
revision: 7fe2d48ef0b01de7b16aa927465d83c768e3769e
@@ -129,7 +99,6 @@ GEM
12999
coffee-script-source
130100
execjs
131101
coffee-script-source (1.2.0)
132-
daemon-spawn (0.4.2)
133102
daemons (1.1.6)
134103
dalli (1.1.1)
135104
devise (1.5.2)
@@ -157,14 +126,13 @@ GEM
157126
hike (1.2.1)
158127
hoe (2.14.0)
159128
rake (~> 0.8)
160-
hpricot (0.8.5)
161129
i18n (0.6.0)
162130
journey (1.0.3)
163131
jquery-atwho-rails (0.1.3)
164132
jquery-rails (1.0.16)
165133
railties (~> 3.0)
166134
thor (~> 0.14)
167-
json (1.6.5)
135+
json (1.7.3)
168136
kgio (2.6.0)
169137
mail (2.4.1)
170138
i18n (>= 0.4.0)
@@ -201,7 +169,6 @@ GEM
201169
net-ssh-gateway (1.1.0)
202170
net-ssh (>= 1.99.1)
203171
nokogiri (1.5.2)
204-
oauth (0.4.5)
205172
oauth2 (0.5.1)
206173
faraday (~> 0.7.4)
207174
multi_json (~> 1.0.3)
@@ -211,30 +178,21 @@ GEM
211178
omniauth-github (1.0.0)
212179
omniauth (~> 1.0)
213180
omniauth-oauth2 (~> 1.0)
214-
omniauth-oauth (1.0.0)
215-
oauth
216-
omniauth (~> 1.0)
217181
omniauth-oauth2 (1.0.0)
218182
oauth2 (~> 0.5.0)
219183
omniauth (~> 1.0)
220-
omniauth-openid (1.0.1)
221-
omniauth (~> 1.0)
222-
rack-openid (~> 1.3.1)
223-
omniauth-twitter (0.0.7)
224-
omniauth-oauth (~> 1.0)
225184
orm_adapter (0.0.5)
226185
polyglot (0.3.3)
227186
pr_geohash (1.0.0)
228187
pygments.rb (0.2.4)
229188
rubypython (~> 0.5.3)
189+
quiet_assets (1.0.1)
190+
railties (~> 3.1)
230191
rack (1.4.1)
231-
rack-cache (1.1)
192+
rack-cache (1.2)
232193
rack (>= 0.4)
233194
rack-mount (0.8.3)
234195
rack (>= 1.0.0)
235-
rack-openid (1.3.1)
236-
rack (>= 1.1.0)
237-
ruby-openid (>= 2.1.8)
238196
rack-protection (1.2.0)
239197
rack
240198
rack-ssl (1.3.2)
@@ -282,28 +240,27 @@ GEM
282240
mime-types (>= 1.16)
283241
rsolr (1.0.8)
284242
builder (>= 2.1.2)
285-
rspec (2.8.0)
286-
rspec-core (~> 2.8.0)
287-
rspec-expectations (~> 2.8.0)
288-
rspec-mocks (~> 2.8.0)
243+
rspec (2.10.0)
244+
rspec-core (~> 2.10.0)
245+
rspec-expectations (~> 2.10.0)
246+
rspec-mocks (~> 2.10.0)
289247
rspec-cells (0.1.2)
290248
cells (~> 3.4)
291249
rails (~> 3.0)
292250
rspec-rails (~> 2.2)
293-
rspec-core (2.8.0)
294-
rspec-expectations (2.8.0)
295-
diff-lcs (~> 1.1.2)
296-
rspec-mocks (2.8.0)
297-
rspec-rails (2.8.1)
251+
rspec-core (2.10.0)
252+
rspec-expectations (2.10.0)
253+
diff-lcs (~> 1.1.3)
254+
rspec-mocks (2.10.1)
255+
rspec-rails (2.10.1)
298256
actionpack (>= 3.0)
299257
activesupport (>= 3.0)
300258
railties (>= 3.0)
301-
rspec (~> 2.8.0)
259+
rspec (~> 2.10.0)
302260
ruby-github (0.0.3)
303261
hoe (>= 1.5.1)
304262
json
305263
mash (>= 0.0.3)
306-
ruby-openid (2.1.8)
307264
rubypython (0.5.3)
308265
blankslate (>= 2.1.2.3)
309266
ffi (~> 1.0.7)
@@ -319,17 +276,16 @@ GEM
319276
multi_json (~> 1.0.4)
320277
rubyzip
321278
settingslogic (2.0.6)
322-
simplecov (0.5.4)
323-
multi_json (~> 1.0.3)
324-
simplecov-html (~> 0.5.3)
325-
simplecov-html (0.5.3)
279+
simple_form (2.0.2)
280+
actionpack (~> 3.0)
281+
activemodel (~> 3.0)
326282
sinatra (1.3.2)
327283
rack (~> 1.3, >= 1.3.6)
328284
rack-protection (~> 1.2)
329285
tilt (~> 1.3, >= 1.3.3)
330286
social-share-button (0.0.3)
331287
sprite-factory (1.4.1)
332-
sprockets (2.1.2)
288+
sprockets (2.1.3)
333289
hike (~> 1.2)
334290
rack (~> 1.0)
335291
tilt (~> 1.1, != 1.3.0)
@@ -387,15 +343,12 @@ DEPENDENCIES
387343
cells (= 3.7.1)
388344
chunky_png (= 1.2.5)
389345
coffee-rails (~> 3.2.1)
390-
daemon-spawn
391346
dalli (= 1.1.1)
392347
devise (= 1.5.2)
393348
factory_girl_rails
394349
grape!
395-
hpricot (~> 0.8.5)
396350
jquery-atwho-rails (= 0.1.3)
397351
jquery-rails (= 1.0.16)
398-
mail_view!
399352
memcache-client (= 1.8.5)
400353
mini_magick (= 3.3)
401354
mongo-rails-instrumentation (= 0.2.4)
@@ -404,12 +357,9 @@ DEPENDENCIES
404357
mongoid_colored_logger (= 0.1.1)
405358
mongoid_rails_migrations (~> 0.0.14)
406359
omniauth (~> 1.0.1)
407-
omniauth-douban!
408360
omniauth-github (~> 1.0.0)
409-
omniauth-openid (~> 1.0.1)
410-
omniauth-twitter (~> 0.0.7)
411361
pygments.rb (~> 0.2.4)
412-
quiet_assets!
362+
quiet_assets (= 1.0.1)
413363
rails (= 3.2.2)
414364
rails-i18n (= 0.1.8)
415365
rails_autolink (>= 1.0.4)
@@ -419,12 +369,11 @@ DEPENDENCIES
419369
resque (~> 1.20.0)
420370
resque_mailer (= 2.0.2)
421371
rspec-cells
422-
rspec-rails (~> 2.8.1)
372+
rspec-rails (~> 2.10.0)
423373
ruby-github
424374
sass-rails (~> 3.2.3)
425375
settingslogic (~> 2.0.6)
426-
simple_form!
427-
simplecov
376+
simple_form (= 2.0.2)
428377
social-share-button (~> 0.0.3)
429378
sprite-factory (= 1.4.1)
430379
sunspot-rails-tester

app/mailers/user_mailer.rb

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,4 @@ def welcome(user_id)
55
return false if @user.blank?
66
mail(:to => @user.email, :subject => "#{t("mail.welcome_subject", :app_name => Setting.app_name)}")
77
end
8-
9-
class Preview < MailView
10-
# Pull data from existing fixtures
11-
def welcome
12-
::UserMailer.welcome(User.last.id)
13-
end
14-
end
158
end

app/views/cpanel/comments/_form.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<%= simple_form_for([:cpanel,@comment], :wrapper => :inline) do |f| %>
1+
<%= simple_form_for([:cpanel,@comment]) do |f| %>
22
<fieldset>
33
<legend>Edit Comment</legend>
44
<%= render "/shared/error_messages", :target => @comment %>

app/views/cpanel/locations/_form.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div id="cpanel_location" class="form">
22

3-
<%= simple_form_for([:cpanel,@location], :wrapper => :inline ) do |f| %>
3+
<%= simple_form_for([:cpanel,@location]) do |f| %>
44
<%= render "/shared/error_messages", :target => @location %>
55
<fieldset>
66
<legend><%= t("common.edit") %></legend>

app/views/cpanel/site_nodes/_form.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div id="cpanel_site_node" class="form">
22

3-
<%= simple_form_for([:cpanel,@site_node], :wrapper => :inline ) do |f| %>
3+
<%= simple_form_for([:cpanel,@site_node]) do |f| %>
44
<%= render "/shared/error_messages", :target => @site_node %>
55
<fieldset>
66
<legend><%= t("common.edit") %></legend>

app/views/cpanel/sites/_form.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div id="cpanel_site" class="form">
22

3-
<%= simple_form_for([:cpanel,@site], :wrapper => :inline ) do |f| %>
3+
<%= simple_form_for([:cpanel,@site]) do |f| %>
44
<%= render "/shared/error_messages", :target => @site %>
55
<fieldset>
66
<legend><%= t("common.edit") %></legend>

app/views/cpanel/users/_form.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<%= simple_form_for([:cpanel,@user], :html => { :enctype => "multipart/form-data" }, :wrapper => :inline) do |f| %>
1+
<%= simple_form_for([:cpanel,@user]) do |f| %>
22
<%= render 'shared/error_messages', :target => @user %>
33
<%= f.input :login %>
44
<%= f.input :name %>

app/views/pages/_form.html.erb

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,32 @@
1-
<%= simple_form_for @page, :wrapper => :inline do |f| %>
2-
<fieldset>
3-
<legend><%= t("pages.edit_wiki_page")%></legend>
4-
<%= render "shared/error_messages", :target => @page %>
1+
<%= simple_form_for @page do |f| %>
2+
<fieldset>
3+
<legend><%= t("pages.edit_wiki_page")%></legend>
4+
<%= render "shared/error_messages", :target => @page %>
55

6-
<%= f.input :slug, :hint => "http://#{Setting.domain}/wiki/:slug"%>
7-
<%= f.input :title, :input_html => { :class => "xxlarge" } %>
8-
9-
<% if I18n.default_locale == "zh-CN" %>
10-
<%= f.input :body, :as => :text,
11-
:input_html => { :class => "long", :rows => "30" },
12-
:hint => "请使用 Markdown 格式编写,可以试试用 <a href='http://mouapp.com' target='_blank'>Mou</a> 这个 App 来编写。".html_safe
13-
%>
14-
<% else %>
15-
<%= f.input :body, :as => :text,
16-
:input_html => { :class => "long", :rows => "30" },
17-
:hint => "請使用 Markdown 格式編寫,可以試試用 <a href='http://mouapp.com' target='_blank'>Mou</a> 這個 App 来編寫。".html_safe
18-
%>
19-
<% end %>
6+
<%= f.input :slug, :hint => "http://#{Setting.domain}/wiki/:slug"%>
7+
<%= f.input :title, :input_html => { :class => "xxlarge" } %>
208

21-
<% if not @page.new_record? %>
22-
<%= f.input :change_desc , :as => :text,
23-
:input_html => { :class => "long", :rows => "2" },
24-
:hint => t("pages.describe_this_time_change")
25-
%>
9+
<% if I18n.default_locale == "zh-CN" %>
10+
<%= f.input :body, :as => :text,
11+
:input_html => { :class => "long", :rows => "30" },
12+
:hint => "请使用 Markdown 格式编写,可以试试用 <a href='http://mouapp.com' target='_blank'>Mou</a> 这个 App 来编写。".html_safe
13+
%>
14+
<% else %>
15+
<%= f.input :body, :as => :text,
16+
:input_html => { :class => "long", :rows => "30" },
17+
:hint => "請使用 Markdown 格式編寫,可以試試用 <a href='http://mouapp.com' target='_blank'>Mou</a> 這個 App 来編寫。".html_safe
18+
%>
19+
<% end %>
2620

27-
<% end %>
28-
<div class="actions">
29-
<%= f.submit t("common.save"), :class => "btn primary", :disable_with => t("common.saving") %>
30-
</div>
21+
<% if not @page.new_record? %>
22+
<%= f.input :change_desc , :as => :text,
23+
:input_html => { :class => "long", :rows => "2" },
24+
:hint => t("pages.describe_this_time_change")
25+
%>
26+
27+
<% end %>
28+
<div class="actions">
29+
<%= f.submit t("common.save"), :class => "btn primary", :disable_with => t("common.saving") %>
30+
</div>
31+
</fieldset>
3132
<% end %>

0 commit comments

Comments
 (0)