padrino-admin 0.13.3 → 0.13.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/padrino-admin.rb +0 -1
- data/lib/padrino-admin/access_control.rb +1 -1
- data/lib/padrino-admin/generators/admin_app.rb +2 -0
- data/lib/padrino-admin/generators/templates/app.rb.tt +2 -0
- data/lib/padrino-admin/helpers/authentication_helpers.rb +1 -1
- data/test/test_locale.rb +14 -14
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa474f8dcdea67e42c27d492bc59ca8cd42c82bb
|
4
|
+
data.tar.gz: 619ebc7e29ffa95e9e2c66106f629b6caeb923e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 721bf7cb6d4b29e1e9522d9e04daac935c8156be2f72c7807772a126b7f98b99735fed99751eb62d73e234fc6c453a6dfed1588f66d1e001e382ddb4e4e0ed59
|
7
|
+
data.tar.gz: 4f0df29341af0de6b4a9f564dc18d9e7fadda23b41e77dbe4451ebbfdb5d528354d2ffd21970dcdfa07b9c4fd5da6a7b019b07525df75c6f8a2253ee5b75dc3b
|
data/lib/padrino-admin.rb
CHANGED
@@ -104,7 +104,7 @@ module Padrino
|
|
104
104
|
# = link_to 'Profile', url(:accounts, :edit, :id => current_account.id)
|
105
105
|
#
|
106
106
|
def allowed?(account=nil, path=nil)
|
107
|
-
path = "/" if path.
|
107
|
+
path = "/" if path.nil? || path.empty?
|
108
108
|
role = account.role.to_sym rescue nil
|
109
109
|
authorizations = @authorizations.find_all { |auth| auth.roles.include?(:any) }
|
110
110
|
allowed_paths = authorizations.map(&:allowed).flatten.uniq
|
@@ -135,6 +135,8 @@ module Padrino
|
|
135
135
|
require_dependencies('bcrypt')
|
136
136
|
end
|
137
137
|
|
138
|
+
require_dependencies 'activesupport', :version => ">= 3.1"
|
139
|
+
|
138
140
|
# A nicer select box.
|
139
141
|
# TODO FIXME This doesn't make much sense in here. Review.
|
140
142
|
# gsub_file destination_root("admin/views/#{@model_plural}/_form.#{ext}"), "f.text_field :role, :class => :text_field", "f.select :role, :options => access_control.roles"
|
data/test/test_locale.rb
CHANGED
@@ -6,20 +6,20 @@ describe "Filters" do
|
|
6
6
|
it "should have a vaild #{name} locale for admin" do
|
7
7
|
base = YAML.load_file(file)
|
8
8
|
base = base[name]['padrino']['admin']
|
9
|
-
assert base
|
10
|
-
assert base['save']
|
11
|
-
assert base['cancel']
|
12
|
-
assert base['list']
|
13
|
-
assert base['edit']
|
14
|
-
assert base['new']
|
15
|
-
assert base['show']
|
16
|
-
assert base['delete']
|
17
|
-
assert base['confirm']
|
18
|
-
assert base['created_at']
|
19
|
-
assert base['all']
|
20
|
-
assert base['profile']
|
21
|
-
assert base['settings']
|
22
|
-
assert base['logout']
|
9
|
+
assert base
|
10
|
+
assert base['save']
|
11
|
+
assert base['cancel']
|
12
|
+
assert base['list']
|
13
|
+
assert base['edit']
|
14
|
+
assert base['new']
|
15
|
+
assert base['show']
|
16
|
+
assert base['delete']
|
17
|
+
assert base['confirm']
|
18
|
+
assert base['created_at']
|
19
|
+
assert base['all']
|
20
|
+
assert base['profile']
|
21
|
+
assert base['settings']
|
22
|
+
assert base['logout']
|
23
23
|
end
|
24
24
|
end
|
25
25
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: padrino-admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.13.3
|
4
|
+
version: 0.13.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Padrino Team
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2016-08-
|
14
|
+
date: 2016-08-30 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: padrino-core
|
@@ -19,28 +19,28 @@ dependencies:
|
|
19
19
|
requirements:
|
20
20
|
- - '='
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 0.13.3
|
22
|
+
version: 0.13.3.1
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - '='
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.13.3
|
29
|
+
version: 0.13.3.1
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: padrino-helpers
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
33
33
|
requirements:
|
34
34
|
- - '='
|
35
35
|
- !ruby/object:Gem::Version
|
36
|
-
version: 0.13.3
|
36
|
+
version: 0.13.3.1
|
37
37
|
type: :runtime
|
38
38
|
prerelease: false
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
40
40
|
requirements:
|
41
41
|
- - '='
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version: 0.13.3
|
43
|
+
version: 0.13.3.1
|
44
44
|
- !ruby/object:Gem::Dependency
|
45
45
|
name: therubyracer
|
46
46
|
requirement: !ruby/object:Gem::Requirement
|
@@ -291,7 +291,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
291
291
|
version: 1.3.6
|
292
292
|
requirements: []
|
293
293
|
rubyforge_project: padrino-admin
|
294
|
-
rubygems_version: 2.
|
294
|
+
rubygems_version: 2.5.1
|
295
295
|
signing_key:
|
296
296
|
specification_version: 4
|
297
297
|
summary: Admin Dashboard for Padrino
|