いなた屋.Log

君がやることはすべて、君にしか出来ないことである。

本サイトの活動は終了しました。今後の活動は いなた屋.tumblr.com で行います。詳細

nanoc のアップデート実行

Created at 2013-05-31 Fri 07:31:53

昨日悩んでた nanoc のアップデート の続き。今日は本番だが、先に VirtualBox で試してみた。念のためだ。

gems のバージョンは本番環境と同じ。現在インストールされているのは以下のとおり。

inataya@mint13-32 ~ $ gem list

*** LOCAL GEMS ***

adsf (1.1.1)
colored (1.2)
cri (2.3.0)
haml (3.1.7)
kramdown (0.14.1)
nanoc (3.4.3)
rack (1.4.4)

新しいパッケージがあるか確認する。

inataya@mint13-32 ~ $ gem outdated
haml (3.1.7 < 4.0.3)
kramdown (0.14.1 < 1.0.2)
nanoc (3.4.3 < 3.6.4)
rack (1.4.4 < 1.5.2)

nanoc 以外にも新しいパッケージがある。ひとつずつアップデートしたほうが安全だが、テスト環境なので一気に上げてしまった。

少し長いが、出力をそのまま載せよう。ドキュメントでお送りしております。

inataya@mint13-32 ~ $ sudo gem update
Updating installed gems
Updating haml
Fetching: tilt-1.4.1.gem (100%)
Fetching: haml-4.0.3.gem (100%)

HEADS UP! Haml 4.0 has many improvements, but also has changes that may break
your application:

* Support for Ruby 1.8.6 dropped
* Support for Rails 2 dropped
* Sass filter now always outputs <style> tags
* Data attributes are now hyphenated, not underscored
* html2haml utility moved to the html2haml gem
* Textile and Maruku filters moved to the haml-contrib gem

For more info see:

http://rubydoc.info/github/haml/haml/file/CHANGELOG.md

Successfully installed tilt-1.4.1
Successfully installed haml-4.0.3
Updating kramdown
Fetching: kramdown-1.0.2.gem (100%)
Successfully installed kramdown-1.0.2
Updating nanoc
Fetching: nanoc-3.6.4.gem (100%)
Successfully installed nanoc-3.6.4
Updating rack
Fetching: rack-1.5.2.gem (100%)
Successfully installed rack-1.5.2
Gems updated: tilt, haml, kramdown, nanoc, rack
Installing ri documentation for tilt-1.4.1...
Installing ri documentation for haml-4.0.3...
Installing ri documentation for kramdown-1.0.2...
Installing ri documentation for nanoc-3.6.4...
Installing ri documentation for rack-1.5.2...
Installing RDoc documentation for tilt-1.4.1...
Installing RDoc documentation for haml-4.0.3...
Installing RDoc documentation for kramdown-1.0.2...
Installing RDoc documentation for nanoc-3.6.4...
Installing RDoc documentation for rack-1.5.2...

haml 関係の注意がたくさん出た。一言でいうと、「いろいろ改良したから今までのアプリケーションで不具合が起きるかもしれんよ」ってことだ。具体的な内容は以下のページが参考になります。

それ以外に注意するメッセージは特になし。問題ないとは言えないが、今の時点では判断できない感じ。動かして確かめるしかないね。

今回はテストだけど、データは本番と同じものを使いたい。Bitbucket でバージョン管理しているので、リポジトリのクローンを置いて試す。公開用のファイルは管理してないので、この時点で出力先ディレクトリ(output/)は存在しません。

inataya@mint13-32 ~ $ hg clone https://inataya@bitbucket.org/inataya/inataya.log
inataya@mint13-32 ~ $ cd inataya.log/
inataya@mint13-32 ~/inataya.log $ ls
Rules  config.yaml  content  layouts  lib  mirror-up.lftp

コンパイルしてみよう。

inataya@mint13-32 ~/inataya.log $ nanoc
Loading site data… done
Compiling site…
      create  [0.00s]  output/print.css
      create  [0.38s]  output/archive/index.html
      create  [0.00s]  output/images/42-0.png
      create  [0.00s]  output/images/qclose.png
      (中略…)
      create  [0.04s]  output/articles/10/index.html
      create  [0.04s]  output/articles/18/index.html
      create  [0.04s]  output/articles/25/index.html
      create  [0.04s]  output/404.html
      create  [0.00s]  output/styles.css
      create  [0.04s]  output/profile/index.html
      create  [0.04s]  output/archive/2013/05/index.html
      create  [0.04s]  output/archive/2013/04/index.html
      create  [0.04s]  output/archive/2013/03/index.html
      create  [0.04s]  output/archive/2013/02/index.html
      create  [0.04s]  output/archive/2013/01/index.html
      create  [0.04s]  output/index.html

Site compiled in 3.00s.
inataya@mint13-32 ~/inataya.log $ ls
Rules  config.yaml  content  layouts  lib  mirror-up.lftp  output  tmp

エラーは出なかった。プレビューでも確認したけど大丈夫そうだ。細かいところまで見てないけど、あとは問題に気付いたら考えよう。

ということでテストは終了。本番環境もアップデートしました。手順は同じだから省略。

comments powered by Disqus