action_link 0.1.1 → 1.0.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 +33 -12
- data/app/assets/fonts/action_link/acticons.woff +0 -0
- data/app/assets/stylesheets/action_link/_index.sass +4 -0
- data/app/assets/stylesheets/action_link/style.scss +10 -8
- data/app/assets/stylesheets/action_link/variables.scss +8 -8
- data/app/components/action_link/base.rb +1 -0
- data/lib/action_link/engine.rb +4 -0
- data/lib/action_link/version.rb +1 -1
- metadata +4 -4
- data/app/assets/stylesheets/action_link/all.sass +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 90a160a0379ad2b4ff0a3813e886c89e89ca482c4ef94b3299d115c16e343e8b
|
4
|
+
data.tar.gz: 10e782ef155643a9740d39c4c946afc28df9dc34fc80b1cd1319e7be6205ec60
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23ff1d124a0aa98854c1a86a09e030ac942999318febb6e006ac307d73aabb05c7cd3008fb162f45e145c82211cd60a5149240de912b3643315a46d0eff3cbb1
|
7
|
+
data.tar.gz: 9b76d7416233de84b45201b9e151961d46a666dab70cd1661540a04d50c1b1808221c37a0a826ff915c1a8ce798ecdfda5c7aed71cc83aa4799488c6d3a34c4e
|
data/README.md
CHANGED
@@ -1,34 +1,55 @@
|
|
1
1
|
# ActionLink
|
2
2
|
|
3
|
-
|
3
|
+
ActionLink is a Ruby gem that provides intuitive ViewComponents for CRUD resource link actions in Rails. It simplifies the process of creating common action links (show, edit, delete, etc.) with associated icons.
|
4
4
|
|
5
5
|
## Usage
|
6
6
|
|
7
|
+
Here's an example of how to use the `ActionLink` gem in a Rails view:
|
8
|
+
|
7
9
|
```ruby
|
8
10
|
# In Rails view
|
9
|
-
= render ActionLink::Show.new(url: [:admin, @post], current_user:)
|
11
|
+
= render ActionLink::Show.new(url: [:admin, @post], current_user: current_user)
|
12
|
+
```
|
13
|
+
|
14
|
+
## More Usage Examples
|
15
|
+
|
16
|
+
Here are some more examples of how to use the `ActionLink` gem in a Rails view:
|
17
|
+
|
18
|
+
```ruby
|
19
|
+
# In Rails view
|
20
|
+
= render ActionLink::Edit.new(url: [:edit, @post], current_user: current_user)
|
21
|
+
= render ActionLink::Destroy.new(url: [:destroy, @post], current_user: current_user)
|
22
|
+
= render ActionLink::New.new(url: [:new, @post], current_user: current_user)
|
10
23
|
```
|
11
24
|
|
12
25
|
## Installation
|
13
26
|
|
14
|
-
|
27
|
+
To install the `ActionLink` gem, add it to your application's Gemfile and run `bundle install`:
|
15
28
|
|
16
|
-
|
29
|
+
```ruby
|
30
|
+
gem 'action_link'
|
31
|
+
```
|
17
32
|
|
18
|
-
|
33
|
+
Alternatively, you can install the gem manually by running:
|
19
34
|
|
20
|
-
|
35
|
+
```sh
|
36
|
+
gem install action_link
|
37
|
+
```
|
21
38
|
|
22
39
|
## Development
|
23
40
|
|
24
|
-
|
25
|
-
|
26
|
-
## Contributing
|
41
|
+
To contribute to the development of the `ActionLink` gem, follow these steps:
|
27
42
|
|
28
|
-
|
43
|
+
1. Fork the repository on GitHub.
|
44
|
+
2. Clone your forked repository to your local machine.
|
45
|
+
3. Install the gem's dependencies by running `bin/setup`.
|
46
|
+
4. Run the tests to ensure everything is working correctly: `rake test`.
|
47
|
+
5. Make your changes and add tests for your changes.
|
48
|
+
6. Commit your changes and push them to your forked repository.
|
49
|
+
7. Create a pull request on GitHub with a description of your changes.
|
29
50
|
|
30
51
|
## License
|
31
52
|
|
32
|
-
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
53
|
+
The `ActionLink` gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
33
54
|
|
34
|
-
The icons are taken from the incredible [iconmonstr](https://iconmonstr.com/license/).
|
55
|
+
The icons used in this gem are taken from the incredible [iconmonstr](https://iconmonstr.com/license/).
|
Binary file
|
@@ -1,42 +1,44 @@
|
|
1
1
|
// This file is autogenerated by `rake acticons:update`
|
2
2
|
|
3
|
+
@use "variables";
|
4
|
+
|
3
5
|
.o-acticon--info-circle {
|
4
6
|
&:before {
|
5
|
-
content:
|
7
|
+
content: variables.$info-circle;
|
6
8
|
}
|
7
9
|
}
|
8
10
|
.o-acticon--questionmark {
|
9
11
|
&:before {
|
10
|
-
content:
|
12
|
+
content: variables.$questionmark;
|
11
13
|
}
|
12
14
|
}
|
13
15
|
.o-acticon--arrow-down-circle {
|
14
16
|
&:before {
|
15
|
-
content:
|
17
|
+
content: variables.$arrow-down-circle;
|
16
18
|
}
|
17
19
|
}
|
18
20
|
.o-acticon--pencil-circle {
|
19
21
|
&:before {
|
20
|
-
content:
|
22
|
+
content: variables.$pencil-circle;
|
21
23
|
}
|
22
24
|
}
|
23
25
|
.o-acticon--check-circle {
|
24
26
|
&:before {
|
25
|
-
content:
|
27
|
+
content: variables.$check-circle;
|
26
28
|
}
|
27
29
|
}
|
28
30
|
.o-acticon--chevron-circle-right {
|
29
31
|
&:before {
|
30
|
-
content:
|
32
|
+
content: variables.$chevron-circle-right;
|
31
33
|
}
|
32
34
|
}
|
33
35
|
.o-acticon--plus-circle {
|
34
36
|
&:before {
|
35
|
-
content:
|
37
|
+
content: variables.$plus-circle;
|
36
38
|
}
|
37
39
|
}
|
38
40
|
.o-acticon--times-circle {
|
39
41
|
&:before {
|
40
|
-
content:
|
42
|
+
content: variables.$times-circle;
|
41
43
|
}
|
42
44
|
}
|
@@ -1,10 +1,10 @@
|
|
1
1
|
// This file is autogenerated by `rake acticons:update`
|
2
2
|
|
3
|
-
$
|
4
|
-
$
|
5
|
-
$
|
6
|
-
$
|
7
|
-
$
|
8
|
-
$
|
9
|
-
$
|
10
|
-
$
|
3
|
+
$info-circle: "\e907";
|
4
|
+
$questionmark: "\2753";
|
5
|
+
$arrow-down-circle: "\e9af";
|
6
|
+
$pencil-circle: "\e9ae";
|
7
|
+
$check-circle: "\e93b";
|
8
|
+
$chevron-circle-right: "\e928";
|
9
|
+
$plus-circle: "\e919";
|
10
|
+
$times-circle: "\e91a";
|
data/lib/action_link/engine.rb
CHANGED
@@ -8,6 +8,10 @@ module ActionLink
|
|
8
8
|
class Engine < ::Rails::Engine
|
9
9
|
isolate_namespace ActionLink
|
10
10
|
|
11
|
+
initializer "action_link.assets" do |app|
|
12
|
+
app.config.assets.paths << File.expand_path("../app/assets/stylesheets", __dir__)
|
13
|
+
end
|
14
|
+
|
11
15
|
config.to_prepare do
|
12
16
|
# Our ActionLink components are subclasses of `ViewComponent::Base`.
|
13
17
|
# When `ViewComponent::Base` is subclassed, two things happen:
|
data/lib/action_link/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: action_link
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- halo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-05-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionview
|
@@ -77,8 +77,8 @@ files:
|
|
77
77
|
- LICENSE.txt
|
78
78
|
- README.md
|
79
79
|
- app/assets/fonts/action_link/acticons.woff
|
80
|
+
- app/assets/stylesheets/action_link/_index.sass
|
80
81
|
- app/assets/stylesheets/action_link/acticons.sass
|
81
|
-
- app/assets/stylesheets/action_link/all.sass
|
82
82
|
- app/assets/stylesheets/action_link/fonts.sass
|
83
83
|
- app/assets/stylesheets/action_link/style.scss
|
84
84
|
- app/assets/stylesheets/action_link/variables.scss
|
@@ -118,7 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
118
118
|
- !ruby/object:Gem::Version
|
119
119
|
version: '0'
|
120
120
|
requirements: []
|
121
|
-
rubygems_version: 3.5.
|
121
|
+
rubygems_version: 3.5.14
|
122
122
|
signing_key:
|
123
123
|
specification_version: 4
|
124
124
|
summary: A set of ViewComponents for common links (show, edit, delete, etc.)
|