[noosfero/noosfero][api] 3 commits: api: remove obsolete request_logger
Rodrigo Souto
gitlab at gitlab.com
Mon Jun 8 18:59:57 BRT 2015
Rodrigo Souto pushed to branch api at Noosfero / noosfero
Commits:
51784514 by Rodrigo Souto at 2015-06-08T17:09:28Z
api: remove obsolete request_logger
- - - - -
425ad631 by Rodrigo Souto at 2015-06-08T18:22:54Z
api: remove duplicated migration
- - - - -
a752c502 by Rodrigo Souto at 2015-06-08T18:23:38Z
api: fix articles_tests
- - - - -
3 changed files:
- − db/migrate/20140407013817_add_private_token_info_to_users.rb
- − lib/noosfero/api/request_logger.rb
- test/unit/api/articles_test.rb
Changes:
=====================================
db/migrate/20140407013817_add_private_token_info_to_users.rb deleted
=====================================
--- a/db/migrate/20140407013817_add_private_token_info_to_users.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-class AddPrivateTokenInfoToUsers < ActiveRecord::Migration
- def self.up
- add_column :users, :private_token, :string
- add_column :users, :private_token_generated_at, :datetime
- end
-
- def self.down
- remove_column :users, :private_token
- remove_column :users, :private_token_generated_at
- end
-end
=====================================
lib/noosfero/api/request_logger.rb deleted
=====================================
--- a/lib/noosfero/api/request_logger.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-module Noosfero
- module API
- class RequestLogger < GrapeLogging::Middleware::RequestLogger
-
- protected
-
- def parameters(response, duration)
- {
- path: request.path,
- params: request.params.to_hash.except('password'),
- method: request.request_method,
- }
- end
- end
- end
-end
=====================================
test/unit/api/articles_test.rb
=====================================
--- a/test/unit/api/articles_test.rb
+++ b/test/unit/api/articles_test.rb
@@ -459,7 +459,7 @@ class ArticlesTest < ActiveSupport::TestCase
post "/api/v1/articles/#{article.id}/children/suggest?#{params.to_query}"
end
json = JSON.parse(last_response.body)
- assert_equal 'SuggestArticle', json['type']
+ assert_equal 'SuggestArticle', json['task']['type']
end
should 'suggest event children' do
@@ -470,7 +470,7 @@ class ArticlesTest < ActiveSupport::TestCase
post "/api/v1/articles/#{article.id}/children/suggest?#{params.to_query}"
end
json = JSON.parse(last_response.body)
- assert_equal 'SuggestArticle', json['type']
+ assert_equal 'SuggestArticle', json['task']['type']
end
should 'update hit attribute of article children' do
View it on GitLab: https://gitlab.com/noosfero/noosfero/compare/93311e8c2b6be0a9e07cb448780f23c7b7d2f9db...a752c5027f0385aeda1b993f5def954c31a40ff9
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20150608/9063986f/attachment-0001.html>
More information about the Noosfero-dev
mailing list