runlight 0.4.3 → 0.5.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.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/README.md +1 -1
  4. data/assets/build.json +4 -4
  5. data/assets/dashboard.js +12 -12
  6. data/assets/locales.json +5 -5
  7. data/assets/picker.js +1 -1
  8. data/assets/tracker.js +1 -1
  9. data/lib/runlight/accounts/accounts.rb +40 -10
  10. data/lib/runlight/accounts/crypto.rb +6 -3
  11. data/lib/runlight/accounts/lockout.rb +98 -0
  12. data/lib/runlight/accounts/throttle.rb +70 -16
  13. data/lib/runlight/accounts/web.rb +71 -28
  14. data/lib/runlight/body.rb +13 -0
  15. data/lib/runlight/core.rb +194 -28
  16. data/lib/runlight/data/sources.rb +1 -2
  17. data/lib/runlight/db/connect.rb +2 -2
  18. data/lib/runlight/db/db.rb +52 -32
  19. data/lib/runlight/geo.rb +2 -2
  20. data/lib/runlight/http/response.rb +22 -3
  21. data/lib/runlight/icon.rb +2 -1
  22. data/lib/runlight/importers/csv_visits.rb +13 -3
  23. data/lib/runlight/importers/dub.rb +2 -1
  24. data/lib/runlight/importers/index.rb +2 -1
  25. data/lib/runlight/importers/umami.rb +3 -0
  26. data/lib/runlight/importers/visits.rb +16 -5
  27. data/lib/runlight/importers/write.rb +50 -12
  28. data/lib/runlight/links.rb +10 -1
  29. data/lib/runlight/mcp.rb +10 -1
  30. data/lib/runlight/oauth.rb +34 -23
  31. data/lib/runlight/payload.rb +26 -7
  32. data/lib/runlight/rack_app.rb +7 -1
  33. data/lib/runlight/routes.rb +51 -21
  34. data/lib/runlight/server/cli.rb +9 -0
  35. data/lib/runlight/server/db_ip.rb +287 -45
  36. data/lib/runlight/server/standalone.rb +41 -5
  37. data/lib/runlight/sources.rb +3 -2
  38. data/lib/runlight/store/sql.rb +14 -0
  39. data/lib/runlight/store/sql_store.rb +88 -59
  40. data/lib/runlight/ua.rb +14 -4
  41. data/lib/runlight/version.rb +1 -1
  42. data/lib/runlight/weak_keys.rb +31 -0
  43. data/lib/runlight.rb +2 -0
  44. metadata +6 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7a7293ae5972147d74f5d3159667f4323dddaf681e35044c5af621372ad1a9e0
4
- data.tar.gz: d78b209da3d466e4aaadceddb31948ce2c0e0d974fa36efc5de8f2bea7f0bb10
3
+ metadata.gz: '09ac989c6438e5b6637a65703f3a0a76918906f6af7c17f97ecc6d02175f5e41'
4
+ data.tar.gz: 1b6ea6721a45edd1aef2a4983ccc3e0aa52667bac1e68399d7d8dd4efe3703b6
5
5
  SHA512:
6
- metadata.gz: 3084056a8279893898ba8728847dcee5ff20e56dd48d95cf600ee0fe701b55aaef583a27a7c6a11ca2344340c31e5c2dd66c09695093e6e1ca600a4c76777226
7
- data.tar.gz: a404ac28cc5b6a081cd6a88dcc3fb703092ead13a25f16aa32de6b23acad670e385e2256b6c8fb83527b0c41260787a5ecdb168f7cc22bf8be6283ea9e2180ac
6
+ metadata.gz: 841aa400b5f2b579774e7e785d40d26b5b5fea85fdd5abcba4fb719e09b816303bfb27e0274c91a2af757a17921a358b328d650d013256d9ffc3b8076d81996c
7
+ data.tar.gz: b626da25bf0201fcb8c27b37096b0de7856b4fb068b095444bc766d201d0531cab2ab779305db1216f058cf309d5358b1bbc0d6db560f6910f9cd1dcf96940fa
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2026 Jon Phillips
3
+ Copyright (c) 2026 Runlight.sh
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Runlight is privacy friendly web analytics that runs inside your own Ruby app. It counts visitors without cookies and without storing anyone’s IP address. The numbers stay in your database, and the dashboard is served from your domain at `/runlight`.
4
4
 
5
- This gem is the Ruby version of [Runlight](https://runlight.sh). It works in Rails 7.2 or later and in any Rack app on Ruby 3.2 or later, and it can also run on a domain of its own. It answers every request the way the TypeScript library does and uses the same tables, so any of them can read the others’ database.
5
+ This gem is the Ruby version of [Runlight](https://runlight.sh). It works in Rails 8.0 and 8.1 and in any Rack app on Ruby 3.2 or later, and it can also run on a domain of its own. It answers every request the way the TypeScript library does and uses the same tables, so any of them can read the others’ database.
6
6
 
7
7
  ## Rails
8
8
 
data/assets/build.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "note": "Written by scripts/ruby-assets.mts from the TypeScript SDK's generated files. Do not edit.",
3
- "version": "0.4.3",
3
+ "version": "0.5.0",
4
4
  "apiVersion": 1,
5
- "dashboardHash": "68bd79265ef7",
5
+ "dashboardHash": "e4c1f73226c7",
6
6
  "worldHash": "4422113781f8",
7
- "localesHash": "42e4093d7807",
8
- "trackerHash": "73c5080cf665",
7
+ "localesHash": "e41051e1d514",
8
+ "trackerHash": "deba7bea57f2",
9
9
  "icon": "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2032%2032%22%3E%3Cstyle%3E.h%7Bfill%3A%23000%7D.r%7Bstroke%3A%23fff%7D%40media%20%28prefers-color-scheme%3Adark%29%7B.h%7Bfill%3A%23fff%7D.r%7Bstroke%3A%23000%7D%7D%3C/style%3E%3Crect%20class%3D%22h%22%20x%3D%222.5%22%20y%3D%222.5%22%20width%3D%2227%22%20height%3D%2227%22%20rx%3D%227%22/%3E%3Cpath%20class%3D%22r%22%20d%3D%22M11%2023V9h6.2a4.3%204.3%200%200%201%200%208.6H11m6%200%205%205.4%22%20fill%3D%22none%22%20stroke-width%3D%222.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22/%3E%3Ccircle%20cx%3D%2223.6%22%20cy%3D%228.4%22%20r%3D%222.6%22%20fill%3D%22%2322c55e%22/%3E%3C/svg%3E"
10
10
  }