padrino-admin 0.9.21 → 0.9.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2010 Padrino
1
+ Copyright (c) 2011 Padrino
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.rdoc CHANGED
@@ -67,4 +67,4 @@ For a more complete look at using the Admin panel functionality and access featu
67
67
 
68
68
  == Copyright
69
69
 
70
- Copyright (c) 2010 Padrino. See LICENSE for details.
70
+ Copyright (c) 2011 Padrino. See LICENSE for details.
@@ -13,7 +13,7 @@ class Account < ActiveRecord::Base
13
13
  validates_format_of :role, :with => /[A-Za-z]/
14
14
 
15
15
  # Callbacks
16
- before_save :encrypt_password
16
+ before_save :encrypt_password, :if => :password_required
17
17
 
18
18
  ##
19
19
  # This method is for authentication purpose
@@ -33,6 +33,6 @@ class Account < ActiveRecord::Base
33
33
  end
34
34
 
35
35
  def password_required
36
- crypted_password.blank? || !password.blank?
36
+ crypted_password.blank? || password.present?
37
37
  end
38
- end
38
+ end
@@ -27,7 +27,7 @@ class Account < CouchRest::ExtendedDocument
27
27
  validates_format_of :role, :with => /[A-Za-z]/
28
28
 
29
29
  # Callbacks
30
- before_save :encrypt_password
30
+ before_save :encrypt_password, :if => :password_required
31
31
 
32
32
  ##
33
33
  # This method is for authentication purpose
@@ -56,7 +56,7 @@ class Account < CouchRest::ExtendedDocument
56
56
  end
57
57
 
58
58
  def password_required
59
- crypted_password.blank? || !password.blank?
59
+ crypted_password.blank? || password.present?
60
60
  end
61
61
 
62
62
  def email_is_unique
@@ -69,4 +69,4 @@ class Account < CouchRest::ExtendedDocument
69
69
  end
70
70
  [false, "Email has already been taken"]
71
71
  end
72
- end
72
+ end
@@ -47,10 +47,10 @@ class Account
47
47
 
48
48
  private
49
49
  def password_required
50
- crypted_password.blank? || !password.blank?
50
+ crypted_password.blank? || password.present?
51
51
  end
52
52
 
53
53
  def encrypt_password
54
- self.crypted_password = ::BCrypt::Password.create(password)
54
+ self.crypted_password = ::BCrypt::Password.create(password) if password.present?
55
55
  end
56
56
  end
@@ -16,12 +16,12 @@ class Account
16
16
  validates_length_of :password, :within => 4..40, :if => :password_required
17
17
  validates_confirmation_of :password, :if => :password_required
18
18
  validates_length_of :email, :within => 3..100
19
- validates_uniqueness_of :email
19
+ validates_uniqueness_of :email, :case_sensitive => false
20
20
  validates_format_of :email, :with => /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z/i
21
21
  validates_format_of :role, :with => /[A-Za-z]/
22
22
 
23
23
  # Callbacks
24
- before_save :generate_password
24
+ before_save :encrypt_password, :if => :password_required
25
25
 
26
26
  ##
27
27
  # This method is for authentication purpose
@@ -43,11 +43,11 @@ class Account
43
43
  end
44
44
 
45
45
  private
46
- def generate_password
46
+ def encrypt_password
47
47
  self.crypted_password = ::BCrypt::Password.create(self.password)
48
48
  end
49
49
 
50
50
  def password_required
51
- crypted_password.blank? || !password.blank?
51
+ crypted_password.blank? || self.password.present?
52
52
  end
53
- end
53
+ end
@@ -21,7 +21,7 @@ class Account
21
21
  validates_format_of :role, :with => /[A-Za-z]/
22
22
 
23
23
  # Callbacks
24
- before_save :generate_password
24
+ before_save :encrypt_password, :if => :password_required
25
25
 
26
26
  ##
27
27
  # This method is for authentication purpose
@@ -36,11 +36,11 @@ class Account
36
36
  end
37
37
 
38
38
  private
39
- def generate_password
39
+ def encrypt_password
40
40
  self.crypted_password = ::BCrypt::Password.create(password)
41
41
  end
42
42
 
43
43
  def password_required
44
- crypted_password.blank? || !password.blank?
44
+ crypted_password.blank? || password.present?
45
45
  end
46
- end
46
+ end
@@ -19,7 +19,7 @@ class Account < ::Sequel::Model
19
19
 
20
20
  # Callbacks
21
21
  def before_save
22
- generate_password
22
+ encrypt_password
23
23
  end
24
24
 
25
25
  ##
@@ -42,11 +42,11 @@ class Account < ::Sequel::Model
42
42
  end
43
43
 
44
44
  private
45
- def generate_password
46
- self.crypted_password = ::BCrypt::Password.create(password)
45
+ def encrypt_password
46
+ self.crypted_password = ::BCrypt::Password.create(password) if password.present?
47
47
  end
48
48
 
49
49
  def password_required
50
- crypted_password.blank? || !password.blank?
50
+ crypted_password.blank? || password.present?
51
51
  end
52
- end
52
+ end
@@ -0,0 +1,16 @@
1
+ ja:
2
+ padrino:
3
+ admin:
4
+ save: 保存
5
+ cancel: キャンセル
6
+ list: 一覧
7
+ edit: 編集
8
+ new: 新規
9
+ show: 詳細
10
+ delete: 削除
11
+ confirm: 本当に削除しますか?
12
+ created_at: 作成日時
13
+ all: 全ての
14
+ profile: プロフィール
15
+ settings: 設定
16
+ logout: ログアウト
@@ -0,0 +1,26 @@
1
+ ja:
2
+ activemodel: &activemodel
3
+ errors:
4
+ messages:
5
+ inclusion: "は、次の値のうちどれかでなければなりません:"
6
+ exclusion: "は、使用できない値です"
7
+ invalid: "は、不正な値です"
8
+ confirmation: "は、条件を満たしません"
9
+ accepted: "は、受け入れられなければなりません"
10
+ empty: "は、空であってはなりません"
11
+ blank: "は、空欄であってはなりません"
12
+ too_long: "は、長すぎます (最大 %{count} 文字)"
13
+ too_short: "は、短すぎます (少なくとも %{count} 文字)"
14
+ wrong_length: "の文字数が不正です (%{count} 文字であること)"
15
+ taken: "は、すでに利用された値です"
16
+ not_a_number: "は、数字である必要があります"
17
+ greater_than: "は、 %{count} より大きな値である必要があります"
18
+ greater_than_or_equal_to: "は、 %{count} 以上の値である必要があります"
19
+ equal_to: "は、 %{count} と等しい値である必要があります"
20
+ less_than: "は、 %{count} より少ない値である必要があります"
21
+ less_than_or_equal_to: "は、 %{count} 以下の値である必要があります"
22
+ odd: "は、奇数でなければなりません"
23
+ even: "は、偶数でなければなりません"
24
+ record_invalid: "不正なレコードです: %{errors}"
25
+ content_type: "そのファイルフォーマットはサポートされていません。"
26
+ activerecord: *activemodel
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: padrino-admin
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 9
9
- - 21
10
- version: 0.9.21
9
+ - 22
10
+ version: 0.9.22
11
11
  platform: ruby
12
12
  authors:
13
13
  - Padrino Team
@@ -18,7 +18,7 @@ autorequire:
18
18
  bindir: bin
19
19
  cert_chain: []
20
20
 
21
- date: 2011-02-28 00:00:00 -08:00
21
+ date: 2011-03-04 00:00:00 -08:00
22
22
  default_executable:
23
23
  dependencies:
24
24
  - !ruby/object:Gem::Dependency
@@ -29,12 +29,12 @@ dependencies:
29
29
  requirements:
30
30
  - - "="
31
31
  - !ruby/object:Gem::Version
32
- hash: 17
32
+ hash: 23
33
33
  segments:
34
34
  - 0
35
35
  - 9
36
- - 21
37
- version: 0.9.21
36
+ - 22
37
+ version: 0.9.22
38
38
  type: :runtime
39
39
  version_requirements: *id001
40
40
  - !ruby/object:Gem::Dependency
@@ -45,12 +45,12 @@ dependencies:
45
45
  requirements:
46
46
  - - "="
47
47
  - !ruby/object:Gem::Version
48
- hash: 17
48
+ hash: 23
49
49
  segments:
50
50
  - 0
51
51
  - 9
52
- - 21
53
- version: 0.9.21
52
+ - 22
53
+ version: 0.9.22
54
54
  type: :runtime
55
55
  version_requirements: *id002
56
56
  description: Admin View for Padrino applications
@@ -130,6 +130,7 @@ files:
130
130
  - lib/padrino-admin/locale/admin/es.yml
131
131
  - lib/padrino-admin/locale/admin/fr.yml
132
132
  - lib/padrino-admin/locale/admin/it.yml
133
+ - lib/padrino-admin/locale/admin/ja.yml
133
134
  - lib/padrino-admin/locale/admin/nl.yml
134
135
  - lib/padrino-admin/locale/admin/no.yml
135
136
  - lib/padrino-admin/locale/admin/pl.yml
@@ -146,6 +147,7 @@ files:
146
147
  - lib/padrino-admin/locale/orm/es.yml
147
148
  - lib/padrino-admin/locale/orm/fr.yml
148
149
  - lib/padrino-admin/locale/orm/it.yml
150
+ - lib/padrino-admin/locale/orm/ja.yml
149
151
  - lib/padrino-admin/locale/orm/nl.yml
150
152
  - lib/padrino-admin/locale/orm/no.yml
151
153
  - lib/padrino-admin/locale/orm/pl.yml
@@ -194,7 +196,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
194
196
  requirements: []
195
197
 
196
198
  rubyforge_project: padrino-admin
197
- rubygems_version: 1.5.2
199
+ rubygems_version: 1.6.0
198
200
  signing_key:
199
201
  specification_version: 3
200
202
  summary: Admin Dashboard for Padrino