From d233f9fe94b272eff81a9d8039b7e4954d6d6503 Mon Sep 17 00:00:00 2001 From: nwb Date: Mon, 23 Jun 2014 15:00:54 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/测试环境搭建.doc | Bin 27648 -> 28672 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/doc/测试环境搭建.doc b/doc/测试环境搭建.doc index 106a5db4218e5fb3d14e14f56c25ee83528e5b41..9473f768509c49485687deb72d79cb351f39eeca 100644 GIT binary patch delta 2558 zcma)7du&rx82|3==(^dCF<8N|;MR>X9%J3xm2K?N4dm(Z2)}-`_sh=d8#<2sg&-B`F^rBcD zlaa(xJUSf7;`f;1d91+WpW;z|^b2*n&K8W?A4(b(gfVz^>*Te|C-x6XQT3A%dG>_3 zqViMVPXjR@!J9F2$#_KV4IXb zLLPULaadV0xR}JSW`?}ZC?06fNQ0r%v43d#6U*du0~OIi+N!j*hz-jQwgnBmQAacj zSOBaNhJ=|SQ=b?##}V0p!$4X*kqO8I768@2ZeTAk4AebAv>n(1yaNma-vYk?zXHDj zw}A)1Lx2*A3IQw71AGMh2*gYw(gL?fZpDtK`d;u&NCnhU@|NBJWTSJO*RH^L?~>4@>-9Pm9-HKm>j3Uc7_aQX+d8? zVOF%F(JDqO#TDvBHTnSbVO_#iaU!8gcy(LE^~otg>rV2LhxFkFTS9ZIW9goq%|F;u!tIc6fjo_z(6vCvO|8V-fXZ#8 zDypZY)I=MpmTa_&%E_e4f__XU7(932ekVIOkbz!am*|MM-8!IbIeLg4>BD*JZ#G@G zWv_0h4mjW-+|&lsIkvdopB?Ok?HC<)1m{5*QI4N399X)C)6<1-HvQE_uXn%17xnJ8 zS2y%*17Ei;WjLcn;VEH~|G{1G<48S!}YbPoG4w6h-RTI(3W}BL*x_ zm9nwXO^9Pm#`|Ib95QCL3F$gV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Zn(W1~$bNt3a>2?}kt&Jjsn$s#0dzJVib9gzxAh3@NXXpJR{Xz9SU zJdr?SfTY-KHEHn-(-U~iTTUC7bBON17P8W3_m{ltdQ!4dq8#MGx((=ujjh5C(yyV> z1zO$o)*oW$4BTcI7pOj6ZgzrFtIg-ZpoTeJ9^6#HT%#%*{cHQa9}<@a@ww8Zmv+b4 z+TZ&)AQwhTNI!Nd;r(p(GOos&gGJR?9NSq{(m2b{HJ(Y*a5pmFlqO;11le7B$@2z;kBh R@fi0WUTsEBMi`$K`2}s;208!$ From ef61e41d4877437d46bf571be1bd8e994778aa0a Mon Sep 17 00:00:00 2001 From: nwb Date: Mon, 23 Jun 2014 16:00:10 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/welcome/index.html.erb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb index 79001a3f5..16a4cbf21 100644 --- a/app/views/welcome/index.html.erb +++ b/app/views/welcome/index.html.erb @@ -54,7 +54,7 @@
    <% projects = find_miracle_project(10, 3) %> <% projects.map do |project| %> - <% cache cache_key_for_project(project) do %> +
  • <%= image_tag(get_project_avatar(project), :class => "avatar-4") %> @@ -75,7 +75,7 @@ :id => "tooltip-#{project.id}" %>
  • - <% end %> + <% end; reset_cycle %>
@@ -88,7 +88,7 @@
<%activities = find_all_activities%> <% activities.each do |event| %> - <% cache cache_key_for_event(event) do %> +
  • <%= image_tag url_to_avatar(event.event_author), :class => "avatar-3" %> @@ -99,7 +99,7 @@

    <%= l(:field_updated_on) %><%= time_tag_welcome event.event_datetime %>前     <%= show_event_reply event %>

  • - <% end %> + <% end %>
    @@ -107,7 +107,7 @@
      - <% cache 'forum_links' do %> +

      贴吧动态 @@ -115,11 +115,11 @@ <%= link_to "我要反馈" , suggestion_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%>

      <%= link_to "更多>>", forums_path %>
      - <% end %> +
      <% topics = find_new_forum_topics(7) %> <% topics.includes(:forum, :last_reply, :author).each do |topic|%> - <% cache cache_key_for_topic(topic) do %> +
    • <%= link_to '['+topic.forum.name + ']',forum_path(topic.forum),:class => 'memo_Bar_title' %><%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url,title: topic.subject %> @@ -139,7 +139,7 @@
    • - <% end %> + <% end %>
    From 067a2d78414be8798a9e2d333c2b90cb75c12a19 Mon Sep 17 00:00:00 2001 From: nwb Date: Mon, 23 Jun 2014 16:13:00 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E6=9C=AA=E6=89=BE=E5=88=B0=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/file_not_found.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/file_not_found.html b/public/file_not_found.html index 80b0e3dde..5b9b8bc1d 100644 --- a/public/file_not_found.html +++ b/public/file_not_found.html @@ -1,7 +1,7 @@ -文件未找到 +File not found -

    文件已经损坏

    -

    抱歉,因文件已经损坏,请重新上传此文件.

    +

    Sorry, this file can not be downloaded now.

    +

    Trustie Team.

    Back

    From 7ba723e582978512d3f295eba2ee92c44a840d17 Mon Sep 17 00:00:00 2001 From: linchun Date: Mon, 23 Jun 2014 17:16:12 +0800 Subject: [PATCH 4/6] bundle mysql connetion version --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 400cdab3c..f5d88fb48 100644 --- a/Gemfile +++ b/Gemfile @@ -85,7 +85,7 @@ if File.exist?(database_file) adapters.each do |adapter| case adapter when 'mysql2' - gem "mysql2", "~> 0.3.11", :platforms => [:mri, :mingw] + gem "mysql2", "= 0.3.11", :platforms => [:mri, :mingw] gem "activerecord-jdbcmysql-adapter", :platforms => :jruby when 'mysql' gem "mysql", "~> 2.8.1", :platforms => [:mri, :mingw] From 26b92a925fb7b2071d741fa7a473caf4ddd821aa Mon Sep 17 00:00:00 2001 From: nwb Date: Mon, 23 Jun 2014 17:35:12 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E6=B5=8B=E8=AF=95gem?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gemfile | 10 +++++----- Gemfile.lock | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Gemfile b/Gemfile index f5d88fb48..f12958ef0 100644 --- a/Gemfile +++ b/Gemfile @@ -45,10 +45,10 @@ end group :test do # shoulda的版本做了改动 #gem "shoulda", "~> 3.3.2" - gem "shoulda", "> 3.3.2" - gem "mocha", "~> 0.13.3" - gem 'capybara', '~> 2.0.0' - gem 'nokogiri', '< 1.6.0' + #gem "shoulda", "> 3.3.2" + #gem "mocha", "~> 0.13.3" + #gem 'capybara', '~> 2.0.0' + #gem 'nokogiri', '< 1.6.0' end platforms :mri, :mingw do @@ -56,7 +56,7 @@ platforms :mri, :mingw do # RMagick 2 supports ruby 1.9 # RMagick 1 would be fine for ruby 1.8 but Bundler does not support # different requirements for the same gem on different platforms - gem "rmagick", ">= 2.0.0" + #gem "rmagick", ">= 2.0.0" end end diff --git a/Gemfile.lock b/Gemfile.lock index 14f6aa047..189cbabce 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -174,7 +174,7 @@ DEPENDENCIES i18n (~> 0.6.0) jquery-rails (~> 2.0.2) mocha (~> 0.13.3) - mysql2 (~> 0.3.11) + mysql2 (= 0.3.11) net-ldap (~> 0.3.1) nokogiri (< 1.6.0) rack-mini-profiler! From e367c03f6e25ed87f9fcfc1414a427d49a813c4a Mon Sep 17 00:00:00 2001 From: nwb Date: Mon, 23 Jun 2014 17:50:45 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E5=88=97=E8=A1=A8=E6=98=BE=E7=A4=BABUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gemfile.lock | 35 -------------------------- app/controllers/projects_controller.rb | 3 +++ 2 files changed, 3 insertions(+), 35 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 189cbabce..7b18882b9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -52,15 +52,6 @@ GEM rails (>= 3, < 5) arel (3.0.2) builder (3.0.0) - capybara (2.0.3) - mime-types (>= 1.16) - nokogiri (>= 1.3.3) - rack (>= 1.0.0) - rack-test (>= 0.5.4) - selenium-webdriver (~> 2.0) - xpath (~> 1.0.0) - childprocess (0.5.3) - ffi (~> 1.0, >= 1.0.11) coderay (1.0.9) coffee-rails (3.2.2) coffee-script (>= 2.2.0) @@ -73,7 +64,6 @@ GEM execjs (1.4.0) multi_json (~> 1.0) fastercsv (1.5.0) - ffi (1.9.3-x86-mingw32) hike (1.2.3) i18n (0.6.1) journey (1.0.4) @@ -84,14 +74,10 @@ GEM mail (2.5.4) mime-types (~> 1.16) treetop (~> 1.4.8) - metaclass (0.0.4) mime-types (1.23) - mocha (0.13.3) - metaclass (~> 0.0.1) multi_json (1.7.6) mysql2 (0.3.11-x86-mingw32) net-ldap (0.3.1) - nokogiri (1.5.11-x86-mingw32) polyglot (0.3.3) rack (1.4.5) rack-cache (1.2) @@ -121,25 +107,12 @@ GEM rake (10.3.2) rdoc (3.12.2) json (~> 1.4) - rmagick (2.13.2) ruby-openid (2.1.8) - rubyzip (1.1.4) sass (3.2.7) sass-rails (3.2.6) railties (~> 3.2.0) sass (>= 3.1.10) tilt (~> 1.3) - selenium-webdriver (2.42.0) - childprocess (>= 0.5.0) - multi_json (~> 1.0) - rubyzip (~> 1.0) - websocket (~> 1.0.4) - shoulda (3.5.0) - shoulda-context (~> 1.0, >= 1.0.1) - shoulda-matchers (>= 1.4.1, < 3.0) - shoulda-context (1.2.1) - shoulda-matchers (2.6.1) - activesupport (>= 3.0.0) sprockets (2.2.2) hike (~> 1.2) multi_json (~> 1.0) @@ -154,9 +127,6 @@ GEM uglifier (1.0.3) execjs (>= 0.3.0) multi_json (>= 1.0.2) - websocket (1.0.7) - xpath (1.0.0) - nokogiri (~> 1.3) PLATFORMS x86-mingw32 @@ -167,22 +137,17 @@ DEPENDENCIES acts-as-taggable-on (= 2.4.1) better_errors! builder (= 3.0.0) - capybara (~> 2.0.0) coderay (~> 1.0.6) coffee-rails (~> 3.2.1) fastercsv (~> 1.5.0) i18n (~> 0.6.0) jquery-rails (~> 2.0.2) - mocha (~> 0.13.3) mysql2 (= 0.3.11) net-ldap (~> 0.3.1) - nokogiri (< 1.6.0) rack-mini-profiler! rack-openid rails (= 3.2.13) - rmagick (>= 2.0.0) ruby-openid (~> 2.1.4) sass-rails (~> 3.2.3) seems_rateable! - shoulda (> 3.3.2) uglifier (>= 1.0.3) diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index ad3dc3dca..33adb3ac9 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -372,6 +372,9 @@ class ProjectsController < ApplicationController @bids = @bids.offset(@offset).limit(@limit).all.reverse else limit = @bid_count % @limit + if limit == 0 + limit = 10 + end @bids = @bids.offset(@offset).limit(limit).all.reverse end render :layout => 'base_courses'