recourse 0.1.0 → 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/MIT-LICENSE +22 -0
- data/README.md +22 -26
- data/Rakefile +4 -6
- data/app/controllers/recourse_controller.rb +23 -0
- data/app/helpers/recoursive_helper.rb +17 -0
- data/app/helpers/searchable_helper.rb +50 -0
- data/app/views/recourse/_row.html.erb +4 -0
- data/app/views/recourse/index.html.erb +21 -0
- data/lib/recourse/engine.rb +10 -0
- data/lib/recourse/model/recoursive.rb +36 -0
- data/lib/recourse/model/searchable.rb +40 -0
- data/lib/recourse/model.rb +6 -0
- data/lib/recourse/routing.rb +15 -0
- data/lib/recourse/version.rb +1 -3
- data/lib/recourse.rb +11 -4
- metadata +104 -13
- data/.rspec +0 -3
- data/CHANGELOG.md +0 -5
- data/LICENSE.txt +0 -21
- data/sig/recourse.rbs +0 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cd168efcdd88afa58c1b4bc5a5c7c4fc71bc91caec7b7a8ad344f41d7f2b3eb0
|
|
4
|
+
data.tar.gz: 4c6858fa894182eda4378571397b962fff778d172f7e749cc31e976776c71f50
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 065fcb2ed2b597570045209d931b5dc74f6e12b30f39e3456dbbb7a635038a62d8b4e542764297df205b51c1163fe86937613ac5c6d69cd1def9f2dfeb40262d
|
|
7
|
+
data.tar.gz: ca93b998e63631993f14b55dc1ed8f2dcd3d9380eb57198f11e235cbaa366520a2f1247a4745e0c5c7b1cdcd9f1daf298b448ef975e29ac255d02ccca6e0340c
|
data/MIT-LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Copyright (c) 2026 Claudio Baccigalupo
|
|
2
|
+
|
|
3
|
+
MIT License
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
+
a copy of this software and associated documentation files (the
|
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
+
the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be
|
|
14
|
+
included in all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
|
@@ -1,39 +1,35 @@
|
|
|
1
|
-
|
|
1
|
+
Recourse
|
|
2
|
+
========
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
Provides a new `recourses` method that can be invoked in a Rails app inside config/routes.rb
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
`recourses` is like `resources` on steroids for admin-only routes:
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
- All the routes are included in `Recourse.resources` to easily display in a navbar
|
|
9
|
+
- Their controllers do not need to define the `index` action: they inherit a predefined one
|
|
10
|
+
- There is also a predefined `index.html` view which displays the resources paginated/searchable.
|
|
11
|
+
- The content of each row can be customized defining a new `_row.html.erb` partial
|
|
8
12
|
|
|
9
|
-
|
|
13
|
+
How to install
|
|
14
|
+
==============
|
|
10
15
|
|
|
11
|
-
|
|
16
|
+
1. Add `gem 'resource'` to the `Gemfile` file of your Rails app.
|
|
12
17
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
```
|
|
18
|
+
Available methods
|
|
19
|
+
=================
|
|
16
20
|
|
|
17
|
-
|
|
21
|
+
In config/routes.rb:
|
|
18
22
|
|
|
19
|
-
|
|
20
|
-
gem install UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
|
|
21
|
-
```
|
|
23
|
+
- `recourses` inside the routes
|
|
22
24
|
|
|
23
|
-
|
|
25
|
+
In a resourceful Active Record model:
|
|
24
26
|
|
|
25
|
-
|
|
27
|
+
- `recourse_includes`: the associations to include when fetching the resources
|
|
28
|
+
- `recourse_order`: the SQL to sort the resources by
|
|
29
|
+
- `recourse_positionable?`: whether the model has a position field to drag'n'drop sort
|
|
30
|
+
- `recourse_searchable?`: whether the model has Ransack enabled for searches
|
|
26
31
|
|
|
27
|
-
|
|
32
|
+
Anywhere:
|
|
28
33
|
|
|
29
|
-
|
|
34
|
+
- `Recourse.resources` to list all the routes
|
|
30
35
|
|
|
31
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
|
32
|
-
|
|
33
|
-
## Contributing
|
|
34
|
-
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/recourse.
|
|
36
|
-
|
|
37
|
-
## License
|
|
38
|
-
|
|
39
|
-
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
require "bundler/setup"
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
RSpec::Core::RakeTask.new(:spec)
|
|
3
|
+
APP_RAKEFILE = File.expand_path("test/dummy/Rakefile", __dir__)
|
|
4
|
+
load "rails/tasks/engine.rake"
|
|
7
5
|
|
|
8
|
-
|
|
6
|
+
require "bundler/gem_tasks"
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Base class for controllers that require admin access
|
|
2
|
+
class RecourseController < ApplicationController
|
|
3
|
+
helper RecoursiveHelper, SearchableHelper
|
|
4
|
+
include Pagy::Method
|
|
5
|
+
|
|
6
|
+
def index
|
|
7
|
+
@model = controller_name.classify.constantize
|
|
8
|
+
@pagy, @resources = paginate @model, order: @model.recourse_order, includes: @model.recourse_includes
|
|
9
|
+
render 'recourse/index'
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
private
|
|
13
|
+
|
|
14
|
+
def paginate(model, includes: [], order: nil)
|
|
15
|
+
if model.recourse_searchable?
|
|
16
|
+
@q = model.ransack params[:q]
|
|
17
|
+
@q.sorts = (order || 'created_at desc') if @q.sorts.empty?
|
|
18
|
+
pagy includes.present? ? @q.result.includes(includes) : @q.result.distinct(true)
|
|
19
|
+
else
|
|
20
|
+
pagy @model.includes(includes).order(order)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# A collection of helper methods used for navigation link in the admin-only section
|
|
2
|
+
module RecoursiveHelper
|
|
3
|
+
# Adds a link next to the title to add a new resource.
|
|
4
|
+
def button_link_to_add(name, path)
|
|
5
|
+
content_for(:edit) { button_link_to "Add #{name}", path, class: 'btn-sm btn-outline ms-3' }
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
private
|
|
9
|
+
|
|
10
|
+
def button_link_to(name, path, options = {})
|
|
11
|
+
link_to name, path, with_class('btn theme-primary', options)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def with_class(classes, options = {})
|
|
15
|
+
options.merge class: [options[:class], classes].compact.join(' ')
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# A collection of helper methods used for navigation link in the admin-only section
|
|
2
|
+
module SearchableHelper
|
|
3
|
+
# Renders a form with a field to search within +model+ that uses +placeholder+.
|
|
4
|
+
# @param [String] q the search query.
|
|
5
|
+
# @param [ApplicationRecord] model the model of each object returned by the search
|
|
6
|
+
def search_form(q:, model:, url: url_for(model))
|
|
7
|
+
search_form_for(q, search_form_params(url: url)) do |form|
|
|
8
|
+
safe_join [filter_field_for(form, model:), search_field_for(form, model:)].compact
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
# Highlights the search query within the text of the matched content.
|
|
13
|
+
def search_highlight(content, model:)
|
|
14
|
+
highlight content.to_s, params.dig(:q, model.search_field)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
private
|
|
18
|
+
|
|
19
|
+
def filter_field_for(form, model:)
|
|
20
|
+
method = model.filter_field
|
|
21
|
+
choices = model.filter_choices
|
|
22
|
+
options = { prompt: model.filter_prompt }
|
|
23
|
+
form.select method, choices, options, filter_field_params if method && choices
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def search_field_for(form, model:)
|
|
27
|
+
form.search_field model.search_field, search_field_params(placeholder: model.search_placeholder)
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def search_form_params(url:)
|
|
31
|
+
{
|
|
32
|
+
url: url, class: 'col-8 col-sm-6 col-md-4 d-flex', role: 'search',
|
|
33
|
+
data: { turbo_frame: :results, turbo_action: :advance },
|
|
34
|
+
}
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def search_field_params(placeholder:)
|
|
38
|
+
{
|
|
39
|
+
class: 'form-control form-control-sm flex-grow-1', placeholder: placeholder,
|
|
40
|
+
oninput: 'debouncedSubmit(this.form)', aria: { label: 'Search' }
|
|
41
|
+
}
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def filter_field_params
|
|
45
|
+
{
|
|
46
|
+
aria: { label: 'Filter' }, class: 'form-control form-control-sm me-3',
|
|
47
|
+
onchange: 'debouncedSubmit(this.form)',
|
|
48
|
+
}
|
|
49
|
+
end
|
|
50
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<% content_for :title, @model.name.pluralize %>
|
|
2
|
+
|
|
3
|
+
<% content_for :search do %>
|
|
4
|
+
<script>
|
|
5
|
+
function debounce(method) {
|
|
6
|
+
let timer
|
|
7
|
+
return (...args) => {
|
|
8
|
+
clearTimeout(timer)
|
|
9
|
+
timer = setTimeout(() => { method.apply(this, args) }, 300);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
const debouncedSubmit = debounce((form) => form.requestSubmit())
|
|
13
|
+
</script>
|
|
14
|
+
<%= search_form q: @q, model: @model %>
|
|
15
|
+
<% end if @model.recourse_searchable? %>
|
|
16
|
+
|
|
17
|
+
<% button_link_to_add @model.name.underscore, url_for(action: :new) if @model.recourse_actions.include? :new %>
|
|
18
|
+
|
|
19
|
+
<%= table items: @resources, cached: @model.recourse_cachable?, positioned: @model.recourse_positionable?, pagy: @pagy, empty_label: "No #{@model.name.underscore.pluralize}" do |resource, section| %>
|
|
20
|
+
<%= render 'row', resource: resource, section: section %>
|
|
21
|
+
<% end %>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# A module to manage administered resources.
|
|
2
|
+
module Recourse
|
|
3
|
+
# Makes Recourse methods like `recourses` available in config/routes.rb
|
|
4
|
+
class Engine < ::Rails::Engine
|
|
5
|
+
config.to_prepare do
|
|
6
|
+
require 'recourse/routing'
|
|
7
|
+
require 'recourse/model'
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# A module to manage administered resources.
|
|
2
|
+
module Recourse
|
|
3
|
+
# Ensures every Active Record object is compatible with recourse.
|
|
4
|
+
module Recoursive
|
|
5
|
+
# Return the associations to .include when loading all the resources.
|
|
6
|
+
def recourse_includes
|
|
7
|
+
%i[]
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
# Return the actions available for the model (among :new, :edit, :destroy)
|
|
11
|
+
def recourse_actions
|
|
12
|
+
default = %i[new edit destroy]
|
|
13
|
+
options = Recourse.resources[name.underscore.pluralize.to_sym]
|
|
14
|
+
(Array(options.fetch :only, default) & default) - Array(options.fetch :except, [])
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# Return the fields to .order when loading all the models.
|
|
18
|
+
def recourse_order
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
# Return whether the content to display all the models can be cached.
|
|
22
|
+
def recourse_cachable?
|
|
23
|
+
true
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Return whether the model has a position field to use for drag'n'drop sorting.
|
|
27
|
+
def recourse_positionable?
|
|
28
|
+
false
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# @return [Boolean] whether Ransack attributes are defined on the resource.
|
|
32
|
+
def recourse_searchable?
|
|
33
|
+
ransackable_attributes.any? || ransortable_attributes.any?
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# A module to manage administered resources.
|
|
2
|
+
module Recourse
|
|
3
|
+
# Extends any model to be searchable with Ransack.
|
|
4
|
+
module Searchable
|
|
5
|
+
# Returns the attributes that can be searched.
|
|
6
|
+
def ransackable_attributes(auth_object = nil)
|
|
7
|
+
%w[ ]
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
# Returns the associations that can be searched (by default: none).
|
|
11
|
+
def ransackable_associations(auth_object = nil)
|
|
12
|
+
%w[ ]
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# Returns the associations that can be sorted by (by default: none).
|
|
16
|
+
def ransortable_attributes(auth_object = nil)
|
|
17
|
+
%w[ ]
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
# @note to be overriden by subclasses -- the name of the field to search with.
|
|
21
|
+
def search_field
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
# @note to be overriden by subclasses -- the placeholder for the field to search with.
|
|
25
|
+
def search_placeholder
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# @note to be overriden by subclasses -- the name of the field to filter by.
|
|
29
|
+
def filter_field
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# @note to be overriden by subclasses -- the prompt for the field to filter by.
|
|
33
|
+
def filter_prompt
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# @note to be overriden by subclasses -- the values for the field to filter by.
|
|
37
|
+
def filter_choices
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# A module to manage administered resources.
|
|
2
|
+
module Recourse
|
|
3
|
+
# Makes Recourse methods like `recourses` available in config/routes.rb
|
|
4
|
+
module Routing
|
|
5
|
+
# This method is equivalent to Rails `resources` with the added bonus that we store
|
|
6
|
+
# the name of these administered resources so we can display them to admins in the navbar.
|
|
7
|
+
def recourses(*administered_resources, concerns: nil, **options, &block)
|
|
8
|
+
# NOTE: only is not enough, I need the except as well
|
|
9
|
+
administered_resources.each { |resource| Recourse.resources[resource] = options }
|
|
10
|
+
resources *administered_resources, concerns: concerns, **options, &block
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
ActionDispatch::Routing::Mapper.include Recourse::Routing
|
data/lib/recourse/version.rb
CHANGED
data/lib/recourse.rb
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
require 'bh'
|
|
2
|
+
require 'pagy'
|
|
3
|
+
require 'ransack'
|
|
4
|
+
require 'recourse/engine'
|
|
2
5
|
|
|
3
|
-
|
|
6
|
+
# @see https://ddnexus.github.io/pagy/resources/initializer/
|
|
7
|
+
Pagy::OPTIONS[:limit] = 15
|
|
8
|
+
# Pagy.options[:limit] = 15
|
|
4
9
|
|
|
10
|
+
# A module to manage administered resources.
|
|
5
11
|
module Recourse
|
|
6
|
-
|
|
7
|
-
|
|
12
|
+
# Return all the administered resources.
|
|
13
|
+
mattr_reader :resources
|
|
14
|
+
@@resources = {}
|
|
8
15
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,98 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: recourse
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 1.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
|
-
-
|
|
8
|
-
bindir:
|
|
7
|
+
- Claudio Baccigalupo
|
|
8
|
+
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
10
|
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
|
-
dependencies:
|
|
11
|
+
dependencies:
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: rails
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
- - ">="
|
|
17
|
+
- !ruby/object:Gem::Version
|
|
18
|
+
version: '0'
|
|
19
|
+
type: :runtime
|
|
20
|
+
prerelease: false
|
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
22
|
+
requirements:
|
|
23
|
+
- - ">="
|
|
24
|
+
- !ruby/object:Gem::Version
|
|
25
|
+
version: '0'
|
|
26
|
+
- !ruby/object:Gem::Dependency
|
|
27
|
+
name: bh
|
|
28
|
+
requirement: !ruby/object:Gem::Requirement
|
|
29
|
+
requirements:
|
|
30
|
+
- - ">="
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: '0'
|
|
33
|
+
type: :runtime
|
|
34
|
+
prerelease: false
|
|
35
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
36
|
+
requirements:
|
|
37
|
+
- - ">="
|
|
38
|
+
- !ruby/object:Gem::Version
|
|
39
|
+
version: '0'
|
|
40
|
+
- !ruby/object:Gem::Dependency
|
|
41
|
+
name: pagy
|
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
|
43
|
+
requirements:
|
|
44
|
+
- - ">="
|
|
45
|
+
- !ruby/object:Gem::Version
|
|
46
|
+
version: '0'
|
|
47
|
+
type: :runtime
|
|
48
|
+
prerelease: false
|
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
50
|
+
requirements:
|
|
51
|
+
- - ">="
|
|
52
|
+
- !ruby/object:Gem::Version
|
|
53
|
+
version: '0'
|
|
54
|
+
- !ruby/object:Gem::Dependency
|
|
55
|
+
name: ransack
|
|
56
|
+
requirement: !ruby/object:Gem::Requirement
|
|
57
|
+
requirements:
|
|
58
|
+
- - ">="
|
|
59
|
+
- !ruby/object:Gem::Version
|
|
60
|
+
version: '0'
|
|
61
|
+
type: :runtime
|
|
62
|
+
prerelease: false
|
|
63
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
64
|
+
requirements:
|
|
65
|
+
- - ">="
|
|
66
|
+
- !ruby/object:Gem::Version
|
|
67
|
+
version: '0'
|
|
68
|
+
- !ruby/object:Gem::Dependency
|
|
69
|
+
name: minitest
|
|
70
|
+
requirement: !ruby/object:Gem::Requirement
|
|
71
|
+
requirements:
|
|
72
|
+
- - "<"
|
|
73
|
+
- !ruby/object:Gem::Version
|
|
74
|
+
version: '6'
|
|
75
|
+
type: :development
|
|
76
|
+
prerelease: false
|
|
77
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
78
|
+
requirements:
|
|
79
|
+
- - "<"
|
|
80
|
+
- !ruby/object:Gem::Version
|
|
81
|
+
version: '6'
|
|
82
|
+
- !ruby/object:Gem::Dependency
|
|
83
|
+
name: simplecov
|
|
84
|
+
requirement: !ruby/object:Gem::Requirement
|
|
85
|
+
requirements:
|
|
86
|
+
- - ">="
|
|
87
|
+
- !ruby/object:Gem::Version
|
|
88
|
+
version: '0'
|
|
89
|
+
type: :development
|
|
90
|
+
prerelease: false
|
|
91
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
92
|
+
requirements:
|
|
93
|
+
- - ">="
|
|
94
|
+
- !ruby/object:Gem::Version
|
|
95
|
+
version: '0'
|
|
12
96
|
description: Turns resources into recourses
|
|
13
97
|
email:
|
|
14
98
|
- claudiob@users.noreply.github.com
|
|
@@ -16,21 +100,28 @@ executables: []
|
|
|
16
100
|
extensions: []
|
|
17
101
|
extra_rdoc_files: []
|
|
18
102
|
files:
|
|
19
|
-
-
|
|
20
|
-
- CHANGELOG.md
|
|
21
|
-
- LICENSE.txt
|
|
103
|
+
- MIT-LICENSE
|
|
22
104
|
- README.md
|
|
23
105
|
- Rakefile
|
|
106
|
+
- app/controllers/recourse_controller.rb
|
|
107
|
+
- app/helpers/recoursive_helper.rb
|
|
108
|
+
- app/helpers/searchable_helper.rb
|
|
109
|
+
- app/views/recourse/_row.html.erb
|
|
110
|
+
- app/views/recourse/index.html.erb
|
|
24
111
|
- lib/recourse.rb
|
|
112
|
+
- lib/recourse/engine.rb
|
|
113
|
+
- lib/recourse/model.rb
|
|
114
|
+
- lib/recourse/model/recoursive.rb
|
|
115
|
+
- lib/recourse/model/searchable.rb
|
|
116
|
+
- lib/recourse/routing.rb
|
|
25
117
|
- lib/recourse/version.rb
|
|
26
|
-
- sig/recourse.rbs
|
|
27
118
|
homepage: https://github.com/claudiob/recourse
|
|
28
119
|
licenses:
|
|
29
120
|
- MIT
|
|
30
121
|
metadata:
|
|
31
122
|
homepage_uri: https://github.com/claudiob/recourse
|
|
32
|
-
source_code_uri: https://github.com/claudiob/recourse
|
|
33
|
-
changelog_uri: https://github.com/claudiob/recourse
|
|
123
|
+
source_code_uri: https://github.com/claudiob/recourse/
|
|
124
|
+
changelog_uri: https://github.com/claudiob/recourse/blob/master/CHANGELOG.md
|
|
34
125
|
rdoc_options: []
|
|
35
126
|
require_paths:
|
|
36
127
|
- lib
|
|
@@ -38,14 +129,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
38
129
|
requirements:
|
|
39
130
|
- - ">="
|
|
40
131
|
- !ruby/object:Gem::Version
|
|
41
|
-
version: 3
|
|
132
|
+
version: '3'
|
|
42
133
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
43
134
|
requirements:
|
|
44
135
|
- - ">="
|
|
45
136
|
- !ruby/object:Gem::Version
|
|
46
137
|
version: '0'
|
|
47
138
|
requirements: []
|
|
48
|
-
rubygems_version:
|
|
139
|
+
rubygems_version: 4.0.3
|
|
49
140
|
specification_version: 4
|
|
50
|
-
summary: Rails admin tool
|
|
141
|
+
summary: Rails admin tool
|
|
51
142
|
test_files: []
|
data/.rspec
DELETED
data/CHANGELOG.md
DELETED
data/LICENSE.txt
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 claudiob
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
|
13
|
-
all copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
THE SOFTWARE.
|
data/sig/recourse.rbs
DELETED