agilib 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 957f22bc0492db8d31a2b8b09504dcf17e420848
4
- data.tar.gz: ce3664959d727aef66671f1b51dc8f16db7c003a
3
+ metadata.gz: 189bdf1f51474c316ab63deca338df69327b94e6
4
+ data.tar.gz: d3e671ce9629dd9785f46189d632dc4c99ccfaca
5
5
  SHA512:
6
- metadata.gz: eb6bfa1133dddae17c0b0432768e79ee130b4d5e4e3f5da56951580bc5afe85eafa612c1ec49a2bd2891aac081b2157b877f198b1f10840753216b80570633d2
7
- data.tar.gz: c59dece64979d4d424cb7650c7563f5f89f81baba50ebab46d450742d9a7d86eb183d7d7a1d618ac1cda756adab51118b627155d3ebb2d6487d3e5ca12358107
6
+ metadata.gz: 759fd4250a1f4f45acd1d1da2173b35a444ed028a49027a085db5b826dec88a25709a4b745f844c135749867cbd07fc53bdf396452ca0bfe0b2761202a34b0d5
7
+ data.tar.gz: 719ed059848d95ce980ea54e8e70600f6909d0b428e70890ab0ceaaa5c88e2a7c2f99fd11caa8a68faa84df6ec68bce80cc3d1bbcb13457399302d6dbdff3b93
@@ -13,12 +13,12 @@ module Agilib
13
13
  password = params[Agilib::TokenAuthenticatable.login_params[:password]]
14
14
 
15
15
  if request.format != :json
16
- render :status=>406, :json => { :message => "The request must be json" }
16
+ render :status=>406, :json => { :message => t('agilib.token_authenticatable.format_error', :default => "The request must be json") }
17
17
  return
18
18
  end
19
19
 
20
20
  if login.nil? or password.nil?
21
- render :status=>400, :json=>{ :message => "The request must contain the user login and password." }
21
+ render :status=>400, :json=>{ :message => t('agilib.token_authenticatable.request_login_and_password', :default => "The request must contain the user login and password.") }
22
22
  return
23
23
  end
24
24
 
@@ -29,7 +29,7 @@ module Agilib
29
29
  end
30
30
 
31
31
  if @user.nil?
32
- render :status=>401, :json=>{:message=>"Invalid login or passoword."}
32
+ render :status=>401, :json=>{:message=>t('agilib.token_authenticatable.invalid_login_or_password', :default => "Invalid login or passoword.")}
33
33
  return
34
34
  end
35
35
 
@@ -37,7 +37,7 @@ module Agilib
37
37
  @user.save!
38
38
 
39
39
  if not @user.valid_password?(password)
40
- render :status=> 401, :json=>{:message=>"Invalid login or passoword."}
40
+ render :status=> 401, :json=>{:message=>t('agilib.token_authenticatable.invalid_login_or_password', :default => "Invalid login or passoword.")}
41
41
  else
42
42
  render :status=>200, :json=>{:user=> @user, :token => @user.authentication_token}
43
43
  end
@@ -54,7 +54,7 @@ module Agilib
54
54
  end
55
55
 
56
56
  if @user.nil?
57
- render :status=>404, :json=>{:message=>"Invalid token."}
57
+ render :status=>404, :json=>{:message=>t('agilib.token_authenticatable.invalid_token', :default => "Invalid Token")}
58
58
  else
59
59
  @user.authentication_token = ""
60
60
  @user.save!
@@ -2,7 +2,7 @@ module Agilib
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
- PATCH = 5
5
+ PATCH = 6
6
6
  BUILD = ''
7
7
 
8
8
  STRING = [MAJOR, MINOR, PATCH].compact.join('.')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: agilib
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcos Junior
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-20 00:00:00.000000000 Z
11
+ date: 2014-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: executable-hooks