micro_admin 0.1.0 → 0.1.2

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +24 -7
  3. data/lib/micro_admin/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9e6c904e80504c5021c5771fd06b281af4e507e5e2805f387da7c6cbb2f99f61
4
- data.tar.gz: 637de506634334380febb4cbbc3540249fe58c0a28f9bb2fadc807824a636a66
3
+ metadata.gz: d2bb6ad04454509e6414a0309c84c7a2ae5ddea3c4e74bb23bbda9126dd7f40a
4
+ data.tar.gz: 54b3e282a99725591218fa43796887748682c43deb7de815481b96f3022904e2
5
5
  SHA512:
6
- metadata.gz: 4201857a17e9d0b1d1979862df3c427616cb8424956933dba88b07dff4bf269dea1f284aa4d7b330a8ce17530fa7973369b32aa79893f9ed841536d9a880e082
7
- data.tar.gz: e3ec1a869325160628ad73c62b2a5f718f139bfad176ec1199b6b876382f7313fd83e7f17aae34f1853ecb5d10b7c1d7ff162d8895f89d376b9a5050d8e2d3fc
6
+ metadata.gz: 1c490d7e1adba0a3607b46013cea52d4ec420da130cb2d610de3b2c5d125a21124e67ec6d176a5203537c0960906789704fcd0eedd00e1afe177599d333f3e1c
7
+ data.tar.gz: 16007794fc8f36ac2c4635aac850698995ce09a3c5ff65060d312327658820465f640d7ade29ac2c2283f9f2fa33712f46738b8f48e3ba545b8810c907443435
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # MicroAdmin
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/micro_admin`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ A Minimal Administration dashboard parts.
6
4
 
7
5
  ## Installation
8
6
 
@@ -23,7 +21,14 @@ Or install it yourself as:
23
21
  ## Usage
24
22
 
25
23
  ```ruby
26
- class UserDashboard < MicroAdmin::Dashboard::Base
24
+ class ApplicationDashboard < MicroAdmin::Dashboard::Base
25
+ # If you use with Ruby on Rails
26
+ self.view_paths = [Rails.root.join("app", "views", "dashboards")]
27
+ end
28
+ ```
29
+
30
+ ```ruby
31
+ class UserDashboard < ApplicationDashboard
27
32
  def index_attributes
28
33
  [:id, :name]
29
34
  end
@@ -42,6 +47,18 @@ class UserDashboard < MicroAdmin::Dashboard::Base
42
47
  end
43
48
  ```
44
49
 
50
+ `/app/views/dashboards/user_dashboard/new/name.erb`:
51
+
52
+ ```html
53
+ <input type="text" name="name">
54
+ ```
55
+
56
+ `/app/views/dashboards/user_dashboard/edit/name.erb`:
57
+
58
+ ```html
59
+ <input type="text" name="name" value="<%= value %>">
60
+ ```
61
+
45
62
  ```ruby
46
63
  smith = User.new(id: 1, name: "Smith")
47
64
  jams = User.new(id: 1, name: "Jams")
@@ -64,7 +81,7 @@ dashboard = UserDashboard.new
64
81
  <%= dashboard.edit(id: 1, values: {name: "Smith"}, errors: []) %>
65
82
  ```
66
83
 
67
- You can decorate table and forms with [Bootstrap](https://getbootstrap.com/docs/5.0/getting-started/download/)!
84
+ **You can decorate table and forms with [Bootstrap](https://getbootstrap.com/docs/5.0/getting-started/download/)!**
68
85
 
69
86
  ## Development
70
87
 
@@ -74,8 +91,8 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
74
91
 
75
92
  ## Contributing
76
93
 
77
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/micro_admin. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
94
+ Bug reports and pull requests are welcome on GitHub at https://github.com/cc-kawakami/micro_admin. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
78
95
 
79
96
  ## Code of Conduct
80
97
 
81
- Everyone interacting in the MicroAdmin project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/micro_admin/blob/master/CODE_OF_CONDUCT.md).
98
+ Everyone interacting in the MicroAdmin project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/cc-kawakami/micro_admin/blob/master/CODE_OF_CONDUCT.md).
@@ -1,3 +1,3 @@
1
1
  module MicroAdmin
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: micro_admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - cc-kawakami
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-10-29 00:00:00.000000000 Z
11
+ date: 2022-10-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler