Skip to content

Commit 576786e

Browse files
committed
Update readme about mruby version and file structure.
1 parent de765ae commit 576786e

1 file changed

Lines changed: 53 additions & 13 deletions

File tree

README.md

Lines changed: 53 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
This is a Ruby library for the GNU gettext PO files. This is a C
44
binding of the libgettextpo library, which is provided by the GNU
5-
gettext package. It is designed to promote Ruby's idiomatic coding
6-
style while avoiding memory leaks.
5+
gettext package. The API of this gem is designed to promote Ruby's
6+
idiomatic coding style while avoiding memory safety. Currently this
7+
supports both CRuby and mruby.
78

89
## Installation
910

@@ -23,17 +24,22 @@ apt search libgettextpo
2324
# process PO files - shared library
2425
```
2526

26-
Install the gem and add to the application's `Gemfile` by executing:
27+
For CRuby:
2728

28-
```bash
29-
bundle add gettextpo
30-
```
29+
* Install the gem and add to the application's `Gemfile` by executing:
3130

32-
If Bundler is not being used to manage dependencies, install the gem by executing:
31+
```bash
32+
bundle add gettextpo
33+
```
3334

34-
```bash
35-
gem install gettextpo
36-
```
35+
* If Bundler is not being used to manage dependencies, install the gem by executing:
36+
37+
```bash
38+
gem install gettextpo
39+
```
40+
41+
For mruby, modify `build_config.rb` as you like, set `MRUBY_SRC` to
42+
mruby source repository, and run `./bin/compile` or `./bin/test`.
3743

3844
## Usage
3945

@@ -56,14 +62,12 @@ end
5662
```
5763

5864
Please refer to the [API documentation][api] and test cases for
59-
details.
65+
details. The mruby version has same API.
6066

6167
[api]: https://gemmaro.github.io/ruby-gettextpo/
6268

6369
## Development
6470

65-
`./bin/debug` to debug when segmentation fault.
66-
6771
After checking out the repo, run `bin/setup` to install
6872
dependencies. Then, run `rake test` to run the tests. You can also run
6973
`bin/console` for an interactive prompt that will allow you to
@@ -75,6 +79,42 @@ install`. To release a new version, update the version number in
7579
create a git tag for the version, push git commits and the created
7680
tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
7781

82+
File structure:
83+
84+
```text
85+
bin : script ifles
86+
build_config.rb : for mruby
87+
* build_config.rb.lock
88+
CHANGELOG.md
89+
COPYING
90+
* doc : generated by RDoc from CRuby sources
91+
ext : for CRuby
92+
Gemfile : for CRuby
93+
gettextpo.gemspec : for CRuby
94+
include : for mruby
95+
lib : for CRuby
96+
mrbgem.rake : for mruby
97+
mrblib : for mruby
98+
* pkg : generated by RubyGem
99+
Rakefile : for CRuby
100+
README.md
101+
- sample.rb : for debug purpose especially with GDB
102+
sig : for CRuby
103+
src : for mruby
104+
test : common test cases for both CRuby and mruby
105+
test.cruby : CRuby specific tests
106+
* tmp
107+
- .env
108+
.env.example
109+
.envrc : Direnv config
110+
.clang-format
111+
.dir-locals.el : Emacs config
112+
.gitignore
113+
114+
* generated files
115+
- ignored by version control
116+
```
117+
78118
## Contributing
79119

80120
Bug reports and pull requests are welcome on [Disroot][disroot].

0 commit comments

Comments
 (0)