padrino-admin 0.13.0.beta2 → 0.13.0.beta3
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 810a81baa71b89b60c4e7aa0e0a4449f3ef19b27
|
4
|
+
data.tar.gz: 4fa7b242943c7a71b897a5fcb9489ea559dd5478
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e21ac38e18c746d0cd7c85f154342f828e9b51d6b6843e52779316dd5ca135285f7c9eb6337258aa0ee97610be9168fdc5f064d0a95d7f9dc0b3091f3882c3b
|
7
|
+
data.tar.gz: b9bdde805155a9467813651035d740e9881d100b3fd7a6e6284b1c5929a02d38dd053a24263937b3d7d92a51300dab6877fb6a205995a4339130e7399349d536
|
@@ -76,7 +76,8 @@ module Padrino
|
|
76
76
|
template "templates/app.rb.tt", destination_root(@admin_path + "/app.rb")
|
77
77
|
inject_into_file destination_root('config/apps.rb'), "\nPadrino.mount(\"#{@app_name}::#{@admin_name}\", :app_file => Padrino.root('#{@admin_path}/app.rb')).to(\"/#{@admin_path}\")\n", :before => /^Padrino.mount.*\.to\('\/'\)$/
|
78
78
|
unless options[:destroy]
|
79
|
-
insert_middleware '
|
79
|
+
insert_middleware 'ConnectionPoolManagement', @admin_path if [:minirecord, :activerecord].include?(orm)
|
80
|
+
insert_middleware 'IdentityMap', @admin_path if orm == :datamapper
|
80
81
|
end
|
81
82
|
|
82
83
|
params = [
|
@@ -6,7 +6,7 @@
|
|
6
6
|
# shell.say name
|
7
7
|
#
|
8
8
|
email = shell.ask "Which email do you want use for logging into admin?"
|
9
|
-
password = shell.ask "Tell me the password to use:"
|
9
|
+
password = shell.ask "Tell me the password to use:", :echo => false
|
10
10
|
|
11
11
|
shell.say ""
|
12
12
|
|
@@ -18,7 +18,7 @@ if account.valid?
|
|
18
18
|
shell.say "<%= @model_name %> has been successfully created, now you can login with:"
|
19
19
|
shell.say "================================================================="
|
20
20
|
shell.say " email: #{email}"
|
21
|
-
shell.say " password: #{password}"
|
21
|
+
shell.say " password: #{?* * password.length}"
|
22
22
|
shell.say "================================================================="
|
23
23
|
else
|
24
24
|
shell.say "Sorry, but something went wrong!"
|
@@ -12,7 +12,7 @@
|
|
12
12
|
<%%= tag_icon :magic %> <span class=caret></span>
|
13
13
|
</a>
|
14
14
|
<ul class="list-menu dropdown-menu" role=menu>
|
15
|
-
<li class=
|
15
|
+
<li class=list-menu-wrapper>
|
16
16
|
<%%= link_to tag_icon('check-square-o', pat(:select_all)), '#', :id => 'select-all', :class => 'list-menu-link' %>
|
17
17
|
</li>
|
18
18
|
<li class=list-menu-wrapper.list-menu-wrapper-disabled>
|
@@ -183,19 +183,33 @@ describe "AdminAppGenerator" do
|
|
183
183
|
it 'should add it for #activerecord' do
|
184
184
|
capture_io { generate(:project, 'sample_project', '-e=slim', "--root=#{@apptmp}", '-d=activerecord', '-e=haml') }
|
185
185
|
capture_io { generate(:admin_app, "--root=#{@apptmp}/sample_project") }
|
186
|
-
assert_match_in_file(/ use
|
186
|
+
assert_match_in_file(/ use ConnectionPoolManagement/m, "#{@apptmp}/sample_project/admin/app.rb")
|
187
187
|
end
|
188
188
|
|
189
189
|
it 'should add it #minirecord' do
|
190
190
|
capture_io { generate(:project, 'sample_project', '-e=slim', "--root=#{@apptmp}", '-d=minirecord', '-e=haml') }
|
191
191
|
capture_io { generate(:admin_app, "--root=#{@apptmp}/sample_project") }
|
192
|
-
assert_match_in_file(/ use
|
192
|
+
assert_match_in_file(/ use ConnectionPoolManagement/m, "#{@apptmp}/sample_project/admin/app.rb")
|
193
193
|
end
|
194
194
|
|
195
195
|
it 'should not add it for #datamapper' do
|
196
196
|
capture_io { generate(:project, 'sample_project', '-e=slim', "--root=#{@apptmp}", '-d=datamapper', '-e=haml') }
|
197
197
|
capture_io { generate(:admin_app, "--root=#{@apptmp}/sample_project") }
|
198
|
-
assert_no_match_in_file(/ use
|
198
|
+
assert_no_match_in_file(/ use ConnectionPoolManagement/m, "#{@apptmp}/sample_project/admin/app.rb")
|
199
|
+
end
|
200
|
+
end
|
201
|
+
|
202
|
+
describe "datamapper middleware" do
|
203
|
+
it 'should add it for #datamapper' do
|
204
|
+
capture_io { generate(:project, 'sample_project', '-e=slim', "--root=#{@apptmp}", '-d=datamapper', '-e=haml') }
|
205
|
+
capture_io { generate(:admin_app, "--root=#{@apptmp}/sample_project") }
|
206
|
+
assert_match_in_file(/ use IdentityMap/m, "#{@apptmp}/sample_project/admin/app.rb")
|
207
|
+
end
|
208
|
+
|
209
|
+
it 'should not add it for #activerecord' do
|
210
|
+
capture_io { generate(:project, 'sample_project', '-e=slim', "--root=#{@apptmp}", '-d=activerecord', '-e=haml') }
|
211
|
+
capture_io { generate(:admin_app, "--root=#{@apptmp}/sample_project") }
|
212
|
+
assert_no_match_in_file(/ use IdentityMap/m, "#{@apptmp}/sample_project/admin/app.rb")
|
199
213
|
end
|
200
214
|
end
|
201
215
|
|
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.0.
|
4
|
+
version: 0.13.0.beta3
|
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: 2015-
|
14
|
+
date: 2015-08-02 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.0.
|
22
|
+
version: 0.13.0.beta3
|
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.0.
|
29
|
+
version: 0.13.0.beta3
|
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.0.
|
36
|
+
version: 0.13.0.beta3
|
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.0.
|
43
|
+
version: 0.13.0.beta3
|
44
44
|
- !ruby/object:Gem::Dependency
|
45
45
|
name: therubyracer
|
46
46
|
requirement: !ruby/object:Gem::Requirement
|