rails_url_shortener 0.2.1 → 0.2.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d4a481aa504c85571a337b3fef38e9f7c5f6b498b18eb0dbb96cc19a28648a0
|
4
|
+
data.tar.gz: 0d57d071fccde22b9855f47663a6737eecb1a9329b3c4dbdc553744bdbcaf5c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce7e9633744aea66572207d0fd12ef5f75dd3a48044fa3dd0d9f3e3ed5b13fcc38fed290dad5f0a00da630fff903f4754dc77201de8e5d8f1243092a85a80260
|
7
|
+
data.tar.gz: c400166ae93286517a6b5f876e431d034ae8e7ac6b293967671a0b75a99c3a0d7faa45fa9981ea35c871da9a0b40652249b1f9c7cdca591726cebba60d00844e
|
@@ -17,7 +17,7 @@ module RailsUrlShortener
|
|
17
17
|
if ip.code == 200
|
18
18
|
ipgeo = Ipgeo.find_by(ip: visit.ip)
|
19
19
|
ipgeo.update(JSON.parse(ip.body).transform_keys { |key| key.to_s.underscore }.slice(*Ipgeo.column_names))
|
20
|
-
visit.ipgeo
|
20
|
+
visit.update(ipgeo: ipgeo)
|
21
21
|
end
|
22
22
|
elsif !Ipgeo.exists?(ip: visit.ip)
|
23
23
|
# Then create a new record
|
@@ -26,7 +26,7 @@ module RailsUrlShortener
|
|
26
26
|
ipgeo = Ipgeo.new(JSON.parse(ip.body).transform_keys { |key| key.to_s.underscore }.slice(*Ipgeo.column_names))
|
27
27
|
ipgeo.ip = JSON.parse(ip.body)['query']
|
28
28
|
ipgeo.save
|
29
|
-
visit.ipgeo
|
29
|
+
visit.update(ipgeo: ipgeo)
|
30
30
|
end
|
31
31
|
end
|
32
32
|
rescue Exception => e
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- a-chacon
|
@@ -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.2
|
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.2
|
107
107
|
rubygems_mfa_required: 'true'
|
108
108
|
post_install_message:
|
109
109
|
rdoc_options: []
|