rails_url_shortener 0.2.6 → 0.2.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 20985bb8cc91463fdc5482bd63d3cc20f4d246bd061b2a3379183ab2ef00ebc3
4
- data.tar.gz: d84145481a224bbf71071da27a85a2a358190e487cceff531586daa6b245c8e8
3
+ metadata.gz: 8d569d3fd17542a9fd16a932d904e6fab08bf27e75ad45bd331a4d2baebfd8e9
4
+ data.tar.gz: ef092c5b80463d59f1597c3a3914024e5fe444d98c0908f5559a65baf51b06bd
5
5
  SHA512:
6
- metadata.gz: 9df5be0690db7d0939e18a1db2ae9aeb68f243cbc4e1a99ea908ac59099c835b09ebbe89e64c4ba237065419e2de82115519a195d723942452943a5bb58fc298
7
- data.tar.gz: 2a2e9fc7fc7180ba824aee0080c65bf1729915171a93ade15f97dd36ade234f39750fe713ed89a83a4fcb0a21d6f7b92d0dab6b95eda4ecfe62c20e3e00de62e
6
+ metadata.gz: 3ab36211b6978eec32353b155fe1232b9d81933d943a7c283a93709c8d9978c529c556eb88988b06c02f3b9f0f7766e215978f628ba156902d1a91bfd538932b
7
+ data.tar.gz: 36d43a73060aa771d85cbb3765cde7f18d741e899fd42617a2ae740e2efe8b8f2b1286e34839cdeaf3acb0601b3f83ce3af3bf3ba4a591543097e51428f8e51a
@@ -0,0 +1,11 @@
1
+ module RailsUrlShortener
2
+ module Model
3
+ # rubocop:disable Naming/PredicateName
4
+ def has_short_urls
5
+ class_eval do
6
+ has_many :urls, class_name: 'RailsUrlShortener::Url', as: 'owner'
7
+ end
8
+ end
9
+ # rubocop:enable Naming/PredicateName
10
+ end
11
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsUrlShortener
4
- VERSION = '0.2.6'
4
+ VERSION = '0.2.7'
5
5
  end
@@ -2,6 +2,7 @@
2
2
 
3
3
  require 'rails_url_shortener/version'
4
4
  require 'rails_url_shortener/engine'
5
+ require 'rails_url_shortener/model'
5
6
 
6
7
  module RailsUrlShortener
7
8
  ##
@@ -39,3 +40,7 @@ module RailsUrlShortener
39
40
  # by default saving all requests
40
41
  mattr_accessor :save_bots_visits, default: true
41
42
  end
43
+
44
+ ActiveSupport.on_load(:active_record) do
45
+ extend RailsUrlShortener::Model
46
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_url_shortener
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - a-chacon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-30 00:00:00.000000000 Z
11
+ date: 2022-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: browser
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: 5.0.4
47
+ version: 5.1.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: 5.0.4
54
+ version: 5.1.0
55
55
  description: |-
56
56
  RailsUrlShortener is a simple engine that provide to your rail's app the functionalities for
57
57
  short URLs. Like bitly.com, but working on your project only.
@@ -80,16 +80,16 @@ files:
80
80
  - lib/generators/rails_url_shortener/templates/initializer.rb
81
81
  - lib/rails_url_shortener.rb
82
82
  - lib/rails_url_shortener/engine.rb
83
+ - lib/rails_url_shortener/model.rb
83
84
  - lib/rails_url_shortener/version.rb
84
- - lib/tasks/rails_url_shortener_tasks.rake
85
85
  homepage: https://www.github.com/a-chacon/rails-url-shortener
86
86
  licenses:
87
87
  - GPL-3.0
88
88
  metadata:
89
89
  bug_tracker_uri: https://www.github.com/a-chacon/rails-url-shortener/issues
90
- changelog_uri: https://www.github.com/a-chacon/rails-url-shortener/releases/tag/v0.2.6
90
+ changelog_uri: https://www.github.com/a-chacon/rails-url-shortener/releases/tag/v0.2.7
91
91
  documentation_uri: https://github.com/a-chacon/rails-url-shortener/blob/main/README.md
92
- source_code_uri: https://github.com/a-chacon/rails-url-shortener/tree/v0.2.6
92
+ source_code_uri: https://github.com/a-chacon/rails-url-shortener/tree/v0.2.7
93
93
  rubygems_mfa_required: 'true'
94
94
  post_install_message:
95
95
  rdoc_options: []
@@ -1,5 +0,0 @@
1
- # frozen_string_literal: true
2
- # desc "Explaining what the task does"
3
- # task :rails_url_shortener do
4
- # # Task goes here
5
- # end