ric 0.12.0 → 0.12.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1206) hide show
  1. checksums.yaml +7 -0
  2. checksums.yaml.gz.sig +1 -0
  3. data.tar.gz.sig +2 -0
  4. data/Gemfile +0 -1
  5. data/HISTORY.yml +2 -0
  6. data/LICENSE +1 -1
  7. data/Makefile +12 -2
  8. data/Manifest +1189 -4
  9. data/Rakefile +16 -9
  10. data/VERSION +1 -1
  11. data/ric.gemspec +31 -27
  12. data/vendor/bundle/ruby/2.5.0/bin/allison +27 -0
  13. data/vendor/bundle/ruby/2.5.0/bin/rake +27 -0
  14. data/vendor/bundle/ruby/2.5.0/bin/rdoc +27 -0
  15. data/vendor/bundle/ruby/2.5.0/bin/ri +27 -0
  16. data/vendor/bundle/ruby/2.5.0/bin/rubyforge +27 -0
  17. data/vendor/bundle/ruby/2.5.0/cache/activemodel-5.2.3.gem +0 -0
  18. data/vendor/bundle/ruby/2.5.0/cache/activemodel-serializers-xml-1.0.2.gem +0 -0
  19. data/vendor/bundle/ruby/2.5.0/cache/activeresource-5.1.0.gem +0 -0
  20. data/vendor/bundle/ruby/2.5.0/cache/activesupport-5.2.3.gem +0 -0
  21. data/vendor/bundle/ruby/2.5.0/cache/allison-2.0.3.gem +0 -0
  22. data/vendor/bundle/ruby/2.5.0/cache/builder-3.2.3.gem +0 -0
  23. data/vendor/bundle/ruby/2.5.0/cache/concurrent-ruby-1.1.5.gem +0 -0
  24. data/vendor/bundle/ruby/2.5.0/cache/echoe-4.6.6.gem +0 -0
  25. data/vendor/bundle/ruby/2.5.0/cache/i18n-1.6.0.gem +0 -0
  26. data/vendor/bundle/ruby/2.5.0/cache/json_pure-2.2.0.gem +0 -0
  27. data/vendor/bundle/ruby/2.5.0/cache/minitest-5.11.3.gem +0 -0
  28. data/vendor/bundle/ruby/2.5.0/cache/rake-12.3.2.gem +0 -0
  29. data/vendor/bundle/ruby/2.5.0/cache/rdoc-6.1.1.gem +0 -0
  30. data/vendor/bundle/ruby/2.5.0/cache/rubyforge-2.0.4.gem +0 -0
  31. data/vendor/bundle/ruby/2.5.0/cache/thread_safe-0.3.6.gem +0 -0
  32. data/vendor/bundle/ruby/2.5.0/cache/tzinfo-1.2.5.gem +0 -0
  33. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/CHANGELOG.md +114 -0
  34. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/MIT-LICENSE +21 -0
  35. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/README.rdoc +264 -0
  36. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model.rb +77 -0
  37. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/attribute.rb +248 -0
  38. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/attribute/user_provided_default.rb +52 -0
  39. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/attribute_assignment.rb +57 -0
  40. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/attribute_methods.rb +478 -0
  41. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/attribute_mutation_tracker.rb +124 -0
  42. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/attribute_set.rb +114 -0
  43. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/attribute_set/builder.rb +126 -0
  44. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/attribute_set/yaml_encoder.rb +41 -0
  45. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/attributes.rb +111 -0
  46. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/callbacks.rb +153 -0
  47. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/conversion.rb +111 -0
  48. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/dirty.rb +343 -0
  49. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/errors.rb +517 -0
  50. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/forbidden_attributes_protection.rb +31 -0
  51. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/gem_version.rb +17 -0
  52. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/lint.rb +118 -0
  53. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/locale/en.yml +36 -0
  54. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/model.rb +99 -0
  55. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/naming.rb +318 -0
  56. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/railtie.rb +14 -0
  57. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/secure_password.rb +129 -0
  58. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/serialization.rb +192 -0
  59. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/serializers/json.rb +146 -0
  60. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/translation.rb +70 -0
  61. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/type.rb +53 -0
  62. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/type/big_integer.rb +15 -0
  63. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/type/binary.rb +52 -0
  64. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/type/boolean.rb +38 -0
  65. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/type/date.rb +57 -0
  66. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/type/date_time.rb +51 -0
  67. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/type/decimal.rb +70 -0
  68. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/type/float.rb +36 -0
  69. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/type/helpers.rb +7 -0
  70. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/type/helpers/accepts_multiparameter_time.rb +41 -0
  71. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/type/helpers/mutable.rb +20 -0
  72. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/type/helpers/numeric.rb +37 -0
  73. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/type/helpers/time_value.rb +68 -0
  74. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/type/helpers/timezone.rb +19 -0
  75. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/type/immutable_string.rb +32 -0
  76. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/type/integer.rb +70 -0
  77. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/type/registry.rb +70 -0
  78. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/type/string.rb +26 -0
  79. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/type/time.rb +51 -0
  80. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/type/value.rb +126 -0
  81. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/validations.rb +439 -0
  82. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/validations/absence.rb +33 -0
  83. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/validations/acceptance.rb +106 -0
  84. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/validations/callbacks.rb +122 -0
  85. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/validations/clusivity.rb +54 -0
  86. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/validations/confirmation.rb +80 -0
  87. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/validations/exclusion.rb +49 -0
  88. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/validations/format.rb +114 -0
  89. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/validations/helper_methods.rb +15 -0
  90. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/validations/inclusion.rb +47 -0
  91. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/validations/length.rb +129 -0
  92. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/validations/numericality.rb +189 -0
  93. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/validations/presence.rb +39 -0
  94. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/validations/validates.rb +174 -0
  95. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/validations/with.rb +147 -0
  96. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/validator.rb +183 -0
  97. data/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.3/lib/active_model/version.rb +10 -0
  98. data/vendor/bundle/ruby/2.5.0/gems/activemodel-serializers-xml-1.0.2/CONTRIBUTING.md +99 -0
  99. data/vendor/bundle/ruby/2.5.0/gems/activemodel-serializers-xml-1.0.2/Gemfile +4 -0
  100. data/vendor/bundle/ruby/2.5.0/gems/activemodel-serializers-xml-1.0.2/MIT-LICENSE +21 -0
  101. data/vendor/bundle/ruby/2.5.0/gems/activemodel-serializers-xml-1.0.2/README.md +89 -0
  102. data/vendor/bundle/ruby/2.5.0/gems/activemodel-serializers-xml-1.0.2/Rakefile +10 -0
  103. data/vendor/bundle/ruby/2.5.0/gems/activemodel-serializers-xml-1.0.2/activemodel-serializers-xml.gemspec +25 -0
  104. data/vendor/bundle/ruby/2.5.0/gems/activemodel-serializers-xml-1.0.2/lib/active_model/serializers.rb +23 -0
  105. data/vendor/bundle/ruby/2.5.0/gems/activemodel-serializers-xml-1.0.2/lib/active_model/serializers/version.rb +5 -0
  106. data/vendor/bundle/ruby/2.5.0/gems/activemodel-serializers-xml-1.0.2/lib/active_model/serializers/xml.rb +238 -0
  107. data/vendor/bundle/ruby/2.5.0/gems/activemodel-serializers-xml-1.0.2/lib/active_record/serializers/xml_serializer.rb +194 -0
  108. data/vendor/bundle/ruby/2.5.0/gems/activemodel-serializers-xml-1.0.2/lib/activemodel-serializers-xml.rb +1 -0
  109. data/vendor/bundle/ruby/2.5.0/gems/activeresource-5.1.0/MIT-LICENSE +20 -0
  110. data/vendor/bundle/ruby/2.5.0/gems/activeresource-5.1.0/README.rdoc +285 -0
  111. data/vendor/bundle/ruby/2.5.0/gems/activeresource-5.1.0/lib/active_resource.rb +46 -0
  112. data/vendor/bundle/ruby/2.5.0/gems/activeresource-5.1.0/lib/active_resource/active_job_serializer.rb +26 -0
  113. data/vendor/bundle/ruby/2.5.0/gems/activeresource-5.1.0/lib/active_resource/associations.rb +175 -0
  114. data/vendor/bundle/ruby/2.5.0/gems/activeresource-5.1.0/lib/active_resource/associations/builder/association.rb +33 -0
  115. data/vendor/bundle/ruby/2.5.0/gems/activeresource-5.1.0/lib/active_resource/associations/builder/belongs_to.rb +16 -0
  116. data/vendor/bundle/ruby/2.5.0/gems/activeresource-5.1.0/lib/active_resource/associations/builder/has_many.rb +14 -0
  117. data/vendor/bundle/ruby/2.5.0/gems/activeresource-5.1.0/lib/active_resource/associations/builder/has_one.rb +14 -0
  118. data/vendor/bundle/ruby/2.5.0/gems/activeresource-5.1.0/lib/active_resource/base.rb +1695 -0
  119. data/vendor/bundle/ruby/2.5.0/gems/activeresource-5.1.0/lib/active_resource/callbacks.rb +22 -0
  120. data/vendor/bundle/ruby/2.5.0/gems/activeresource-5.1.0/lib/active_resource/collection.rb +94 -0
  121. data/vendor/bundle/ruby/2.5.0/gems/activeresource-5.1.0/lib/active_resource/connection.rb +294 -0
  122. data/vendor/bundle/ruby/2.5.0/gems/activeresource-5.1.0/lib/active_resource/custom_methods.rb +129 -0
  123. data/vendor/bundle/ruby/2.5.0/gems/activeresource-5.1.0/lib/active_resource/exceptions.rb +84 -0
  124. data/vendor/bundle/ruby/2.5.0/gems/activeresource-5.1.0/lib/active_resource/formats.rb +24 -0
  125. data/vendor/bundle/ruby/2.5.0/gems/activeresource-5.1.0/lib/active_resource/formats/json_format.rb +28 -0
  126. data/vendor/bundle/ruby/2.5.0/gems/activeresource-5.1.0/lib/active_resource/formats/xml_format.rb +27 -0
  127. data/vendor/bundle/ruby/2.5.0/gems/activeresource-5.1.0/lib/active_resource/http_mock.rb +373 -0
  128. data/vendor/bundle/ruby/2.5.0/gems/activeresource-5.1.0/lib/active_resource/log_subscriber.rb +26 -0
  129. data/vendor/bundle/ruby/2.5.0/gems/activeresource-5.1.0/lib/active_resource/observing.rb +0 -0
  130. data/vendor/bundle/ruby/2.5.0/gems/activeresource-5.1.0/lib/active_resource/railtie.rb +25 -0
  131. data/vendor/bundle/ruby/2.5.0/gems/activeresource-5.1.0/lib/active_resource/reflection.rb +78 -0
  132. data/vendor/bundle/ruby/2.5.0/gems/activeresource-5.1.0/lib/active_resource/schema.rb +59 -0
  133. data/vendor/bundle/ruby/2.5.0/gems/activeresource-5.1.0/lib/active_resource/singleton.rb +113 -0
  134. data/vendor/bundle/ruby/2.5.0/gems/activeresource-5.1.0/lib/active_resource/threadsafe_attributes.rb +66 -0
  135. data/vendor/bundle/ruby/2.5.0/gems/activeresource-5.1.0/lib/active_resource/validations.rb +176 -0
  136. data/vendor/bundle/ruby/2.5.0/gems/activeresource-5.1.0/lib/active_resource/version.rb +12 -0
  137. data/vendor/bundle/ruby/2.5.0/gems/activeresource-5.1.0/lib/activeresource.rb +3 -0
  138. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/CHANGELOG.md +602 -0
  139. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/MIT-LICENSE +20 -0
  140. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/README.rdoc +39 -0
  141. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support.rb +95 -0
  142. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/all.rb +5 -0
  143. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/array_inquirer.rb +48 -0
  144. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/backtrace_cleaner.rb +105 -0
  145. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/benchmarkable.rb +51 -0
  146. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/builder.rb +8 -0
  147. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/cache.rb +808 -0
  148. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/cache/file_store.rb +196 -0
  149. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/cache/mem_cache_store.rb +207 -0
  150. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/cache/memory_store.rb +169 -0
  151. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/cache/null_store.rb +43 -0
  152. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/cache/redis_cache_store.rb +461 -0
  153. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/cache/strategy/local_cache.rb +194 -0
  154. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/cache/strategy/local_cache_middleware.rb +45 -0
  155. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/callbacks.rb +845 -0
  156. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/concern.rb +148 -0
  157. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb +17 -0
  158. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/concurrency/share_lock.rb +227 -0
  159. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/configurable.rb +150 -0
  160. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext.rb +5 -0
  161. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/array.rb +9 -0
  162. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/array/access.rb +92 -0
  163. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/array/conversions.rb +213 -0
  164. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/array/extract_options.rb +31 -0
  165. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/array/grouping.rb +109 -0
  166. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/array/inquiry.rb +19 -0
  167. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/array/prepend_and_append.rb +9 -0
  168. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/array/wrap.rb +48 -0
  169. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/benchmark.rb +16 -0
  170. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/big_decimal.rb +3 -0
  171. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/big_decimal/conversions.rb +14 -0
  172. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/class.rb +4 -0
  173. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/class/attribute.rb +146 -0
  174. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/class/attribute_accessors.rb +6 -0
  175. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/class/subclasses.rb +54 -0
  176. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/date.rb +7 -0
  177. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/date/acts_like.rb +10 -0
  178. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/date/blank.rb +14 -0
  179. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/date/calculations.rb +145 -0
  180. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/date/conversions.rb +96 -0
  181. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/date/zones.rb +8 -0
  182. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/date_and_time/calculations.rb +374 -0
  183. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/date_and_time/compatibility.rb +16 -0
  184. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/date_and_time/zones.rb +41 -0
  185. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/date_time.rb +7 -0
  186. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/date_time/acts_like.rb +16 -0
  187. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/date_time/blank.rb +14 -0
  188. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/date_time/calculations.rb +211 -0
  189. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/date_time/compatibility.rb +18 -0
  190. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/date_time/conversions.rb +107 -0
  191. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/digest/uuid.rb +53 -0
  192. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/enumerable.rb +164 -0
  193. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/file.rb +3 -0
  194. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/file/atomic.rb +70 -0
  195. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/hash.rb +11 -0
  196. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/hash/compact.rb +29 -0
  197. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/hash/conversions.rb +263 -0
  198. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/hash/deep_merge.rb +34 -0
  199. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/hash/except.rb +24 -0
  200. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/hash/indifferent_access.rb +24 -0
  201. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/hash/keys.rb +172 -0
  202. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/hash/reverse_merge.rb +25 -0
  203. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/hash/slice.rb +48 -0
  204. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/hash/transform_values.rb +32 -0
  205. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/integer.rb +5 -0
  206. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/integer/inflections.rb +31 -0
  207. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/integer/multiple.rb +12 -0
  208. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/integer/time.rb +22 -0
  209. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/kernel.rb +6 -0
  210. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/kernel/agnostics.rb +13 -0
  211. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/kernel/concern.rb +14 -0
  212. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/kernel/reporting.rb +45 -0
  213. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/kernel/singleton_class.rb +8 -0
  214. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/load_error.rb +9 -0
  215. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/marshal.rb +24 -0
  216. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/module.rb +14 -0
  217. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/module/aliasing.rb +31 -0
  218. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/module/anonymous.rb +30 -0
  219. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/module/attr_internal.rb +38 -0
  220. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/module/attribute_accessors.rb +215 -0
  221. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb +150 -0
  222. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/module/concerning.rb +134 -0
  223. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/module/delegation.rb +287 -0
  224. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/module/deprecation.rb +25 -0
  225. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/module/introspection.rb +62 -0
  226. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/module/reachable.rb +11 -0
  227. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/module/redefine_method.rb +49 -0
  228. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/module/remove_method.rb +17 -0
  229. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/name_error.rb +38 -0
  230. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/numeric.rb +6 -0
  231. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/numeric/bytes.rb +66 -0
  232. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/numeric/conversions.rb +140 -0
  233. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/numeric/inquiry.rb +28 -0
  234. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/numeric/time.rb +66 -0
  235. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/object.rb +16 -0
  236. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/object/acts_like.rb +21 -0
  237. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/object/blank.rb +156 -0
  238. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/object/conversions.rb +6 -0
  239. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/object/deep_dup.rb +55 -0
  240. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/object/duplicable.rb +156 -0
  241. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/object/inclusion.rb +29 -0
  242. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/object/instance_variables.rb +30 -0
  243. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/object/json.rb +227 -0
  244. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/object/to_param.rb +3 -0
  245. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/object/to_query.rb +89 -0
  246. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/object/try.rb +148 -0
  247. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/object/with_options.rb +82 -0
  248. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/range.rb +7 -0
  249. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/range/compare_range.rb +61 -0
  250. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/range/conversions.rb +39 -0
  251. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/range/each.rb +25 -0
  252. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/range/include_range.rb +3 -0
  253. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/range/include_time_with_zone.rb +23 -0
  254. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/range/overlaps.rb +10 -0
  255. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/regexp.rb +11 -0
  256. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/securerandom.rb +25 -0
  257. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/string.rb +15 -0
  258. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/string/access.rb +106 -0
  259. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/string/behavior.rb +8 -0
  260. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/string/conversions.rb +59 -0
  261. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/string/exclude.rb +13 -0
  262. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/string/filters.rb +104 -0
  263. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/string/indent.rb +45 -0
  264. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/string/inflections.rb +254 -0
  265. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/string/inquiry.rb +15 -0
  266. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/string/multibyte.rb +57 -0
  267. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/string/output_safety.rb +258 -0
  268. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/string/starts_ends_with.rb +6 -0
  269. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/string/strip.rb +25 -0
  270. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/string/zones.rb +16 -0
  271. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/time.rb +7 -0
  272. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/time/acts_like.rb +10 -0
  273. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/time/calculations.rb +315 -0
  274. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/time/compatibility.rb +16 -0
  275. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/time/conversions.rb +72 -0
  276. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/time/zones.rb +113 -0
  277. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/core_ext/uri.rb +24 -0
  278. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/current_attributes.rb +195 -0
  279. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb +753 -0
  280. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies/autoload.rb +79 -0
  281. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies/interlock.rb +57 -0
  282. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/deprecation.rb +46 -0
  283. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/deprecation/behaviors.rb +109 -0
  284. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/deprecation/constant_accessor.rb +52 -0
  285. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/deprecation/instance_delegator.rb +39 -0
  286. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/deprecation/method_wrappers.rb +90 -0
  287. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/deprecation/proxy_wrappers.rb +154 -0
  288. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/deprecation/reporting.rb +114 -0
  289. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/descendants_tracker.rb +62 -0
  290. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/digest.rb +20 -0
  291. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/duration.rb +432 -0
  292. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/duration/iso8601_parser.rb +125 -0
  293. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/duration/iso8601_serializer.rb +55 -0
  294. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/encrypted_configuration.rb +49 -0
  295. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/encrypted_file.rb +99 -0
  296. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/evented_file_update_checker.rb +205 -0
  297. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/execution_wrapper.rb +128 -0
  298. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/executor.rb +8 -0
  299. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/file_update_checker.rb +163 -0
  300. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/gem_version.rb +17 -0
  301. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/gzip.rb +38 -0
  302. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/hash_with_indifferent_access.rb +395 -0
  303. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/i18n.rb +15 -0
  304. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/i18n_railtie.rb +118 -0
  305. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/inflections.rb +72 -0
  306. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/inflector.rb +9 -0
  307. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/inflector/inflections.rb +260 -0
  308. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/inflector/methods.rb +410 -0
  309. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/inflector/transliterate.rb +118 -0
  310. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/json.rb +4 -0
  311. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/json/decoding.rb +76 -0
  312. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/json/encoding.rb +130 -0
  313. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/key_generator.rb +73 -0
  314. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/lazy_load_hooks.rb +78 -0
  315. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/locale/en.yml +135 -0
  316. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/log_subscriber.rb +112 -0
  317. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/log_subscriber/test_helper.rb +106 -0
  318. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/logger.rb +108 -0
  319. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/logger_silence.rb +29 -0
  320. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/logger_thread_safe_level.rb +33 -0
  321. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/message_encryptor.rb +229 -0
  322. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/message_verifier.rb +205 -0
  323. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/messages/metadata.rb +71 -0
  324. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/messages/rotation_configuration.rb +22 -0
  325. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/messages/rotator.rb +56 -0
  326. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/multibyte.rb +23 -0
  327. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/multibyte/chars.rb +235 -0
  328. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/multibyte/unicode.rb +394 -0
  329. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/notifications.rb +216 -0
  330. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/notifications/fanout.rb +159 -0
  331. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/notifications/instrumenter.rb +93 -0
  332. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/number_helper.rb +371 -0
  333. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/number_helper/number_converter.rb +184 -0
  334. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/number_helper/number_to_currency_converter.rb +46 -0
  335. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/number_helper/number_to_delimited_converter.rb +29 -0
  336. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/number_helper/number_to_human_converter.rb +68 -0
  337. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/number_helper/number_to_human_size_converter.rb +59 -0
  338. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/number_helper/number_to_percentage_converter.rb +14 -0
  339. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/number_helper/number_to_phone_converter.rb +58 -0
  340. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/number_helper/number_to_rounded_converter.rb +54 -0
  341. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/number_helper/rounding_helper.rb +66 -0
  342. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/option_merger.rb +27 -0
  343. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/ordered_hash.rb +50 -0
  344. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/ordered_options.rb +85 -0
  345. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/per_thread_registry.rb +60 -0
  346. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/proxy_object.rb +15 -0
  347. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/rails.rb +35 -0
  348. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/railtie.rb +80 -0
  349. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/reloader.rb +131 -0
  350. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/rescuable.rb +174 -0
  351. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/security_utils.rb +31 -0
  352. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/string_inquirer.rb +34 -0
  353. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/subscriber.rb +130 -0
  354. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/tagged_logging.rb +79 -0
  355. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/test_case.rb +72 -0
  356. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/testing/assertions.rb +214 -0
  357. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/testing/autorun.rb +7 -0
  358. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/testing/constant_lookup.rb +51 -0
  359. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/testing/declarative.rb +28 -0
  360. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/testing/deprecation.rb +39 -0
  361. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/testing/file_fixtures.rb +36 -0
  362. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/testing/isolation.rb +110 -0
  363. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/testing/method_call_assertions.rb +43 -0
  364. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/testing/setup_and_teardown.rb +55 -0
  365. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/testing/stream.rb +44 -0
  366. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/testing/tagged_logging.rb +27 -0
  367. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/testing/time_helpers.rb +200 -0
  368. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/time.rb +20 -0
  369. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/time_with_zone.rb +551 -0
  370. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/values/time_zone.rb +565 -0
  371. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/values/unicode_tables.dat +0 -0
  372. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/version.rb +10 -0
  373. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/xml_mini.rb +209 -0
  374. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/xml_mini/jdom.rb +183 -0
  375. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/xml_mini/libxml.rb +80 -0
  376. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/xml_mini/libxmlsax.rb +83 -0
  377. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/xml_mini/nokogiri.rb +83 -0
  378. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/xml_mini/nokogirisax.rb +86 -0
  379. data/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/xml_mini/rexml.rb +130 -0
  380. data/vendor/bundle/ruby/2.5.0/gems/allison-2.0.3/CHANGELOG +18 -0
  381. data/vendor/bundle/ruby/2.5.0/gems/allison-2.0.3/LICENSE +184 -0
  382. data/vendor/bundle/ruby/2.5.0/gems/allison-2.0.3/Manifest +24 -0
  383. data/vendor/bundle/ruby/2.5.0/gems/allison-2.0.3/README +67 -0
  384. data/vendor/bundle/ruby/2.5.0/gems/allison-2.0.3/allison.gemspec +48 -0
  385. data/vendor/bundle/ruby/2.5.0/gems/allison-2.0.3/bin/allison +9 -0
  386. data/vendor/bundle/ruby/2.5.0/gems/allison-2.0.3/cache/BODY +570 -0
  387. data/vendor/bundle/ruby/2.5.0/gems/allison-2.0.3/cache/CLASS_INDEX +4 -0
  388. data/vendor/bundle/ruby/2.5.0/gems/allison-2.0.3/cache/CLASS_PAGE +1 -0
  389. data/vendor/bundle/ruby/2.5.0/gems/allison-2.0.3/cache/FILE_INDEX +4 -0
  390. data/vendor/bundle/ruby/2.5.0/gems/allison-2.0.3/cache/FILE_PAGE +1 -0
  391. data/vendor/bundle/ruby/2.5.0/gems/allison-2.0.3/cache/FONTS +1 -0
  392. data/vendor/bundle/ruby/2.5.0/gems/allison-2.0.3/cache/FR_INDEX_BODY +1 -0
  393. data/vendor/bundle/ruby/2.5.0/gems/allison-2.0.3/cache/INDEX +1 -0
  394. data/vendor/bundle/ruby/2.5.0/gems/allison-2.0.3/cache/JAVASCRIPT +316 -0
  395. data/vendor/bundle/ruby/2.5.0/gems/allison-2.0.3/cache/METHOD_INDEX +4 -0
  396. data/vendor/bundle/ruby/2.5.0/gems/allison-2.0.3/cache/METHOD_LIST +1 -0
  397. data/vendor/bundle/ruby/2.5.0/gems/allison-2.0.3/cache/SRC_PAGE +1 -0
  398. data/vendor/bundle/ruby/2.5.0/gems/allison-2.0.3/cache/STYLE +320 -0
  399. data/vendor/bundle/ruby/2.5.0/gems/allison-2.0.3/contrib/Rakefile +147 -0
  400. data/vendor/bundle/ruby/2.5.0/gems/allison-2.0.3/contrib/rdoc_patch.rb +252 -0
  401. data/vendor/bundle/ruby/2.5.0/gems/allison-2.0.3/contrib/rdoc_patch_test.rb +95 -0
  402. data/vendor/bundle/ruby/2.5.0/gems/allison-2.0.3/lib/allison.css +314 -0
  403. data/vendor/bundle/ruby/2.5.0/gems/allison-2.0.3/lib/allison.js +316 -0
  404. data/vendor/bundle/ruby/2.5.0/gems/allison-2.0.3/lib/allison.rb +276 -0
  405. data/vendor/bundle/ruby/2.5.0/gems/builder-3.2.3/CHANGES +107 -0
  406. data/vendor/bundle/ruby/2.5.0/gems/builder-3.2.3/MIT-LICENSE +20 -0
  407. data/vendor/bundle/ruby/2.5.0/gems/builder-3.2.3/README.md +258 -0
  408. data/vendor/bundle/ruby/2.5.0/gems/builder-3.2.3/Rakefile +195 -0
  409. data/vendor/bundle/ruby/2.5.0/gems/builder-3.2.3/doc/jamis.rb +591 -0
  410. data/vendor/bundle/ruby/2.5.0/gems/builder-3.2.3/doc/releases/builder-1.2.4.rdoc +31 -0
  411. data/vendor/bundle/ruby/2.5.0/gems/builder-3.2.3/doc/releases/builder-2.0.0.rdoc +46 -0
  412. data/vendor/bundle/ruby/2.5.0/gems/builder-3.2.3/doc/releases/builder-2.1.1.rdoc +58 -0
  413. data/vendor/bundle/ruby/2.5.0/gems/builder-3.2.3/lib/blankslate.rb +137 -0
  414. data/vendor/bundle/ruby/2.5.0/gems/builder-3.2.3/lib/builder.rb +13 -0
  415. data/vendor/bundle/ruby/2.5.0/gems/builder-3.2.3/lib/builder/blankslate.rb +23 -0
  416. data/vendor/bundle/ruby/2.5.0/gems/builder-3.2.3/lib/builder/version.rb +8 -0
  417. data/vendor/bundle/ruby/2.5.0/gems/builder-3.2.3/lib/builder/xchar.rb +197 -0
  418. data/vendor/bundle/ruby/2.5.0/gems/builder-3.2.3/lib/builder/xmlbase.rb +199 -0
  419. data/vendor/bundle/ruby/2.5.0/gems/builder-3.2.3/lib/builder/xmlevents.rb +63 -0
  420. data/vendor/bundle/ruby/2.5.0/gems/builder-3.2.3/lib/builder/xmlmarkup.rb +339 -0
  421. data/vendor/bundle/ruby/2.5.0/gems/builder-3.2.3/rakelib/publish.rake +20 -0
  422. data/vendor/bundle/ruby/2.5.0/gems/builder-3.2.3/rakelib/tags.rake +62 -0
  423. data/vendor/bundle/ruby/2.5.0/gems/builder-3.2.3/rakelib/testing.rake +7 -0
  424. data/vendor/bundle/ruby/2.5.0/gems/builder-3.2.3/test/helper.rb +12 -0
  425. data/vendor/bundle/ruby/2.5.0/gems/builder-3.2.3/test/performance.rb +41 -0
  426. data/vendor/bundle/ruby/2.5.0/gems/builder-3.2.3/test/preload.rb +39 -0
  427. data/vendor/bundle/ruby/2.5.0/gems/builder-3.2.3/test/test_blankslate.rb +213 -0
  428. data/vendor/bundle/ruby/2.5.0/gems/builder-3.2.3/test/test_eventbuilder.rb +150 -0
  429. data/vendor/bundle/ruby/2.5.0/gems/builder-3.2.3/test/test_markupbuilder.rb +611 -0
  430. data/vendor/bundle/ruby/2.5.0/gems/builder-3.2.3/test/test_method_caching.rb +62 -0
  431. data/vendor/bundle/ruby/2.5.0/gems/builder-3.2.3/test/test_namecollision.rb +39 -0
  432. data/vendor/bundle/ruby/2.5.0/gems/builder-3.2.3/test/test_xchar.rb +78 -0
  433. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/CHANGELOG.md +478 -0
  434. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/Gemfile +41 -0
  435. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/LICENSE.md +23 -0
  436. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/README.md +381 -0
  437. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/Rakefile +327 -0
  438. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/ext/concurrent-ruby/ConcurrentRubyService.java +17 -0
  439. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/ext/concurrent-ruby/com/concurrent_ruby/ext/AtomicReferenceLibrary.java +175 -0
  440. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/ext/concurrent-ruby/com/concurrent_ruby/ext/JRubyMapBackendLibrary.java +248 -0
  441. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/ext/concurrent-ruby/com/concurrent_ruby/ext/JavaAtomicBooleanLibrary.java +93 -0
  442. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/ext/concurrent-ruby/com/concurrent_ruby/ext/JavaAtomicFixnumLibrary.java +113 -0
  443. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/ext/concurrent-ruby/com/concurrent_ruby/ext/JavaSemaphoreLibrary.java +159 -0
  444. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/ext/concurrent-ruby/com/concurrent_ruby/ext/SynchronizationLibrary.java +307 -0
  445. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/ext/concurrent-ruby/com/concurrent_ruby/ext/jsr166e/ConcurrentHashMap.java +31 -0
  446. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/ext/concurrent-ruby/com/concurrent_ruby/ext/jsr166e/ConcurrentHashMapV8.java +3863 -0
  447. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/ext/concurrent-ruby/com/concurrent_ruby/ext/jsr166e/LongAdder.java +203 -0
  448. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/ext/concurrent-ruby/com/concurrent_ruby/ext/jsr166e/Striped64.java +342 -0
  449. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/ext/concurrent-ruby/com/concurrent_ruby/ext/jsr166e/nounsafe/ConcurrentHashMapV8.java +3800 -0
  450. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/ext/concurrent-ruby/com/concurrent_ruby/ext/jsr166e/nounsafe/LongAdder.java +204 -0
  451. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/ext/concurrent-ruby/com/concurrent_ruby/ext/jsr166e/nounsafe/Striped64.java +291 -0
  452. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/ext/concurrent-ruby/com/concurrent_ruby/ext/jsr166y/ThreadLocalRandom.java +199 -0
  453. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent-ruby.rb +1 -0
  454. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent.rb +134 -0
  455. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/agent.rb +587 -0
  456. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/array.rb +66 -0
  457. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/async.rb +459 -0
  458. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atom.rb +222 -0
  459. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/abstract_thread_local_var.rb +66 -0
  460. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/atomic_boolean.rb +126 -0
  461. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/atomic_fixnum.rb +143 -0
  462. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/atomic_markable_reference.rb +164 -0
  463. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/atomic_reference.rb +204 -0
  464. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/count_down_latch.rb +100 -0
  465. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/cyclic_barrier.rb +128 -0
  466. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/event.rb +109 -0
  467. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/java_count_down_latch.rb +42 -0
  468. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/java_thread_local_var.rb +37 -0
  469. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/mutex_atomic_boolean.rb +62 -0
  470. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/mutex_atomic_fixnum.rb +75 -0
  471. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/mutex_count_down_latch.rb +44 -0
  472. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/mutex_semaphore.rb +115 -0
  473. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/read_write_lock.rb +254 -0
  474. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/reentrant_read_write_lock.rb +379 -0
  475. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/ruby_thread_local_var.rb +161 -0
  476. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/semaphore.rb +145 -0
  477. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/thread_local_var.rb +104 -0
  478. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic_reference/mutex_atomic.rb +56 -0
  479. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic_reference/numeric_cas_wrapper.rb +28 -0
  480. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomics.rb +10 -0
  481. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/collection/copy_on_notify_observer_set.rb +107 -0
  482. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/collection/copy_on_write_observer_set.rb +111 -0
  483. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/collection/java_non_concurrent_priority_queue.rb +84 -0
  484. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/collection/lock_free_stack.rb +158 -0
  485. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/collection/map/atomic_reference_map_backend.rb +927 -0
  486. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/collection/map/mri_map_backend.rb +66 -0
  487. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/collection/map/non_concurrent_map_backend.rb +140 -0
  488. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/collection/map/synchronized_map_backend.rb +82 -0
  489. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/collection/non_concurrent_priority_queue.rb +143 -0
  490. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/collection/ruby_non_concurrent_priority_queue.rb +150 -0
  491. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/concern/deprecation.rb +34 -0
  492. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/concern/dereferenceable.rb +73 -0
  493. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/concern/logging.rb +32 -0
  494. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/concern/obligation.rb +220 -0
  495. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/concern/observable.rb +110 -0
  496. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/concurrent_ruby.jar +0 -0
  497. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/configuration.rb +184 -0
  498. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/constants.rb +8 -0
  499. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/dataflow.rb +81 -0
  500. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/delay.rb +199 -0
  501. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/errors.rb +69 -0
  502. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/exchanger.rb +352 -0
  503. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/abstract_executor_service.rb +134 -0
  504. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/cached_thread_pool.rb +62 -0
  505. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/executor_service.rb +185 -0
  506. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/fixed_thread_pool.rb +206 -0
  507. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/immediate_executor.rb +66 -0
  508. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/indirect_immediate_executor.rb +44 -0
  509. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/java_executor_service.rb +91 -0
  510. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/java_single_thread_executor.rb +29 -0
  511. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/java_thread_pool_executor.rb +123 -0
  512. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/ruby_executor_service.rb +78 -0
  513. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/ruby_single_thread_executor.rb +22 -0
  514. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/ruby_thread_pool_executor.rb +362 -0
  515. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/safe_task_executor.rb +35 -0
  516. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/serial_executor_service.rb +34 -0
  517. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/serialized_execution.rb +107 -0
  518. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/serialized_execution_delegator.rb +28 -0
  519. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/simple_executor_service.rb +100 -0
  520. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/single_thread_executor.rb +56 -0
  521. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/thread_pool_executor.rb +87 -0
  522. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/timer_set.rb +173 -0
  523. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executors.rb +20 -0
  524. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/future.rb +141 -0
  525. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/hash.rb +59 -0
  526. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/immutable_struct.rb +93 -0
  527. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/ivar.rb +207 -0
  528. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/map.rb +337 -0
  529. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/maybe.rb +229 -0
  530. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/mutable_struct.rb +229 -0
  531. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/mvar.rb +242 -0
  532. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/options.rb +42 -0
  533. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/promise.rb +579 -0
  534. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/promises.rb +2167 -0
  535. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/re_include.rb +58 -0
  536. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/scheduled_task.rb +318 -0
  537. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/set.rb +66 -0
  538. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/settable_struct.rb +129 -0
  539. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization.rb +30 -0
  540. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization/abstract_lockable_object.rb +98 -0
  541. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization/abstract_object.rb +24 -0
  542. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization/abstract_struct.rb +160 -0
  543. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization/condition.rb +60 -0
  544. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization/jruby_lockable_object.rb +13 -0
  545. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization/jruby_object.rb +45 -0
  546. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization/lock.rb +36 -0
  547. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization/lockable_object.rb +74 -0
  548. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization/mri_object.rb +44 -0
  549. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization/mutex_lockable_object.rb +76 -0
  550. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization/object.rb +183 -0
  551. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization/rbx_lockable_object.rb +65 -0
  552. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization/rbx_object.rb +49 -0
  553. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization/truffleruby_object.rb +47 -0
  554. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization/volatile.rb +36 -0
  555. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/thread_safe/synchronized_delegator.rb +50 -0
  556. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/thread_safe/util.rb +16 -0
  557. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/thread_safe/util/adder.rb +74 -0
  558. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/thread_safe/util/cheap_lockable.rb +118 -0
  559. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/thread_safe/util/data_structures.rb +63 -0
  560. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/thread_safe/util/power_of_two_tuple.rb +38 -0
  561. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/thread_safe/util/striped64.rb +246 -0
  562. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/thread_safe/util/volatile.rb +75 -0
  563. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/thread_safe/util/xor_shift_random.rb +50 -0
  564. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/timer_task.rb +334 -0
  565. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/tuple.rb +86 -0
  566. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/tvar.rb +258 -0
  567. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/utility/at_exit.rb +97 -0
  568. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/utility/engine.rb +56 -0
  569. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/utility/monotonic_time.rb +58 -0
  570. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/utility/native_extension_loader.rb +79 -0
  571. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/utility/native_integer.rb +53 -0
  572. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/utility/processor_counter.rb +158 -0
  573. data/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/version.rb +3 -0
  574. data/vendor/bundle/ruby/2.5.0/gems/echoe-4.6.6/CHANGELOG +113 -0
  575. data/vendor/bundle/ruby/2.5.0/gems/echoe-4.6.6/LICENSE +184 -0
  576. data/vendor/bundle/ruby/2.5.0/gems/echoe-4.6.6/MIT-LICENSE +21 -0
  577. data/vendor/bundle/ruby/2.5.0/gems/echoe-4.6.6/Manifest +19 -0
  578. data/vendor/bundle/ruby/2.5.0/gems/echoe-4.6.6/README.rdoc +97 -0
  579. data/vendor/bundle/ruby/2.5.0/gems/echoe-4.6.6/Rakefile +15 -0
  580. data/vendor/bundle/ruby/2.5.0/gems/echoe-4.6.6/echoe.gemspec +45 -0
  581. data/vendor/bundle/ruby/2.5.0/gems/echoe-4.6.6/echoe.pem +21 -0
  582. data/vendor/bundle/ruby/2.5.0/gems/echoe-4.6.6/lib/echoe.rb +793 -0
  583. data/vendor/bundle/ruby/2.5.0/gems/echoe-4.6.6/lib/echoe/extensions.rb +61 -0
  584. data/vendor/bundle/ruby/2.5.0/gems/echoe-4.6.6/lib/echoe/platform.rb +37 -0
  585. data/vendor/bundle/ruby/2.5.0/gems/echoe-4.6.6/lib/echoe/rubygems.rb +41 -0
  586. data/vendor/bundle/ruby/2.5.0/gems/echoe-4.6.6/vendor/rake/MIT-LICENSE +21 -0
  587. data/vendor/bundle/ruby/2.5.0/gems/echoe-4.6.6/vendor/rake/lib/rake/contrib/compositepublisher.rb +24 -0
  588. data/vendor/bundle/ruby/2.5.0/gems/echoe-4.6.6/vendor/rake/lib/rake/contrib/ftptools.rb +153 -0
  589. data/vendor/bundle/ruby/2.5.0/gems/echoe-4.6.6/vendor/rake/lib/rake/contrib/publisher.rb +75 -0
  590. data/vendor/bundle/ruby/2.5.0/gems/echoe-4.6.6/vendor/rake/lib/rake/contrib/rubyforgepublisher.rb +18 -0
  591. data/vendor/bundle/ruby/2.5.0/gems/echoe-4.6.6/vendor/rake/lib/rake/contrib/sshpublisher.rb +43 -0
  592. data/vendor/bundle/ruby/2.5.0/gems/echoe-4.6.6/vendor/rake/lib/rake/contrib/sys.rb +209 -0
  593. data/vendor/bundle/ruby/2.5.0/gems/i18n-1.6.0/MIT-LICENSE +20 -0
  594. data/vendor/bundle/ruby/2.5.0/gems/i18n-1.6.0/README.md +125 -0
  595. data/vendor/bundle/ruby/2.5.0/gems/i18n-1.6.0/lib/i18n.rb +398 -0
  596. data/vendor/bundle/ruby/2.5.0/gems/i18n-1.6.0/lib/i18n/backend.rb +21 -0
  597. data/vendor/bundle/ruby/2.5.0/gems/i18n-1.6.0/lib/i18n/backend/base.rb +284 -0
  598. data/vendor/bundle/ruby/2.5.0/gems/i18n-1.6.0/lib/i18n/backend/cache.rb +113 -0
  599. data/vendor/bundle/ruby/2.5.0/gems/i18n-1.6.0/lib/i18n/backend/cache_file.rb +36 -0
  600. data/vendor/bundle/ruby/2.5.0/gems/i18n-1.6.0/lib/i18n/backend/cascade.rb +56 -0
  601. data/vendor/bundle/ruby/2.5.0/gems/i18n-1.6.0/lib/i18n/backend/chain.rb +127 -0
  602. data/vendor/bundle/ruby/2.5.0/gems/i18n-1.6.0/lib/i18n/backend/fallbacks.rb +84 -0
  603. data/vendor/bundle/ruby/2.5.0/gems/i18n-1.6.0/lib/i18n/backend/flatten.rb +115 -0
  604. data/vendor/bundle/ruby/2.5.0/gems/i18n-1.6.0/lib/i18n/backend/gettext.rb +85 -0
  605. data/vendor/bundle/ruby/2.5.0/gems/i18n-1.6.0/lib/i18n/backend/interpolation_compiler.rb +123 -0
  606. data/vendor/bundle/ruby/2.5.0/gems/i18n-1.6.0/lib/i18n/backend/key_value.rb +206 -0
  607. data/vendor/bundle/ruby/2.5.0/gems/i18n-1.6.0/lib/i18n/backend/memoize.rb +54 -0
  608. data/vendor/bundle/ruby/2.5.0/gems/i18n-1.6.0/lib/i18n/backend/metadata.rb +71 -0
  609. data/vendor/bundle/ruby/2.5.0/gems/i18n-1.6.0/lib/i18n/backend/pluralization.rb +55 -0
  610. data/vendor/bundle/ruby/2.5.0/gems/i18n-1.6.0/lib/i18n/backend/simple.rb +111 -0
  611. data/vendor/bundle/ruby/2.5.0/gems/i18n-1.6.0/lib/i18n/backend/transliterator.rb +108 -0
  612. data/vendor/bundle/ruby/2.5.0/gems/i18n-1.6.0/lib/i18n/config.rb +165 -0
  613. data/vendor/bundle/ruby/2.5.0/gems/i18n-1.6.0/lib/i18n/core_ext/hash.rb +47 -0
  614. data/vendor/bundle/ruby/2.5.0/gems/i18n-1.6.0/lib/i18n/exceptions.rb +111 -0
  615. data/vendor/bundle/ruby/2.5.0/gems/i18n-1.6.0/lib/i18n/gettext.rb +28 -0
  616. data/vendor/bundle/ruby/2.5.0/gems/i18n-1.6.0/lib/i18n/gettext/helpers.rb +75 -0
  617. data/vendor/bundle/ruby/2.5.0/gems/i18n-1.6.0/lib/i18n/gettext/po_parser.rb +329 -0
  618. data/vendor/bundle/ruby/2.5.0/gems/i18n-1.6.0/lib/i18n/interpolate/ruby.rb +39 -0
  619. data/vendor/bundle/ruby/2.5.0/gems/i18n-1.6.0/lib/i18n/locale.rb +8 -0
  620. data/vendor/bundle/ruby/2.5.0/gems/i18n-1.6.0/lib/i18n/locale/fallbacks.rb +96 -0
  621. data/vendor/bundle/ruby/2.5.0/gems/i18n-1.6.0/lib/i18n/locale/tag.rb +28 -0
  622. data/vendor/bundle/ruby/2.5.0/gems/i18n-1.6.0/lib/i18n/locale/tag/parents.rb +22 -0
  623. data/vendor/bundle/ruby/2.5.0/gems/i18n-1.6.0/lib/i18n/locale/tag/rfc4646.rb +74 -0
  624. data/vendor/bundle/ruby/2.5.0/gems/i18n-1.6.0/lib/i18n/locale/tag/simple.rb +39 -0
  625. data/vendor/bundle/ruby/2.5.0/gems/i18n-1.6.0/lib/i18n/middleware.rb +17 -0
  626. data/vendor/bundle/ruby/2.5.0/gems/i18n-1.6.0/lib/i18n/tests.rb +14 -0
  627. data/vendor/bundle/ruby/2.5.0/gems/i18n-1.6.0/lib/i18n/tests/basics.rb +60 -0
  628. data/vendor/bundle/ruby/2.5.0/gems/i18n-1.6.0/lib/i18n/tests/defaults.rb +52 -0
  629. data/vendor/bundle/ruby/2.5.0/gems/i18n-1.6.0/lib/i18n/tests/interpolation.rb +159 -0
  630. data/vendor/bundle/ruby/2.5.0/gems/i18n-1.6.0/lib/i18n/tests/link.rb +56 -0
  631. data/vendor/bundle/ruby/2.5.0/gems/i18n-1.6.0/lib/i18n/tests/localization.rb +19 -0
  632. data/vendor/bundle/ruby/2.5.0/gems/i18n-1.6.0/lib/i18n/tests/localization/date.rb +117 -0
  633. data/vendor/bundle/ruby/2.5.0/gems/i18n-1.6.0/lib/i18n/tests/localization/date_time.rb +103 -0
  634. data/vendor/bundle/ruby/2.5.0/gems/i18n-1.6.0/lib/i18n/tests/localization/procs.rb +116 -0
  635. data/vendor/bundle/ruby/2.5.0/gems/i18n-1.6.0/lib/i18n/tests/localization/time.rb +103 -0
  636. data/vendor/bundle/ruby/2.5.0/gems/i18n-1.6.0/lib/i18n/tests/lookup.rb +81 -0
  637. data/vendor/bundle/ruby/2.5.0/gems/i18n-1.6.0/lib/i18n/tests/pluralization.rb +35 -0
  638. data/vendor/bundle/ruby/2.5.0/gems/i18n-1.6.0/lib/i18n/tests/procs.rb +55 -0
  639. data/vendor/bundle/ruby/2.5.0/gems/i18n-1.6.0/lib/i18n/version.rb +5 -0
  640. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/CHANGES.md +391 -0
  641. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/Gemfile +14 -0
  642. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/README-json-jruby.md +33 -0
  643. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/README.md +409 -0
  644. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/Rakefile +408 -0
  645. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/VERSION +1 -0
  646. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/ext/json/ext/fbuffer/fbuffer.h +187 -0
  647. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/ext/json/ext/generator/depend +1 -0
  648. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/ext/json/ext/generator/extconf.rb +4 -0
  649. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/ext/json/ext/generator/generator.c +1444 -0
  650. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/ext/json/ext/generator/generator.h +171 -0
  651. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/ext/json/ext/parser/depend +1 -0
  652. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/ext/json/ext/parser/extconf.rb +6 -0
  653. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/ext/json/ext/parser/parser.c +2131 -0
  654. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/ext/json/ext/parser/parser.h +91 -0
  655. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/ext/json/ext/parser/parser.rl +891 -0
  656. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/ext/json/extconf.rb +2 -0
  657. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/install.rb +23 -0
  658. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/java/src/json/ext/ByteListTranscoder.java +166 -0
  659. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/java/src/json/ext/Generator.java +443 -0
  660. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/java/src/json/ext/GeneratorMethods.java +231 -0
  661. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/java/src/json/ext/GeneratorService.java +42 -0
  662. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/java/src/json/ext/GeneratorState.java +490 -0
  663. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/java/src/json/ext/OptionsReader.java +113 -0
  664. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/java/src/json/ext/Parser.java +2362 -0
  665. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/java/src/json/ext/Parser.rl +893 -0
  666. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/java/src/json/ext/ParserService.java +34 -0
  667. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/java/src/json/ext/RuntimeInfo.java +116 -0
  668. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/java/src/json/ext/StringDecoder.java +166 -0
  669. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/java/src/json/ext/StringEncoder.java +111 -0
  670. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/java/src/json/ext/Utils.java +88 -0
  671. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/json-java.gemspec +38 -0
  672. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/json.gemspec +0 -0
  673. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/json_pure.gemspec +38 -0
  674. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/lib/json.rb +63 -0
  675. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/lib/json/add/bigdecimal.rb +29 -0
  676. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/lib/json/add/complex.rb +29 -0
  677. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/lib/json/add/core.rb +12 -0
  678. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/lib/json/add/date.rb +34 -0
  679. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/lib/json/add/date_time.rb +50 -0
  680. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/lib/json/add/exception.rb +31 -0
  681. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/lib/json/add/ostruct.rb +31 -0
  682. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/lib/json/add/range.rb +29 -0
  683. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/lib/json/add/rational.rb +28 -0
  684. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/lib/json/add/regexp.rb +30 -0
  685. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/lib/json/add/set.rb +29 -0
  686. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/lib/json/add/struct.rb +30 -0
  687. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/lib/json/add/symbol.rb +25 -0
  688. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/lib/json/add/time.rb +38 -0
  689. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/lib/json/common.rb +456 -0
  690. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/lib/json/ext.rb +15 -0
  691. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/lib/json/generic_object.rb +71 -0
  692. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/lib/json/pure.rb +15 -0
  693. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/lib/json/pure/generator.rb +458 -0
  694. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/lib/json/pure/parser.rb +311 -0
  695. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/lib/json/version.rb +9 -0
  696. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/references/rfc7159.txt +899 -0
  697. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/tests/fixtures/fail10.json +1 -0
  698. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/tests/fixtures/fail11.json +1 -0
  699. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/tests/fixtures/fail12.json +1 -0
  700. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/tests/fixtures/fail13.json +1 -0
  701. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/tests/fixtures/fail14.json +1 -0
  702. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/tests/fixtures/fail18.json +1 -0
  703. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/tests/fixtures/fail19.json +1 -0
  704. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/tests/fixtures/fail2.json +1 -0
  705. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/tests/fixtures/fail20.json +1 -0
  706. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/tests/fixtures/fail21.json +1 -0
  707. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/tests/fixtures/fail22.json +1 -0
  708. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/tests/fixtures/fail23.json +1 -0
  709. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/tests/fixtures/fail24.json +1 -0
  710. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/tests/fixtures/fail25.json +1 -0
  711. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/tests/fixtures/fail27.json +2 -0
  712. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/tests/fixtures/fail28.json +2 -0
  713. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/tests/fixtures/fail3.json +1 -0
  714. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/tests/fixtures/fail4.json +1 -0
  715. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/tests/fixtures/fail5.json +1 -0
  716. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/tests/fixtures/fail6.json +1 -0
  717. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/tests/fixtures/fail7.json +1 -0
  718. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/tests/fixtures/fail8.json +1 -0
  719. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/tests/fixtures/fail9.json +1 -0
  720. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/tests/fixtures/obsolete_fail1.json +1 -0
  721. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/tests/fixtures/pass1.json +56 -0
  722. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/tests/fixtures/pass15.json +1 -0
  723. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/tests/fixtures/pass16.json +1 -0
  724. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/tests/fixtures/pass17.json +1 -0
  725. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/tests/fixtures/pass2.json +1 -0
  726. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/tests/fixtures/pass26.json +1 -0
  727. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/tests/fixtures/pass3.json +6 -0
  728. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/tests/json_addition_test.rb +203 -0
  729. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/tests/json_common_interface_test.rb +126 -0
  730. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/tests/json_encoding_test.rb +107 -0
  731. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/tests/json_ext_parser_test.rb +15 -0
  732. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/tests/json_fixtures_test.rb +32 -0
  733. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/tests/json_generator_test.rb +377 -0
  734. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/tests/json_generic_object_test.rb +82 -0
  735. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/tests/json_parser_test.rb +472 -0
  736. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/tests/json_string_matching_test.rb +38 -0
  737. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/tests/test_helper.rb +17 -0
  738. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/tools/diff.sh +18 -0
  739. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/tools/fuzz.rb +131 -0
  740. data/vendor/bundle/ruby/2.5.0/gems/json_pure-2.2.0/tools/server.rb +62 -0
  741. data/vendor/bundle/ruby/2.5.0/gems/minitest-5.11.3/History.rdoc +1310 -0
  742. data/vendor/bundle/ruby/2.5.0/gems/minitest-5.11.3/Manifest.txt +26 -0
  743. data/vendor/bundle/ruby/2.5.0/gems/minitest-5.11.3/README.rdoc +746 -0
  744. data/vendor/bundle/ruby/2.5.0/gems/minitest-5.11.3/Rakefile +86 -0
  745. data/vendor/bundle/ruby/2.5.0/gems/minitest-5.11.3/design_rationale.rb +52 -0
  746. data/vendor/bundle/ruby/2.5.0/gems/minitest-5.11.3/lib/hoe/minitest.rb +32 -0
  747. data/vendor/bundle/ruby/2.5.0/gems/minitest-5.11.3/lib/minitest.rb +987 -0
  748. data/vendor/bundle/ruby/2.5.0/gems/minitest-5.11.3/lib/minitest/assertions.rb +693 -0
  749. data/vendor/bundle/ruby/2.5.0/gems/minitest-5.11.3/lib/minitest/autorun.rb +13 -0
  750. data/vendor/bundle/ruby/2.5.0/gems/minitest-5.11.3/lib/minitest/benchmark.rb +455 -0
  751. data/vendor/bundle/ruby/2.5.0/gems/minitest-5.11.3/lib/minitest/expectations.rb +284 -0
  752. data/vendor/bundle/ruby/2.5.0/gems/minitest-5.11.3/lib/minitest/hell.rb +11 -0
  753. data/vendor/bundle/ruby/2.5.0/gems/minitest-5.11.3/lib/minitest/mock.rb +240 -0
  754. data/vendor/bundle/ruby/2.5.0/gems/minitest-5.11.3/lib/minitest/parallel.rb +70 -0
  755. data/vendor/bundle/ruby/2.5.0/gems/minitest-5.11.3/lib/minitest/pride.rb +4 -0
  756. data/vendor/bundle/ruby/2.5.0/gems/minitest-5.11.3/lib/minitest/pride_plugin.rb +142 -0
  757. data/vendor/bundle/ruby/2.5.0/gems/minitest-5.11.3/lib/minitest/spec.rb +331 -0
  758. data/vendor/bundle/ruby/2.5.0/gems/minitest-5.11.3/lib/minitest/test.rb +220 -0
  759. data/vendor/bundle/ruby/2.5.0/gems/minitest-5.11.3/lib/minitest/unit.rb +45 -0
  760. data/vendor/bundle/ruby/2.5.0/gems/minitest-5.11.3/test/minitest/metametameta.rb +102 -0
  761. data/vendor/bundle/ruby/2.5.0/gems/minitest-5.11.3/test/minitest/test_minitest_benchmark.rb +137 -0
  762. data/vendor/bundle/ruby/2.5.0/gems/minitest-5.11.3/test/minitest/test_minitest_mock.rb +874 -0
  763. data/vendor/bundle/ruby/2.5.0/gems/minitest-5.11.3/test/minitest/test_minitest_reporter.rb +299 -0
  764. data/vendor/bundle/ruby/2.5.0/gems/minitest-5.11.3/test/minitest/test_minitest_spec.rb +987 -0
  765. data/vendor/bundle/ruby/2.5.0/gems/minitest-5.11.3/test/minitest/test_minitest_test.rb +2142 -0
  766. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/CONTRIBUTING.rdoc +43 -0
  767. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/Gemfile +3 -0
  768. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/History.rdoc +2333 -0
  769. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/MIT-LICENSE +21 -0
  770. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/README.rdoc +156 -0
  771. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/Rakefile +41 -0
  772. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/bin/bundle +105 -0
  773. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/bin/console +7 -0
  774. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/bin/rake +29 -0
  775. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/bin/rdoc +29 -0
  776. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/bin/rubocop +29 -0
  777. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/bin/setup +6 -0
  778. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/doc/command_line_usage.rdoc +158 -0
  779. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/doc/example/Rakefile1 +38 -0
  780. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/doc/example/Rakefile2 +35 -0
  781. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/doc/example/a.c +6 -0
  782. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/doc/example/b.c +6 -0
  783. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/doc/example/main.c +11 -0
  784. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/doc/glossary.rdoc +42 -0
  785. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/doc/jamis.rb +592 -0
  786. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/doc/proto_rake.rdoc +127 -0
  787. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/doc/rake.1 +156 -0
  788. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/doc/rakefile.rdoc +622 -0
  789. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/doc/rational.rdoc +151 -0
  790. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/exe/rake +27 -0
  791. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake.rb +71 -0
  792. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/application.rb +824 -0
  793. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/backtrace.rb +24 -0
  794. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/clean.rb +78 -0
  795. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/cloneable.rb +17 -0
  796. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/cpu_counter.rb +107 -0
  797. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/default_loader.rb +15 -0
  798. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/dsl_definition.rb +195 -0
  799. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/early_time.rb +22 -0
  800. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/ext/core.rb +26 -0
  801. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/ext/string.rb +176 -0
  802. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/file_creation_task.rb +25 -0
  803. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/file_list.rb +435 -0
  804. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/file_task.rb +54 -0
  805. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/file_utils.rb +137 -0
  806. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/file_utils_ext.rb +145 -0
  807. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/invocation_chain.rb +57 -0
  808. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/invocation_exception_mixin.rb +17 -0
  809. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/late_time.rb +18 -0
  810. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/linked_list.rb +112 -0
  811. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/loaders/makefile.rb +54 -0
  812. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/multi_task.rb +14 -0
  813. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/name_space.rb +38 -0
  814. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/packagetask.rb +207 -0
  815. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/phony.rb +16 -0
  816. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/private_reader.rb +21 -0
  817. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/promise.rb +100 -0
  818. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/pseudo_status.rb +30 -0
  819. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/rake_module.rb +67 -0
  820. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/rake_test_loader.rb +27 -0
  821. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/rule_recursion_overflow_error.rb +20 -0
  822. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/scope.rb +43 -0
  823. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/task.rb +413 -0
  824. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/task_argument_error.rb +8 -0
  825. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/task_arguments.rb +109 -0
  826. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/task_manager.rb +323 -0
  827. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/tasklib.rb +12 -0
  828. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/testtask.rb +224 -0
  829. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/thread_history_display.rb +49 -0
  830. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/thread_pool.rb +163 -0
  831. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/trace_output.rb +23 -0
  832. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/version.rb +10 -0
  833. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/win32.rb +51 -0
  834. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/rake.gemspec +42 -0
  835. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/CONTRIBUTING.rdoc +220 -0
  836. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/CVE-2013-0256.rdoc +49 -0
  837. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/ExampleMarkdown.md +37 -0
  838. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/ExampleRDoc.rdoc +208 -0
  839. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/Gemfile +3 -0
  840. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/History.rdoc +1666 -0
  841. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/LEGAL.rdoc +50 -0
  842. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/LICENSE.rdoc +57 -0
  843. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/README.rdoc +130 -0
  844. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/RI.rdoc +57 -0
  845. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/Rakefile +91 -0
  846. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/TODO.rdoc +59 -0
  847. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/appveyor.yml +36 -0
  848. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/bin/console +7 -0
  849. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/bin/setup +6 -0
  850. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/exe/rdoc +44 -0
  851. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/exe/ri +12 -0
  852. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc.rb +180 -0
  853. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/alias.rb +112 -0
  854. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/anon_class.rb +11 -0
  855. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/any_method.rb +316 -0
  856. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/attr.rb +176 -0
  857. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/class_module.rb +802 -0
  858. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/code_object.rb +421 -0
  859. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/code_objects.rb +6 -0
  860. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/comment.rb +239 -0
  861. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/constant.rb +187 -0
  862. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/context.rb +1258 -0
  863. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/context/section.rb +245 -0
  864. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/cross_reference.rb +202 -0
  865. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/encoding.rb +136 -0
  866. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/erb_partial.rb +19 -0
  867. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/erbio.rb +42 -0
  868. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/extend.rb +10 -0
  869. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator.rb +51 -0
  870. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/darkfish.rb +790 -0
  871. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/json_index.rb +300 -0
  872. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/markup.rb +160 -0
  873. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/pot.rb +98 -0
  874. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/pot/message_extractor.rb +68 -0
  875. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/pot/po.rb +84 -0
  876. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/pot/po_entry.rb +141 -0
  877. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/ri.rb +31 -0
  878. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/_footer.rhtml +5 -0
  879. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/_head.rhtml +20 -0
  880. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/_sidebar_VCS_info.rhtml +19 -0
  881. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/_sidebar_classes.rhtml +9 -0
  882. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/_sidebar_extends.rhtml +15 -0
  883. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/_sidebar_in_files.rhtml +9 -0
  884. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/_sidebar_includes.rhtml +15 -0
  885. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/_sidebar_installed.rhtml +15 -0
  886. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/_sidebar_methods.rhtml +12 -0
  887. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/_sidebar_navigation.rhtml +11 -0
  888. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml +12 -0
  889. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/_sidebar_parent.rhtml +11 -0
  890. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/_sidebar_search.rhtml +14 -0
  891. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/_sidebar_sections.rhtml +11 -0
  892. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml +18 -0
  893. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/class.rhtml +172 -0
  894. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/css/fonts.css +167 -0
  895. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/css/rdoc.css +590 -0
  896. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/fonts/Lato-Light.ttf +0 -0
  897. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/fonts/Lato-LightItalic.ttf +0 -0
  898. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/fonts/Lato-Regular.ttf +0 -0
  899. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/fonts/Lato-RegularItalic.ttf +0 -0
  900. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/fonts/SourceCodePro-Bold.ttf +0 -0
  901. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/fonts/SourceCodePro-Regular.ttf +0 -0
  902. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/images/add.png +0 -0
  903. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/images/arrow_up.png +0 -0
  904. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/images/brick.png +0 -0
  905. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/images/brick_link.png +0 -0
  906. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/images/bug.png +0 -0
  907. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/images/bullet_black.png +0 -0
  908. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/images/bullet_toggle_minus.png +0 -0
  909. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/images/bullet_toggle_plus.png +0 -0
  910. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/images/date.png +0 -0
  911. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/images/delete.png +0 -0
  912. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/images/find.png +0 -0
  913. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/images/loadingAnimation.gif +0 -0
  914. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/images/macFFBgHack.png +0 -0
  915. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/images/package.png +0 -0
  916. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/images/page_green.png +0 -0
  917. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/images/page_white_text.png +0 -0
  918. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/images/page_white_width.png +0 -0
  919. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/images/plugin.png +0 -0
  920. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/images/ruby.png +0 -0
  921. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/images/tag_blue.png +0 -0
  922. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/images/tag_green.png +0 -0
  923. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/images/transparent.png +0 -0
  924. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/images/wrench.png +0 -0
  925. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/images/wrench_orange.png +0 -0
  926. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/images/zoom.png +0 -0
  927. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/index.rhtml +23 -0
  928. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/js/darkfish.js +161 -0
  929. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/js/jquery.js +4 -0
  930. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/js/search.js +109 -0
  931. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/page.rhtml +18 -0
  932. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/servlet_not_found.rhtml +18 -0
  933. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/servlet_root.rhtml +63 -0
  934. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml +58 -0
  935. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/json_index/js/navigation.js +141 -0
  936. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/generator/template/json_index/js/searcher.js +229 -0
  937. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/ghost_method.rb +7 -0
  938. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/i18n.rb +10 -0
  939. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/i18n/locale.rb +102 -0
  940. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/i18n/text.rb +126 -0
  941. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/include.rb +10 -0
  942. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/known_classes.rb +73 -0
  943. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/markdown.kpeg +1219 -0
  944. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/markdown/entities.rb +2132 -0
  945. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/markdown/literals.kpeg +23 -0
  946. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/markup.rb +868 -0
  947. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/markup/attr_changer.rb +23 -0
  948. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/markup/attr_span.rb +30 -0
  949. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/markup/attribute_manager.rb +344 -0
  950. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/markup/attributes.rb +71 -0
  951. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/markup/blank_line.rb +28 -0
  952. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/markup/block_quote.rb +15 -0
  953. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/markup/document.rb +165 -0
  954. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/markup/formatter.rb +266 -0
  955. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/markup/formatter_test_case.rb +764 -0
  956. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/markup/hard_break.rb +32 -0
  957. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/markup/heading.rb +79 -0
  958. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/markup/include.rb +43 -0
  959. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/markup/indented_paragraph.rb +48 -0
  960. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/markup/list.rb +102 -0
  961. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/markup/list_item.rb +100 -0
  962. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/markup/paragraph.rb +29 -0
  963. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/markup/parser.rb +559 -0
  964. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/markup/pre_process.rb +296 -0
  965. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/markup/raw.rb +70 -0
  966. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/markup/regexp_handling.rb +41 -0
  967. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/markup/rule.rb +21 -0
  968. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/markup/text_formatter_test_case.rb +115 -0
  969. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/markup/to_ansi.rb +94 -0
  970. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/markup/to_bs.rb +77 -0
  971. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/markup/to_html.rb +404 -0
  972. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/markup/to_html_crossref.rb +164 -0
  973. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/markup/to_html_snippet.rb +285 -0
  974. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/markup/to_joined_paragraph.rb +46 -0
  975. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/markup/to_label.rb +75 -0
  976. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/markup/to_markdown.rb +192 -0
  977. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/markup/to_rdoc.rb +334 -0
  978. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/markup/to_table_of_contents.rb +88 -0
  979. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/markup/to_test.rb +70 -0
  980. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/markup/to_tt_only.rb +121 -0
  981. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/markup/verbatim.rb +84 -0
  982. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/meta_method.rb +7 -0
  983. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/method_attr.rb +419 -0
  984. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/mixin.rb +121 -0
  985. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/normal_class.rb +93 -0
  986. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/normal_module.rb +74 -0
  987. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/options.rb +1235 -0
  988. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/parser.rb +277 -0
  989. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/parser/c.rb +1269 -0
  990. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/parser/changelog.rb +204 -0
  991. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/parser/markdown.rb +24 -0
  992. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/parser/rd.rb +23 -0
  993. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/parser/ripper_state_lex.rb +589 -0
  994. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/parser/ruby.rb +2317 -0
  995. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/parser/ruby_tools.rb +167 -0
  996. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/parser/simple.rb +61 -0
  997. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/parser/text.rb +12 -0
  998. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/rd.rb +100 -0
  999. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/rd/block_parser.ry +639 -0
  1000. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/rd/inline.rb +72 -0
  1001. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/rd/inline_parser.ry +593 -0
  1002. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/rdoc.rb +566 -0
  1003. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/require.rb +52 -0
  1004. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/ri.rb +21 -0
  1005. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/ri/driver.rb +1568 -0
  1006. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/ri/formatter.rb +6 -0
  1007. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/ri/paths.rb +185 -0
  1008. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/ri/store.rb +7 -0
  1009. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/ri/task.rb +71 -0
  1010. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/rubygems_hook.rb +246 -0
  1011. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/servlet.rb +443 -0
  1012. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/single_class.rb +26 -0
  1013. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/stats.rb +462 -0
  1014. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/stats/normal.rb +58 -0
  1015. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/stats/quiet.rb +60 -0
  1016. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/stats/verbose.rb +46 -0
  1017. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/store.rb +987 -0
  1018. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/task.rb +329 -0
  1019. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/text.rb +298 -0
  1020. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/token_stream.rb +114 -0
  1021. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/tom_doc.rb +264 -0
  1022. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/top_level.rb +289 -0
  1023. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/version.rb +8 -0
  1024. data/vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/rdoc.gemspec +62 -0
  1025. data/vendor/bundle/ruby/2.5.0/gems/rubyforge-2.0.4/History.txt +128 -0
  1026. data/vendor/bundle/ruby/2.5.0/gems/rubyforge-2.0.4/Manifest.txt +9 -0
  1027. data/vendor/bundle/ruby/2.5.0/gems/rubyforge-2.0.4/README.txt +55 -0
  1028. data/vendor/bundle/ruby/2.5.0/gems/rubyforge-2.0.4/Rakefile +40 -0
  1029. data/vendor/bundle/ruby/2.5.0/gems/rubyforge-2.0.4/bin/rubyforge +222 -0
  1030. data/vendor/bundle/ruby/2.5.0/gems/rubyforge-2.0.4/lib/rubyforge.rb +389 -0
  1031. data/vendor/bundle/ruby/2.5.0/gems/rubyforge-2.0.4/lib/rubyforge/client.rb +124 -0
  1032. data/vendor/bundle/ruby/2.5.0/gems/rubyforge-2.0.4/test/test_rubyforge.rb +329 -0
  1033. data/vendor/bundle/ruby/2.5.0/gems/rubyforge-2.0.4/test/test_rubyforge_client.rb +57 -0
  1034. data/vendor/bundle/ruby/2.5.0/gems/thread_safe-0.3.6/Gemfile +20 -0
  1035. data/vendor/bundle/ruby/2.5.0/gems/thread_safe-0.3.6/LICENSE +144 -0
  1036. data/vendor/bundle/ruby/2.5.0/gems/thread_safe-0.3.6/README.md +60 -0
  1037. data/vendor/bundle/ruby/2.5.0/gems/thread_safe-0.3.6/Rakefile +62 -0
  1038. data/vendor/bundle/ruby/2.5.0/gems/thread_safe-0.3.6/examples/bench_cache.rb +35 -0
  1039. data/vendor/bundle/ruby/2.5.0/gems/thread_safe-0.3.6/ext/org/jruby/ext/thread_safe/JRubyCacheBackendLibrary.java +245 -0
  1040. data/vendor/bundle/ruby/2.5.0/gems/thread_safe-0.3.6/ext/org/jruby/ext/thread_safe/jsr166e/ConcurrentHashMap.java +31 -0
  1041. data/vendor/bundle/ruby/2.5.0/gems/thread_safe-0.3.6/ext/org/jruby/ext/thread_safe/jsr166e/ConcurrentHashMapV8.java +3863 -0
  1042. data/vendor/bundle/ruby/2.5.0/gems/thread_safe-0.3.6/ext/org/jruby/ext/thread_safe/jsr166e/LongAdder.java +203 -0
  1043. data/vendor/bundle/ruby/2.5.0/gems/thread_safe-0.3.6/ext/org/jruby/ext/thread_safe/jsr166e/Striped64.java +342 -0
  1044. data/vendor/bundle/ruby/2.5.0/gems/thread_safe-0.3.6/ext/org/jruby/ext/thread_safe/jsr166e/nounsafe/ConcurrentHashMapV8.java +3800 -0
  1045. data/vendor/bundle/ruby/2.5.0/gems/thread_safe-0.3.6/ext/org/jruby/ext/thread_safe/jsr166e/nounsafe/LongAdder.java +204 -0
  1046. data/vendor/bundle/ruby/2.5.0/gems/thread_safe-0.3.6/ext/org/jruby/ext/thread_safe/jsr166e/nounsafe/Striped64.java +291 -0
  1047. data/vendor/bundle/ruby/2.5.0/gems/thread_safe-0.3.6/ext/org/jruby/ext/thread_safe/jsr166y/ThreadLocalRandom.java +199 -0
  1048. data/vendor/bundle/ruby/2.5.0/gems/thread_safe-0.3.6/ext/thread_safe/JrubyCacheBackendService.java +15 -0
  1049. data/vendor/bundle/ruby/2.5.0/gems/thread_safe-0.3.6/lib/thread_safe.rb +65 -0
  1050. data/vendor/bundle/ruby/2.5.0/gems/thread_safe-0.3.6/lib/thread_safe/atomic_reference_cache_backend.rb +908 -0
  1051. data/vendor/bundle/ruby/2.5.0/gems/thread_safe-0.3.6/lib/thread_safe/cache.rb +161 -0
  1052. data/vendor/bundle/ruby/2.5.0/gems/thread_safe-0.3.6/lib/thread_safe/mri_cache_backend.rb +60 -0
  1053. data/vendor/bundle/ruby/2.5.0/gems/thread_safe-0.3.6/lib/thread_safe/non_concurrent_cache_backend.rb +135 -0
  1054. data/vendor/bundle/ruby/2.5.0/gems/thread_safe-0.3.6/lib/thread_safe/synchronized_cache_backend.rb +77 -0
  1055. data/vendor/bundle/ruby/2.5.0/gems/thread_safe-0.3.6/lib/thread_safe/synchronized_delegator.rb +43 -0
  1056. data/vendor/bundle/ruby/2.5.0/gems/thread_safe-0.3.6/lib/thread_safe/util.rb +16 -0
  1057. data/vendor/bundle/ruby/2.5.0/gems/thread_safe-0.3.6/lib/thread_safe/util/adder.rb +62 -0
  1058. data/vendor/bundle/ruby/2.5.0/gems/thread_safe-0.3.6/lib/thread_safe/util/atomic_reference.rb +44 -0
  1059. data/vendor/bundle/ruby/2.5.0/gems/thread_safe-0.3.6/lib/thread_safe/util/cheap_lockable.rb +106 -0
  1060. data/vendor/bundle/ruby/2.5.0/gems/thread_safe-0.3.6/lib/thread_safe/util/power_of_two_tuple.rb +26 -0
  1061. data/vendor/bundle/ruby/2.5.0/gems/thread_safe-0.3.6/lib/thread_safe/util/striped64.rb +222 -0
  1062. data/vendor/bundle/ruby/2.5.0/gems/thread_safe-0.3.6/lib/thread_safe/util/volatile.rb +64 -0
  1063. data/vendor/bundle/ruby/2.5.0/gems/thread_safe-0.3.6/lib/thread_safe/util/volatile_tuple.rb +46 -0
  1064. data/vendor/bundle/ruby/2.5.0/gems/thread_safe-0.3.6/lib/thread_safe/util/xor_shift_random.rb +41 -0
  1065. data/vendor/bundle/ruby/2.5.0/gems/thread_safe-0.3.6/lib/thread_safe/version.rb +21 -0
  1066. data/vendor/bundle/ruby/2.5.0/gems/thread_safe-0.3.6/spec/spec_helper.rb +31 -0
  1067. data/vendor/bundle/ruby/2.5.0/gems/thread_safe-0.3.6/spec/src/thread_safe/SecurityManager.java +21 -0
  1068. data/vendor/bundle/ruby/2.5.0/gems/thread_safe-0.3.6/spec/support/threads.rb +1 -0
  1069. data/vendor/bundle/ruby/2.5.0/gems/thread_safe-0.3.6/spec/support/threadsafe_test.rb +75 -0
  1070. data/vendor/bundle/ruby/2.5.0/gems/thread_safe-0.3.6/spec/thread_safe/array_spec.rb +18 -0
  1071. data/vendor/bundle/ruby/2.5.0/gems/thread_safe-0.3.6/spec/thread_safe/cache_loops_spec.rb +507 -0
  1072. data/vendor/bundle/ruby/2.5.0/gems/thread_safe-0.3.6/spec/thread_safe/cache_spec.rb +943 -0
  1073. data/vendor/bundle/ruby/2.5.0/gems/thread_safe-0.3.6/spec/thread_safe/hash_spec.rb +17 -0
  1074. data/vendor/bundle/ruby/2.5.0/gems/thread_safe-0.3.6/spec/thread_safe/no_unsafe_spec.rb +27 -0
  1075. data/vendor/bundle/ruby/2.5.0/gems/thread_safe-0.3.6/spec/thread_safe/synchronized_delegator_spec.rb +85 -0
  1076. data/vendor/bundle/ruby/2.5.0/gems/thread_safe-0.3.6/tasks/update_doc.rake +45 -0
  1077. data/vendor/bundle/ruby/2.5.0/gems/thread_safe-0.3.6/thread_safe.gemspec +26 -0
  1078. data/vendor/bundle/ruby/2.5.0/gems/thread_safe-0.3.6/yard-template/default/fulldoc/html/css/common.css +125 -0
  1079. data/vendor/bundle/ruby/2.5.0/gems/thread_safe-0.3.6/yard-template/default/layout/html/footer.erb +16 -0
  1080. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/CHANGES.md +786 -0
  1081. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/LICENSE +19 -0
  1082. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/README.md +151 -0
  1083. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/Rakefile +107 -0
  1084. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/lib/tzinfo.rb +40 -0
  1085. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/lib/tzinfo/country.rb +196 -0
  1086. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/lib/tzinfo/country_index_definition.rb +31 -0
  1087. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/lib/tzinfo/country_info.rb +42 -0
  1088. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/lib/tzinfo/country_timezone.rb +135 -0
  1089. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/lib/tzinfo/data_source.rb +190 -0
  1090. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/lib/tzinfo/data_timezone.rb +58 -0
  1091. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/lib/tzinfo/data_timezone_info.rb +55 -0
  1092. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/lib/tzinfo/info_timezone.rb +30 -0
  1093. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/lib/tzinfo/linked_timezone.rb +63 -0
  1094. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/lib/tzinfo/linked_timezone_info.rb +26 -0
  1095. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/lib/tzinfo/offset_rationals.rb +77 -0
  1096. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/lib/tzinfo/ruby_core_support.rb +146 -0
  1097. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/lib/tzinfo/ruby_country_info.rb +74 -0
  1098. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/lib/tzinfo/ruby_data_source.rb +136 -0
  1099. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/lib/tzinfo/time_or_datetime.rb +340 -0
  1100. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/lib/tzinfo/timezone.rb +669 -0
  1101. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/lib/tzinfo/timezone_definition.rb +36 -0
  1102. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/lib/tzinfo/timezone_index_definition.rb +54 -0
  1103. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/lib/tzinfo/timezone_info.rb +30 -0
  1104. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/lib/tzinfo/timezone_offset.rb +101 -0
  1105. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/lib/tzinfo/timezone_period.rb +245 -0
  1106. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/lib/tzinfo/timezone_proxy.rb +105 -0
  1107. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/lib/tzinfo/timezone_transition.rb +130 -0
  1108. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/lib/tzinfo/timezone_transition_definition.rb +104 -0
  1109. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/lib/tzinfo/transition_data_timezone_info.rb +274 -0
  1110. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/lib/tzinfo/zoneinfo_country_info.rb +37 -0
  1111. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/lib/tzinfo/zoneinfo_data_source.rb +488 -0
  1112. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/lib/tzinfo/zoneinfo_timezone_info.rb +296 -0
  1113. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/tc_country.rb +234 -0
  1114. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/tc_country_index_definition.rb +69 -0
  1115. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/tc_country_info.rb +16 -0
  1116. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/tc_country_timezone.rb +173 -0
  1117. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/tc_data_source.rb +218 -0
  1118. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/tc_data_timezone.rb +99 -0
  1119. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/tc_data_timezone_info.rb +18 -0
  1120. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/tc_info_timezone.rb +34 -0
  1121. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/tc_linked_timezone.rb +155 -0
  1122. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/tc_linked_timezone_info.rb +23 -0
  1123. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/tc_offset_rationals.rb +23 -0
  1124. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/tc_ruby_core_support.rb +168 -0
  1125. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/tc_ruby_country_info.rb +110 -0
  1126. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/tc_ruby_data_source.rb +143 -0
  1127. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/tc_time_or_datetime.rb +654 -0
  1128. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/tc_timezone.rb +1350 -0
  1129. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/tc_timezone_definition.rb +113 -0
  1130. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/tc_timezone_index_definition.rb +73 -0
  1131. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/tc_timezone_info.rb +11 -0
  1132. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/tc_timezone_london.rb +143 -0
  1133. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/tc_timezone_melbourne.rb +142 -0
  1134. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/tc_timezone_new_york.rb +142 -0
  1135. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/tc_timezone_offset.rb +126 -0
  1136. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/tc_timezone_period.rb +555 -0
  1137. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/tc_timezone_proxy.rb +136 -0
  1138. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/tc_timezone_transition.rb +366 -0
  1139. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/tc_timezone_transition_definition.rb +295 -0
  1140. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/tc_timezone_utc.rb +27 -0
  1141. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/tc_transition_data_timezone_info.rb +423 -0
  1142. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/tc_zoneinfo_country_info.rb +78 -0
  1143. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/tc_zoneinfo_data_source.rb +1195 -0
  1144. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/tc_zoneinfo_timezone_info.rb +1232 -0
  1145. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/test_utils.rb +163 -0
  1146. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/ts_all.rb +7 -0
  1147. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/ts_all_ruby.rb +5 -0
  1148. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/ts_all_zoneinfo.rb +7 -0
  1149. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/tzinfo-data/tzinfo/data.rb +8 -0
  1150. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/tzinfo-data/tzinfo/data/definitions/America/Argentina/Buenos_Aires.rb +89 -0
  1151. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/tzinfo-data/tzinfo/data/definitions/America/New_York.rb +315 -0
  1152. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/tzinfo-data/tzinfo/data/definitions/Australia/Melbourne.rb +218 -0
  1153. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/tzinfo-data/tzinfo/data/definitions/EST.rb +19 -0
  1154. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/tzinfo-data/tzinfo/data/definitions/Etc/GMT__m__1.rb +21 -0
  1155. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/tzinfo-data/tzinfo/data/definitions/Etc/GMT__p__1.rb +21 -0
  1156. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/tzinfo-data/tzinfo/data/definitions/Etc/UTC.rb +21 -0
  1157. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/tzinfo-data/tzinfo/data/definitions/Europe/Amsterdam.rb +261 -0
  1158. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/tzinfo-data/tzinfo/data/definitions/Europe/Andorra.rb +186 -0
  1159. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/tzinfo-data/tzinfo/data/definitions/Europe/London.rb +321 -0
  1160. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/tzinfo-data/tzinfo/data/definitions/Europe/Paris.rb +265 -0
  1161. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/tzinfo-data/tzinfo/data/definitions/Europe/Prague.rb +220 -0
  1162. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/tzinfo-data/tzinfo/data/definitions/UTC.rb +16 -0
  1163. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/tzinfo-data/tzinfo/data/indexes/countries.rb +927 -0
  1164. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/tzinfo-data/tzinfo/data/indexes/timezones.rb +596 -0
  1165. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/tzinfo-data/tzinfo/data/version.rb +14 -0
  1166. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/zoneinfo/America/Argentina/Buenos_Aires +0 -0
  1167. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/zoneinfo/America/New_York +0 -0
  1168. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/zoneinfo/Australia/Melbourne +0 -0
  1169. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/zoneinfo/EST +0 -0
  1170. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/zoneinfo/Etc/UTC +0 -0
  1171. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/zoneinfo/Europe/Amsterdam +0 -0
  1172. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/zoneinfo/Europe/Andorra +0 -0
  1173. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/zoneinfo/Europe/London +0 -0
  1174. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/zoneinfo/Europe/Paris +0 -0
  1175. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/zoneinfo/Europe/Prague +0 -0
  1176. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/zoneinfo/Factory +0 -0
  1177. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/zoneinfo/iso3166.tab +275 -0
  1178. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/zoneinfo/leapseconds +61 -0
  1179. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/zoneinfo/posix/Europe/London +0 -0
  1180. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/zoneinfo/posixrules +0 -0
  1181. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/zoneinfo/right/Europe/London +0 -0
  1182. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/zoneinfo/zone.tab +439 -0
  1183. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/test/zoneinfo/zone1970.tab +369 -0
  1184. data/vendor/bundle/ruby/2.5.0/gems/tzinfo-1.2.5/tzinfo.gemspec +21 -0
  1185. data/vendor/bundle/ruby/2.5.0/specifications/activemodel-5.2.3.gemspec +34 -0
  1186. data/vendor/bundle/ruby/2.5.0/specifications/activemodel-serializers-xml-1.0.2.gemspec +46 -0
  1187. data/vendor/bundle/ruby/2.5.0/specifications/activeresource-5.1.0.gemspec +48 -0
  1188. data/vendor/bundle/ruby/2.5.0/specifications/activesupport-5.2.3.gemspec +44 -0
  1189. data/vendor/bundle/ruby/2.5.0/specifications/allison-2.0.3.gemspec +23 -0
  1190. data/vendor/bundle/ruby/2.5.0/specifications/builder-3.2.3.gemspec +21 -0
  1191. data/vendor/bundle/ruby/2.5.0/specifications/concurrent-ruby-1.1.5.gemspec +24 -0
  1192. data/vendor/bundle/ruby/2.5.0/specifications/echoe-4.6.6.gemspec +46 -0
  1193. data/vendor/bundle/ruby/2.5.0/specifications/i18n-1.6.0.gemspec +35 -0
  1194. data/vendor/bundle/ruby/2.5.0/specifications/json_pure-2.2.0.gemspec +39 -0
  1195. data/vendor/bundle/ruby/2.5.0/specifications/minitest-5.11.3.gemspec +39 -0
  1196. data/vendor/bundle/ruby/2.5.0/specifications/rake-12.3.2.gemspec +49 -0
  1197. data/vendor/bundle/ruby/2.5.0/specifications/rdoc-6.1.1.gemspec +50 -0
  1198. data/vendor/bundle/ruby/2.5.0/specifications/rubyforge-2.0.4.gemspec +36 -0
  1199. data/vendor/bundle/ruby/2.5.0/specifications/thread_safe-0.3.6.gemspec +38 -0
  1200. data/vendor/bundle/ruby/2.5.0/specifications/tzinfo-1.2.5.gemspec +37 -0
  1201. metadata +1283 -91
  1202. metadata.gz.sig +2 -0
  1203. data/sbin/rake-deploy1.sh +0 -9
  1204. data/sbin/rake-deploy2.sh +0 -11
  1205. data/sbin/reboot.rb +0 -3
  1206. data/sbin/ric_reboot.rb +0 -3
@@ -0,0 +1,46 @@
1
+ # frozen_string_literal: true
2
+
3
+ #--
4
+ # Copyright (c) 2006-2012 David Heinemeier Hansson
5
+ #
6
+ # Permission is hereby granted, free of charge, to any person obtaining
7
+ # a copy of this software and associated documentation files (the
8
+ # "Software"), to deal in the Software without restriction, including
9
+ # without limitation the rights to use, copy, modify, merge, publish,
10
+ # distribute, sublicense, and/or sell copies of the Software, and to
11
+ # permit persons to whom the Software is furnished to do so, subject to
12
+ # the following conditions:
13
+ #
14
+ # The above copyright notice and this permission notice shall be
15
+ # included in all copies or substantial portions of the Software.
16
+ #
17
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18
+ # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19
+ # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20
+ # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21
+ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22
+ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23
+ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24
+ #++
25
+
26
+ require "active_support"
27
+ require "active_model"
28
+ require "active_resource/exceptions"
29
+ require "active_resource/version"
30
+
31
+ module ActiveResource
32
+ extend ActiveSupport::Autoload
33
+
34
+ autoload :Base
35
+ autoload :Callbacks
36
+ autoload :Connection
37
+ autoload :CustomMethods
38
+ autoload :Formats
39
+ autoload :HttpMock
40
+ autoload :Schema
41
+ autoload :Singleton
42
+ autoload :Validations
43
+ autoload :Collection
44
+ end
45
+
46
+ require "active_resource/railtie" if defined?(Rails.application)
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ActiveResource
4
+ class ActiveJobSerializer < ActiveJob::Serializers::ObjectSerializer
5
+ def serialize(resource)
6
+ super(
7
+ "class" => resource.class.name,
8
+ "persisted" => resource.persisted?,
9
+ "prefix_options" => resource.prefix_options.as_json,
10
+ "attributes" => resource.attributes.as_json
11
+ )
12
+ end
13
+
14
+ def deserialize(hash)
15
+ hash["class"].constantize.new(hash["attributes"]).tap do |resource|
16
+ resource.persisted = hash["persisted"]
17
+ resource.prefix_options = hash["prefix_options"]
18
+ end
19
+ end
20
+
21
+ private
22
+ def klass
23
+ ActiveResource::Base
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,175 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ActiveResource::Associations
4
+ module Builder
5
+ autoload :Association, "active_resource/associations/builder/association"
6
+ autoload :HasMany, "active_resource/associations/builder/has_many"
7
+ autoload :HasOne, "active_resource/associations/builder/has_one"
8
+ autoload :BelongsTo, "active_resource/associations/builder/belongs_to"
9
+ end
10
+
11
+
12
+
13
+ # Specifies a one-to-many association.
14
+ #
15
+ # === Options
16
+ # [:class_name]
17
+ # Specify the class name of the association. This class name would
18
+ # be used for resolving the association class.
19
+ #
20
+ # ==== Example for [:class_name] - option
21
+ # GET /posts/123.json delivers following response body:
22
+ # {
23
+ # title: "ActiveResource now has associations",
24
+ # body: "Lorem Ipsum"
25
+ # comments: [
26
+ # {
27
+ # content: "..."
28
+ # },
29
+ # {
30
+ # content: "..."
31
+ # }
32
+ # ]
33
+ # }
34
+ # ====
35
+ #
36
+ # <tt>has_many :comments, :class_name => 'myblog/comment'</tt>
37
+ # Would resolve those comments into the <tt>Myblog::Comment</tt> class.
38
+ #
39
+ # If the response body does not contain an attribute matching the association name
40
+ # a request sent to the index action under the current resource.
41
+ # For the example above, if the comments are not present the requested path would be:
42
+ # GET /posts/123/comments.xml
43
+ def has_many(name, options = {})
44
+ Builder::HasMany.build(self, name, options)
45
+ end
46
+
47
+ # Specifies a one-to-one association.
48
+ #
49
+ # === Options
50
+ # [:class_name]
51
+ # Specify the class name of the association. This class name would
52
+ # be used for resolving the association class.
53
+ #
54
+ # ==== Example for [:class_name] - option
55
+ # GET /posts/1.json delivers following response body:
56
+ # {
57
+ # title: "ActiveResource now has associations",
58
+ # body: "Lorem Ipsum",
59
+ # author: {
60
+ # name: "Gabby Blogger",
61
+ # }
62
+ # }
63
+ # ====
64
+ #
65
+ # <tt>has_one :author, :class_name => 'myblog/author'</tt>
66
+ # Would resolve this author into the <tt>Myblog::Author</tt> class.
67
+ #
68
+ # If the response body does not contain an attribute matching the association name
69
+ # a request is sent to a singleton path under the current resource.
70
+ # For example, if a Product class <tt>has_one :inventory</tt> calling <tt>Product#inventory</tt>
71
+ # will generate a request on /products/:product_id/inventory.json.
72
+ #
73
+ def has_one(name, options = {})
74
+ Builder::HasOne.build(self, name, options)
75
+ end
76
+
77
+ # Specifies a one-to-one association with another class. This class should only be used
78
+ # if this class contains the foreign key.
79
+ #
80
+ # Methods will be added for retrieval and query for a single associated object, for which
81
+ # this object holds an id:
82
+ #
83
+ # [association(force_reload = false)]
84
+ # Returns the associated object. +nil+ is returned if the foreign key is +nil+.
85
+ # Throws a ActiveResource::ResourceNotFound exception if the foreign key is not +nil+
86
+ # and the resource is not found.
87
+ #
88
+ # (+association+ is replaced with the symbol passed as the first argument, so
89
+ # <tt>belongs_to :post</tt> would add among others <tt>post.nil?</tt>.
90
+ #
91
+ # === Example
92
+ #
93
+ # A Comment class declares <tt>belongs_to :post</tt>, which will add:
94
+ # * <tt>Comment#post</tt> (similar to <tt>Post.find(post_id)</tt>)
95
+ # The declaration can also include an options hash to specialize the behavior of the association.
96
+ #
97
+ # === Options
98
+ # [:class_name]
99
+ # Specify the class name for the association. Use it only if that name can't be inferred from association name.
100
+ # So <tt>belongs_to :post</tt> will by default be linked to the Post class, but if the real class name is Article,
101
+ # you'll have to specify it with this option.
102
+ # [:foreign_key]
103
+ # Specify the foreign key used for the association. By default this is guessed to be the name
104
+ # of the association with an "_id" suffix. So a class that defines a <tt>belongs_to :post</tt>
105
+ # association will use "post_id" as the default <tt>:foreign_key</tt>. Similarly,
106
+ # <tt>belongs_to :article, :class_name => "Post"</tt> will use a foreign key
107
+ # of "article_id".
108
+ #
109
+ # Option examples:
110
+ # <tt>belongs_to :customer, :class_name => 'User'</tt>
111
+ # Creates a belongs_to association called customer which is represented through the <tt>User</tt> class.
112
+ #
113
+ # <tt>belongs_to :customer, :foreign_key => 'user_id'</tt>
114
+ # Creates a belongs_to association called customer which would be resolved by the foreign_key <tt>user_id</tt> instead of <tt>customer_id</tt>
115
+ #
116
+ def belongs_to(name, options = {})
117
+ Builder::BelongsTo.build(self, name, options)
118
+ end
119
+
120
+ # Defines the belongs_to association finder method
121
+ def defines_belongs_to_finder_method(reflection)
122
+ method_name = reflection.name
123
+ ivar_name = :"@#{method_name}"
124
+
125
+ if method_defined?(method_name)
126
+ instance_variable_set(ivar_name, nil)
127
+ remove_method(method_name)
128
+ end
129
+
130
+ define_method(method_name) do
131
+ if instance_variable_defined?(ivar_name)
132
+ instance_variable_get(ivar_name)
133
+ elsif attributes.include?(method_name)
134
+ attributes[method_name]
135
+ elsif association_id = send(reflection.foreign_key)
136
+ instance_variable_set(ivar_name, reflection.klass.find(association_id))
137
+ end
138
+ end
139
+ end
140
+
141
+ def defines_has_many_finder_method(reflection)
142
+ method_name = reflection.name
143
+ ivar_name = :"@#{method_name}"
144
+
145
+ define_method(method_name) do
146
+ if instance_variable_defined?(ivar_name)
147
+ instance_variable_get(ivar_name)
148
+ elsif attributes.include?(method_name)
149
+ attributes[method_name]
150
+ elsif !new_record?
151
+ instance_variable_set(ivar_name, reflection.klass.find(:all, params: { :"#{self.class.element_name}_id" => self.id }))
152
+ else
153
+ instance_variable_set(ivar_name, self.class.collection_parser.new)
154
+ end
155
+ end
156
+ end
157
+
158
+ # Defines the has_one association
159
+ def defines_has_one_finder_method(reflection)
160
+ method_name = reflection.name
161
+ ivar_name = :"@#{method_name}"
162
+
163
+ define_method(method_name) do
164
+ if instance_variable_defined?(ivar_name)
165
+ instance_variable_get(ivar_name)
166
+ elsif attributes.include?(method_name)
167
+ attributes[method_name]
168
+ elsif reflection.klass.respond_to?(:singleton_name)
169
+ instance_variable_set(ivar_name, reflection.klass.find(params: { :"#{self.class.element_name}_id" => self.id }))
170
+ else
171
+ instance_variable_set(ivar_name, reflection.klass.find(:one, from: "/#{self.class.collection_name}/#{self.id}/#{method_name}#{self.class.format_extension}"))
172
+ end
173
+ end
174
+ end
175
+ end
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ActiveResource::Associations::Builder
4
+ class Association #:nodoc:
5
+ # providing a Class-Variable, which will have a different store of subclasses
6
+ class_attribute :valid_options
7
+ self.valid_options = [:class_name]
8
+
9
+ # would identify subclasses of association
10
+ class_attribute :macro
11
+
12
+ attr_reader :model, :name, :options, :klass
13
+
14
+ def self.build(model, name, options)
15
+ new(model, name, options).build
16
+ end
17
+
18
+ def initialize(model, name, options)
19
+ @model, @name, @options = model, name, options
20
+ end
21
+
22
+ def build
23
+ validate_options
24
+ model.create_reflection(self.class.macro, name, options)
25
+ end
26
+
27
+ private
28
+
29
+ def validate_options
30
+ options.assert_valid_keys(self.class.valid_options)
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ActiveResource::Associations::Builder
4
+ class BelongsTo < Association
5
+ self.valid_options += [:foreign_key]
6
+
7
+ self.macro = :belongs_to
8
+
9
+ def build
10
+ validate_options
11
+ reflection = model.create_reflection(self.class.macro, name, options)
12
+ model.defines_belongs_to_finder_method(reflection)
13
+ reflection
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ActiveResource::Associations::Builder
4
+ class HasMany < Association
5
+ self.macro = :has_many
6
+
7
+ def build
8
+ validate_options
9
+ model.create_reflection(self.class.macro, name, options).tap do |reflection|
10
+ model.defines_has_many_finder_method(reflection)
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ActiveResource::Associations::Builder
4
+ class HasOne < Association
5
+ self.macro = :has_one
6
+
7
+ def build
8
+ validate_options
9
+ model.create_reflection(self.class.macro, name, options).tap do |reflection|
10
+ model.defines_has_one_finder_method(reflection)
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,1695 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "active_support"
4
+ require "active_support/core_ext/class/attribute_accessors"
5
+ require "active_support/core_ext/class/attribute"
6
+ require "active_support/core_ext/hash/indifferent_access"
7
+ require "active_support/core_ext/kernel/reporting"
8
+ require "active_support/core_ext/module/delegation"
9
+ require "active_support/core_ext/module/aliasing"
10
+ require "active_support/core_ext/object/blank"
11
+ require "active_support/core_ext/object/to_query"
12
+ require "active_support/core_ext/object/duplicable"
13
+ require "set"
14
+ require "uri"
15
+
16
+ require "active_support/core_ext/uri"
17
+ require "active_resource/connection"
18
+ require "active_resource/formats"
19
+ require "active_resource/schema"
20
+ require "active_resource/log_subscriber"
21
+ require "active_resource/associations"
22
+ require "active_resource/reflection"
23
+ require "active_resource/threadsafe_attributes"
24
+
25
+ require "active_model/serializers/xml"
26
+
27
+ module ActiveResource
28
+ # ActiveResource::Base is the main class for mapping RESTful resources as models in a Rails application.
29
+ #
30
+ # For an outline of what Active Resource is capable of, see its {README}[link:files/activeresource/README_rdoc.html].
31
+ #
32
+ # == Automated mapping
33
+ #
34
+ # Active Resource objects represent your RESTful resources as manipulatable Ruby objects. To map resources
35
+ # to Ruby objects, Active Resource only needs a class name that corresponds to the resource name (e.g., the class
36
+ # Person maps to the resources people, very similarly to Active Record) and a +site+ value, which holds the
37
+ # URI of the resources.
38
+ #
39
+ # class Person < ActiveResource::Base
40
+ # self.site = "https://api.people.com"
41
+ # end
42
+ #
43
+ # Now the Person class is mapped to RESTful resources located at <tt>https://api.people.com/people/</tt>, and
44
+ # you can now use Active Resource's life cycle methods to manipulate resources. In the case where you already have
45
+ # an existing model with the same name as the desired RESTful resource you can set the +element_name+ value.
46
+ #
47
+ # class PersonResource < ActiveResource::Base
48
+ # self.site = "https://api.people.com"
49
+ # self.element_name = "person"
50
+ # end
51
+ #
52
+ # If your Active Resource object is required to use an HTTP proxy you can set the +proxy+ value which holds a URI.
53
+ #
54
+ # class PersonResource < ActiveResource::Base
55
+ # self.site = "https://api.people.com"
56
+ # self.proxy = "https://user:password@proxy.people.com:8080"
57
+ # end
58
+ #
59
+ #
60
+ # == Life cycle methods
61
+ #
62
+ # Active Resource exposes methods for creating, finding, updating, and deleting resources
63
+ # from REST web services.
64
+ #
65
+ # ryan = Person.new(:first => 'Ryan', :last => 'Daigle')
66
+ # ryan.save # => true
67
+ # ryan.id # => 2
68
+ # Person.exists?(ryan.id) # => true
69
+ # ryan.exists? # => true
70
+ #
71
+ # ryan = Person.find(1)
72
+ # # Resource holding our newly created Person object
73
+ #
74
+ # ryan.first = 'Rizzle'
75
+ # ryan.save # => true
76
+ #
77
+ # ryan.destroy # => true
78
+ #
79
+ # As you can see, these are very similar to Active Record's life cycle methods for database records.
80
+ # You can read more about each of these methods in their respective documentation.
81
+ #
82
+ # === Custom REST methods
83
+ #
84
+ # Since simple CRUD/life cycle methods can't accomplish every task, Active Resource also supports
85
+ # defining your own custom REST methods. To invoke them, Active Resource provides the <tt>get</tt>,
86
+ # <tt>post</tt>, <tt>put</tt> and <tt>delete</tt> methods where you can specify a custom REST method
87
+ # name to invoke.
88
+ #
89
+ # # POST to the custom 'register' REST method, i.e. POST /people/new/register.json.
90
+ # Person.new(:name => 'Ryan').post(:register)
91
+ # # => { :id => 1, :name => 'Ryan', :position => 'Clerk' }
92
+ #
93
+ # # PUT an update by invoking the 'promote' REST method, i.e. PUT /people/1/promote.json?position=Manager.
94
+ # Person.find(1).put(:promote, :position => 'Manager')
95
+ # # => { :id => 1, :name => 'Ryan', :position => 'Manager' }
96
+ #
97
+ # # GET all the positions available, i.e. GET /people/positions.json.
98
+ # Person.get(:positions)
99
+ # # => [{:name => 'Manager'}, {:name => 'Clerk'}]
100
+ #
101
+ # # DELETE to 'fire' a person, i.e. DELETE /people/1/fire.json.
102
+ # Person.find(1).delete(:fire)
103
+ #
104
+ # For more information on using custom REST methods, see the
105
+ # ActiveResource::CustomMethods documentation.
106
+ #
107
+ # == Validations
108
+ #
109
+ # You can validate resources client side by overriding validation methods in the base class.
110
+ #
111
+ # class Person < ActiveResource::Base
112
+ # self.site = "https://api.people.com"
113
+ # protected
114
+ # def validate
115
+ # errors.add("last", "has invalid characters") unless last =~ /[a-zA-Z]*/
116
+ # end
117
+ # end
118
+ #
119
+ # See the ActiveResource::Validations documentation for more information.
120
+ #
121
+ # == Authentication
122
+ #
123
+ # Many REST APIs require authentication. The HTTP spec describes two ways to
124
+ # make requests with a username and password (see RFC 2617).
125
+ #
126
+ # Basic authentication simply sends a username and password along with HTTP
127
+ # requests. These sensitive credentials are sent unencrypted, visible to
128
+ # any onlooker, so this scheme should only be used with SSL.
129
+ #
130
+ # Digest authentication sends a crytographic hash of the username, password,
131
+ # HTTP method, URI, and a single-use secret key provided by the server.
132
+ # Sensitive credentials aren't visible to onlookers, so digest authentication
133
+ # doesn't require SSL. However, this doesn't mean the connection is secure!
134
+ # Just the username and password.
135
+ #
136
+ # (You really, really want to use SSL. There's little reason not to.)
137
+ #
138
+ # === Picking an authentication scheme
139
+ #
140
+ # Basic authentication is the default. To switch to digest authentication,
141
+ # set +auth_type+ to +:digest+:
142
+ #
143
+ # class Person < ActiveResource::Base
144
+ # self.auth_type = :digest
145
+ # end
146
+ #
147
+ # === Setting the username and password
148
+ #
149
+ # Set +user+ and +password+ on the class, or include them in the +site+ URL.
150
+ #
151
+ # class Person < ActiveResource::Base
152
+ # # Set user and password directly:
153
+ # self.user = "ryan"
154
+ # self.password = "password"
155
+ #
156
+ # # Or include them in the site:
157
+ # self.site = "https://ryan:password@api.people.com"
158
+ # end
159
+ #
160
+ # === Certificate Authentication
161
+ #
162
+ # You can also authenticate using an X509 certificate. <tt>See ssl_options=</tt> for all options.
163
+ #
164
+ # class Person < ActiveResource::Base
165
+ # self.site = "https://secure.api.people.com/"
166
+ #
167
+ # File.open(pem_file_path, 'rb') do |pem_file|
168
+ # self.ssl_options = {
169
+ # cert: OpenSSL::X509::Certificate.new(pem_file),
170
+ # key: OpenSSL::PKey::RSA.new(pem_file),
171
+ # ca_path: "/path/to/OpenSSL/formatted/CA_Certs",
172
+ # verify_mode: OpenSSL::SSL::VERIFY_PEER }
173
+ # end
174
+ # end
175
+ #
176
+ #
177
+ # == Errors & Validation
178
+ #
179
+ # Error handling and validation is handled in much the same manner as you're used to seeing in
180
+ # Active Record. Both the response code in the HTTP response and the body of the response are used to
181
+ # indicate that an error occurred.
182
+ #
183
+ # === Resource errors
184
+ #
185
+ # When a GET is requested for a resource that does not exist, the HTTP <tt>404</tt> (Resource Not Found)
186
+ # response code will be returned from the server which will raise an ActiveResource::ResourceNotFound
187
+ # exception.
188
+ #
189
+ # # GET https://api.people.com/people/999.json
190
+ # ryan = Person.find(999) # 404, raises ActiveResource::ResourceNotFound
191
+ #
192
+ #
193
+ # <tt>404</tt> is just one of the HTTP error response codes that Active Resource will handle with its own exception. The
194
+ # following HTTP response codes will also result in these exceptions:
195
+ #
196
+ # * 200..399 - Valid response. No exceptions, other than these redirects:
197
+ # * 301, 302, 303, 307 - ActiveResource::Redirection
198
+ # * 400 - ActiveResource::BadRequest
199
+ # * 401 - ActiveResource::UnauthorizedAccess
200
+ # * 403 - ActiveResource::ForbiddenAccess
201
+ # * 404 - ActiveResource::ResourceNotFound
202
+ # * 405 - ActiveResource::MethodNotAllowed
203
+ # * 409 - ActiveResource::ResourceConflict
204
+ # * 410 - ActiveResource::ResourceGone
205
+ # * 422 - ActiveResource::ResourceInvalid (rescued by save as validation errors)
206
+ # * 401..499 - ActiveResource::ClientError
207
+ # * 500..599 - ActiveResource::ServerError
208
+ # * Other - ActiveResource::ConnectionError
209
+ #
210
+ # These custom exceptions allow you to deal with resource errors more naturally and with more precision
211
+ # rather than returning a general HTTP error. For example:
212
+ #
213
+ # begin
214
+ # ryan = Person.find(my_id)
215
+ # rescue ActiveResource::ResourceNotFound
216
+ # redirect_to :action => 'not_found'
217
+ # rescue ActiveResource::ResourceConflict, ActiveResource::ResourceInvalid
218
+ # redirect_to :action => 'new'
219
+ # end
220
+ #
221
+ # When a GET is requested for a nested resource and you don't provide the prefix_param
222
+ # an ActiveResource::MissingPrefixParam will be raised.
223
+ #
224
+ # class Comment < ActiveResource::Base
225
+ # self.site = "https://someip.com/posts/:post_id"
226
+ # end
227
+ #
228
+ # Comment.find(1)
229
+ # # => ActiveResource::MissingPrefixParam: post_id prefix_option is missing
230
+ #
231
+ # === Validation errors
232
+ #
233
+ # Active Resource supports validations on resources and will return errors if any of these validations fail
234
+ # (e.g., "First name can not be blank" and so on). These types of errors are denoted in the response by
235
+ # a response code of <tt>422</tt> and an JSON or XML representation of the validation errors. The save operation will
236
+ # then fail (with a <tt>false</tt> return value) and the validation errors can be accessed on the resource in question.
237
+ #
238
+ # ryan = Person.find(1)
239
+ # ryan.first # => ''
240
+ # ryan.save # => false
241
+ #
242
+ # # When
243
+ # # PUT https://api.people.com/people/1.xml
244
+ # # or
245
+ # # PUT https://api.people.com/people/1.json
246
+ # # is requested with invalid values, the response is:
247
+ # #
248
+ # # Response (422):
249
+ # # <errors><error>First cannot be empty</error></errors>
250
+ # # or
251
+ # # {"errors":{"first":["cannot be empty"]}}
252
+ # #
253
+ #
254
+ # ryan.errors.invalid?(:first) # => true
255
+ # ryan.errors.full_messages # => ['First cannot be empty']
256
+ #
257
+ # For backwards-compatibility with older endpoints, the following formats are also supported in JSON responses:
258
+ #
259
+ # # {"errors":['First cannot be empty']}
260
+ # # This was the required format for previous versions of ActiveResource
261
+ # # {"first":["cannot be empty"]}
262
+ # # This was the default format produced by respond_with in ActionController <3.2.1
263
+ #
264
+ # Parsing either of these formats will result in a deprecation warning.
265
+ #
266
+ # Learn more about Active Resource's validation features in the ActiveResource::Validations documentation.
267
+ #
268
+ # === Timeouts
269
+ #
270
+ # Active Resource relies on HTTP to access RESTful APIs and as such is inherently susceptible to slow or
271
+ # unresponsive servers. In such cases, your Active Resource method calls could \timeout. You can control the
272
+ # amount of time before Active Resource times out with the +timeout+ variable.
273
+ #
274
+ # class Person < ActiveResource::Base
275
+ # self.site = "https://api.people.com"
276
+ # self.timeout = 5
277
+ # end
278
+ #
279
+ # This sets the +timeout+ to 5 seconds. You can adjust the +timeout+ to a value suitable for the RESTful API
280
+ # you are accessing. It is recommended to set this to a reasonably low value to allow your Active Resource
281
+ # clients (especially if you are using Active Resource in a Rails application) to fail-fast (see
282
+ # http://en.wikipedia.org/wiki/Fail-fast) rather than cause cascading failures that could incapacitate your
283
+ # server.
284
+ #
285
+ # When a \timeout occurs, an ActiveResource::TimeoutError is raised. You should rescue from
286
+ # ActiveResource::TimeoutError in your Active Resource method calls.
287
+ #
288
+ # Internally, Active Resource relies on Ruby's Net::HTTP library to make HTTP requests. Setting +timeout+
289
+ # sets the <tt>read_timeout</tt> of the internal Net::HTTP instance to the same value. The default
290
+ # <tt>read_timeout</tt> is 60 seconds on most Ruby implementations.
291
+ #
292
+ # Active Resource also supports distinct +open_timeout+ (time to connect) and +read_timeout+ (how long to
293
+ # wait for an upstream response). This is inline with supported +Net::HTTP+ timeout configuration and allows
294
+ # for finer control of client timeouts depending on context.
295
+ #
296
+ # class Person < ActiveResource::Base
297
+ # self.site = "https://api.people.com"
298
+ # self.open_timeout = 2
299
+ # self.read_timeout = 10
300
+ # end
301
+ class Base
302
+ ##
303
+ # :singleton-method:
304
+ # The logger for diagnosing and tracing Active Resource calls.
305
+ cattr_reader :logger
306
+
307
+ def self.logger=(logger)
308
+ self._connection = nil
309
+ @@logger = logger
310
+ end
311
+
312
+ class_attribute :_format
313
+ class_attribute :_collection_parser
314
+ class_attribute :include_format_in_path
315
+ self.include_format_in_path = true
316
+
317
+ class_attribute :connection_class
318
+ self.connection_class = Connection
319
+
320
+ class << self
321
+ include ThreadsafeAttributes
322
+ threadsafe_attribute :_headers, :_connection, :_user, :_password, :_site, :_proxy
323
+
324
+ # Creates a schema for this resource - setting the attributes that are
325
+ # known prior to fetching an instance from the remote system.
326
+ #
327
+ # The schema helps define the set of <tt>known_attributes</tt> of the
328
+ # current resource.
329
+ #
330
+ # There is no need to specify a schema for your Active Resource. If
331
+ # you do not, the <tt>known_attributes</tt> will be guessed from the
332
+ # instance attributes returned when an instance is fetched from the
333
+ # remote system.
334
+ #
335
+ # example:
336
+ # class Person < ActiveResource::Base
337
+ # schema do
338
+ # # define each attribute separately
339
+ # attribute 'name', :string
340
+ #
341
+ # # or use the convenience methods and pass >=1 attribute names
342
+ # string 'eye_color', 'hair_color'
343
+ # integer 'age'
344
+ # float 'height', 'weight'
345
+ #
346
+ # # unsupported types should be left as strings
347
+ # # overload the accessor methods if you need to convert them
348
+ # attribute 'created_at', 'string'
349
+ # end
350
+ # end
351
+ #
352
+ # p = Person.new
353
+ # p.respond_to? :name # => true
354
+ # p.respond_to? :age # => true
355
+ # p.name # => nil
356
+ # p.age # => nil
357
+ #
358
+ # j = Person.find_by_name('John')
359
+ # <person><name>John</name><age>34</age><num_children>3</num_children></person>
360
+ # j.respond_to? :name # => true
361
+ # j.respond_to? :age # => true
362
+ # j.name # => 'John'
363
+ # j.age # => '34' # note this is a string!
364
+ # j.num_children # => '3' # note this is a string!
365
+ #
366
+ # p.num_children # => NoMethodError
367
+ #
368
+ # Attribute-types must be one of: <tt>string, text, integer, float, decimal, datetime, timestamp, time, date, binary, boolean</tt>
369
+ #
370
+ # Note: at present the attribute-type doesn't do anything, but stay
371
+ # tuned...
372
+ # Shortly it will also *cast* the value of the returned attribute.
373
+ # ie:
374
+ # j.age # => 34 # cast to an integer
375
+ # j.weight # => '65' # still a string!
376
+ #
377
+ def schema(&block)
378
+ if block_given?
379
+ schema_definition = Schema.new
380
+ schema_definition.instance_eval(&block)
381
+
382
+ # skip out if we didn't define anything
383
+ return unless schema_definition.attrs.present?
384
+
385
+ @schema ||= {}.with_indifferent_access
386
+ @known_attributes ||= []
387
+
388
+ schema_definition.attrs.each do |k, v|
389
+ @schema[k] = v
390
+ @known_attributes << k
391
+ end
392
+
393
+ @schema
394
+ else
395
+ @schema ||= nil
396
+ end
397
+ end
398
+
399
+ # Alternative, direct way to specify a <tt>schema</tt> for this
400
+ # Resource. <tt>schema</tt> is more flexible, but this is quick
401
+ # for a very simple schema.
402
+ #
403
+ # Pass the schema as a hash with the keys being the attribute-names
404
+ # and the value being one of the accepted attribute types (as defined
405
+ # in <tt>schema</tt>)
406
+ #
407
+ # example:
408
+ #
409
+ # class Person < ActiveResource::Base
410
+ # schema = {'name' => :string, 'age' => :integer }
411
+ # end
412
+ #
413
+ # The keys/values can be strings or symbols. They will be converted to
414
+ # strings.
415
+ #
416
+ def schema=(the_schema)
417
+ unless the_schema.present?
418
+ # purposefully nulling out the schema
419
+ @schema = nil
420
+ @known_attributes = []
421
+ return
422
+ end
423
+
424
+ raise ArgumentError, "Expected a hash" unless the_schema.kind_of? Hash
425
+
426
+ schema do
427
+ the_schema.each { |k, v| attribute(k, v) }
428
+ end
429
+ end
430
+
431
+ # Returns the list of known attributes for this resource, gathered
432
+ # from the provided <tt>schema</tt>
433
+ # Attributes that are known will cause your resource to return 'true'
434
+ # when <tt>respond_to?</tt> is called on them. A known attribute will
435
+ # return nil if not set (rather than <tt>MethodNotFound</tt>); thus
436
+ # known attributes can be used with <tt>validates_presence_of</tt>
437
+ # without a getter-method.
438
+ def known_attributes
439
+ @known_attributes ||= []
440
+ end
441
+
442
+ # Gets the URI of the REST resources to map for this class. The site variable is required for
443
+ # Active Resource's mapping to work.
444
+ def site
445
+ # Not using superclass_delegating_reader because don't want subclasses to modify superclass instance
446
+ #
447
+ # With superclass_delegating_reader
448
+ #
449
+ # Parent.site = 'https://anonymous@test.com'
450
+ # Subclass.site # => 'https://anonymous@test.com'
451
+ # Subclass.site.user = 'david'
452
+ # Parent.site # => 'https://david@test.com'
453
+ #
454
+ # Without superclass_delegating_reader (expected behavior)
455
+ #
456
+ # Parent.site = 'https://anonymous@test.com'
457
+ # Subclass.site # => 'https://anonymous@test.com'
458
+ # Subclass.site.user = 'david' # => TypeError: can't modify frozen object
459
+ #
460
+ if _site_defined?
461
+ _site
462
+ elsif superclass != Object && superclass.site
463
+ superclass.site.dup.freeze
464
+ end
465
+ end
466
+
467
+ # Sets the URI of the REST resources to map for this class to the value in the +site+ argument.
468
+ # The site variable is required for Active Resource's mapping to work.
469
+ def site=(site)
470
+ self._connection = nil
471
+ if site.nil?
472
+ self._site = nil
473
+ else
474
+ self._site = create_site_uri_from(site)
475
+ self._user = URI.parser.unescape(_site.user) if _site.user
476
+ self._password = URI.parser.unescape(_site.password) if _site.password
477
+ end
478
+ end
479
+
480
+ # Gets the \proxy variable if a proxy is required
481
+ def proxy
482
+ # Not using superclass_delegating_reader. See +site+ for explanation
483
+ if _proxy_defined?
484
+ _proxy
485
+ elsif superclass != Object && superclass.proxy
486
+ superclass.proxy.dup.freeze
487
+ end
488
+ end
489
+
490
+ # Sets the URI of the http proxy to the value in the +proxy+ argument.
491
+ def proxy=(proxy)
492
+ self._connection = nil
493
+ self._proxy = proxy.nil? ? nil : create_proxy_uri_from(proxy)
494
+ end
495
+
496
+ # Gets the \user for REST HTTP authentication.
497
+ def user
498
+ # Not using superclass_delegating_reader. See +site+ for explanation
499
+ if _user_defined?
500
+ _user
501
+ elsif superclass != Object && superclass.user
502
+ superclass.user.dup.freeze
503
+ end
504
+ end
505
+
506
+ # Sets the \user for REST HTTP authentication.
507
+ def user=(user)
508
+ self._connection = nil
509
+ self._user = user
510
+ end
511
+
512
+ # Gets the \password for REST HTTP authentication.
513
+ def password
514
+ # Not using superclass_delegating_reader. See +site+ for explanation
515
+ if _password_defined?
516
+ _password
517
+ elsif superclass != Object && superclass.password
518
+ superclass.password.dup.freeze
519
+ end
520
+ end
521
+
522
+ # Sets the \password for REST HTTP authentication.
523
+ def password=(password)
524
+ self._connection = nil
525
+ self._password = password
526
+ end
527
+
528
+ def auth_type
529
+ if defined?(@auth_type)
530
+ @auth_type
531
+ end
532
+ end
533
+
534
+ def auth_type=(auth_type)
535
+ self._connection = nil
536
+ @auth_type = auth_type
537
+ end
538
+
539
+ # Sets the format that attributes are sent and received in from a mime type reference:
540
+ #
541
+ # Person.format = :json
542
+ # Person.find(1) # => GET /people/1.json
543
+ #
544
+ # Person.format = ActiveResource::Formats::XmlFormat
545
+ # Person.find(1) # => GET /people/1.xml
546
+ #
547
+ # Default format is <tt>:json</tt>.
548
+ def format=(mime_type_reference_or_format)
549
+ format = mime_type_reference_or_format.is_a?(Symbol) ?
550
+ ActiveResource::Formats[mime_type_reference_or_format] : mime_type_reference_or_format
551
+
552
+ self._format = format
553
+ connection.format = format if site
554
+ end
555
+
556
+ # Returns the current format, default is ActiveResource::Formats::JsonFormat.
557
+ def format
558
+ self._format || ActiveResource::Formats::JsonFormat
559
+ end
560
+
561
+ # Sets the parser to use when a collection is returned. The parser must be Enumerable.
562
+ def collection_parser=(parser_instance)
563
+ parser_instance = parser_instance.constantize if parser_instance.is_a?(String)
564
+ self._collection_parser = parser_instance
565
+ end
566
+
567
+ def collection_parser
568
+ self._collection_parser || ActiveResource::Collection
569
+ end
570
+
571
+ # Sets the number of seconds after which requests to the REST API should time out.
572
+ def timeout=(timeout)
573
+ self._connection = nil
574
+ @timeout = timeout
575
+ end
576
+
577
+ # Sets the number of seconds after which connection attempts to the REST API should time out.
578
+ def open_timeout=(timeout)
579
+ self._connection = nil
580
+ @open_timeout = timeout
581
+ end
582
+
583
+ # Sets the number of seconds after which reads to the REST API should time out.
584
+ def read_timeout=(timeout)
585
+ self._connection = nil
586
+ @read_timeout = timeout
587
+ end
588
+
589
+ # Gets the number of seconds after which requests to the REST API should time out.
590
+ def timeout
591
+ if defined?(@timeout)
592
+ @timeout
593
+ elsif superclass != Object && superclass.timeout
594
+ superclass.timeout
595
+ end
596
+ end
597
+
598
+ # Gets the number of seconds after which connection attempts to the REST API should time out.
599
+ def open_timeout
600
+ if defined?(@open_timeout)
601
+ @open_timeout
602
+ elsif superclass != Object && superclass.open_timeout
603
+ superclass.open_timeout
604
+ end
605
+ end
606
+
607
+ # Gets the number of seconds after which reads to the REST API should time out.
608
+ def read_timeout
609
+ if defined?(@read_timeout)
610
+ @read_timeout
611
+ elsif superclass != Object && superclass.read_timeout
612
+ superclass.read_timeout
613
+ end
614
+ end
615
+
616
+ # Options that will get applied to an SSL connection.
617
+ #
618
+ # * <tt>:key</tt> - An OpenSSL::PKey::RSA or OpenSSL::PKey::DSA object.
619
+ # * <tt>:cert</tt> - An OpenSSL::X509::Certificate object as client certificate
620
+ # * <tt>:ca_file</tt> - Path to a CA certification file in PEM format. The file can contain several CA certificates.
621
+ # * <tt>:ca_path</tt> - Path of a CA certification directory containing certifications in PEM format.
622
+ # * <tt>:verify_mode</tt> - Flags for server the certification verification at beginning of SSL/TLS session. (OpenSSL::SSL::VERIFY_NONE or OpenSSL::SSL::VERIFY_PEER is acceptable)
623
+ # * <tt>:verify_callback</tt> - The verify callback for the server certification verification.
624
+ # * <tt>:verify_depth</tt> - The maximum depth for the certificate chain verification.
625
+ # * <tt>:cert_store</tt> - OpenSSL::X509::Store to verify peer certificate.
626
+ # * <tt>:ssl_timeout</tt> -The SSL timeout in seconds.
627
+ def ssl_options=(options)
628
+ self._connection = nil
629
+ @ssl_options = options
630
+ end
631
+
632
+ # Returns the SSL options hash.
633
+ def ssl_options
634
+ if defined?(@ssl_options)
635
+ @ssl_options
636
+ elsif superclass != Object && superclass.ssl_options
637
+ superclass.ssl_options
638
+ end
639
+ end
640
+
641
+ # An instance of ActiveResource::Connection that is the base \connection to the remote service.
642
+ # The +refresh+ parameter toggles whether or not the \connection is refreshed at every request
643
+ # or not (defaults to <tt>false</tt>).
644
+ def connection(refresh = false)
645
+ if _connection_defined? || superclass == Object
646
+ self._connection = connection_class.new(
647
+ site, format, logger: logger
648
+ ) if refresh || _connection.nil?
649
+ _connection.proxy = proxy if proxy
650
+ _connection.user = user if user
651
+ _connection.password = password if password
652
+ _connection.auth_type = auth_type if auth_type
653
+ _connection.timeout = timeout if timeout
654
+ _connection.open_timeout = open_timeout if open_timeout
655
+ _connection.read_timeout = read_timeout if read_timeout
656
+ _connection.ssl_options = ssl_options if ssl_options
657
+ _connection
658
+ else
659
+ superclass.connection
660
+ end
661
+ end
662
+
663
+ def headers
664
+ headers_state = self._headers || {}
665
+ if superclass != Object
666
+ self._headers = superclass.headers.merge(headers_state)
667
+ else
668
+ headers_state
669
+ end
670
+ end
671
+
672
+ attr_writer :element_name
673
+
674
+ def element_name
675
+ @element_name ||= model_name.element
676
+ end
677
+
678
+ attr_writer :collection_name
679
+
680
+ def collection_name
681
+ @collection_name ||= ActiveSupport::Inflector.pluralize(element_name)
682
+ end
683
+
684
+ attr_writer :primary_key
685
+
686
+ def primary_key
687
+ if defined?(@primary_key)
688
+ @primary_key
689
+ elsif superclass != Object && superclass.primary_key
690
+ primary_key = superclass.primary_key
691
+ return primary_key if primary_key.is_a?(Symbol)
692
+ primary_key.dup.freeze
693
+ else
694
+ "id"
695
+ end
696
+ end
697
+
698
+ # Gets the \prefix for a resource's nested URL (e.g., <tt>prefix/collectionname/1.json</tt>)
699
+ # This method is regenerated at runtime based on what the \prefix is set to.
700
+ def prefix(options = {})
701
+ default = site.path
702
+ default << "/" unless default[-1..-1] == "/"
703
+ # generate the actual method based on the current site path
704
+ self.prefix = default
705
+ prefix(options)
706
+ end
707
+
708
+ # An attribute reader for the source string for the resource path \prefix. This
709
+ # method is regenerated at runtime based on what the \prefix is set to.
710
+ def prefix_source
711
+ prefix # generate #prefix and #prefix_source methods first
712
+ prefix_source
713
+ end
714
+
715
+ # Sets the \prefix for a resource's nested URL (e.g., <tt>prefix/collectionname/1.json</tt>).
716
+ # Default value is <tt>site.path</tt>.
717
+ def prefix=(value = "/")
718
+ # Replace :placeholders with '#{embedded options[:lookups]}'
719
+ prefix_call = value.gsub(/:\w+/) { |key| "\#{URI.parser.escape options[#{key}].to_s}" }
720
+
721
+ # Clear prefix parameters in case they have been cached
722
+ @prefix_parameters = nil
723
+
724
+ silence_warnings do
725
+ # Redefine the new methods.
726
+ instance_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1
727
+ def prefix_source() "#{value}" end
728
+ def prefix(options={}) "#{prefix_call}" end
729
+ RUBY_EVAL
730
+ end
731
+ rescue Exception => e
732
+ logger.error "Couldn't set prefix: #{e}\n #{code}" if logger
733
+ raise
734
+ end
735
+
736
+ alias_method :set_prefix, :prefix= #:nodoc:
737
+
738
+ alias_method :set_element_name, :element_name= #:nodoc:
739
+ alias_method :set_collection_name, :collection_name= #:nodoc:
740
+
741
+ def format_extension
742
+ include_format_in_path ? ".#{format.extension}" : ""
743
+ end
744
+
745
+ # Gets the element path for the given ID in +id+. If the +query_options+ parameter is omitted, Rails
746
+ # will split from the \prefix options.
747
+ #
748
+ # ==== Options
749
+ # +prefix_options+ - A \hash to add a \prefix to the request for nested URLs (e.g., <tt>:account_id => 19</tt>
750
+ # would yield a URL like <tt>/accounts/19/purchases.json</tt>).
751
+ #
752
+ # +query_options+ - A \hash to add items to the query string for the request.
753
+ #
754
+ # ==== Examples
755
+ # Post.element_path(1)
756
+ # # => /posts/1.json
757
+ #
758
+ # class Comment < ActiveResource::Base
759
+ # self.site = "https://37s.sunrise.com/posts/:post_id"
760
+ # end
761
+ #
762
+ # Comment.element_path(1, :post_id => 5)
763
+ # # => /posts/5/comments/1.json
764
+ #
765
+ # Comment.element_path(1, :post_id => 5, :active => 1)
766
+ # # => /posts/5/comments/1.json?active=1
767
+ #
768
+ # Comment.element_path(1, {:post_id => 5}, {:active => 1})
769
+ # # => /posts/5/comments/1.json?active=1
770
+ #
771
+ def element_path(id, prefix_options = {}, query_options = nil)
772
+ check_prefix_options(prefix_options)
773
+
774
+ prefix_options, query_options = split_options(prefix_options) if query_options.nil?
775
+ "#{prefix(prefix_options)}#{collection_name}/#{URI.parser.escape id.to_s}#{format_extension}#{query_string(query_options)}"
776
+ end
777
+
778
+ # Gets the element url for the given ID in +id+. If the +query_options+ parameter is omitted, Rails
779
+ # will split from the \prefix options.
780
+ #
781
+ # ==== Options
782
+ # +prefix_options+ - A \hash to add a \prefix to the request for nested URLs (e.g., <tt>:account_id => 19</tt>
783
+ # would yield a URL like <tt>https://37s.sunrise.com/accounts/19/purchases.json</tt>).
784
+ #
785
+ # +query_options+ - A \hash to add items to the query string for the request.
786
+ #
787
+ # ==== Examples
788
+ # Post.element_url(1)
789
+ # # => https://37s.sunrise.com/posts/1.json
790
+ #
791
+ # class Comment < ActiveResource::Base
792
+ # self.site = "https://37s.sunrise.com/posts/:post_id"
793
+ # end
794
+ #
795
+ # Comment.element_url(1, :post_id => 5)
796
+ # # => https://37s.sunrise.com/posts/5/comments/1.json
797
+ #
798
+ # Comment.element_url(1, :post_id => 5, :active => 1)
799
+ # # => https://37s.sunrise.com/posts/5/comments/1.json?active=1
800
+ #
801
+ # Comment.element_url(1, {:post_id => 5}, {:active => 1})
802
+ # # => https://37s.sunrise.com/posts/5/comments/1.json?active=1
803
+ #
804
+ def element_url(id, prefix_options = {}, query_options = nil)
805
+ URI.join(site, element_path(id, prefix_options, query_options)).to_s
806
+ end
807
+
808
+ # Gets the new element path for REST resources.
809
+ #
810
+ # ==== Options
811
+ # * +prefix_options+ - A hash to add a prefix to the request for nested URLs (e.g., <tt>:account_id => 19</tt>
812
+ # would yield a URL like <tt>/accounts/19/purchases/new.json</tt>).
813
+ #
814
+ # ==== Examples
815
+ # Post.new_element_path
816
+ # # => /posts/new.json
817
+ #
818
+ # class Comment < ActiveResource::Base
819
+ # self.site = "https://37s.sunrise.com/posts/:post_id"
820
+ # end
821
+ #
822
+ # Comment.collection_path(:post_id => 5)
823
+ # # => /posts/5/comments/new.json
824
+ def new_element_path(prefix_options = {})
825
+ "#{prefix(prefix_options)}#{collection_name}/new#{format_extension}"
826
+ end
827
+
828
+ # Gets the collection path for the REST resources. If the +query_options+ parameter is omitted, Rails
829
+ # will split from the +prefix_options+.
830
+ #
831
+ # ==== Options
832
+ # * +prefix_options+ - A hash to add a prefix to the request for nested URLs (e.g., <tt>:account_id => 19</tt>
833
+ # would yield a URL like <tt>/accounts/19/purchases.json</tt>).
834
+ # * +query_options+ - A hash to add items to the query string for the request.
835
+ #
836
+ # ==== Examples
837
+ # Post.collection_path
838
+ # # => /posts.json
839
+ #
840
+ # Comment.collection_path(:post_id => 5)
841
+ # # => /posts/5/comments.json
842
+ #
843
+ # Comment.collection_path(:post_id => 5, :active => 1)
844
+ # # => /posts/5/comments.json?active=1
845
+ #
846
+ # Comment.collection_path({:post_id => 5}, {:active => 1})
847
+ # # => /posts/5/comments.json?active=1
848
+ #
849
+ def collection_path(prefix_options = {}, query_options = nil)
850
+ check_prefix_options(prefix_options)
851
+ prefix_options, query_options = split_options(prefix_options) if query_options.nil?
852
+ "#{prefix(prefix_options)}#{collection_name}#{format_extension}#{query_string(query_options)}"
853
+ end
854
+
855
+ alias_method :set_primary_key, :primary_key= #:nodoc:
856
+
857
+ # Builds a new, unsaved record using the default values from the remote server so
858
+ # that it can be used with RESTful forms.
859
+ #
860
+ # ==== Options
861
+ # * +attributes+ - A hash that overrides the default values from the server.
862
+ #
863
+ # Returns the new resource instance.
864
+ #
865
+ def build(attributes = {})
866
+ attrs = self.format.decode(connection.get("#{new_element_path(attributes)}", headers).body).merge(attributes)
867
+ self.new(attrs)
868
+ end
869
+
870
+ # Creates a new resource instance and makes a request to the remote service
871
+ # that it be saved, making it equivalent to the following simultaneous calls:
872
+ #
873
+ # ryan = Person.new(:first => 'ryan')
874
+ # ryan.save
875
+ #
876
+ # Returns the newly created resource. If a failure has occurred an
877
+ # exception will be raised (see <tt>save</tt>). If the resource is invalid and
878
+ # has not been saved then <tt>valid?</tt> will return <tt>false</tt>,
879
+ # while <tt>new?</tt> will still return <tt>true</tt>.
880
+ #
881
+ # ==== Examples
882
+ # Person.create(:name => 'Jeremy', :email => 'myname@nospam.com', :enabled => true)
883
+ # my_person = Person.find(:first)
884
+ # my_person.email # => myname@nospam.com
885
+ #
886
+ # dhh = Person.create(:name => 'David', :email => 'dhh@nospam.com', :enabled => true)
887
+ # dhh.valid? # => true
888
+ # dhh.new? # => false
889
+ #
890
+ # # We'll assume that there's a validation that requires the name attribute
891
+ # that_guy = Person.create(:name => '', :email => 'thatguy@nospam.com', :enabled => true)
892
+ # that_guy.valid? # => false
893
+ # that_guy.new? # => true
894
+ def create(attributes = {})
895
+ self.new(attributes).tap { |resource| resource.save }
896
+ end
897
+
898
+ # Creates a new resource (just like <tt>create</tt>) and makes a request to the
899
+ # remote service that it be saved, but runs validations and raises
900
+ # <tt>ActiveResource::ResourceInvalid</tt>, making it equivalent to the following
901
+ # simultaneous calls:
902
+ #
903
+ # ryan = Person.new(:first => 'ryan')
904
+ # ryan.save!
905
+ def create!(attributes = {})
906
+ self.new(attributes).tap { |resource| resource.save! }
907
+ end
908
+
909
+ # Core method for finding resources. Used similarly to Active Record's +find+ method.
910
+ #
911
+ # ==== Arguments
912
+ # The first argument is considered to be the scope of the query. That is, how many
913
+ # resources are returned from the request. It can be one of the following.
914
+ #
915
+ # * <tt>:one</tt> - Returns a single resource.
916
+ # * <tt>:first</tt> - Returns the first resource found.
917
+ # * <tt>:last</tt> - Returns the last resource found.
918
+ # * <tt>:all</tt> - Returns every resource that matches the request.
919
+ #
920
+ # ==== Options
921
+ #
922
+ # * <tt>:from</tt> - Sets the path or custom method that resources will be fetched from.
923
+ # * <tt>:params</tt> - Sets query and \prefix (nested URL) parameters.
924
+ #
925
+ # ==== Examples
926
+ # Person.find(1)
927
+ # # => GET /people/1.json
928
+ #
929
+ # Person.find(:all)
930
+ # # => GET /people.json
931
+ #
932
+ # Person.find(:all, :params => { :title => "CEO" })
933
+ # # => GET /people.json?title=CEO
934
+ #
935
+ # Person.find(:first, :from => :managers)
936
+ # # => GET /people/managers.json
937
+ #
938
+ # Person.find(:last, :from => :managers)
939
+ # # => GET /people/managers.json
940
+ #
941
+ # Person.find(:all, :from => "/companies/1/people.json")
942
+ # # => GET /companies/1/people.json
943
+ #
944
+ # Person.find(:one, :from => :leader)
945
+ # # => GET /people/leader.json
946
+ #
947
+ # Person.find(:all, :from => :developers, :params => { :language => 'ruby' })
948
+ # # => GET /people/developers.json?language=ruby
949
+ #
950
+ # Person.find(:one, :from => "/companies/1/manager.json")
951
+ # # => GET /companies/1/manager.json
952
+ #
953
+ # StreetAddress.find(1, :params => { :person_id => 1 })
954
+ # # => GET /people/1/street_addresses/1.json
955
+ #
956
+ # == Failure or missing data
957
+ # A failure to find the requested object raises a ResourceNotFound
958
+ # exception if the find was called with an id.
959
+ # With any other scope, find returns nil when no data is returned.
960
+ #
961
+ # Person.find(1)
962
+ # # => raises ResourceNotFound
963
+ #
964
+ # Person.find(:all)
965
+ # Person.find(:first)
966
+ # Person.find(:last)
967
+ # # => nil
968
+ def find(*arguments)
969
+ scope = arguments.slice!(0)
970
+ options = arguments.slice!(0) || {}
971
+
972
+ case scope
973
+ when :all
974
+ find_every(options)
975
+ when :first
976
+ collection = find_every(options)
977
+ collection && collection.first
978
+ when :last
979
+ collection = find_every(options)
980
+ collection && collection.last
981
+ when :one
982
+ find_one(options)
983
+ else
984
+ find_single(scope, options)
985
+ end
986
+ end
987
+
988
+
989
+ # A convenience wrapper for <tt>find(:first, *args)</tt>. You can pass
990
+ # in all the same arguments to this method as you can to
991
+ # <tt>find(:first)</tt>.
992
+ def first(*args)
993
+ find(:first, *args)
994
+ end
995
+
996
+ # A convenience wrapper for <tt>find(:last, *args)</tt>. You can pass
997
+ # in all the same arguments to this method as you can to
998
+ # <tt>find(:last)</tt>.
999
+ def last(*args)
1000
+ find(:last, *args)
1001
+ end
1002
+
1003
+ # This is an alias for find(:all). You can pass in all the same
1004
+ # arguments to this method as you can to <tt>find(:all)</tt>
1005
+ def all(*args)
1006
+ find(:all, *args)
1007
+ end
1008
+
1009
+ def where(clauses = {})
1010
+ raise ArgumentError, "expected a clauses Hash, got #{clauses.inspect}" unless clauses.is_a? Hash
1011
+ find(:all, params: clauses)
1012
+ end
1013
+
1014
+
1015
+ # Deletes the resources with the ID in the +id+ parameter.
1016
+ #
1017
+ # ==== Options
1018
+ # All options specify \prefix and query parameters.
1019
+ #
1020
+ # ==== Examples
1021
+ # Event.delete(2) # sends DELETE /events/2
1022
+ #
1023
+ # Event.create(:name => 'Free Concert', :location => 'Community Center')
1024
+ # my_event = Event.find(:first) # let's assume this is event with ID 7
1025
+ # Event.delete(my_event.id) # sends DELETE /events/7
1026
+ #
1027
+ # # Let's assume a request to events/5/cancel.json
1028
+ # Event.delete(params[:id]) # sends DELETE /events/5
1029
+ def delete(id, options = {})
1030
+ connection.delete(element_path(id, options), headers)
1031
+ end
1032
+
1033
+ # Asserts the existence of a resource, returning <tt>true</tt> if the resource is found.
1034
+ #
1035
+ # ==== Examples
1036
+ # Note.create(:title => 'Hello, world.', :body => 'Nothing more for now...')
1037
+ # Note.exists?(1) # => true
1038
+ #
1039
+ # Note.exists(1349) # => false
1040
+ def exists?(id, options = {})
1041
+ if id
1042
+ prefix_options, query_options = split_options(options[:params])
1043
+ path = element_path(id, prefix_options, query_options)
1044
+ response = connection.head(path, headers)
1045
+ (200..206).include? response.code.to_i
1046
+ end
1047
+ # id && !find_single(id, options).nil?
1048
+ rescue ActiveResource::ResourceNotFound, ActiveResource::ResourceGone
1049
+ false
1050
+ end
1051
+
1052
+ private
1053
+
1054
+ def check_prefix_options(prefix_options)
1055
+ p_options = HashWithIndifferentAccess.new(prefix_options)
1056
+ prefix_parameters.each do |p|
1057
+ raise(MissingPrefixParam, "#{p} prefix_option is missing") if p_options[p].blank?
1058
+ end
1059
+ end
1060
+
1061
+ # Find every resource
1062
+ def find_every(options)
1063
+ begin
1064
+ case from = options[:from]
1065
+ when Symbol
1066
+ instantiate_collection(get(from, options[:params]), options[:params])
1067
+ when String
1068
+ path = "#{from}#{query_string(options[:params])}"
1069
+ instantiate_collection(format.decode(connection.get(path, headers).body) || [], options[:params])
1070
+ else
1071
+ prefix_options, query_options = split_options(options[:params])
1072
+ path = collection_path(prefix_options, query_options)
1073
+ instantiate_collection((format.decode(connection.get(path, headers).body) || []), query_options, prefix_options)
1074
+ end
1075
+ rescue ActiveResource::ResourceNotFound
1076
+ # Swallowing ResourceNotFound exceptions and return nil - as per
1077
+ # ActiveRecord.
1078
+ nil
1079
+ end
1080
+ end
1081
+
1082
+ # Find a single resource from a one-off URL
1083
+ def find_one(options)
1084
+ case from = options[:from]
1085
+ when Symbol
1086
+ instantiate_record(get(from, options[:params]))
1087
+ when String
1088
+ path = "#{from}#{query_string(options[:params])}"
1089
+ instantiate_record(format.decode(connection.get(path, headers).body))
1090
+ end
1091
+ end
1092
+
1093
+ # Find a single resource from the default URL
1094
+ def find_single(scope, options)
1095
+ prefix_options, query_options = split_options(options[:params])
1096
+ path = element_path(scope, prefix_options, query_options)
1097
+ instantiate_record(format.decode(connection.get(path, headers).body), prefix_options)
1098
+ end
1099
+
1100
+ def instantiate_collection(collection, original_params = {}, prefix_options = {})
1101
+ collection_parser.new(collection).tap do |parser|
1102
+ parser.resource_class = self
1103
+ parser.original_params = original_params
1104
+ end.collect! { |record| instantiate_record(record, prefix_options) }
1105
+ end
1106
+
1107
+ def instantiate_record(record, prefix_options = {})
1108
+ new(record, true).tap do |resource|
1109
+ resource.prefix_options = prefix_options
1110
+ end
1111
+ end
1112
+
1113
+
1114
+ # Accepts a URI and creates the site URI from that.
1115
+ def create_site_uri_from(site)
1116
+ site.is_a?(URI) ? site.dup : URI.parse(site)
1117
+ end
1118
+
1119
+ # Accepts a URI and creates the proxy URI from that.
1120
+ def create_proxy_uri_from(proxy)
1121
+ proxy.is_a?(URI) ? proxy.dup : URI.parse(proxy)
1122
+ end
1123
+
1124
+ # contains a set of the current prefix parameters.
1125
+ def prefix_parameters
1126
+ @prefix_parameters ||= prefix_source.scan(/:\w+/).map { |key| key[1..-1].to_sym }.to_set
1127
+ end
1128
+
1129
+ # Builds the query string for the request.
1130
+ def query_string(options)
1131
+ "?#{options.to_query}" unless options.nil? || options.empty?
1132
+ end
1133
+
1134
+ # split an option hash into two hashes, one containing the prefix options,
1135
+ # and the other containing the leftovers.
1136
+ def split_options(options = {})
1137
+ prefix_options, query_options = {}, {}
1138
+
1139
+ (options || {}).each do |key, value|
1140
+ next if key.blank?
1141
+ (prefix_parameters.include?(key.to_s.to_sym) ? prefix_options : query_options)[key.to_s.to_sym] = value
1142
+ end
1143
+
1144
+ [ prefix_options, query_options ]
1145
+ end
1146
+ end
1147
+
1148
+ attr_accessor :attributes #:nodoc:
1149
+ attr_accessor :prefix_options #:nodoc:
1150
+
1151
+ # If no schema has been defined for the class (see
1152
+ # <tt>ActiveResource::schema=</tt>), the default automatic schema is
1153
+ # generated from the current instance's attributes
1154
+ def schema
1155
+ self.class.schema || self.attributes
1156
+ end
1157
+
1158
+ # This is a list of known attributes for this resource. Either
1159
+ # gathered from the provided <tt>schema</tt>, or from the attributes
1160
+ # set on this instance after it has been fetched from the remote system.
1161
+ def known_attributes
1162
+ (self.class.known_attributes + self.attributes.keys.map(&:to_s)).uniq
1163
+ end
1164
+
1165
+
1166
+ # Constructor method for \new resources; the optional +attributes+ parameter takes a \hash
1167
+ # of attributes for the \new resource.
1168
+ #
1169
+ # ==== Examples
1170
+ # my_course = Course.new
1171
+ # my_course.name = "Western Civilization"
1172
+ # my_course.lecturer = "Don Trotter"
1173
+ # my_course.save
1174
+ #
1175
+ # my_other_course = Course.new(:name => "Philosophy: Reason and Being", :lecturer => "Ralph Cling")
1176
+ # my_other_course.save
1177
+ def initialize(attributes = {}, persisted = false)
1178
+ @attributes = {}.with_indifferent_access
1179
+ @prefix_options = {}
1180
+ @persisted = persisted
1181
+ load(attributes, false, persisted)
1182
+ end
1183
+
1184
+ # Returns a \clone of the resource that hasn't been assigned an +id+ yet and
1185
+ # is treated as a \new resource.
1186
+ #
1187
+ # ryan = Person.find(1)
1188
+ # not_ryan = ryan.clone
1189
+ # not_ryan.new? # => true
1190
+ #
1191
+ # Any active resource member attributes will NOT be cloned, though all other
1192
+ # attributes are. This is to prevent the conflict between any +prefix_options+
1193
+ # that refer to the original parent resource and the newly cloned parent
1194
+ # resource that does not exist.
1195
+ #
1196
+ # ryan = Person.find(1)
1197
+ # ryan.address = StreetAddress.find(1, :person_id => ryan.id)
1198
+ # ryan.hash = {:not => "an ARes instance"}
1199
+ #
1200
+ # not_ryan = ryan.clone
1201
+ # not_ryan.new? # => true
1202
+ # not_ryan.address # => NoMethodError
1203
+ # not_ryan.hash # => {:not => "an ARes instance"}
1204
+ def clone
1205
+ # Clone all attributes except the pk and any nested ARes
1206
+ cloned = Hash[attributes.reject { |k, v| k == self.class.primary_key || v.is_a?(ActiveResource::Base) }.map { |k, v| [k, v.clone] }]
1207
+ # Form the new resource - bypass initialize of resource with 'new' as that will call 'load' which
1208
+ # attempts to convert hashes into member objects and arrays into collections of objects. We want
1209
+ # the raw objects to be cloned so we bypass load by directly setting the attributes hash.
1210
+ resource = self.class.new({})
1211
+ resource.prefix_options = self.prefix_options
1212
+ resource.send :instance_variable_set, "@attributes", cloned
1213
+ resource
1214
+ end
1215
+
1216
+
1217
+ # Returns +true+ if this object hasn't yet been saved, otherwise, returns +false+.
1218
+ #
1219
+ # ==== Examples
1220
+ # not_new = Computer.create(:brand => 'Apple', :make => 'MacBook', :vendor => 'MacMall')
1221
+ # not_new.new? # => false
1222
+ #
1223
+ # is_new = Computer.new(:brand => 'IBM', :make => 'Thinkpad', :vendor => 'IBM')
1224
+ # is_new.new? # => true
1225
+ #
1226
+ # is_new.save
1227
+ # is_new.new? # => false
1228
+ #
1229
+ def new?
1230
+ !persisted?
1231
+ end
1232
+ alias :new_record? :new?
1233
+
1234
+ # Returns +true+ if this object has been saved, otherwise returns +false+.
1235
+ #
1236
+ # ==== Examples
1237
+ # persisted = Computer.create(:brand => 'Apple', :make => 'MacBook', :vendor => 'MacMall')
1238
+ # persisted.persisted? # => true
1239
+ #
1240
+ # not_persisted = Computer.new(:brand => 'IBM', :make => 'Thinkpad', :vendor => 'IBM')
1241
+ # not_persisted.persisted? # => false
1242
+ #
1243
+ # not_persisted.save
1244
+ # not_persisted.persisted? # => true
1245
+ #
1246
+ def persisted?
1247
+ @persisted
1248
+ end
1249
+
1250
+ # Gets the <tt>\id</tt> attribute of the resource.
1251
+ def id
1252
+ attributes[self.class.primary_key]
1253
+ end
1254
+
1255
+ # Sets the <tt>\id</tt> attribute of the resource.
1256
+ def id=(id)
1257
+ attributes[self.class.primary_key] = id
1258
+ end
1259
+
1260
+ # Test for equality. Resource are equal if and only if +other+ is the same object or
1261
+ # is an instance of the same class, is not <tt>new?</tt>, and has the same +id+.
1262
+ #
1263
+ # ==== Examples
1264
+ # ryan = Person.create(:name => 'Ryan')
1265
+ # jamie = Person.create(:name => 'Jamie')
1266
+ #
1267
+ # ryan == jamie
1268
+ # # => false (Different name attribute and id)
1269
+ #
1270
+ # ryan_again = Person.new(:name => 'Ryan')
1271
+ # ryan == ryan_again
1272
+ # # => false (ryan_again is new?)
1273
+ #
1274
+ # ryans_clone = Person.create(:name => 'Ryan')
1275
+ # ryan == ryans_clone
1276
+ # # => false (Different id attributes)
1277
+ #
1278
+ # ryans_twin = Person.find(ryan.id)
1279
+ # ryan == ryans_twin
1280
+ # # => true
1281
+ #
1282
+ def ==(other)
1283
+ other.equal?(self) || (other.instance_of?(self.class) && other.id == id && other.prefix_options == prefix_options)
1284
+ end
1285
+
1286
+ # Tests for equality (delegates to ==).
1287
+ def eql?(other)
1288
+ self == other
1289
+ end
1290
+
1291
+ # Delegates to id in order to allow two resources of the same type and \id to work with something like:
1292
+ # [(a = Person.find 1), (b = Person.find 2)] & [(c = Person.find 1), (d = Person.find 4)] # => [a]
1293
+ def hash
1294
+ id.hash
1295
+ end
1296
+
1297
+ # Duplicates the current resource without saving it.
1298
+ #
1299
+ # ==== Examples
1300
+ # my_invoice = Invoice.create(:customer => 'That Company')
1301
+ # next_invoice = my_invoice.dup
1302
+ # next_invoice.new? # => true
1303
+ #
1304
+ # next_invoice.save
1305
+ # next_invoice == my_invoice # => false (different id attributes)
1306
+ #
1307
+ # my_invoice.customer # => That Company
1308
+ # next_invoice.customer # => That Company
1309
+ def dup
1310
+ self.class.new.tap do |resource|
1311
+ resource.attributes = @attributes
1312
+ resource.prefix_options = @prefix_options
1313
+ end
1314
+ end
1315
+
1316
+ # Saves (+POST+) or \updates (+PUT+) a resource. Delegates to +create+ if the object is \new,
1317
+ # +update+ if it exists. If the response to the \save includes a body, it will be assumed that this body
1318
+ # is Json for the final object as it looked after the \save (which would include attributes like +created_at+
1319
+ # that weren't part of the original submit).
1320
+ #
1321
+ # ==== Examples
1322
+ # my_company = Company.new(:name => 'RoleModel Software', :owner => 'Ken Auer', :size => 2)
1323
+ # my_company.new? # => true
1324
+ # my_company.save # sends POST /companies/ (create)
1325
+ #
1326
+ # my_company.new? # => false
1327
+ # my_company.size = 10
1328
+ # my_company.save # sends PUT /companies/1 (update)
1329
+ def save
1330
+ run_callbacks :save do
1331
+ new? ? create : update
1332
+ end
1333
+ end
1334
+
1335
+ # Saves the resource.
1336
+ #
1337
+ # If the resource is new, it is created via +POST+, otherwise the
1338
+ # existing resource is updated via +PUT+.
1339
+ #
1340
+ # With <tt>save!</tt> validations always run. If any of them fail
1341
+ # ActiveResource::ResourceInvalid gets raised, and nothing is POSTed to
1342
+ # the remote system.
1343
+ # See ActiveResource::Validations for more information.
1344
+ #
1345
+ # There's a series of callbacks associated with <tt>save!</tt>. If any
1346
+ # of the <tt>before_*</tt> callbacks return +false+ the action is
1347
+ # cancelled and <tt>save!</tt> raises ActiveResource::ResourceInvalid.
1348
+ def save!
1349
+ save || raise(ResourceInvalid.new(self))
1350
+ end
1351
+
1352
+ # Deletes the resource from the remote service.
1353
+ #
1354
+ # ==== Examples
1355
+ # my_id = 3
1356
+ # my_person = Person.find(my_id)
1357
+ # my_person.destroy
1358
+ # Person.find(my_id) # 404 (Resource Not Found)
1359
+ #
1360
+ # new_person = Person.create(:name => 'James')
1361
+ # new_id = new_person.id # => 7
1362
+ # new_person.destroy
1363
+ # Person.find(new_id) # 404 (Resource Not Found)
1364
+ def destroy
1365
+ run_callbacks :destroy do
1366
+ connection.delete(element_path, self.class.headers)
1367
+ end
1368
+ end
1369
+
1370
+ # Evaluates to <tt>true</tt> if this resource is not <tt>new?</tt> and is
1371
+ # found on the remote service. Using this method, you can check for
1372
+ # resources that may have been deleted between the object's instantiation
1373
+ # and actions on it.
1374
+ #
1375
+ # ==== Examples
1376
+ # Person.create(:name => 'Theodore Roosevelt')
1377
+ # that_guy = Person.find(:first)
1378
+ # that_guy.exists? # => true
1379
+ #
1380
+ # that_lady = Person.new(:name => 'Paul Bean')
1381
+ # that_lady.exists? # => false
1382
+ #
1383
+ # guys_id = that_guy.id
1384
+ # Person.delete(guys_id)
1385
+ # that_guy.exists? # => false
1386
+ def exists?
1387
+ !new? && self.class.exists?(to_param, params: prefix_options)
1388
+ end
1389
+
1390
+ # Returns the serialized string representation of the resource in the configured
1391
+ # serialization format specified in ActiveResource::Base.format. The options
1392
+ # applicable depend on the configured encoding format.
1393
+ def encode(options = {})
1394
+ send("to_#{self.class.format.extension}", options)
1395
+ end
1396
+
1397
+ # A method to \reload the attributes of this object from the remote web service.
1398
+ #
1399
+ # ==== Examples
1400
+ # my_branch = Branch.find(:first)
1401
+ # my_branch.name # => "Wislon Raod"
1402
+ #
1403
+ # # Another client fixes the typo...
1404
+ #
1405
+ # my_branch.name # => "Wislon Raod"
1406
+ # my_branch.reload
1407
+ # my_branch.name # => "Wilson Road"
1408
+ def reload
1409
+ self.load(self.class.find(to_param, params: @prefix_options).attributes, false, true)
1410
+ end
1411
+
1412
+ # A method to manually load attributes from a \hash. Recursively loads collections of
1413
+ # resources. This method is called in +initialize+ and +create+ when a \hash of attributes
1414
+ # is provided.
1415
+ #
1416
+ # ==== Examples
1417
+ # my_attrs = {:name => 'J&J Textiles', :industry => 'Cloth and textiles'}
1418
+ # my_attrs = {:name => 'Marty', :colors => ["red", "green", "blue"]}
1419
+ #
1420
+ # the_supplier = Supplier.find(:first)
1421
+ # the_supplier.name # => 'J&M Textiles'
1422
+ # the_supplier.load(my_attrs)
1423
+ # the_supplier.name('J&J Textiles')
1424
+ #
1425
+ # # These two calls are the same as Supplier.new(my_attrs)
1426
+ # my_supplier = Supplier.new
1427
+ # my_supplier.load(my_attrs)
1428
+ #
1429
+ # # These three calls are the same as Supplier.create(my_attrs)
1430
+ # your_supplier = Supplier.new
1431
+ # your_supplier.load(my_attrs)
1432
+ # your_supplier.save
1433
+ def load(attributes, remove_root = false, persisted = false)
1434
+ unless attributes.respond_to?(:to_hash)
1435
+ raise ArgumentError, "expected attributes to be able to convert to Hash, got #{attributes.inspect}"
1436
+ end
1437
+
1438
+ attributes = attributes.to_hash
1439
+ @prefix_options, attributes = split_options(attributes)
1440
+
1441
+ if attributes.keys.size == 1
1442
+ remove_root = self.class.element_name == attributes.keys.first.to_s
1443
+ end
1444
+
1445
+ attributes = Formats.remove_root(attributes) if remove_root
1446
+
1447
+ attributes.each do |key, value|
1448
+ @attributes[key.to_s] =
1449
+ case value
1450
+ when Array
1451
+ resource = nil
1452
+ value.map do |attrs|
1453
+ if attrs.is_a?(Hash)
1454
+ resource ||= find_or_create_resource_for_collection(key)
1455
+ resource.new(attrs, persisted)
1456
+ else
1457
+ attrs.duplicable? ? attrs.dup : attrs
1458
+ end
1459
+ end
1460
+ when Hash
1461
+ resource = find_or_create_resource_for(key)
1462
+ resource.new(value, persisted)
1463
+ else
1464
+ value.duplicable? ? value.dup : value
1465
+ end
1466
+ end
1467
+ self
1468
+ end
1469
+
1470
+ # Updates a single attribute and then saves the object.
1471
+ #
1472
+ # Note: <tt>Unlike ActiveRecord::Base.update_attribute</tt>, this method <b>is</b>
1473
+ # subject to normal validation routines as an update sends the whole body
1474
+ # of the resource in the request. (See Validations).
1475
+ #
1476
+ # As such, this method is equivalent to calling update_attributes with a single attribute/value pair.
1477
+ #
1478
+ # If the saving fails because of a connection or remote service error, an
1479
+ # exception will be raised. If saving fails because the resource is
1480
+ # invalid then <tt>false</tt> will be returned.
1481
+ def update_attribute(name, value)
1482
+ self.send("#{name}=".to_sym, value)
1483
+ self.save
1484
+ end
1485
+
1486
+ # Updates this resource with all the attributes from the passed-in Hash
1487
+ # and requests that the record be saved.
1488
+ #
1489
+ # If the saving fails because of a connection or remote service error, an
1490
+ # exception will be raised. If saving fails because the resource is
1491
+ # invalid then <tt>false</tt> will be returned.
1492
+ #
1493
+ # Note: Though this request can be made with a partial set of the
1494
+ # resource's attributes, the full body of the request will still be sent
1495
+ # in the save request to the remote service.
1496
+ def update_attributes(attributes)
1497
+ load(attributes, false) && save
1498
+ end
1499
+
1500
+ # For checking <tt>respond_to?</tt> without searching the attributes (which is faster).
1501
+ alias_method :respond_to_without_attributes?, :respond_to?
1502
+
1503
+ # A method to determine if an object responds to a message (e.g., a method call). In Active Resource, a Person object with a
1504
+ # +name+ attribute can answer <tt>true</tt> to <tt>my_person.respond_to?(:name)</tt>, <tt>my_person.respond_to?(:name=)</tt>, and
1505
+ # <tt>my_person.respond_to?(:name?)</tt>.
1506
+ def respond_to_missing?(method, include_priv = false)
1507
+ method_name = method.to_s
1508
+ if attributes.nil?
1509
+ super
1510
+ elsif known_attributes.include?(method_name)
1511
+ true
1512
+ elsif method_name =~ /(?:=|\?)$/ && attributes.include?($`)
1513
+ true
1514
+ else
1515
+ # super must be called at the end of the method, because the inherited respond_to?
1516
+ # would return true for generated readers, even if the attribute wasn't present
1517
+ super
1518
+ end
1519
+ end
1520
+
1521
+ def to_json(options = {})
1522
+ super(include_root_in_json ? { root: self.class.element_name }.merge(options) : options)
1523
+ end
1524
+
1525
+ def to_xml(options = {})
1526
+ super({ root: self.class.element_name }.merge(options))
1527
+ end
1528
+
1529
+ def read_attribute_for_serialization(n)
1530
+ if !attributes[n].nil?
1531
+ attributes[n]
1532
+ elsif respond_to?(n)
1533
+ send(n)
1534
+ end
1535
+ end
1536
+
1537
+ protected
1538
+ def connection(refresh = false)
1539
+ self.class.connection(refresh)
1540
+ end
1541
+
1542
+ # Update the resource on the remote service.
1543
+ def update
1544
+ run_callbacks :update do
1545
+ connection.put(element_path(prefix_options), encode, self.class.headers).tap do |response|
1546
+ load_attributes_from_response(response)
1547
+ end
1548
+ end
1549
+ end
1550
+
1551
+ # Create (i.e., \save to the remote service) the \new resource.
1552
+ def create
1553
+ run_callbacks :create do
1554
+ connection.post(collection_path, encode, self.class.headers).tap do |response|
1555
+ self.id = id_from_response(response)
1556
+ load_attributes_from_response(response)
1557
+ end
1558
+ end
1559
+ end
1560
+
1561
+ def load_attributes_from_response(response)
1562
+ if response_code_allows_body?(response.code.to_i) &&
1563
+ (response["Content-Length"].nil? || response["Content-Length"] != "0") &&
1564
+ !response.body.nil? && response.body.strip.size > 0
1565
+ load(self.class.format.decode(response.body), true, true)
1566
+ @persisted = true
1567
+ end
1568
+ end
1569
+
1570
+ # Takes a response from a typical create post and pulls the ID out
1571
+ def id_from_response(response)
1572
+ response["Location"][/\/([^\/]*?)(\.\w+)?$/, 1] if response["Location"]
1573
+ end
1574
+
1575
+ def element_path(options = nil)
1576
+ self.class.element_path(to_param, options || prefix_options)
1577
+ end
1578
+
1579
+ def element_url(options = nil)
1580
+ self.class.element_url(to_param, options || prefix_options)
1581
+ end
1582
+
1583
+ def new_element_path
1584
+ self.class.new_element_path(prefix_options)
1585
+ end
1586
+
1587
+ def collection_path(options = nil)
1588
+ self.class.collection_path(options || prefix_options)
1589
+ end
1590
+
1591
+ private
1592
+
1593
+ # Determine whether the response is allowed to have a body per HTTP 1.1 spec section 4.4.1
1594
+ def response_code_allows_body?(c)
1595
+ !((100..199).include?(c) || [204, 304].include?(c))
1596
+ end
1597
+
1598
+ # Tries to find a resource for a given collection name; if it fails, then the resource is created
1599
+ def find_or_create_resource_for_collection(name)
1600
+ return reflections[name.to_sym].klass if reflections.key?(name.to_sym)
1601
+ find_or_create_resource_for(ActiveSupport::Inflector.singularize(name.to_s))
1602
+ end
1603
+
1604
+ # Tries to find a resource in a non empty list of nested modules
1605
+ # if it fails, then the resource is created
1606
+ def find_or_create_resource_in_modules(resource_name, module_names)
1607
+ receiver = Object
1608
+ namespaces = module_names[0, module_names.size - 1].map do |module_name|
1609
+ receiver = receiver.const_get(module_name)
1610
+ end
1611
+ const_args = [resource_name, false]
1612
+ if namespace = namespaces.reverse.detect { |ns| ns.const_defined?(*const_args) }
1613
+ namespace.const_get(*const_args)
1614
+ else
1615
+ create_resource_for(resource_name)
1616
+ end
1617
+ end
1618
+
1619
+ # Tries to find a resource for a given name; if it fails, then the resource is created
1620
+ def find_or_create_resource_for(name)
1621
+ return reflections[name.to_sym].klass if reflections.key?(name.to_sym)
1622
+ resource_name = name.to_s.camelize
1623
+
1624
+ const_args = [resource_name, false]
1625
+
1626
+ if !const_valid?(*const_args)
1627
+ # resource_name is not a valid ruby module name and cannot be created normally
1628
+ find_or_create_resource_for(:UnnamedResource)
1629
+ elsif self.class.const_defined?(*const_args)
1630
+ self.class.const_get(*const_args)
1631
+ else
1632
+ ancestors = self.class.name.to_s.split("::")
1633
+ if ancestors.size > 1
1634
+ find_or_create_resource_in_modules(resource_name, ancestors)
1635
+ else
1636
+ if Object.const_defined?(*const_args)
1637
+ Object.const_get(*const_args)
1638
+ else
1639
+ create_resource_for(resource_name)
1640
+ end
1641
+ end
1642
+ end
1643
+ end
1644
+
1645
+ def const_valid?(*const_args)
1646
+ self.class.const_defined?(*const_args)
1647
+ true
1648
+ rescue NameError
1649
+ false
1650
+ end
1651
+
1652
+ # Create and return a class definition for a resource inside the current resource
1653
+ def create_resource_for(resource_name)
1654
+ resource = self.class.const_set(resource_name, Class.new(ActiveResource::Base))
1655
+ resource.prefix = self.class.prefix
1656
+ resource.site = self.class.site
1657
+ resource
1658
+ end
1659
+
1660
+ def split_options(options = {})
1661
+ self.class.__send__(:split_options, options)
1662
+ end
1663
+
1664
+ def method_missing(method_symbol, *arguments) #:nodoc:
1665
+ method_name = method_symbol.to_s
1666
+
1667
+ if method_name =~ /(=|\?)$/
1668
+ case $1
1669
+ when "="
1670
+ attributes[$`] = arguments.first
1671
+ when "?"
1672
+ attributes[$`]
1673
+ end
1674
+ else
1675
+ return attributes[method_name] if attributes.include?(method_name)
1676
+ # not set right now but we know about it
1677
+ return nil if known_attributes.include?(method_name)
1678
+ super
1679
+ end
1680
+ end
1681
+ end
1682
+
1683
+ class Base
1684
+ extend ActiveModel::Naming
1685
+ extend ActiveResource::Associations
1686
+
1687
+ include Callbacks, CustomMethods, Validations
1688
+ include ActiveModel::Conversion
1689
+ include ActiveModel::Serializers::JSON
1690
+ include ActiveModel::Serializers::Xml
1691
+ include ActiveResource::Reflection
1692
+ end
1693
+
1694
+ ActiveSupport.run_load_hooks(:active_resource, Base)
1695
+ end