brainsome_typus 4.0.0.beta3 → 4.0.0.beta4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/typus/engine.rb +50 -0
- data/lib/typus/version.rb +1 -1
- metadata +3 -4
- data/config/routes.rb +0 -46
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37404f04cfdf44383447781df7bd908d88d625c6
|
4
|
+
data.tar.gz: a23deeae8569236e7b32bc45d05b13c1c2e41f61
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69a8aac32aa2feb9102e26b83870600627fd82170c8a3b0c13fc33f8ebe30c6c1216ed1dc6ef8395fd589f868683edc5f9c5a67aac5be5f88666236228030cdc
|
7
|
+
data.tar.gz: c1566221377fa01376ec3a4f2cc50a3da3420e600b43e5cf512e04039f81fd53a079e8b96d039c0b8161d1cc2a259c8f561673e2d3bd88dd9669b07c512e7232
|
data/lib/typus/engine.rb
CHANGED
@@ -13,5 +13,55 @@ module Admin
|
|
13
13
|
Rails.application.config.assets.precompile << %r{^img/.+}
|
14
14
|
Rails.application.config.assets.precompile += %w( glyphicons-halflings.png glyphicons-halflings-white.png)
|
15
15
|
end
|
16
|
+
|
17
|
+
# Moved from config/routes.rb to this initializer. This was done to prevent
|
18
|
+
# Rails::Application::RoutesReloader#reload! from loading them twice.
|
19
|
+
initializer :add_routing_paths do |app|
|
20
|
+
app.routes.append do
|
21
|
+
routes_block = lambda do
|
22
|
+
|
23
|
+
dashboard = Typus.subdomain ? "/dashboard" : "/admin/dashboard"
|
24
|
+
|
25
|
+
get "/" => redirect(dashboard)
|
26
|
+
get "dashboard" => "dashboard#index", :as => "dashboard_index"
|
27
|
+
get "dashboard/:application" => "dashboard#show", :as => "dashboard"
|
28
|
+
|
29
|
+
if Typus.authentication == :session
|
30
|
+
resource :session, :only => [:new, :create], :controller => :session do
|
31
|
+
delete :destroy, :as => "destroy"
|
32
|
+
end
|
33
|
+
|
34
|
+
resources :account, :only => [:new, :create, :show] do
|
35
|
+
collection do
|
36
|
+
get :forgot_password
|
37
|
+
post :send_password
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
Typus.models.map(&:to_resource).each do |_resource|
|
43
|
+
get "#{_resource}(/:action(/:id))(.:format)", :controller => _resource
|
44
|
+
post "#{_resource}(/:action(/:id))(.:format)", :controller => _resource
|
45
|
+
patch "#{_resource}(/:action(/:id))(.:format)", :controller => _resource
|
46
|
+
delete "#{_resource}(/:action(/:id))(.:format)", :controller => _resource
|
47
|
+
end
|
48
|
+
|
49
|
+
Typus.resources.map(&:underscore).each do |_resource|
|
50
|
+
get "#{_resource}(/:action(/:id))(.:format)", :controller => _resource
|
51
|
+
post "#{_resource}(/:action(/:id))(.:format)", :controller => _resource
|
52
|
+
end
|
53
|
+
|
54
|
+
end
|
55
|
+
|
56
|
+
if Typus.subdomain
|
57
|
+
constraints :subdomain => Typus.subdomain do
|
58
|
+
namespace :admin, :path => "", &routes_block
|
59
|
+
end
|
60
|
+
else
|
61
|
+
scope "admin", {:module => :admin, :as => "admin"}, &routes_block
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
16
66
|
end
|
17
67
|
end
|
data/lib/typus/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: brainsome_typus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.0.
|
4
|
+
version: 4.0.0.beta4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Francesc Esplugas
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-11-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bcrypt-ruby
|
@@ -222,7 +222,6 @@ files:
|
|
222
222
|
- config/locales/typus.ru.yml
|
223
223
|
- config/locales/typus.zh-CN.models.yml
|
224
224
|
- config/locales/typus.zh-CN.yml
|
225
|
-
- config/routes.rb
|
226
225
|
- lib/generators/templates/config/initializers/typus.rb
|
227
226
|
- lib/generators/templates/config/initializers/typus_authentication.rb
|
228
227
|
- lib/generators/templates/config/initializers/typus_resources.rb
|
@@ -321,7 +320,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
321
320
|
version: 1.8.11
|
322
321
|
requirements: []
|
323
322
|
rubyforge_project:
|
324
|
-
rubygems_version: 2.4.
|
323
|
+
rubygems_version: 2.4.2
|
325
324
|
signing_key:
|
326
325
|
specification_version: 4
|
327
326
|
summary: Effortless backend interface for Ruby on Rails applications. (Admin scaffold
|
data/config/routes.rb
DELETED
@@ -1,46 +0,0 @@
|
|
1
|
-
Rails.application.routes.append do
|
2
|
-
|
3
|
-
routes_block = lambda do
|
4
|
-
|
5
|
-
dashboard = Typus.subdomain ? "/dashboard" : "/admin/dashboard"
|
6
|
-
|
7
|
-
get "/" => redirect(dashboard)
|
8
|
-
get "dashboard" => "dashboard#index", :as => "dashboard_index"
|
9
|
-
get "dashboard/:application" => "dashboard#show", :as => "dashboard"
|
10
|
-
|
11
|
-
if Typus.authentication == :session
|
12
|
-
resource :session, :only => [:new, :create], :controller => :session do
|
13
|
-
delete :destroy, :as => "destroy"
|
14
|
-
end
|
15
|
-
|
16
|
-
resources :account, :only => [:new, :create, :show] do
|
17
|
-
collection do
|
18
|
-
get :forgot_password
|
19
|
-
post :send_password
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
Typus.models.map(&:to_resource).each do |_resource|
|
25
|
-
get "#{_resource}(/:action(/:id))(.:format)", :controller => _resource
|
26
|
-
post "#{_resource}(/:action(/:id))(.:format)", :controller => _resource
|
27
|
-
patch "#{_resource}(/:action(/:id))(.:format)", :controller => _resource
|
28
|
-
delete "#{_resource}(/:action(/:id))(.:format)", :controller => _resource
|
29
|
-
end
|
30
|
-
|
31
|
-
Typus.resources.map(&:underscore).each do |_resource|
|
32
|
-
get "#{_resource}(/:action(/:id))(.:format)", :controller => _resource
|
33
|
-
post "#{_resource}(/:action(/:id))(.:format)", :controller => _resource
|
34
|
-
end
|
35
|
-
|
36
|
-
end
|
37
|
-
|
38
|
-
if Typus.subdomain
|
39
|
-
constraints :subdomain => Typus.subdomain do
|
40
|
-
namespace :admin, :path => "", &routes_block
|
41
|
-
end
|
42
|
-
else
|
43
|
-
scope "admin", {:module => :admin, :as => "admin"}, &routes_block
|
44
|
-
end
|
45
|
-
|
46
|
-
end
|