Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webrickの存在チェック #1826

Merged
merged 1 commit into from
Jul 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion doc/quickstart.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,13 @@ review-init コマンドを使って、雛型となるプロジェクトフォ
$ review-init プロジェクト名
```

TeX を利用した PDF 作成を目的としているならば、雛型の作成時に、Web ブラウザによるウィザードモードで基本版面設計を行うことができます。これには `-w` オプションを付けます。
TeX を利用した PDF 作成を目的としているならば、雛型の作成時に、Web ブラウザによるウィザードモードで基本版面設計を行うことができます。外部 gem の webrick が必要なので、インストールしておいてください。

```
$ gem install webrick
```

ウィザードモードで起動するため、review-init コマンドに `-w` オプションを付けます。

```
$ review-init -w プロジェクト名
Expand Down
8 changes: 7 additions & 1 deletion doc/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,13 @@ $ ls hello
Rakefile catalog.yml config.yml hello.re images/ layouts/ sty/ style.css
```

If your purpose is to create a PDF using TeX, it is a good idea to use the wizard mode for basic layouting in a web browser. Add `-w` option to review-init.
If your purpose is to create a PDF using TeX, it is a good idea to use the wizard mode for basic layouting in a web browser. Because the wizard mode requires webrick library, please install webrick gem before running.

```
$ gem install webrick
```

Run review-init with `-w` option.

(notice: currently wizard UI supports only Japanese language)

Expand Down
9 changes: 7 additions & 2 deletions lib/review/init.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2018-2021 Masanori Kado, Masayoshi Takahashi, Kenshi Muto
# Copyright (c) 2018-2022 Masanori Kado, Masayoshi Takahashi, Kenshi Muto
#
# This program is free software.
# You can distribute or modify this program under the terms of
Expand Down Expand Up @@ -308,7 +308,12 @@ def extract_archive(dir, filename, originalfilename)
end

def start_webui
require 'webrick'
begin
require 'webrick'
rescue LoadError
@logger.error 'not found webrick. Please install webrick gem.'
exit 1
end
web_config = {
BindAddress: @bind,
Port: @port,
Expand Down
1 change: 1 addition & 0 deletions review.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,5 @@ Gem::Specification.new do |gem|
gem.add_development_dependency('simplecov')
gem.add_development_dependency('test-unit')
gem.add_development_dependency('unicode-eaw')
gem.add_development_dependency('webrick')
end