rails_url_shortener 0.2.3 → 0.2.4
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 +10 -0
- data/lib/rails_url_shortener/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d1ea28ea6ecc82de86d43c585096c18b051bb1a175cd85b0499e40c5fbb2b7e1
|
4
|
+
data.tar.gz: 72e8a2614b38c608981628a6b427c2548d0991d8ec76e7cce0b89f563d8ea30b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d1c181add3b53d088765e07b0148b192e09f0281ecd102b15a8581a966282c911de6a3e3270b5f590acee9a7db730ee61dc4c3f547ee3c91b46f4a441ad58b26
|
7
|
+
data.tar.gz: a453b9c81dcc6376608c46feb8cba23cadbe06a94dc5bf9f9f4b32a2378a622d3e07fb624a9d3a7fec552cc2a1cd8358812226fc6434d8def0c27ab29e1f181f
|
data/README.md
CHANGED
@@ -15,6 +15,7 @@ A few of the things you can do with RailsUrlShortener:
|
|
15
15
|
* The short links can be associated with a model in your app.
|
16
16
|
* Save interesting things like browser, system and ip data of the 'un-shortened' request.
|
17
17
|
* Temporal short links using the expires_at option.
|
18
|
+
* Get IP data from third part service.
|
18
19
|
|
19
20
|
## Usage
|
20
21
|
|
@@ -80,6 +81,15 @@ Or using the model class:
|
|
80
81
|
RailsUrlShortener::Visit.all # all in database
|
81
82
|
```
|
82
83
|
|
84
|
+
And a Visit is related to a Ipgeo model that contain information about the ip, so you can view this using the active record relation:
|
85
|
+
```ruby
|
86
|
+
RailsUrlShortener::Visit.first.ipgeo # Ipgeo object that contain information of the ip
|
87
|
+
```
|
88
|
+
|
89
|
+
### Ip data
|
90
|
+
|
91
|
+
When a Visit record is created, a job is enqueue for get Ip data from [this](https://ip-api.com/) service and create the Ipgeo record. It is integrated to the free endpoint, so if you think that you have more than 45 different IPS querying in a minute to your app, we need to think in a new solution.
|
92
|
+
|
83
93
|
## Installation
|
84
94
|
|
85
95
|
Add this line to your application's Gemfile:
|
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.
|
4
|
+
version: 0.2.4
|
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-04-
|
11
|
+
date: 2022-04-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -101,9 +101,9 @@ licenses:
|
|
101
101
|
- GPL-3.0
|
102
102
|
metadata:
|
103
103
|
bug_tracker_uri: https://www.github.com/a-chacon/rails-url-shortener/issues
|
104
|
-
changelog_uri: https://www.github.com/a-chacon/rails-url-shortener/releases/tag/v0.2.
|
104
|
+
changelog_uri: https://www.github.com/a-chacon/rails-url-shortener/releases/tag/v0.2.4
|
105
105
|
documentation_uri: https://github.com/a-chacon/rails-url-shortener/blob/main/README.md
|
106
|
-
source_code_uri: https://github.com/a-chacon/rails-url-shortener/tree/v0.2.
|
106
|
+
source_code_uri: https://github.com/a-chacon/rails-url-shortener/tree/v0.2.4
|
107
107
|
rubygems_mfa_required: 'true'
|
108
108
|
post_install_message:
|
109
109
|
rdoc_options: []
|