discourse_theme 0.7.1 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +7 -9
- data/README.md +1 -1
- data/lib/discourse_theme/cli.rb +7 -4
- data/lib/discourse_theme/client.rb +4 -2
- data/lib/discourse_theme/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ffe67e68e2ee480c68cb8ce8031c9a09bfdd16025a01ba873eebca2228c821fe
|
4
|
+
data.tar.gz: 5094e13dc147c656a15b9b0d9ad790daf54c8f8ff2501f81f540cd0cfb2d95d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4afb46c9e254275d537990d9e91240aa4269def484c0c5be5db1963092643b5e2b24bef42bd5cd1ace7dd3d402b84fb36e6e98e2addc37d3eda281fbb32d9d54
|
7
|
+
data.tar.gz: 5894640522c7c3491a2fb7d7bab2dc55e334f70e445bd06198ae5628d748a87d99c1033f5df0b369ac29ad694f490752ded9ccc3208853c4fd107db40f1bc790
|
data/.github/workflows/ci.yml
CHANGED
@@ -4,7 +4,6 @@ on:
|
|
4
4
|
pull_request:
|
5
5
|
push:
|
6
6
|
branches:
|
7
|
-
- master
|
8
7
|
- main
|
9
8
|
|
10
9
|
jobs:
|
@@ -14,13 +13,12 @@ jobs:
|
|
14
13
|
strategy:
|
15
14
|
matrix:
|
16
15
|
ruby:
|
17
|
-
- 2.
|
18
|
-
-
|
19
|
-
-
|
20
|
-
- 3.0
|
16
|
+
- "2.7"
|
17
|
+
- "3.0"
|
18
|
+
- "3.1"
|
21
19
|
|
22
20
|
steps:
|
23
|
-
- uses: actions/checkout@
|
21
|
+
- uses: actions/checkout@v3
|
24
22
|
|
25
23
|
- name: Setup ruby
|
26
24
|
uses: ruby/setup-ruby@v1
|
@@ -35,15 +33,15 @@ jobs:
|
|
35
33
|
run: bundle exec rake test
|
36
34
|
|
37
35
|
publish:
|
38
|
-
if: github.event_name == 'push' &&
|
36
|
+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
39
37
|
needs: build
|
40
38
|
runs-on: ubuntu-latest
|
41
39
|
|
42
40
|
steps:
|
43
|
-
- uses: actions/checkout@
|
41
|
+
- uses: actions/checkout@v3
|
44
42
|
|
45
43
|
- name: Release Gem
|
46
|
-
uses: discourse/publish-rubygems-action@v2
|
44
|
+
uses: discourse/publish-rubygems-action@v2
|
47
45
|
env:
|
48
46
|
RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
|
49
47
|
GIT_EMAIL: team@discourse.org
|
data/README.md
CHANGED
@@ -46,4 +46,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
46
46
|
|
47
47
|
## Code of Conduct
|
48
48
|
|
49
|
-
Everyone interacting in the DiscourseTheme project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/
|
49
|
+
Everyone interacting in the DiscourseTheme project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/discourse/discourse_theme/blob/main/CODE_OF_CONDUCT.md).
|
data/lib/discourse_theme/cli.rb
CHANGED
@@ -80,14 +80,17 @@ module DiscourseTheme
|
|
80
80
|
settings.theme_id = theme_id = uploader.upload_full_theme
|
81
81
|
|
82
82
|
UI.success "Theme uploaded (id:#{theme_id})"
|
83
|
-
UI.info "Preview: #{client.
|
83
|
+
UI.info "Preview: #{client.url}/?preview_theme_id=#{theme_id}"
|
84
|
+
|
84
85
|
if client.is_theme_creator
|
85
|
-
UI.info "Manage: #{client.
|
86
|
+
UI.info "Manage: #{client.url}/my/themes"
|
86
87
|
else
|
87
|
-
UI.info "Manage: #{client.
|
88
|
+
UI.info "Manage: #{client.url}/admin/customize/themes/#{theme_id}"
|
88
89
|
end
|
89
|
-
watcher = DiscourseTheme::Watcher.new(dir: dir, uploader: uploader)
|
90
90
|
|
91
|
+
UI.info "Tests: #{client.url}/theme-qunit?id=#{theme_id}"
|
92
|
+
|
93
|
+
watcher = DiscourseTheme::Watcher.new(dir: dir, uploader: uploader)
|
91
94
|
UI.progress "Watching for changes in #{dir}..."
|
92
95
|
watcher.watch
|
93
96
|
elsif command == "download"
|
@@ -3,6 +3,8 @@ module DiscourseTheme
|
|
3
3
|
class Client
|
4
4
|
THEME_CREATOR_REGEX = /^https:\/\/(theme-creator\.discourse\.org|discourse\.theme-creator\.io)$/i
|
5
5
|
|
6
|
+
attr_reader :url
|
7
|
+
|
6
8
|
def initialize(dir, settings, reset:)
|
7
9
|
@reset = reset
|
8
10
|
@url = guess_url(settings)
|
@@ -19,7 +21,7 @@ module DiscourseTheme
|
|
19
21
|
end
|
20
22
|
end
|
21
23
|
|
22
|
-
# From https://github.com/discourse/discourse/blob/
|
24
|
+
# From https://github.com/discourse/discourse/blob/main/lib/version.rb
|
23
25
|
def self.has_needed_version?(current, needed)
|
24
26
|
current_split = current.split('.')
|
25
27
|
needed_split = needed.split('.')
|
@@ -105,7 +107,7 @@ module DiscourseTheme
|
|
105
107
|
end
|
106
108
|
|
107
109
|
def root
|
108
|
-
URI.parse(@url)
|
110
|
+
URI.parse(@url)
|
109
111
|
end
|
110
112
|
|
111
113
|
def is_theme_creator
|
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: 0.7.
|
4
|
+
version: 0.7.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: 2022-
|
11
|
+
date: 2022-07-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitar
|