discourse_plugin_statistics 0.1.0.pre6 → 0.1.0.pre7

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: b249a20d593e7e1a839038a0da601e37b41f9f57a7ce7086d05eca3d9b4e4147
4
- data.tar.gz: f0236b57cc64d8bc018ad10b62588d75f4d3dfc4af774cb524441c28d30c7d15
3
+ metadata.gz: 918c4b831a10d6151c074f108c0d6693fa352653b3a3bfb4a3a4da5f5f7736dc
4
+ data.tar.gz: a788aeaf43534f5c7ba62602e381de99ff7cb420dff9e63cdc6605909b43069d
5
5
  SHA512:
6
- metadata.gz: 7e1a232d87f0dec32deac0a621505ee35236c7f613d49b762e9e036bb4a680e4a160ba702a616cb8007885c49e987ea3dbd66bb43ffceaaefe49f88168fc3d71
7
- data.tar.gz: 1f3b37f4b1bd54b4c053d9fb9747b8b8110d0c104734a0252d6740f2a9021b5b4432c180ac0c4d3ecba1aa4b6de88af3b3037b873c2fb591d243c15da4fab2fd
6
+ metadata.gz: d8271077c1dfdf04c3a2ac277439ff73922ddc9b9069c849c9dd1be6b3382b862f5bb4d47bf17e65b775e4a902b0354c2eb1b7ed7ea8c1c71a0201d60806345c
7
+ data.tar.gz: fc980f9ccc18443da4b1c57e10fe4619d644a05cd8edf73b8e67229cbf5c9e1ca90b64cdc0cd8a81408819c2426842ec372c36ac106524561257c41925c979b2
@@ -15,6 +15,7 @@ module DiscoursePluginStatistics
15
15
  name: name,
16
16
  branch: branch,
17
17
  sha: sha,
18
+ url: url,
18
19
  data: data
19
20
  }.as_json
20
21
  end
@@ -27,6 +28,10 @@ module DiscoursePluginStatistics
27
28
  @sha ||= git_sha
28
29
  end
29
30
 
31
+ def url
32
+ @url ||= git_url
33
+ end
34
+
30
35
  def data
31
36
  @data ||= if self.class.respond_to?(name.underscore)
32
37
  self.class.send(name.underscore)
@@ -43,6 +48,10 @@ module DiscoursePluginStatistics
43
48
  run_shell_cmd("git rev-parse --abbrev-ref HEAD", chdir: dir)
44
49
  end
45
50
 
51
+ def git_url
52
+ run_shell_cmd("git config --get remote.origin.url", chdir: dir)
53
+ end
54
+
46
55
  def run_shell_cmd(cmd, opts = {})
47
56
  stdout, stderr_str, = Open3.capture3(cmd, opts)
48
57
  stderr_str.present? ? nil : stdout.strip
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DiscoursePluginStatistics
4
- VERSION = "0.1.0.pre6"
4
+ VERSION = "0.1.0.pre7"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: discourse_plugin_statistics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.pre6
4
+ version: 0.1.0.pre7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Angus McLeod