discourse_theme 2.1.0 → 2.1.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: 202bc4483d1d73df24eb1674c2d2e1f8920c3f73a7ffbf6d0a69d0fd9bc0fce8
4
- data.tar.gz: 47e22597abb662a1fff0ba8f1678ea7533d8daa84eb63879d9dcb2c8a79e8dbf
3
+ metadata.gz: 7c952dc0bc427d1c7a5e928ea8140735aa5cdbb4b6d0af282b4660399f201720
4
+ data.tar.gz: 98e0fbc726922cab037dd90ae1683e36ec742b209e0604ef34ec09cd751a9010
5
5
  SHA512:
6
- metadata.gz: 14f195165983249d04b48c8e80427176ba1d673541fb87054a9e1f24f64e8f59897d88e2b11612be93996aee9c6122d6772ce141485674167cf793a8c41bb818
7
- data.tar.gz: 2b6c59248aaac23b12744c89eb83ee886326cbff563a8156cba494e372c9b5b3ccf5cd2ede58c193ae0acb17c72ebeeafec10f35767448bb3e91d64029107c37
6
+ metadata.gz: 4b9d6671a41ed236124203d96582f487cc85daabf002d00c7f50b69ff0a769b1750e3ad07eee216dc887bb74b0b48509287bb675854a2bafef06a9a9f7c9dc76
7
+ data.tar.gz: 37d80cea940d2e30b2a7452fe9a6916dcae39701b744a1a7041e7c9de1953c200ab23d3a4a47c940e2fe65bcd0defe8849bbb896680ab0b543dccb85b563b283
data/CHANGELOG.md CHANGED
@@ -5,6 +5,18 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [2.1.1] - 2024-03-25
9
+
10
+ ### Added
11
+
12
+ - Suggest the root URL of the local site when running `watch` command
13
+
14
+ ## [2.1.1] - 2024-03-25
15
+
16
+ ### Added
17
+
18
+ - `--version` to CLI (#46)
19
+
8
20
  ## [2.1.0] - 2024-02-28
9
21
 
10
22
  ### Changed
@@ -37,6 +37,11 @@ module DiscourseTheme
37
37
  end
38
38
 
39
39
  def run(args)
40
+ if args.delete("--version")
41
+ puts VERSION
42
+ return
43
+ end
44
+
40
45
  usage unless args[1]
41
46
 
42
47
  reset = !!args.delete("--reset")
@@ -177,7 +177,10 @@ module DiscourseTheme
177
177
  end
178
178
 
179
179
  if !url || @reset
180
- url = normalize_url(UI.ask("What is the root URL of your Discourse site?", default: url))
180
+ url =
181
+ normalize_url(
182
+ UI.ask("What is the root URL of your Discourse site?", default: settings.possible_url),
183
+ )
181
184
  url = "http://#{url}" unless url =~ %r{^https?://}
182
185
 
183
186
  # maybe this is an HTTPS redirect
@@ -22,6 +22,13 @@ class DiscourseTheme::Config
22
22
  set("url", val)
23
23
  end
24
24
 
25
+ def possible_url
26
+ return safe_config["url"] if safe_config["url"]
27
+
28
+ first_config = @config.raw_config.values.find { |config| config["url"] }
29
+ first_config["url"] if first_config
30
+ end
31
+
25
32
  def theme_id
26
33
  safe_config["theme_id"].to_i
27
34
  end
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module DiscourseTheme
3
- VERSION = "2.1.0"
3
+ VERSION = "2.1.2"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: discourse_theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Saffron
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-02-28 00:00:00.000000000 Z
11
+ date: 2024-04-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitar