sanemat/tachikoma — pull request #7 by kyanny (2013-06-29 15:57:21+00:00)
Title: Bugfix: fix wrong `@data_path` resolution with path handling refactoring

I tried to use tachikoma as gem (described at https://github.com/sanemat/bot-motoko-tachikoma README) but faced an error due to wrong `@data_path` resolution.

runtime error log: https://gist.github.com/kyanny/5891618

I figured out why `No such file or directory` error was occured. Congifuration example section of README of https://github.com/sanemat/bot-motoko-tachikoma causes a misunderstanding.

```
# /Rakefile
namespace :tachikoma do
@default_timestamp_format = '%Y-%m-%d-%H-%M-%S%z'
end
```

Firstly I tried to assign new root path to `@root_path` but `@data_path` still points the directory owned by tachikoma gem, such as `/Users/kyanny/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/bundler/gems/tachikoma-9d915dd9ff77/data/`.

I have to assign both `@root_path` and `@data_path` but I felt it's boreing, so I refactored path resolution mechanism.

If this pull request is merged, I'm happy to send another pull request to https://github.com/sanemat/bot-motoko-tachikoma for adding more detailed configuration example to README.