discourse_theme 2.1.1 → 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: fd374430e4fb62d3c7ee98ebdc23af4709f699dc5b2580c216a12dd0d52fd6fb
4
- data.tar.gz: db348e6b482980219f236b1fbbdf9a6a2d1d8e72fe46fce6386fcad35358878a
3
+ metadata.gz: 7c952dc0bc427d1c7a5e928ea8140735aa5cdbb4b6d0af282b4660399f201720
4
+ data.tar.gz: 98e0fbc726922cab037dd90ae1683e36ec742b209e0604ef34ec09cd751a9010
5
5
  SHA512:
6
- metadata.gz: 79bf80af701810f3f9e35c0b17a1c2d8d854222a09ae9451eecd1796776cb2f0f6d4f5a931a529236f7eebc23c687eb040bce941c8df581b08b633b24dea1f7b
7
- data.tar.gz: 77f09a916e25c7bd87407bd6f5c466bd75709a941c2930543977079f175916193d209db336886107dd650dd4a3be128d4c0524784d915fafee048549e3364fa2
6
+ metadata.gz: 4b9d6671a41ed236124203d96582f487cc85daabf002d00c7f50b69ff0a769b1750e3ad07eee216dc887bb74b0b48509287bb675854a2bafef06a9a9f7c9dc76
7
+ data.tar.gz: 37d80cea940d2e30b2a7452fe9a6916dcae39701b744a1a7041e7c9de1953c200ab23d3a4a47c940e2fe65bcd0defe8849bbb896680ab0b543dccb85b563b283
data/CHANGELOG.md CHANGED
@@ -9,6 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
 
10
10
  ### Added
11
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
+
12
18
  - `--version` to CLI (#46)
13
19
 
14
20
  ## [2.1.0] - 2024-02-28
@@ -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.1"
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.1
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-03-26 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