diff options
| author | dearblue <[email protected]> | 2021-05-05 19:01:57 +0900 |
|---|---|---|
| committer | dearblue <[email protected]> | 2021-05-05 22:16:03 +0900 |
| commit | 6fc5dc986a5ffc1a74c63ad0617ea1dcc10d3cdd (patch) | |
| tree | 86da312642d6093ebd28452e13c295a842ed118a /doc/guides/mrbgems.md | |
| parent | 35a6dfe905ec3cca51dabbcc8d17032c9f3a305c (diff) | |
| download | mruby-6fc5dc986a5ffc1a74c63ad0617ea1dcc10d3cdd.tar.gz mruby-6fc5dc986a5ffc1a74c63ad0617ea1dcc10d3cdd.zip | |
Extend the tab with 8 whitespace
This work was done as follows:
- check: `git grep $'\011' -- :^oss-fuzz`
- convert: `ruby -pi -e 'nil while $_.sub!(/^(.*?)\t/) { $1 + " " * (8 - $1.size % 8) }'`
The `doc/guide/{compile,mrbgems}.md` file adds and removes whitespace to make the directory tree look the same.
In `mrbgems/mruby-socket/src/socket.c`, there is a part where the indent is changed from 4 to 2 at the same time as the tab is changed.
Diffstat (limited to 'doc/guides/mrbgems.md')
| -rw-r--r-- | doc/guides/mrbgems.md | 144 |
1 files changed, 75 insertions, 69 deletions
diff --git a/doc/guides/mrbgems.md b/doc/guides/mrbgems.md index d4160ebc8..9aebb9208 100644 --- a/doc/guides/mrbgems.md +++ b/doc/guides/mrbgems.md @@ -111,21 +111,21 @@ contains every gem found in the `mrbgems` directory. The maximal GEM structure looks like this: ``` -+- GEM_NAME <- Name of GEM - | - +- README.md <- Readme for GEM - | - +- mrbgem.rake <- GEM Specification - | - +- include/ <- Header for Ruby extension (will exported) - | - +- mrblib/ <- Source for Ruby extension - | - +- src/ <- Source for C extension - | - +- tools/ <- Source for Executable (in C) - | - +- test/ <- Test code (Ruby) ++- GEM_NAME <- Name of GEM + | + +- README.md <- Readme for GEM + | + +- mrbgem.rake <- GEM Specification + | + +- include/ <- Header for Ruby extension (will exported) + | + +- mrblib/ <- Source for Ruby extension + | + +- src/ <- Source for C extension + | + +- tools/ <- Source for Executable (in C) + | + +- test/ <- Test code (Ruby) ``` The folder `mrblib` contains pure Ruby files to extend mruby. The folder `src` @@ -297,19 +297,21 @@ mrb_c_extension_example_gem_final(mrb_state* mrb) { ### Example - +- c_extension_example/ - | - +- README.md (Optional) - | - +- src/ - | | - | +- example.c <- C extension source - | - +- test/ - | | - | +- example.rb <- Test code for C extension - | - +- mrbgem.rake <- GEM specification +``` ++- c_extension_example/ + | + +- README.md (Optional) + | + +- src/ + | | + | +- example.c <- C extension source + | + +- test/ + | | + | +- example.rb <- Test code for C extension + | + +- mrbgem.rake <- GEM specification +``` ## Ruby Extension @@ -323,19 +325,21 @@ none ### Example - +- ruby_extension_example/ - | - +- README.md (Optional) - | - +- mrblib/ - | | - | +- example.rb <- Ruby extension source - | - +- test/ - | | - | +- example.rb <- Test code for Ruby extension - | - +- mrbgem.rake <- GEM specification +``` ++- ruby_extension_example/ + | + +- README.md (Optional) + | + +- mrblib/ + | | + | +- example.rb <- Ruby extension source + | + +- test/ + | | + | +- example.rb <- Test code for Ruby extension + | + +- mrbgem.rake <- GEM specification +``` ## C and Ruby Extension @@ -353,23 +357,25 @@ See C and Ruby example. ### Example - +- c_and_ruby_extension_example/ - | - +- README.md (Optional) - | - +- mrblib/ - | | - | +- example.rb <- Ruby extension source - | - +- src/ - | | - | +- example.c <- C extension source - | - +- test/ - | | - | +- example.rb <- Test code for C and Ruby extension - | - +- mrbgem.rake <- GEM specification +``` ++- c_and_ruby_extension_example/ + | + +- README.md (Optional) + | + +- mrblib/ + | | + | +- example.rb <- Ruby extension source + | + +- src/ + | | + | +- example.c <- C extension source + | + +- test/ + | | + | +- example.rb <- Test code for C and Ruby extension + | + +- mrbgem.rake <- GEM specification +``` ## Binary gems @@ -389,23 +395,23 @@ binary gems, to separate normal gems and binary gems. ### Example ``` - +- mruby-bin-example/ ++- mruby-bin-example/ | - +- README.md (Optional) + +- README.md (Optional) | +- bintest/ - | | - | +- example.rb <- Test code for binary gem + | | + | +- example.rb <- Test code for binary gem | - +- mrbgem.rake <- Gem specification + +- mrbgem.rake <- Gem specification | - +- mrblib/ <- Source for Ruby extension (Optional) + +- mrblib/ <- Source for Ruby extension (Optional) | - +- src/ <- Source for C extension (Optional) + +- src/ <- Source for C extension (Optional) | +- tools/ - | - +- example/ <- Executable name directory - | - +- example.c <- Source for Executable (includes main) + | + +- example/ <- Executable name directory + | + +- example.c <- Source for Executable (includes main) ``` |
