resource_quotable 0.2.0 → 0.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8ebb826f39ace180d8f32e12d12ae50ab90a8b2deefe5f19e156810a5ea99636
4
- data.tar.gz: cd2009f815c64a62f51a03a3977a0bfc5d53acbacfe91da5d839b2007e74ee27
3
+ metadata.gz: dc73887960b80a1d8fed5efe2978e0fdf40c5732cd34b49cab65841d5d0e424e
4
+ data.tar.gz: bf3ee79ccc0d0e3eca05de8d31b91d7e081cc89f205822814cde47ffd2be1745
5
5
  SHA512:
6
- metadata.gz: ba541c1da670b1d167bc313399e32c63cfb3858a37072d3ea169a368f1b5e11a813d2c0f5f6e13054afbc6bae72727d5c067fa570c53bafc8108f734fddbbf25
7
- data.tar.gz: 6896c4c58ed19679d083243c3cead8419684d73703c50eb52ab634fb78f0a21047e4668a804e3c2be0e0c3a9005169abdda8a7ab3dd945beead747e9a67d042c
6
+ metadata.gz: 3dcd3c00cff0149b1b42ae31309f766f995f0df21645c57229b2dab16d251c9be538dc15d23010262c4ddc47bb5d985e035b6771925620fcaf93e54ed082fb3d
7
+ data.tar.gz: d9d4cbab1d6fc03c1672d5ac6a70f38e3ccfd40a7910fa1120baa9aedb205dd5fe7f1ac4183d4c355aaa9c682b9d86278bb597de54592db82b24d61fb6d22ad5
data/Changelog.md CHANGED
@@ -4,7 +4,16 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](http://keepachangelog.com/)
5
5
  and this project adheres to [Semantic Versioning](http://semver.org/).
6
6
 
7
- ## [0.2.0] (unreleased)
7
+ ## 0.3.0 (2023-06-27)
8
+
9
+
10
+ ### Features
11
+
12
+ * moved to github actions CI ([91dcfbd](https://github.com/ngelx/resource_quotable/commit/91dcfbd24f646a37dddfe41baf5be841c4d0deab))
13
+ * Support for rails > 6 ([2b0947f](https://github.com/ngelx/resource_quotable/commit/2b0947fada278ea9b8d4f6ff26f8e941d0eccf9d))
14
+
15
+
16
+ ## [0.2.0] (29/9/22)
8
17
  ### Changed
9
18
  - Change Quota system to allow user group configuration.
10
19
 
data/Readme.md CHANGED
@@ -1,6 +1,11 @@
1
1
  # ResourceQuotable
2
2
  A Rails quota limit gem for resources. UNDER DEVELOPMENT
3
3
 
4
+ [![Gem Version](https://badge.fury.io/rb/resource_quotable.svg)](https://badge.fury.io/rb/resource_quotable)
5
+ ![Rspec suit](https://github.com/ngelx/resource_quotable/actions/workflows/release.yml/badge.svg)
6
+ [![Test Coverage](https://api.codeclimate.com/v1/badges/39eaf50966ab71353f66/test_coverage)](https://codeclimate.com/github/ngelx/resource_quotable/test_coverage)
7
+ [![Maintainability](https://api.codeclimate.com/v1/badges/39eaf50966ab71353f66/maintainability)](https://codeclimate.com/github/ngelx/resource_quotable/maintainability)
8
+
4
9
  ## Installation
5
10
  Add this line to your application's Gemfile:
6
11
 
@@ -164,7 +169,7 @@ class ApplicationController < ActionController::Base
164
169
  # hook after every action
165
170
  # default: nil
166
171
  def resource_quotable_after
167
- # ...
172
+ # ...
168
173
  end
169
174
 
170
175
  # ...
@@ -7,7 +7,7 @@ module ResourceQuotable
7
7
  extend ActiveSupport::Concern
8
8
 
9
9
  included do
10
- helper_method :allowed_to?
10
+ helper_method :allowed_to? if respond_to?(:helper_method)
11
11
 
12
12
  def allowed_to?(action, resource)
13
13
  !ResourceQuotable::ActionServices::Check.call(
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ResourceQuotable
4
- VERSION = '0.2.0'
4
+ VERSION = '0.3.0'
5
5
  end
@@ -62,7 +62,10 @@ module ResourceQuotable # :nodoc:
62
62
  end
63
63
 
64
64
  # Extend ActiveRecord::Base with associations
65
- ActiveRecord::Base.include ResourceQuotable::ActsAsQuotable
66
- ActiveRecord::Base.include ResourceQuotable::ActsAsQuotaTrackable
67
- ActionController::Base.include ResourceQuotable::AllowedToManageQuotaCheck
68
- ActionView::Base.include ResourceQuotable::Helper
65
+ ActiveSupport.on_load(:active_record) do
66
+ include ResourceQuotable::ActsAsQuotable
67
+ include ResourceQuotable::ActsAsQuotaTrackable
68
+ end
69
+
70
+ ActiveSupport.on_load(:action_controller) { include ResourceQuotable::AllowedToManageQuotaCheck }
71
+ ActiveSupport.on_load(:action_view) { include ResourceQuotable::Helper }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resource_quotable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ngel
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-24 00:00:00.000000000 Z
11
+ date: 2023-06-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: kaminari
@@ -134,6 +134,20 @@ dependencies:
134
134
  - - "~>"
135
135
  - !ruby/object:Gem::Version
136
136
  version: '1.0'
137
+ - !ruby/object:Gem::Dependency
138
+ name: rspec_junit_formatter
139
+ requirement: !ruby/object:Gem::Requirement
140
+ requirements:
141
+ - - "~>"
142
+ - !ruby/object:Gem::Version
143
+ version: '0.6'
144
+ type: :development
145
+ prerelease: false
146
+ version_requirements: !ruby/object:Gem::Requirement
147
+ requirements:
148
+ - - "~>"
149
+ - !ruby/object:Gem::Version
150
+ version: '0.6'
137
151
  - !ruby/object:Gem::Dependency
138
152
  name: rspec-rails
139
153
  requirement: !ruby/object:Gem::Requirement
@@ -218,6 +232,20 @@ dependencies:
218
232
  - - "~>"
219
233
  - !ruby/object:Gem::Version
220
234
  version: '0.21'
235
+ - !ruby/object:Gem::Dependency
236
+ name: simplecov_json_formatter
237
+ requirement: !ruby/object:Gem::Requirement
238
+ requirements:
239
+ - - "~>"
240
+ - !ruby/object:Gem::Version
241
+ version: '0.1'
242
+ type: :development
243
+ prerelease: false
244
+ version_requirements: !ruby/object:Gem::Requirement
245
+ requirements:
246
+ - - "~>"
247
+ - !ruby/object:Gem::Version
248
+ version: '0.1'
221
249
  description: Flexible quota system for resources.
222
250
  email:
223
251
  - ngel@protonmail.com
@@ -289,15 +317,18 @@ files:
289
317
  - lib/resource_quotable/helper.rb
290
318
  - lib/resource_quotable/version.rb
291
319
  - lib/tasks/resource_quotable_tasks.rake
292
- homepage: https://bitbucket.org/angel_arancibia/resource_quotable/src/master/
320
+ homepage: https://github.com/ngelx/resource_quotable
293
321
  licenses:
294
322
  - MIT
295
323
  metadata:
296
- homepage_uri: https://bitbucket.org/angel_arancibia/resource_quotable/src/master/
297
- source_code_uri: https://bitbucket.org/angel_arancibia/resource_quotable/src/master/
298
- changelog_uri: https://bitbucket.org/angel_arancibia/resource_quotable/src/master//CHANGELOG.md
324
+ homepage_uri: https://github.com/ngelx/resource_quotable
325
+ documentation_uri: https://github.com/ngelx/resource_quotable
326
+ changelog_uri: https://github.com/ngelx/resource_quotable/blob/main/Changelog.md.md
327
+ source_code_uri: https://github.com/ngelx/resource_quotable
328
+ bug_tracker_uri: https://github.com/ngelx/resource_quotable/issues
329
+ wiki_uri: https://github.com/ngelx/resource_quotable/wiki
299
330
  rubygems_mfa_required: 'true'
300
- post_install_message: 'Please see https://bitbucket.org/angel_arancibia/resource_quotable/src/master/Changelog.md
331
+ post_install_message: 'Please see https://github.com/ngelx/resource_quotable/blob/master/Readme.md
301
332
  for details on how to finish the setup.
302
333
 
303
334
  '
@@ -315,8 +346,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
315
346
  - !ruby/object:Gem::Version
316
347
  version: '0'
317
348
  requirements: []
318
- rubygems_version: 3.1.6
319
- signing_key:
349
+ rubygems_version: 3.3.26
350
+ signing_key:
320
351
  specification_version: 4
321
352
  summary: Quota system for resource
322
353
  test_files: []