ionian 0.6.3 → 0.6.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +63 -0
  3. data/doc/Ionian/Extension/IO.html +1062 -599
  4. data/doc/Ionian/Extension/Socket.html +2140 -1314
  5. data/doc/Ionian/Extension.html +98 -70
  6. data/doc/Ionian/Server.html +577 -345
  7. data/doc/Ionian/Socket.html +1100 -612
  8. data/doc/Ionian.html +100 -70
  9. data/doc/_index.html +164 -0
  10. data/doc/class_list.html +54 -0
  11. data/doc/css/common.css +1 -0
  12. data/doc/css/full_list.css +57 -0
  13. data/doc/css/style.css +338 -0
  14. data/doc/file.README.html +133 -0
  15. data/doc/file.license.html +73 -0
  16. data/doc/file_list.html +59 -0
  17. data/doc/frames.html +26 -0
  18. data/doc/index.html +111 -71
  19. data/doc/js/app.js +219 -0
  20. data/doc/js/full_list.js +178 -0
  21. data/doc/js/jquery.js +4 -18
  22. data/doc/method_list.html +419 -0
  23. data/doc/top-level-namespace.html +112 -0
  24. data/lib/ionian/extension/io.rb +4 -2
  25. data/lib/ionian/socket.rb +1 -1
  26. data/license.txt +2 -0
  27. metadata +28 -54
  28. data/doc/created.rid +0 -6
  29. data/doc/fonts/Lato-Light.ttf +0 -0
  30. data/doc/fonts/Lato-LightItalic.ttf +0 -0
  31. data/doc/fonts/Lato-Regular.ttf +0 -0
  32. data/doc/fonts/Lato-RegularItalic.ttf +0 -0
  33. data/doc/fonts/SourceCodePro-Bold.ttf +0 -0
  34. data/doc/fonts/SourceCodePro-Regular.ttf +0 -0
  35. data/doc/fonts.css +0 -167
  36. data/doc/images/add.png +0 -0
  37. data/doc/images/arrow_up.png +0 -0
  38. data/doc/images/brick.png +0 -0
  39. data/doc/images/brick_link.png +0 -0
  40. data/doc/images/bug.png +0 -0
  41. data/doc/images/bullet_black.png +0 -0
  42. data/doc/images/bullet_toggle_minus.png +0 -0
  43. data/doc/images/bullet_toggle_plus.png +0 -0
  44. data/doc/images/date.png +0 -0
  45. data/doc/images/delete.png +0 -0
  46. data/doc/images/find.png +0 -0
  47. data/doc/images/loadingAnimation.gif +0 -0
  48. data/doc/images/macFFBgHack.png +0 -0
  49. data/doc/images/package.png +0 -0
  50. data/doc/images/page_green.png +0 -0
  51. data/doc/images/page_white_text.png +0 -0
  52. data/doc/images/page_white_width.png +0 -0
  53. data/doc/images/plugin.png +0 -0
  54. data/doc/images/ruby.png +0 -0
  55. data/doc/images/tag_blue.png +0 -0
  56. data/doc/images/tag_green.png +0 -0
  57. data/doc/images/transparent.png +0 -0
  58. data/doc/images/wrench.png +0 -0
  59. data/doc/images/wrench_orange.png +0 -0
  60. data/doc/images/zoom.png +0 -0
  61. data/doc/js/darkfish.js +0 -140
  62. data/doc/js/navigation.js +0 -142
  63. data/doc/js/search.js +0 -109
  64. data/doc/js/search_index.js +0 -1
  65. data/doc/js/searcher.js +0 -228
  66. data/doc/rdoc.css +0 -580
  67. data/doc/table_of_contents.html +0 -402
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a0202d93f529470e60e92b50e01f597ccab404c4
4
- data.tar.gz: 897b8ece8bff0033b42ef8c88644fb1b60e84ba2
3
+ metadata.gz: a88970a3a13a5af34bc6e86e58aadd8bc9e629be
4
+ data.tar.gz: e208410ce513ad567203e65175116709c7649878
5
5
  SHA512:
6
- metadata.gz: 09e1bd456fc049d6ef46df54f4e24712c53a31996a596ecf3f53d65653513099c867db157e463f1cb1e2ef8477fdc8c6ea29f041727133809013e68c92f6fbd8
7
- data.tar.gz: d0ae317598bf5c1f74759fc0cde0f5cd61b11faeaacf94390311347c759fd05044540b04a4a506191c36cbe13c9183bc19c6b8bfdf6de66062c55a2843102768
6
+ metadata.gz: 8a5886de7263e48d699a212e180d8d5199116e46a2c2ff70f64b0aea5b150ad11200ae2c09e1be7e357828a5d6993d4ad4e9bd8df1ac5bd4c8a6f02c13dace7d
7
+ data.tar.gz: 6991f614d839b36c2573ce77262f941bdc55c42c6cbb5422b2bd75b80e7b26d36f17e2673a6614fa8c7487d61512b2610555d30e0b1f08f4397472420f3594c7
data/README.md ADDED
@@ -0,0 +1,63 @@
1
+ # Ionian
2
+
3
+ [![Gem Version](https://badge.fury.io/rb/ionian.png)](http://badge.fury.io/rb/ionian)
4
+
5
+
6
+ A Ruby library to simplify interaction with IO streams. This includes network sockets, file sockets, and serial streams like the console and RS232. Features regular expression matching and notification of received data.
7
+
8
+
9
+ ## Supported Ruby Versions
10
+
11
+ - MRI >= 2.0.0
12
+
13
+
14
+ ## Installation
15
+
16
+ gem install ionian
17
+
18
+
19
+ ## Code Examples
20
+
21
+ ### Creating A Socket
22
+
23
+ ``` ruby
24
+ socket = Ionian::Socket.new host: '127.0.0.1', port: 23
25
+ ```
26
+
27
+ ### Sending And Receiving Data
28
+
29
+ ``` ruby
30
+ socket = Ionian::Socket.new host: 'google.com', port: 80
31
+ socket.write "GET / HTTP/1.1\r\n\r\n"
32
+ socket.read_match { |match| p match; puts '' }
33
+ ```
34
+
35
+ ### Match Expressions And Named Captures
36
+
37
+ ``` ruby
38
+ # A simple IRC client.
39
+
40
+ socket = Ionian::Socket.new \
41
+ host: 'chat.freenode.net',
42
+ port: 6667,
43
+ # Break up the matches into named captures so it's easier
44
+ # to sort through the server's responses.
45
+ expression: /:(?<server>.*?)\s*:(?<msg>.*?)[\r\n]+/
46
+
47
+ # Log on to IRC and send a message.
48
+ socket.write "NICK ionian-demo\r\nUSER ionian-demo ionian-demo chat.freenode.net :ionian-demo"
49
+ socket.write "PROTOCL NAMESX\r\n"
50
+ socket.write "JOIN #ionian-demo\r\n"
51
+ socket.write "PRIVMSG #ionian-demo :this is a test\r\n"
52
+
53
+
54
+ loop do
55
+ socket.read_match do |match|
56
+ # Print the body of the server's responses.
57
+ puts match.msg
58
+
59
+ # Exit when the server has caught up.
60
+ exit if match.msg.include? 'End of /NAMES list.'
61
+ end
62
+ end
63
+ ```