restify 2.0.1 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (186) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/README.md +1 -1
  4. data/lib/restify/adapter/base.rb +1 -1
  5. data/lib/restify/cache.rb +1 -1
  6. data/lib/restify/relation.rb +7 -11
  7. data/lib/restify/response.rb +2 -2
  8. data/lib/restify/version.rb +2 -2
  9. data/spec/restify/adapter/base_spec.rb +33 -0
  10. data/spec/restify/context_spec.rb +2 -2
  11. data/spec/restify/features/opentelemetry_spec.rb +1 -1
  12. data/spec/restify/global_spec.rb +50 -1
  13. data/spec/restify/link_spec.rb +13 -3
  14. data/spec/restify/relation_spec.rb +79 -7
  15. data/spec/restify/resource_spec.rb +6 -0
  16. data/spec/restify_spec.rb +1 -1
  17. data/spec/spec_helper.rb +0 -1
  18. data/vendor/bundle/ruby/4.0.0/bundler/gems/my-rubocop-2b861962124a/LICENSE +21 -0
  19. data/vendor/bundle/ruby/4.0.0/bundler/gems/my-rubocop-2b861962124a/README.md +23 -0
  20. data/vendor/bundle/ruby/4.0.0/gems/activesupport-8.1.3/CHANGELOG.md +561 -0
  21. data/vendor/bundle/ruby/4.0.0/gems/activesupport-8.1.3/MIT-LICENSE +20 -0
  22. data/vendor/bundle/ruby/4.0.0/gems/activesupport-8.1.3/README.rdoc +40 -0
  23. data/vendor/bundle/ruby/4.0.0/gems/addressable-2.9.0/CHANGELOG.md +326 -0
  24. data/vendor/bundle/ruby/4.0.0/gems/addressable-2.9.0/LICENSE.txt +202 -0
  25. data/vendor/bundle/ruby/4.0.0/gems/addressable-2.9.0/README.md +121 -0
  26. data/vendor/bundle/ruby/4.0.0/gems/ast-2.4.3/LICENSE.MIT +20 -0
  27. data/vendor/bundle/ruby/4.0.0/gems/ast-2.4.3/README.YARD.md +12 -0
  28. data/vendor/bundle/ruby/4.0.0/gems/base64-0.3.0/README.md +48 -0
  29. data/vendor/bundle/ruby/4.0.0/gems/bigdecimal-4.1.2/LICENSE +56 -0
  30. data/vendor/bundle/ruby/4.0.0/gems/concurrent-ruby-1.3.7/CHANGELOG.md +615 -0
  31. data/vendor/bundle/ruby/4.0.0/gems/concurrent-ruby-1.3.7/LICENSE.txt +21 -0
  32. data/vendor/bundle/ruby/4.0.0/gems/concurrent-ruby-1.3.7/README.md +409 -0
  33. data/vendor/bundle/ruby/4.0.0/gems/connection_pool-3.0.2/LICENSE +20 -0
  34. data/vendor/bundle/ruby/4.0.0/gems/connection_pool-3.0.2/README.md +182 -0
  35. data/vendor/bundle/ruby/4.0.0/gems/crack-1.0.1/LICENSE +20 -0
  36. data/vendor/bundle/ruby/4.0.0/gems/crack-1.0.1/README.md +43 -0
  37. data/vendor/bundle/ruby/4.0.0/gems/diff-lcs-1.6.2/CHANGELOG.md +518 -0
  38. data/vendor/bundle/ruby/4.0.0/gems/diff-lcs-1.6.2/README.md +92 -0
  39. data/vendor/bundle/ruby/4.0.0/gems/docile-1.4.1/LICENSE +21 -0
  40. data/vendor/bundle/ruby/4.0.0/gems/docile-1.4.1/README.md +409 -0
  41. data/vendor/bundle/ruby/4.0.0/gems/drb-2.2.3/LICENSE.txt +22 -0
  42. data/vendor/bundle/ruby/4.0.0/gems/ethon-0.18.0/CHANGELOG.md +417 -0
  43. data/vendor/bundle/ruby/4.0.0/gems/ethon-0.18.0/LICENSE +20 -0
  44. data/vendor/bundle/ruby/4.0.0/gems/ethon-0.18.0/README.md +118 -0
  45. data/vendor/bundle/ruby/4.0.0/gems/ffi-1.17.4-x86_64-linux-gnu/CHANGELOG.md +507 -0
  46. data/vendor/bundle/ruby/4.0.0/gems/ffi-1.17.4-x86_64-linux-gnu/LICENSE +24 -0
  47. data/vendor/bundle/ruby/4.0.0/gems/ffi-1.17.4-x86_64-linux-gnu/LICENSE.SPECS +22 -0
  48. data/vendor/bundle/ruby/4.0.0/gems/ffi-1.17.4-x86_64-linux-gnu/README.md +138 -0
  49. data/vendor/bundle/ruby/4.0.0/gems/hashdiff-1.2.1/LICENSE +19 -0
  50. data/vendor/bundle/ruby/4.0.0/gems/hashdiff-1.2.1/README.md +323 -0
  51. data/vendor/bundle/ruby/4.0.0/gems/hashdiff-1.2.1/changelog.md +127 -0
  52. data/vendor/bundle/ruby/4.0.0/gems/hitimes-3.2.0/LICENSE.txt +16 -0
  53. data/vendor/bundle/ruby/4.0.0/gems/hitimes-3.2.0/README.md +187 -0
  54. data/vendor/bundle/ruby/4.0.0/gems/i18n-1.15.2/MIT-LICENSE +20 -0
  55. data/vendor/bundle/ruby/4.0.0/gems/i18n-1.15.2/README.md +139 -0
  56. data/vendor/bundle/ruby/4.0.0/gems/json-2.19.9/README.md +310 -0
  57. data/vendor/bundle/ruby/4.0.0/gems/language_server-protocol-3.17.0.5/LICENSE.txt +21 -0
  58. data/vendor/bundle/ruby/4.0.0/gems/language_server-protocol-3.17.0.5/README.md +88 -0
  59. data/vendor/bundle/ruby/4.0.0/gems/lint_roller-1.1.0/CHANGELOG.md +15 -0
  60. data/vendor/bundle/ruby/4.0.0/gems/lint_roller-1.1.0/LICENSE.txt +21 -0
  61. data/vendor/bundle/ruby/4.0.0/gems/lint_roller-1.1.0/README.md +173 -0
  62. data/vendor/bundle/ruby/4.0.0/gems/little-plugger-1.1.4/README.rdoc +53 -0
  63. data/vendor/bundle/ruby/4.0.0/gems/logger-1.7.0/README.md +104 -0
  64. data/vendor/bundle/ruby/4.0.0/gems/logging-2.4.0/LICENSE +22 -0
  65. data/vendor/bundle/ruby/4.0.0/gems/logging-2.4.0/README.md +140 -0
  66. data/vendor/bundle/ruby/4.0.0/gems/minitest-6.0.6/README.rdoc +763 -0
  67. data/vendor/bundle/ruby/4.0.0/gems/msgpack-1.8.3/ChangeLog +383 -0
  68. data/vendor/bundle/ruby/4.0.0/gems/msgpack-1.8.3/LICENSE +177 -0
  69. data/vendor/bundle/ruby/4.0.0/gems/msgpack-1.8.3/README.md +302 -0
  70. data/vendor/bundle/ruby/4.0.0/gems/multi_json-1.21.1/LICENSE.md +20 -0
  71. data/vendor/bundle/ruby/4.0.0/gems/multi_json-1.21.1/README.md +281 -0
  72. data/vendor/bundle/ruby/4.0.0/gems/nio4r-2.7.5/ext/libev/LICENSE +37 -0
  73. data/vendor/bundle/ruby/4.0.0/gems/nio4r-2.7.5/ext/libev/README +59 -0
  74. data/vendor/bundle/ruby/4.0.0/gems/nio4r-2.7.5/license.md +80 -0
  75. data/vendor/bundle/ruby/4.0.0/gems/nio4r-2.7.5/readme.md +91 -0
  76. data/vendor/bundle/ruby/4.0.0/gems/opentelemetry-api-1.10.0/CHANGELOG.md +219 -0
  77. data/vendor/bundle/ruby/4.0.0/gems/opentelemetry-api-1.10.0/LICENSE +201 -0
  78. data/vendor/bundle/ruby/4.0.0/gems/opentelemetry-api-1.10.0/README.md +68 -0
  79. data/vendor/bundle/ruby/4.0.0/gems/opentelemetry-common-0.25.0/CHANGELOG.md +110 -0
  80. data/vendor/bundle/ruby/4.0.0/gems/opentelemetry-common-0.25.0/LICENSE +201 -0
  81. data/vendor/bundle/ruby/4.0.0/gems/opentelemetry-common-0.25.0/README.md +62 -0
  82. data/vendor/bundle/ruby/4.0.0/gems/opentelemetry-instrumentation-base-0.26.1/CHANGELOG.md +97 -0
  83. data/vendor/bundle/ruby/4.0.0/gems/opentelemetry-instrumentation-base-0.26.1/LICENSE +201 -0
  84. data/vendor/bundle/ruby/4.0.0/gems/opentelemetry-instrumentation-base-0.26.1/README.md +155 -0
  85. data/vendor/bundle/ruby/4.0.0/gems/opentelemetry-instrumentation-ethon-0.29.0/CHANGELOG.md +192 -0
  86. data/vendor/bundle/ruby/4.0.0/gems/opentelemetry-instrumentation-ethon-0.29.0/LICENSE +201 -0
  87. data/vendor/bundle/ruby/4.0.0/gems/opentelemetry-instrumentation-ethon-0.29.0/README.md +66 -0
  88. data/vendor/bundle/ruby/4.0.0/gems/opentelemetry-registry-0.6.0/CHANGELOG.md +31 -0
  89. data/vendor/bundle/ruby/4.0.0/gems/opentelemetry-registry-0.6.0/LICENSE +201 -0
  90. data/vendor/bundle/ruby/4.0.0/gems/opentelemetry-registry-0.6.0/README.md +40 -0
  91. data/vendor/bundle/ruby/4.0.0/gems/opentelemetry-sdk-1.12.0/CHANGELOG.md +302 -0
  92. data/vendor/bundle/ruby/4.0.0/gems/opentelemetry-sdk-1.12.0/LICENSE +201 -0
  93. data/vendor/bundle/ruby/4.0.0/gems/opentelemetry-sdk-1.12.0/README.md +101 -0
  94. data/vendor/bundle/ruby/4.0.0/gems/opentelemetry-semantic_conventions-1.41.0/CHANGELOG.md +65 -0
  95. data/vendor/bundle/ruby/4.0.0/gems/opentelemetry-semantic_conventions-1.41.0/LICENSE +201 -0
  96. data/vendor/bundle/ruby/4.0.0/gems/opentelemetry-semantic_conventions-1.41.0/README.md +115 -0
  97. data/vendor/bundle/ruby/4.0.0/gems/parallel-2.1.0/MIT-LICENSE.txt +20 -0
  98. data/vendor/bundle/ruby/4.0.0/gems/parser-3.3.11.1/LICENSE.txt +26 -0
  99. data/vendor/bundle/ruby/4.0.0/gems/prism-1.9.0/CHANGELOG.md +786 -0
  100. data/vendor/bundle/ruby/4.0.0/gems/prism-1.9.0/LICENSE.md +7 -0
  101. data/vendor/bundle/ruby/4.0.0/gems/prism-1.9.0/README.md +143 -0
  102. data/vendor/bundle/ruby/4.0.0/gems/public_suffix-7.0.5/CHANGELOG.md +649 -0
  103. data/vendor/bundle/ruby/4.0.0/gems/public_suffix-7.0.5/LICENSE.txt +22 -0
  104. data/vendor/bundle/ruby/4.0.0/gems/public_suffix-7.0.5/README.md +231 -0
  105. data/vendor/bundle/ruby/4.0.0/gems/puma-8.0.2/LICENSE +29 -0
  106. data/vendor/bundle/ruby/4.0.0/gems/puma-8.0.2/README.md +484 -0
  107. data/vendor/bundle/ruby/4.0.0/gems/puma-8.0.2/docs/jungle/README.md +9 -0
  108. data/vendor/bundle/ruby/4.0.0/gems/puma-8.0.2/docs/jungle/rc.d/README.md +74 -0
  109. data/vendor/bundle/ruby/4.0.0/gems/racc-1.8.1/ChangeLog +846 -0
  110. data/vendor/bundle/ruby/4.0.0/gems/racc-1.8.1/README.ja.rdoc +58 -0
  111. data/vendor/bundle/ruby/4.0.0/gems/racc-1.8.1/README.rdoc +60 -0
  112. data/vendor/bundle/ruby/4.0.0/gems/rack-3.2.6/CHANGELOG.md +1346 -0
  113. data/vendor/bundle/ruby/4.0.0/gems/rack-3.2.6/MIT-LICENSE +20 -0
  114. data/vendor/bundle/ruby/4.0.0/gems/rack-3.2.6/README.md +384 -0
  115. data/vendor/bundle/ruby/4.0.0/gems/rainbow-3.1.1/Changelog.md +101 -0
  116. data/vendor/bundle/ruby/4.0.0/gems/rainbow-3.1.1/LICENSE +20 -0
  117. data/vendor/bundle/ruby/4.0.0/gems/rainbow-3.1.1/README.markdown +227 -0
  118. data/vendor/bundle/ruby/4.0.0/gems/rake-13.4.2/MIT-LICENSE +21 -0
  119. data/vendor/bundle/ruby/4.0.0/gems/rake-13.4.2/README.rdoc +155 -0
  120. data/vendor/bundle/ruby/4.0.0/gems/rake-release-1.4.0/LICENSE +21 -0
  121. data/vendor/bundle/ruby/4.0.0/gems/rake-release-1.4.0/README.md +107 -0
  122. data/vendor/bundle/ruby/4.0.0/gems/regexp_parser-2.12.0/LICENSE +22 -0
  123. data/vendor/bundle/ruby/4.0.0/gems/rexml-3.4.4/LICENSE.txt +22 -0
  124. data/vendor/bundle/ruby/4.0.0/gems/rexml-3.4.4/README.md +57 -0
  125. data/vendor/bundle/ruby/4.0.0/gems/rspec-3.13.2/LICENSE.md +27 -0
  126. data/vendor/bundle/ruby/4.0.0/gems/rspec-3.13.2/README.md +47 -0
  127. data/vendor/bundle/ruby/4.0.0/gems/rspec-core-3.13.6/Changelog.md +2447 -0
  128. data/vendor/bundle/ruby/4.0.0/gems/rspec-core-3.13.6/LICENSE.md +26 -0
  129. data/vendor/bundle/ruby/4.0.0/gems/rspec-core-3.13.6/README.md +389 -0
  130. data/vendor/bundle/ruby/4.0.0/gems/rspec-expectations-3.13.5/Changelog.md +1366 -0
  131. data/vendor/bundle/ruby/4.0.0/gems/rspec-expectations-3.13.5/LICENSE.md +25 -0
  132. data/vendor/bundle/ruby/4.0.0/gems/rspec-expectations-3.13.5/README.md +326 -0
  133. data/vendor/bundle/ruby/4.0.0/gems/rspec-mocks-3.13.8/Changelog.md +1351 -0
  134. data/vendor/bundle/ruby/4.0.0/gems/rspec-mocks-3.13.8/LICENSE.md +25 -0
  135. data/vendor/bundle/ruby/4.0.0/gems/rspec-mocks-3.13.8/README.md +465 -0
  136. data/vendor/bundle/ruby/4.0.0/gems/rspec-support-3.13.7/Changelog.md +444 -0
  137. data/vendor/bundle/ruby/4.0.0/gems/rspec-support-3.13.7/LICENSE.md +23 -0
  138. data/vendor/bundle/ruby/4.0.0/gems/rspec-support-3.13.7/README.md +40 -0
  139. data/vendor/bundle/ruby/4.0.0/gems/rubocop-1.88.0/LICENSE.txt +20 -0
  140. data/vendor/bundle/ruby/4.0.0/gems/rubocop-1.88.0/README.md +255 -0
  141. data/vendor/bundle/ruby/4.0.0/gems/rubocop-ast-1.49.1/LICENSE.txt +20 -0
  142. data/vendor/bundle/ruby/4.0.0/gems/rubocop-ast-1.49.1/README.md +54 -0
  143. data/vendor/bundle/ruby/4.0.0/gems/rubocop-capybara-2.23.0/CHANGELOG.md +116 -0
  144. data/vendor/bundle/ruby/4.0.0/gems/rubocop-capybara-2.23.0/MIT-LICENSE.md +21 -0
  145. data/vendor/bundle/ruby/4.0.0/gems/rubocop-capybara-2.23.0/README.md +91 -0
  146. data/vendor/bundle/ruby/4.0.0/gems/rubocop-factory_bot-2.28.0/CHANGELOG.md +135 -0
  147. data/vendor/bundle/ruby/4.0.0/gems/rubocop-factory_bot-2.28.0/MIT-LICENSE.md +21 -0
  148. data/vendor/bundle/ruby/4.0.0/gems/rubocop-factory_bot-2.28.0/README.md +91 -0
  149. data/vendor/bundle/ruby/4.0.0/gems/rubocop-performance-1.26.1/LICENSE.txt +20 -0
  150. data/vendor/bundle/ruby/4.0.0/gems/rubocop-performance-1.26.1/README.md +100 -0
  151. data/vendor/bundle/ruby/4.0.0/gems/rubocop-rspec-3.10.2/CHANGELOG.md +1136 -0
  152. data/vendor/bundle/ruby/4.0.0/gems/rubocop-rspec-3.10.2/MIT-LICENSE.md +21 -0
  153. data/vendor/bundle/ruby/4.0.0/gems/rubocop-rspec-3.10.2/README.md +112 -0
  154. data/vendor/bundle/ruby/4.0.0/gems/rubocop-rspec_rails-2.32.0/CHANGELOG.md +98 -0
  155. data/vendor/bundle/ruby/4.0.0/gems/rubocop-rspec_rails-2.32.0/MIT-LICENSE.md +21 -0
  156. data/vendor/bundle/ruby/4.0.0/gems/rubocop-rspec_rails-2.32.0/README.md +93 -0
  157. data/vendor/bundle/ruby/4.0.0/gems/ruby-progressbar-1.13.0/LICENSE.txt +19 -0
  158. data/vendor/bundle/ruby/4.0.0/gems/ruby-progressbar-1.13.0/README.md +131 -0
  159. data/vendor/bundle/ruby/4.0.0/gems/securerandom-0.4.1/README.md +72 -0
  160. data/vendor/bundle/ruby/4.0.0/gems/simplecov-0.22.0/CHANGELOG.md +191 -0
  161. data/vendor/bundle/ruby/4.0.0/gems/simplecov-0.22.0/LICENSE +20 -0
  162. data/vendor/bundle/ruby/4.0.0/gems/simplecov-0.22.0/README.md +974 -0
  163. data/vendor/bundle/ruby/4.0.0/gems/simplecov-cobertura-3.2.0/LICENSE +202 -0
  164. data/vendor/bundle/ruby/4.0.0/gems/simplecov-cobertura-3.2.0/README.md +65 -0
  165. data/vendor/bundle/ruby/4.0.0/gems/simplecov-html-0.13.2/CHANGELOG.md +114 -0
  166. data/vendor/bundle/ruby/4.0.0/gems/simplecov-html-0.13.2/LICENSE +20 -0
  167. data/vendor/bundle/ruby/4.0.0/gems/simplecov-html-0.13.2/README.md +30 -0
  168. data/vendor/bundle/ruby/4.0.0/gems/simplecov_json_formatter-0.1.4/CHANGELOG.md +13 -0
  169. data/vendor/bundle/ruby/4.0.0/gems/simplecov_json_formatter-0.1.4/README.md +29 -0
  170. data/vendor/bundle/ruby/4.0.0/gems/typhoeus-1.6.0/CHANGELOG.md +465 -0
  171. data/vendor/bundle/ruby/4.0.0/gems/typhoeus-1.6.0/LICENSE +22 -0
  172. data/vendor/bundle/ruby/4.0.0/gems/typhoeus-1.6.0/README.md +588 -0
  173. data/vendor/bundle/ruby/4.0.0/gems/tzinfo-2.0.6/LICENSE +19 -0
  174. data/vendor/bundle/ruby/4.0.0/gems/tzinfo-2.0.6/README.md +406 -0
  175. data/vendor/bundle/ruby/4.0.0/gems/unicode-display_width-3.2.0/CHANGELOG.md +299 -0
  176. data/vendor/bundle/ruby/4.0.0/gems/unicode-display_width-3.2.0/MIT-LICENSE.txt +22 -0
  177. data/vendor/bundle/ruby/4.0.0/gems/unicode-display_width-3.2.0/README.md +194 -0
  178. data/vendor/bundle/ruby/4.0.0/gems/unicode-emoji-4.2.0/CHANGELOG.md +202 -0
  179. data/vendor/bundle/ruby/4.0.0/gems/unicode-emoji-4.2.0/MIT-LICENSE.txt +20 -0
  180. data/vendor/bundle/ruby/4.0.0/gems/unicode-emoji-4.2.0/README.md +205 -0
  181. data/vendor/bundle/ruby/4.0.0/gems/uri-1.1.1/README.md +55 -0
  182. data/vendor/bundle/ruby/4.0.0/gems/webmock-3.26.2/CHANGELOG.md +2148 -0
  183. data/vendor/bundle/ruby/4.0.0/gems/webmock-3.26.2/LICENSE +20 -0
  184. data/vendor/bundle/ruby/4.0.0/gems/webmock-3.26.2/README.md +1229 -0
  185. metadata +171 -4
  186. data/doc/file.README.html +0 -192
@@ -0,0 +1,227 @@
1
+ # Rainbow
2
+
3
+ [![Gem Version](https://badge.fury.io/rb/rainbow.svg)](https://rubygems.org/gems/rainbow)
4
+ [![Build Status](https://travis-ci.org/sickill/rainbow.svg?branch=master)](https://travis-ci.org/sickill/rainbow)
5
+ [![Build status](https://ci.appveyor.com/api/projects/status/vq4acb2c38642s5q?svg=true)](https://ci.appveyor.com/project/sickill/rainbow)
6
+ [![Code Climate](https://codeclimate.com/github/sickill/rainbow.svg)](https://codeclimate.com/github/sickill/rainbow)
7
+ [![Coverage Status](https://coveralls.io/repos/sickill/rainbow/badge.svg)](https://coveralls.io/r/sickill/rainbow)
8
+
9
+ Rainbow is a ruby gem for colorizing printed text on ANSI terminals.
10
+
11
+ It provides a string presenter object, which adds several methods to your
12
+ strings for wrapping them in [ANSI escape
13
+ codes](http://en.wikipedia.org/wiki/ANSI_escape_code). These codes when printed
14
+ in a terminal change text attributes like text color, background color,
15
+ intensity etc.
16
+
17
+ ## Usage
18
+
19
+ To make your string colored wrap it with `Rainbow()` presenter and call
20
+ `.color(<color name>)` on it.
21
+
22
+ ### Example
23
+
24
+ ```ruby
25
+ require 'rainbow'
26
+
27
+ puts Rainbow("this is red").red + " and " + Rainbow("this on yellow bg").bg(:yellow) + " and " + Rainbow("even bright underlined!").underline.bright
28
+
29
+ # => "\e[31mthis is red\e[0m and \e[43mthis on yellow bg\e[0m and \e[4m\e[1meven bright underlined!\e[0m"
30
+ ```
31
+
32
+ ![Screenshot of the previous code in a terminal](https://user-images.githubusercontent.com/132/132943811-93747cc5-bdaf-43a2-a1a4-a1f18e805eba.png)
33
+
34
+ Or, [watch this video example](https://asciinema.org/a/J928KpHoUQ0sl54ulOSOLE71E?rows=20&speed=2.5)
35
+
36
+ ### Rainbow presenter API
37
+
38
+ Rainbow presenter adds the following methods to presented string:
39
+
40
+ * `color(c)` (with `foreground`, and `fg` aliases)
41
+ * `background(c)` (with `bg` alias)
42
+ * `bright`
43
+ * `underline`
44
+ * `blink`
45
+ * `inverse`
46
+ * `hide`
47
+ * `faint` (not well supported by terminal emulators)
48
+ * `italic` (not well supported by terminal emulators)
49
+ * `cross_out`, `strike`
50
+
51
+ Text color can also be changed by calling a method named by a color:
52
+
53
+ * `black`
54
+ * `red`
55
+ * `green`
56
+ * `yellow`
57
+ * `blue`
58
+ * `magenta`
59
+ * `cyan`
60
+ * `white`
61
+ * `aqua`
62
+ * `silver`
63
+ * `aliceblue`
64
+ * `indianred`
65
+
66
+ All of the methods return `self` (the presenter object) so you can chain method
67
+ calls:
68
+
69
+ ```ruby
70
+ Rainbow("hola!").blue.bright.underline
71
+ ```
72
+
73
+ ### Refinement
74
+
75
+ If you want to use the Refinements version, you can:
76
+
77
+ ```ruby
78
+ require 'rainbow/refinement'
79
+ using Rainbow
80
+ puts "Hi!".green
81
+ ```
82
+
83
+ Here's an IRB session example:
84
+
85
+ ```
86
+ >> 'Hello, World!'.blue.bright.underline
87
+ NoMethodError: undefined method `blue' for "Hello, World!":String
88
+ (ripl):1:in `<main>'
89
+ >> using Rainbow
90
+ => main
91
+ >> 'Hello, World!'.blue.bright.underline
92
+ => "\e[34m\e[1m\e[4mHello, World!\e[0m"
93
+ ```
94
+
95
+ ### Color specification
96
+
97
+ Both `color` and `background` accept color specified in any
98
+ of the following ways:
99
+
100
+ * ANSI color number (where 0 is black, 1 is red, 2 is green and so on):
101
+ `Rainbow("hello").color(1)`
102
+
103
+ * [ANSI color](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors) name or [X11 color](https://en.wikipedia.org/wiki/X11_color_names) name as a symbol:
104
+ `Rainbow("hello").color(:yellow)`.
105
+ This can be simplified to `Rainbow("hello").yellow`
106
+
107
+ See [Color list](#user-content-color-list) for all available color names.
108
+ Note that ANSI colors can be changed in accordance with terminal setting.
109
+ But X11 color is just a syntax sugar for RGB triplet. So you always see what you specified.
110
+
111
+ * RGB triplet as separate values in the range 0-255:
112
+ `Rainbow("hello").color(115, 23, 98)`
113
+
114
+ * RGB triplet as a hex string:
115
+ `Rainbow("hello").color("FFC482")` or `Rainbow("hello").color("#FFC482")`
116
+
117
+ When you specify a color with a RGB triplet rainbow finds the nearest match
118
+ from 256 colors palette. Note that it requires a 256-colors capable terminal to
119
+ display correctly.
120
+
121
+ #### Example: Choose a random color
122
+
123
+ You can pick a random color with Rainbow, it's a one-liner:
124
+
125
+ ```ruby
126
+ colors = Range.new(0,7).to_a
127
+ "whoop dee doop".chars.map { |char| Rainbow(char).color(colors.sample) }.join
128
+ # => "\e[36mw\e[0m\e[37mh\e[0m\e[34mo\e[0m\e[34mo\e[0m\e[37mp\e[0m\e[34m \e[0m\e[36md\e[0m\e[33me\e[0m\e[34me\e[0m\e[37m \e[0m\e[32md\e[0m\e[35mo\e[0m\e[33mo\e[0m\e[36mp\e[0m"
129
+
130
+ colors = [:aliceblue, :antiquewhite, :aqua, :aquamarine, :azure, :beige, :bisque, :blanchedalmond, :blueviolet]
131
+ "whoop dee doop".chars.map { |char| Rainbow(char).color(colors.sample) }.join
132
+ # => "\e[38;5;135mw\e[0m\e[38;5;230mh\e[0m\e[38;5;231mo\e[0m\e[38;5;135mo\e[0m\e[38;5;231mp\e[0m\e[38;5;231m \e[0m\e[38;5;122md\e[0m\e[38;5;231me\e[0m\e[38;5;231me\e[0m\e[38;5;230m \e[0m\e[38;5;122md\e[0m\e[38;5;51mo\e[0m\e[38;5;51mo\e[0m\e[38;5;51mp\e[0m"
133
+ ```
134
+
135
+ ### Configuration
136
+
137
+ Rainbow can be enabled/disabled globally by setting:
138
+
139
+ ```ruby
140
+ Rainbow.enabled = true/false
141
+ ```
142
+
143
+ When disabled all the methods return an unmodified string
144
+ (`Rainbow("hello").red == "hello"`).
145
+
146
+ It's enabled by default, unless STDOUT/STDERR is not a TTY or a terminal is
147
+ dumb.
148
+
149
+ ### Advanced usage
150
+
151
+ `Rainbow()` and `Rainbow.enabled` operate on the global Rainbow wrapper
152
+ instance. If you would like to selectively enable/disable coloring in separate
153
+ parts of your application you can get a new Rainbow wrapper instance for each
154
+ of them and control the state of coloring during the runtime.
155
+
156
+ ```ruby
157
+ rainbow_one = Rainbow.new
158
+ rainbow_two = Rainbow.new
159
+
160
+ rainbow_one.enabled = false
161
+
162
+ Rainbow("hello").red # => "\e[31mhello\e[0m" ("hello" if not on TTY)
163
+ rainbow_one.wrap("hello").red # => "hello"
164
+ rainbow_two.wrap("hello").red # => "\e[31mhello\e[0m" ("hello" if not on TTY)
165
+ ```
166
+
167
+ By default each new instance inherits enabled/disabled state from the global
168
+ `Rainbow.enabled`.
169
+
170
+ This feature comes handy for example when you have multiple output formatters
171
+ in your application and some of them print to a terminal but others write to a
172
+ file. Normally rainbow would detect that STDIN/STDERR is a TTY and would
173
+ colorize all the strings, even the ones that go through file writing
174
+ formatters. You can easily solve that by disabling coloring for the Rainbow
175
+ instances that are used by formatters with file output.
176
+
177
+ ## Installation
178
+
179
+ Add it to your Gemfile:
180
+
181
+ ```ruby
182
+ gem 'rainbow'
183
+ ```
184
+
185
+ Or just install it via rubygems:
186
+
187
+ ```ruby
188
+ gem install rainbow
189
+ ```
190
+
191
+ ## Color list
192
+
193
+ ### ANSI colors
194
+
195
+ `black`, `red`, `green`, `yellow`, `blue`, `magenta`, `cyan`, `white`
196
+
197
+ ### X11 colors
198
+
199
+ `aliceblue`, `antiquewhite`, `aqua`, `aquamarine`, `azure`, `beige`, `bisque`,
200
+ `blanchedalmond`, `blueviolet`, `brown`, `burlywood`, `cadetblue`, `chartreuse`,
201
+ `chocolate`, `coral`, `cornflower`, `cornsilk`, `crimson`, `darkblue`,
202
+ `darkcyan`, `darkgoldenrod`, `darkgray`, `darkgreen`, `darkkhaki`,
203
+ `darkmagenta`, `darkolivegreen`, `darkorange`, `darkorchid`, `darkred`,
204
+ `darksalmon`, `darkseagreen`, `darkslateblue`, `darkslategray`, `darkturquoise`,
205
+ `darkviolet`, `deeppink`, `deepskyblue`, `dimgray`, `dodgerblue`, `firebrick`,
206
+ `floralwhite`, `forestgreen`, `fuchsia`, `gainsboro`, `ghostwhite`, `gold`,
207
+ `goldenrod`, `gray`, `greenyellow`, `honeydew`, `hotpink`, `indianred`,
208
+ `indigo`, `ivory`, `khaki`, `lavender`, `lavenderblush`, `lawngreen`,
209
+ `lemonchiffon`, `lightblue`, `lightcoral`, `lightcyan`, `lightgoldenrod`,
210
+ `lightgray`, `lightgreen`, `lightpink`, `lightsalmon`, `lightseagreen`,
211
+ `lightskyblue`, `lightslategray`, `lightsteelblue`, `lightyellow`, `lime`,
212
+ `limegreen`, `linen`, `maroon`, `mediumaquamarine`, `mediumblue`,
213
+ `mediumorchid`, `mediumpurple`, `mediumseagreen`, `mediumslateblue`,
214
+ `mediumspringgreen`, `mediumturquoise`, `mediumvioletred`, `midnightblue`,
215
+ `mintcream`, `mistyrose`, `moccasin`, `navajowhite`, `navyblue`, `oldlace`,
216
+ `olive`, `olivedrab`, `orange`, `orangered`, `orchid`, `palegoldenrod`,
217
+ `palegreen`, `paleturquoise`, `palevioletred`, `papayawhip`, `peachpuff`,
218
+ `peru`, `pink`, `plum`, `powderblue`, `purple`, `rebeccapurple`, `rosybrown`,
219
+ `royalblue`, `saddlebrown`, `salmon`, `sandybrown`, `seagreen`, `seashell`,
220
+ `sienna`, `silver`, `skyblue`, `slateblue`, `slategray`, `snow`, `springgreen`,
221
+ `steelblue`, `tan`, `teal`, `thistle`, `tomato`, `turquoise`, `violet`,
222
+ `webgray`, `webgreen`, `webmaroon`, `webpurple`, `wheat`, `whitesmoke`,
223
+ `yellowgreen`
224
+
225
+ ## Authors
226
+
227
+ [Marcin Kulik](http://ku1ik.com/) and [great open-source contributors](https://github.com/sickill/rainbow/graphs/contributors).
@@ -0,0 +1,21 @@
1
+ Copyright (c) Jim Weirich
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
+
@@ -0,0 +1,155 @@
1
+ = RAKE -- Ruby Make
2
+
3
+ home :: https://github.com/ruby/rake
4
+ bugs :: https://github.com/ruby/rake/issues
5
+ docs :: https://ruby.github.io/rake
6
+
7
+ == Description
8
+
9
+ Rake is a Make-like program implemented in Ruby. Tasks and dependencies are
10
+ specified in standard Ruby syntax.
11
+
12
+ Rake has the following features:
13
+
14
+ * Rakefiles (rake's version of Makefiles) are completely defined in
15
+ standard Ruby syntax. No XML files to edit. No quirky Makefile
16
+ syntax to worry about (is that a tab or a space?)
17
+
18
+ * Users can specify tasks with prerequisites.
19
+
20
+ * Rake supports rule patterns to synthesize implicit tasks.
21
+
22
+ * Flexible FileLists that act like arrays but know about manipulating
23
+ file names and paths.
24
+
25
+ * A library of prepackaged tasks to make building rakefiles easier. For example,
26
+ tasks for building tarballs. (Formerly
27
+ tasks for building RDoc, Gems, and publishing to FTP were included in rake but they're now
28
+ available in RDoc, RubyGems, and rake-contrib respectively.)
29
+
30
+ * Supports parallel execution of tasks.
31
+
32
+ == Installation
33
+
34
+ === Gem Installation
35
+
36
+ Download and install rake with the following.
37
+
38
+ gem install rake
39
+
40
+ == Usage
41
+
42
+ === Simple Example
43
+
44
+ First, you must write a "Rakefile" file which contains the build rules. Here's
45
+ a simple example:
46
+
47
+ task default: %w[test]
48
+
49
+ task :test do
50
+ ruby "test/unittest.rb"
51
+ end
52
+
53
+ This Rakefile has two tasks:
54
+
55
+ * A task named "test", which -- upon invocation -- will run a unit test file
56
+ in Ruby.
57
+ * A task named "default". This task does nothing by itself, but it has exactly
58
+ one dependency, namely the "test" task. Invoking the "default" task will
59
+ cause Rake to invoke the "test" task as well.
60
+
61
+ Running the "rake" command without any options will cause it to run the
62
+ "default" task in the Rakefile:
63
+
64
+ % ls
65
+ Rakefile test/
66
+ % rake
67
+ (in /home/some_user/Projects/rake)
68
+ ruby test/unittest.rb
69
+ ....unit test output here...
70
+
71
+ Type "rake --help" for all available options.
72
+
73
+ == Resources
74
+
75
+ === Rake Information
76
+
77
+ * {Rake command-line}[rdoc-ref:doc/command_line_usage.rdoc]
78
+ * {Writing Rakefiles}[rdoc-ref:doc/rakefile.rdoc]
79
+ * The original {Rake announcement}[rdoc-ref:doc/rational.rdoc]
80
+ * Rake {glossary}[rdoc-ref:doc/glossary.rdoc]
81
+
82
+ === Presentations and Articles about Rake
83
+
84
+ * Avdi Grimm's rake series:
85
+ 1. {Rake Basics}[https://avdi.codes/rake-part-1-basics/]
86
+ 2. {Rake File Lists}[https://avdi.codes/rake-part-2-file-lists-2/]
87
+ 3. {Rake Rules}[https://avdi.codes/rake-part-3-rules/]
88
+ 4. {Rake Pathmap}[https://avdi.codes/rake-part-4-pathmap/]
89
+ 5. {File Operations}[https://avdi.codes/rake-part-5-file-operations/]
90
+ 6. {Clean and Clobber}[https://avdi.codes/rake-part-6-clean-and-clobber/]
91
+ 7. {MultiTask}[https://avdi.codes/rake-part-7-multitask/]
92
+ * {Jim Weirich's 2003 RubyConf presentation}[https://web.archive.org/web/20140221123354/http://onestepback.org/articles/buildingwithrake/]
93
+ * Martin Fowler's article on Rake: https://martinfowler.com/articles/rake.html
94
+
95
+ == Other Make Re-envisionings ...
96
+
97
+ Rake is a late entry in the make replacement field. Here are links to
98
+ other projects with similar (and not so similar) goals.
99
+
100
+ * https://directory.fsf.org/wiki/Bras -- Bras, one of earliest
101
+ implementations of "make in a scripting language".
102
+ * http://www.a-a-p.org -- Make in Python
103
+ * https://ant.apache.org -- The Ant project
104
+ * https://search.cpan.org/search?query=PerlBuildSystem -- The Perl Build System
105
+ * https://www.rubydoc.info/gems/rant/0.5.7/frames -- Rant, another Ruby make tool.
106
+
107
+ == Credits
108
+
109
+ [<b>Jim Weirich</b>] Who originally created Rake.
110
+
111
+ [<b>Ryan Dlugosz</b>] For the initial conversation that sparked Rake.
112
+
113
+ [<b>Nobuyoshi Nakada <nobu@ruby-lang.org></b>] For the initial patch for rule support.
114
+
115
+ [<b>Tilman Sauerbeck <tilman@code-monkey.de></b>] For the recursive rule patch.
116
+
117
+ [<b>Eric Hodel</b>] For aid in maintaining rake.
118
+
119
+ [<b>Hiroshi SHIBATA</b>] Maintainer of Rake 10 and later
120
+
121
+ == License
122
+
123
+ Rake is available under an MIT-style license.
124
+
125
+ :include: MIT-LICENSE
126
+
127
+ ---
128
+
129
+ = Other stuff
130
+
131
+ Author:: Jim Weirich <jim.weirich@gmail.com>
132
+ Requires:: Ruby 2.0.0 or later
133
+ License:: Copyright Jim Weirich.
134
+ Released under an MIT-style license. See the MIT-LICENSE
135
+ file included in the distribution.
136
+
137
+ == Warranty
138
+
139
+ This software is provided "as is" and without any express or implied
140
+ warranties, including, without limitation, the implied warranties of
141
+ merchantability and fitness for a particular purpose.
142
+
143
+ == Historical
144
+
145
+ Rake was originally created by Jim Weirich, who unfortunately passed away in
146
+ February 2014. This repository was originally hosted at
147
+ {github.com/jimweirich/rake}[https://github.com/jimweirich/rake/], however
148
+ with his passing, has been moved to {ruby/rake}[https://github.com/ruby/rake].
149
+
150
+ You can view Jim's last commit here:
151
+ https://github.com/jimweirich/rake/commit/336559f28f55bce418e2ebcc0a57548dcbac4025
152
+
153
+ You can {read more about Jim}[https://en.wikipedia.org/wiki/Jim_Weirich] at Wikipedia.
154
+
155
+ Thank you for this great tool, Jim. We'll remember you.
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 Jan Graichen
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,107 @@
1
+ # Rake::Release
2
+
3
+ Customized fork for bundlers gem task helpers.
4
+
5
+ Automatically detects multiple gemspecs and protect from releasing code not matching git version tag.
6
+
7
+ ## Installation
8
+
9
+ Add this line to your Gemfile:
10
+
11
+ ```ruby
12
+ gem 'rake-release'
13
+ ```
14
+
15
+ ## Usage
16
+
17
+ Simply require in Rakefile:
18
+
19
+ ```ruby
20
+ require 'rake/release'
21
+ ```
22
+
23
+ Check with `rake -D`:
24
+
25
+ ```
26
+ rake build
27
+ Build rake-release-0.2.1.gem.gem into the pkg directory.
28
+
29
+ rake install
30
+ Build and install rake-release-0.2.1.gem into system gems.
31
+
32
+ rake install:local
33
+ Build and install rake-release-0.2.1.gem into system gems without network access.
34
+
35
+ rake release[remote]
36
+ Create and push tag v0.2.1, build gem and publish to rubygems.org.
37
+ ```
38
+
39
+ ### With multiple gemspecs
40
+
41
+ ```
42
+ > rake -T
43
+ rake lib-alpha:build # Build lib-alpha-0.6.0.gem.gem into the pkg directory
44
+ rake lib-alpha:install # Build and install lib-alpha-0.6.0.gem into system gems
45
+ rake lib-alpha:install:local # Build and install lib-alpha-0.6.0.gem into system gems without network access
46
+ rake lib-alpha:release[remote] # Create and push tag v0.6.0, build gem and publish to rubygems.org
47
+ rake lib-beta:build # Build lib-beta-0.8.0.gem.gem into the pkg directory
48
+ rake lib-beta:install # Build and install lib-beta-0.8.0.gem into system gems
49
+ rake lib-beta:install:local # Build and install lib-beta-0.8.0.gem into system gems without network access
50
+ rake lib-beta:release[remote] # Create and push tag v0.6.0, build gem and publish to rubygems.org
51
+ ```
52
+
53
+ ### With tag signing
54
+
55
+ Enable tag signing by manually loading the task:
56
+
57
+ ```ruby
58
+ require 'rake/release/task'
59
+
60
+ Rake::Release::Task.new do |spec|
61
+ spec.sign_tag = true
62
+ end
63
+ ```
64
+
65
+ Or with multiple gems:
66
+
67
+ ```ruby
68
+ require 'rake/release/task'
69
+
70
+ Rake::Release::Task.load_all do |spec|
71
+ spec.sign_tag = true
72
+ end
73
+ ```
74
+
75
+ ### Manually set namespace
76
+
77
+ ```ruby
78
+ require 'rake/release/task'
79
+
80
+ Rake::Release::Task.new do |spec|
81
+ spec.namespace = 'client'
82
+ end
83
+ ```
84
+
85
+ ```
86
+ > rake -T
87
+ rake client:build # Build rake-release-0.6.0.gem.gem into the pkg directory
88
+ rake client:install # Build and install rake-release-0.6.0.gem into system gems
89
+ rake client:install:local # Build and install rake-release-0.6.0.gem into system gems without network access
90
+ rake client:release[remote] # Create and push tag v0.6.0, build gem and publish to rubygems.org
91
+ ```
92
+
93
+ ### Set gem host and version tag
94
+
95
+ You can customize the task e.g. with a custom git tag or gem push host:
96
+
97
+ ```ruby
98
+ Rake::Release::Task.load_all do |spec|
99
+ spec.version_tag = "gem-v#{spec.version}"
100
+ spec.host = 'https://user:pass@gemhost/'
101
+ end
102
+
103
+ ```
104
+
105
+ # License
106
+
107
+ MIT
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2010, 2012-2025, Ammar Ali
2
+
3
+ Permission is hereby granted, free of charge, to any person
4
+ obtaining a copy of this software and associated documentation
5
+ files (the "Software"), to deal in the Software without
6
+ restriction, including without limitation the rights to use,
7
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the
9
+ Software is furnished to do so, subject to the following
10
+ conditions:
11
+
12
+ The above copyright notice and this permission notice shall be
13
+ included in all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
+ OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,22 @@
1
+ Copyright (C) 1993-2013 Yukihiro Matsumoto. All rights reserved.
2
+
3
+ Redistribution and use in source and binary forms, with or without
4
+ modification, are permitted provided that the following conditions
5
+ are met:
6
+ 1. Redistributions of source code must retain the above copyright
7
+ notice, this list of conditions and the following disclaimer.
8
+ 2. Redistributions in binary form must reproduce the above copyright
9
+ notice, this list of conditions and the following disclaimer in the
10
+ documentation and/or other materials provided with the distribution.
11
+
12
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
13
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
15
+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
16
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
22
+ SUCH DAMAGE.
@@ -0,0 +1,57 @@
1
+ # REXML
2
+
3
+ REXML was inspired by the Electric XML library for Java, which features an easy-to-use API, small size, and speed. Hopefully, REXML, designed with the same philosophy, has these same features. I've tried to keep the API as intuitive as possible, and have followed the Ruby methodology for method naming and code flow, rather than mirroring the Java API.
4
+
5
+ REXML supports both tree and stream document parsing. Stream parsing is faster (about 1.5 times as fast). However, with stream parsing, you don't get access to features such as XPath.
6
+
7
+ ## API
8
+
9
+ See the [API documentation](https://ruby.github.io/rexml/).
10
+
11
+ ## Usage
12
+
13
+ We'll start with parsing an XML document
14
+
15
+ ```ruby
16
+ require "rexml/document"
17
+ file = File.new( "mydoc.xml" )
18
+ doc = REXML::Document.new file
19
+ ```
20
+
21
+ Line 3 creates a new document and parses the supplied file. You can also do the following
22
+
23
+ ```ruby
24
+ require "rexml/document"
25
+ include REXML # so that we don't have to prefix everything with REXML::...
26
+ string = <<EOF
27
+ <mydoc>
28
+ <someelement attribute="nanoo">Text, text, text</someelement>
29
+ </mydoc>
30
+ EOF
31
+ doc = Document.new string
32
+ ```
33
+
34
+ So parsing a string is just as easy as parsing a file.
35
+
36
+ ## Support
37
+
38
+ REXML support follows the same maintenance cycle as Ruby releases, as shown on <https://www.ruby-lang.org/en/downloads/branches/>.
39
+
40
+ If you are running on an end-of-life Ruby, do not expect modern REXML releases to be compatible with it; in fact, it's recommended that you DO NOT use this gem, and instead use the REXML version that came bundled with your end-of-life Ruby version.
41
+
42
+ The `required_ruby_version` on the gemspec is kept updated on a [best-effort basis](https://github.com/ruby/rexml/pull/70) by the community.
43
+ Up to version 3.2.5, this information was not set. That version [is known broken with at least Ruby < 2.3](https://github.com/ruby/rexml/issues/69).
44
+
45
+ ## Development
46
+
47
+ After checking out the repo, run `rake test` to run the tests.
48
+
49
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
50
+
51
+ ## Contributing
52
+
53
+ Bug reports and pull requests are welcome on GitHub at https://github.com/ruby/rexml.
54
+
55
+ ## License
56
+
57
+ The gem is available as open source under the terms of the [BSD-2-Clause](LICENSE.txt).
@@ -0,0 +1,27 @@
1
+ The MIT License (MIT)
2
+ =====================
3
+
4
+ Copyright © 2009 Chad Humphries, David Chelimsky
5
+ Copyright © 2006 David Chelimsky, The RSpec Development Team
6
+ Copyright © 2005 Steven Baker
7
+
8
+ Permission is hereby granted, free of charge, to any person
9
+ obtaining a copy of this software and associated documentation
10
+ files (the “Software”), to deal in the Software without
11
+ restriction, including without limitation the rights to use,
12
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ copies of the Software, and to permit persons to whom the
14
+ Software is furnished to do so, subject to the following
15
+ conditions:
16
+
17
+ The above copyright notice and this permission notice shall be
18
+ included in all copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
21
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27
+ OTHER DEALINGS IN THE SOFTWARE.