From e1e08497351b1f2cee9d7c4ceec908f1df4205d4 Mon Sep 17 00:00:00 2001 From: zhuhao Date: Tue, 27 Jan 2015 17:18:01 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/mobile/api.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/api/mobile/api.rb b/app/api/mobile/api.rb index 8226a1020..dcece12f1 100644 --- a/app/api/mobile/api.rb +++ b/app/api/mobile/api.rb @@ -33,7 +33,7 @@ module Mobile mount Apis::Homeworks #add_swagger_documentation ({api_version: 'v1', base_path: 'http://u06.shellinfo.cn/trustie/api'}) - add_swagger_documentation ({api_version: 'v1', base_path: '/api'}) + #add_swagger_documentation ({api_version: 'v1', base_path: '/api'}) end end From 7daf01f8e15af450a2a4fa3d724433fb5a10c883 Mon Sep 17 00:00:00 2001 From: zhuhao Date: Tue, 27 Jan 2015 17:18:31 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E9=94=AE=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gemfile.lock | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Gemfile.lock b/Gemfile.lock index 20107dba6..355ca422d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -96,6 +96,8 @@ GEM execjs (2.2.1) factory_girl (4.4.0) activesupport (>= 3.0.0) + faker (1.4.3) + i18n (~> 0.5) fastercsv (1.5.5) ffi (1.9.3) ffi (1.9.3-x86-mingw32) @@ -314,6 +316,7 @@ DEPENDENCIES coderay (~> 1.0.6) coffee-rails (~> 3.2.1) factory_girl (~> 4.4.0) + faker fastercsv (~> 1.5.0) grape (~> 0.9.0) grape-entity From f793cff3986ab9f63f2958fa44daae2152b49903 Mon Sep 17 00:00:00 2001 From: z9hang Date: Tue, 27 Jan 2015 17:34:02 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=94=B9=E4=B8=BA=E5=BC=80=E5=8F=91?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=E4=B8=8B=E6=89=8D=E8=B0=83=E7=94=A8api?= =?UTF-8?q?=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/mobile/api.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/api/mobile/api.rb b/app/api/mobile/api.rb index 8226a1020..a17c5c84d 100644 --- a/app/api/mobile/api.rb +++ b/app/api/mobile/api.rb @@ -33,7 +33,7 @@ module Mobile mount Apis::Homeworks #add_swagger_documentation ({api_version: 'v1', base_path: 'http://u06.shellinfo.cn/trustie/api'}) - add_swagger_documentation ({api_version: 'v1', base_path: '/api'}) + add_swagger_documentation ({api_version: 'v1', base_path: '/api'}) if Rails.env.devlopment? end end From 222e2cc1350a697b4c3973745ce4e50a831df650 Mon Sep 17 00:00:00 2001 From: z9hang Date: Wed, 28 Jan 2015 09:25:58 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9ErrorHandler=E6=9C=AA?= =?UTF-8?q?=E8=83=BD=E5=8A=A0=E8=BD=BD=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/mobile/api.rb | 4 ++-- db/schema.rb | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/api/mobile/api.rb b/app/api/mobile/api.rb index a17c5c84d..ccf155a92 100644 --- a/app/api/mobile/api.rb +++ b/app/api/mobile/api.rb @@ -1,5 +1,5 @@ module Mobile - + require_relative 'middleware/error_handler' class API < Grape::API version 'v1', using: :path format :json @@ -33,7 +33,7 @@ module Mobile mount Apis::Homeworks #add_swagger_documentation ({api_version: 'v1', base_path: 'http://u06.shellinfo.cn/trustie/api'}) - add_swagger_documentation ({api_version: 'v1', base_path: '/api'}) if Rails.env.devlopment? + add_swagger_documentation ({api_version: 'v1', base_path: '/api'}) if Rails.env.development? end end diff --git a/db/schema.rb b/db/schema.rb index 74ba6d652..98476f9dd 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -12,7 +12,6 @@ # It's strongly recommended to check this file into your version control system. ActiveRecord::Schema.define(:version => 20150123020615) do ->>>>>>> szzh create_table "activities", :force => true do |t| t.integer "act_id", :null => false