discourse_plugin_statistics 0.1.0.pre4 → 0.1.0.pre6

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: 5ecea4649c6e62e7a516377d370b3c3eb46880c8732b1c8d03e5f3b2c05e1de4
4
- data.tar.gz: c81cd9627a8935c9b9fbbff145e49171f20465776c736c32bfb0d11770000c87
3
+ metadata.gz: b249a20d593e7e1a839038a0da601e37b41f9f57a7ce7086d05eca3d9b4e4147
4
+ data.tar.gz: f0236b57cc64d8bc018ad10b62588d75f4d3dfc4af774cb524441c28d30c7d15
5
5
  SHA512:
6
- metadata.gz: e9e5edc1aa1add98a8348b42e3c532832814ee6b96ea327de04abfa770f8ca95b4f83323e6be3f61e64e361ea1ca2e6415301eb717a84c2156742d00be6b72f6
7
- data.tar.gz: '079f5357ab3e37b2b6923fa6b122ad2d77e20cae5e5a08a551bc526009754f0c90b4e6c10e55027331ded6ed4345503342a30b724887bc5722c66a13df26c131'
6
+ metadata.gz: 7e1a232d87f0dec32deac0a621505ee35236c7f613d49b762e9e036bb4a680e4a160ba702a616cb8007885c49e987ea3dbd66bb43ffceaaefe49f88168fc3d71
7
+ data.tar.gz: 1f3b37f4b1bd54b4c053d9fb9747b8b8110d0c104734a0252d6740f2a9021b5b4432c180ac0c4d3ecba1aa4b6de88af3b3037b873c2fb591d243c15da4fab2fd
@@ -4,11 +4,15 @@ require "excon"
4
4
 
5
5
  module DiscoursePluginStatistics
6
6
  class Statistics
7
+ PATH = "plugin-manager/statistics"
8
+
7
9
  def self.update!
8
10
  new.update
9
11
  end
10
12
 
11
13
  def update
14
+ return if ENV["DISCOURSE_PLUGIN_STATISTICS_OPT_OUT"]
15
+
12
16
  body = {
13
17
  discourse: discourse,
14
18
  plugins: plugins
@@ -28,7 +32,7 @@ module DiscoursePluginStatistics
28
32
 
29
33
  def request(body, url = nil)
30
34
  ::Excon.post(
31
- url || DiscoursePluginStatistics.server_url,
35
+ url || "#{DiscoursePluginStatistics.server_url}/#{PATH}",
32
36
  headers: { "Content-Type" => "application/json" },
33
37
  body: body
34
38
  )
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DiscoursePluginStatistics
4
- VERSION = "0.1.0.pre4"
4
+ VERSION = "0.1.0.pre6"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: discourse_plugin_statistics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.pre4
4
+ version: 0.1.0.pre6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Angus McLeod
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-05 00:00:00.000000000 Z
11
+ date: 2023-10-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_model_serializers