lotus_admin 0.1.4 → 0.2.0
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.
- checksums.yaml +4 -4
- data/README.md +15 -0
- data/config/routes.rb +2 -0
- data/lib/lotus_admin/configuration.rb +11 -0
- data/lib/lotus_admin/version.rb +1 -1
- data/lib/lotus_admin.rb +17 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 71c9fe1d41f76cb80a2e2dd1417dbe65eed53559
|
4
|
+
data.tar.gz: 8b06ff35a33b84fa577365a67df9fe98e963d8af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9272546b682589398887a5ec302deed33b56cde039e53cd63d2cdad4bcebdaf7f664f3432ae42f580449339bcfab56015524bb5b16e934803ba88d417f993646
|
7
|
+
data.tar.gz: c5f612e7a6a2416c1874e8d028ceafd08ec7b4279e08eb70db26771d222f574bc8c364b12e0ac90af93efb23bfa389b66735ab45265691ad3f386bc8b2136321
|
data/README.md
CHANGED
@@ -49,6 +49,21 @@ There are many partials and SCSS variables that can be overwritten to customize
|
|
49
49
|
|
50
50
|
To get started, provide any SCSS variables in a file at `app/assets/stylesheets/lotus_admin/_variables.scss`.
|
51
51
|
|
52
|
+
## Configuration
|
53
|
+
You may configure the engine by providing an intializer:
|
54
|
+
|
55
|
+
```ruby
|
56
|
+
# conifg/initializers/lotus_admin.rb
|
57
|
+
LotusAdmin.configure do |config|
|
58
|
+
|
59
|
+
# perhaps add more custom resources
|
60
|
+
config.routes do
|
61
|
+
resources :cats, only: :show
|
62
|
+
resources :dogs
|
63
|
+
end
|
64
|
+
end
|
65
|
+
```
|
66
|
+
|
52
67
|
## Contributing
|
53
68
|
Contribution directions go here.
|
54
69
|
|
data/config/routes.rb
CHANGED
data/lib/lotus_admin/version.rb
CHANGED
data/lib/lotus_admin.rb
CHANGED
@@ -12,6 +12,22 @@ require 'jquery-rails'
|
|
12
12
|
require 'page_title_helper'
|
13
13
|
require 'kaminari'
|
14
14
|
|
15
|
+
require 'lotus_admin/configuration'
|
16
|
+
|
15
17
|
module LotusAdmin
|
16
|
-
|
18
|
+
module_function
|
19
|
+
|
20
|
+
def configure(&block)
|
21
|
+
yield(configuration)
|
22
|
+
end
|
23
|
+
|
24
|
+
def configuration
|
25
|
+
@configuration ||= Configuration.new
|
26
|
+
end
|
27
|
+
|
28
|
+
def install_routes!(router)
|
29
|
+
configuration.routing_options.each do |routes|
|
30
|
+
router.instance_eval(&routes)
|
31
|
+
end
|
32
|
+
end
|
17
33
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lotus_admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Millsaps-Brewer
|
@@ -341,6 +341,7 @@ files:
|
|
341
341
|
- db/migrate/20180228124526_devise_create_lotus_admin_users.rb
|
342
342
|
- db/migrate/20180228210938_add_timezone_to_users.rb
|
343
343
|
- lib/lotus_admin.rb
|
344
|
+
- lib/lotus_admin/configuration.rb
|
344
345
|
- lib/lotus_admin/engine.rb
|
345
346
|
- lib/lotus_admin/version.rb
|
346
347
|
- lib/tasks/lotus_admin_tasks.rake
|