/
HACKING
58 lines (40 loc) · 2.17 KB
/
HACKING
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
== [[HACKING]] HACKING
=== Prerequisites
Install Ruby libraries necessary for development using <<Bundler>>:
------------------------------------------------------------------------------
bundle install
------------------------------------------------------------------------------
=== Infrastructure
<<Inochi>> serves as the project infrastructure for Inochi. It
handles tasks such as building this help manual and API documentation, and
packaging, announcing, and publishing new releases. See its help manual and
list of tasks to get started:
------------------------------------------------------------------------------
bundle exec inochi --help # display help manual
bundle exec inochi --tasks # list available tasks
------------------------------------------------------------------------------
=== $LOAD_PATH setup
Ensure that the `lib/` directory is listed in Ruby's `$LOAD_PATH` before you
use any libraries therein or run any executables in the `bin/` directory.
This can be achieved by passing an option to Ruby:
------------------------------------------------------------------------------
bundle exec ruby -Ilib bin/inochi
bundle exec irb -Ilib -r inochi
------------------------------------------------------------------------------
Or by setting the `$RUBYLIB` environment variable:
------------------------------------------------------------------------------
env RUBYLIB=lib bundle exec ruby bin/inochi
env RUBYLIB=lib bundle exec irb -r inochi
------------------------------------------------------------------------------
=== Running tests
Simply execute the included test runner, which sets up Ruby's `$LOAD_PATH` for
testing, loads the included `test/test_helper.rb` file, and then evaluates all
`test/**/*_test.rb` files:
------------------------------------------------------------------------------
ruby test/runner
------------------------------------------------------------------------------
Its exit status will indicate whether all tests have passed. It may also
print additional pass/fail information depending on the testing library used
in the `test/test_helper.rb` file.
=== Contributing
<%= @code_repo_url %>[Fork this project on GitHub] and send a pull request.