Skip to content

Commit d06b10f

Browse files
authored
Merge pull request #361 from olleolleolle/patch-1
2 parents d12b10f + d73128a commit d06b10f

File tree

1 file changed

+21
-12
lines changed

1 file changed

+21
-12
lines changed

README.md

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,24 @@ and typical short strings only require an extra byte in addition to the strings
88
If you ever wished to use JSON for convenience (storing an image with metadata) but could
99
not for technical reasons (binary data, size, speed...), MessagePack is a perfect replacement.
1010

11-
require 'msgpack'
12-
msg = [1,2,3].to_msgpack #=> "\x93\x01\x02\x03"
13-
MessagePack.unpack(msg) #=> [1,2,3]
11+
```ruby
12+
require 'msgpack'
13+
msg = [1,2,3].to_msgpack #=> "\x93\x01\x02\x03"
14+
MessagePack.unpack(msg) #=> [1,2,3]
15+
```
16+
17+
Add msgpack to your Gemfile to install with Bundler:
18+
19+
```ruby
20+
# Gemfile
21+
gem 'msgpack'
22+
```
1423

15-
Use RubyGems to install:
24+
Or, use RubyGems to install:
1625

1726
gem install msgpack
1827

19-
or build msgpack-ruby and install:
28+
Or, build msgpack-ruby and install from a checked-out msgpack-ruby repository:
2029

2130
bundle
2231
rake
@@ -27,11 +36,11 @@ or build msgpack-ruby and install:
2736

2837
* Create REST API returing MessagePack using Rails + [RABL](https://github.com/nesquena/rabl)
2938
* Store objects efficiently serialized by msgpack on memcached or Redis
30-
* In fact Redis supports msgpack in [EVAL-scripts](http://redis.io/commands/eval)
39+
* In fact Redis supports msgpack in [EVAL-scripts](https://redis.io/docs/latest/commands/eval/)
3140
* Upload data in efficient format from mobile devices such as smartphones
3241
* MessagePack works on iPhone/iPad and Android. See also [Objective-C](https://github.com/msgpack/msgpack-objectivec) and [Java](https://github.com/msgpack/msgpack-java) implementations
3342
* Design a portable protocol to communicate with embedded devices
34-
* Check also [Fluentd](http://fluentd.org/) which is a log collector which uses msgpack for the log format (they say it uses JSON but actually it's msgpack, which is compatible with JSON)
43+
* Check also [Fluentd](https://www.fluentd.org) which is a log collector which uses msgpack for the log format (they say it uses JSON but actually it's msgpack, which is compatible with JSON)
3544
* Exchange objects between software components written in different languages
3645
* You'll need a flexible but efficient format so that components exchange objects while keeping compatibility
3746

@@ -128,9 +137,9 @@ being serialized altogether by throwing an exception:
128137

129138
```ruby
130139
class Symbol
131-
def to_msgpack_ext
132-
raise "Serialization of symbols prohibited"
133-
end
140+
def to_msgpack_ext
141+
raise "Serialization of symbols prohibited"
142+
end
134143
end
135144

136145
MessagePack::DefaultFactory.register_type(0x00, Symbol)
@@ -276,8 +285,8 @@ If this directory has Gemfile.lock (generated with MRI), remove it beforehand.
276285

277286
## Updating documents
278287

279-
Online documents (http://ruby.msgpack.org) is generated from gh-pages branch.
280-
Following commands update documents in gh-pages branch:
288+
Online documentation (https://ruby.msgpack.org) is generated from the gh-pages branch.
289+
To update documents in gh-pages branch:
281290

282291
bundle exec rake doc
283292
git checkout gh-pages

0 commit comments

Comments
 (0)