padrino-admin 0.14.0.rc1 → 0.14.0.rc2

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: 4107303fab4491d4c9b6b224dc1f52a426f3db19
4
- data.tar.gz: ef949e5722f436742f71c144ead17f6cdf10be6a
3
+ metadata.gz: 9f5fe8b0d4121898b6e3408184bde80a47e5ada5
4
+ data.tar.gz: fe7f50ed5937b673a60c9bcd46dd29c35da11e5c
5
5
  SHA512:
6
- metadata.gz: 513085a0e8b9c797f80ec9a7f1b4d232221123918e5e5ed5c16dc9b72b2bda45e1cbfe6e51365b00e700c3a9069dbea1884f59ce4eabe8d0080c361b3f7c40ce
7
- data.tar.gz: 20ba8c3728e2b79fcd7d3ac5354d63bdca0bf6375c6ba90862fbe9934841990f65140ab913696b54c707db5c1d13a4b54a92a3dde605bb9171a4c12879d89653
6
+ metadata.gz: d6bdaad9e6d002dbb121d69e33995bf9f715d7aaec4f77ea0690edf9985e38c836d28a4828f69fe29b2b1e0aea27d3d7e084b845f69c302bf026c2357837e3ec
7
+ data.tar.gz: 6db2c8630a4b078a2f65ca338fc9b1205d4aa53ef2688cc073d1d817b675cae84fe8cee718713b8aa2c275bd81b285a340af0742d49e23d02cd2430ba616b77a
@@ -12,7 +12,7 @@ module Padrino
12
12
  #
13
13
  def registered(app)
14
14
  app.register Padrino::Admin unless app.extensions.include?(Padrino::Admin)
15
- app.set :session_id, "_padrino_#{File.basename(Padrino.root)}_#{app.app_name}".to_sym unless app.respond_to?(:session_id)
15
+ app.set :session_id, "_padrino_#{Padrino.env}_#{app.app_name}" unless app.respond_to?(:session_id)
16
16
  app.set :admin_model, 'Account' unless app.respond_to?(:admin_model)
17
17
  app.helpers Padrino::Admin::Helpers::AuthenticationHelpers
18
18
  app.helpers Padrino::Admin::Helpers::ViewHelpers
@@ -49,7 +49,7 @@ module Padrino
49
49
 
50
50
  tmp_ext = options[:renderer] || fetch_component_choice(:renderer)
51
51
  unless supported_ext.include?(tmp_ext.to_sym)
52
- say "<= You are using '#{tmp_ext}' and for admin we only support '#{supported_ext.join(', ')}'. Please use #{supported_ext.map { |ext| '-e ' + ext }.join(' or ')}", :yellow
52
+ say "<= You are using '#{tmp_ext}' and for admin we only support '#{supported_ext.join(', ')}'. Please use #{supported_ext.map { |ext| '-e ' + ext.to_s }.join(' or ')}", :yellow
53
53
  raise SystemExit
54
54
  end
55
55
 
@@ -9,21 +9,20 @@ describe "AdminApplication" do
9
9
  describe "session id setting" do
10
10
  it "should provide it if it doesn't exist" do
11
11
  mock_app do
12
+ set :app_name, 'session_id_tester'
12
13
  register Padrino::Admin::AccessControl
13
14
  end
14
15
 
15
- assert_equal @app.session_id, "_padrino_#{File.basename(Padrino.root)}_#{@app.app_name}".to_sym
16
+ assert_equal "_padrino_test_session_id_tester", @app.session_id
16
17
  end
17
18
 
18
- # it "should preserve it if it already existed" do
19
- # Padrino.configure_apps { enable :sessions; set :session_id, "foo" }
20
-
21
- # mock_app do
22
- # register Padrino::Admin::AccessControl
23
- # end
24
-
25
- # assert_equal @app.session_id, "foo"
26
- # end
19
+ it "should preserve it if it already existed" do
20
+ mock_app do
21
+ set :session_id, "foo"
22
+ register Padrino::Admin::AccessControl
23
+ end
24
+ assert_equal "foo", @app.session_id
25
+ end
27
26
  end
28
27
 
29
28
  it 'should require correctly login' do
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.14.0.rc1
4
+ version: 0.14.0.rc2
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-11-02 00:00:00.000000000 Z
14
+ date: 2017-01-19 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.14.0.rc1
22
+ version: 0.14.0.rc2
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.14.0.rc1
29
+ version: 0.14.0.rc2
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.14.0.rc1
36
+ version: 0.14.0.rc2
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.14.0.rc1
43
+ version: 0.14.0.rc2
44
44
  - !ruby/object:Gem::Dependency
45
45
  name: therubyracer
46
46
  requirement: !ruby/object:Gem::Requirement