plyom_user 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (265) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/plyom_user/version.rb +1 -1
  4. data/lib/plyom_user.rb +4 -3
  5. data/vendor/bundle/ruby/2.0.0/bin/httparty +23 -0
  6. data/vendor/bundle/ruby/2.0.0/bin/rake +23 -0
  7. data/vendor/bundle/ruby/2.0.0/build_info/httparty-0.11.0.info +1 -0
  8. data/vendor/bundle/ruby/2.0.0/build_info/multi_json-1.8.2.info +1 -0
  9. data/vendor/bundle/ruby/2.0.0/build_info/multi_xml-0.5.5.info +1 -0
  10. data/vendor/bundle/ruby/2.0.0/build_info/rake-10.1.1.info +1 -0
  11. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/.gitignore +10 -0
  12. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/.travis.yml +9 -0
  13. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/Gemfile +15 -0
  14. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/Guardfile +16 -0
  15. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/History +303 -0
  16. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/MIT-LICENSE +20 -0
  17. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/README.md +79 -0
  18. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/Rakefile +15 -0
  19. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/bin/httparty +114 -0
  20. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/cucumber.yml +1 -0
  21. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/examples/aaws.rb +32 -0
  22. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/examples/basic.rb +32 -0
  23. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/examples/crack.rb +19 -0
  24. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/examples/custom_parsers.rb +67 -0
  25. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/examples/delicious.rb +37 -0
  26. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/examples/google.rb +16 -0
  27. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/examples/headers_and_user_agents.rb +6 -0
  28. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/examples/nokogiri_html_parser.rb +22 -0
  29. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/examples/rubyurl.rb +14 -0
  30. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/examples/tripit_sign_in.rb +33 -0
  31. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/examples/twitter.rb +31 -0
  32. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/examples/whoismyrep.rb +10 -0
  33. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/features/basic_authentication.feature +20 -0
  34. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/features/command_line.feature +7 -0
  35. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/features/deals_with_http_error_codes.feature +26 -0
  36. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/features/digest_authentication.feature +20 -0
  37. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/features/handles_compressed_responses.feature +19 -0
  38. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/features/handles_multiple_formats.feature +34 -0
  39. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/features/steps/env.rb +22 -0
  40. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/features/steps/httparty_response_steps.rb +40 -0
  41. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/features/steps/httparty_steps.rb +27 -0
  42. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/features/steps/mongrel_helper.rb +94 -0
  43. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/features/steps/remote_service_steps.rb +69 -0
  44. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/features/supports_redirection.feature +22 -0
  45. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/features/supports_timeout_option.feature +13 -0
  46. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/httparty.gemspec +24 -0
  47. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/lib/httparty/connection_adapter.rb +134 -0
  48. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/lib/httparty/cookie_hash.rb +22 -0
  49. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/lib/httparty/core_extensions.rb +32 -0
  50. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/lib/httparty/exceptions.rb +26 -0
  51. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/lib/httparty/hash_conversions.rb +51 -0
  52. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/lib/httparty/module_inheritable_attributes.rb +56 -0
  53. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/lib/httparty/net_digest_auth.rb +84 -0
  54. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/lib/httparty/parser.rb +139 -0
  55. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/lib/httparty/request.rb +250 -0
  56. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/lib/httparty/response/headers.rb +31 -0
  57. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/lib/httparty/response.rb +67 -0
  58. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/lib/httparty/version.rb +3 -0
  59. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/lib/httparty.rb +534 -0
  60. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/spec/fixtures/delicious.xml +23 -0
  61. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/spec/fixtures/empty.xml +0 -0
  62. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/spec/fixtures/google.html +3 -0
  63. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/spec/fixtures/ssl/generate.sh +29 -0
  64. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/spec/fixtures/ssl/generated/1fe462c2.0 +16 -0
  65. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/spec/fixtures/ssl/generated/bogushost.crt +13 -0
  66. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/spec/fixtures/ssl/generated/ca.crt +16 -0
  67. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/spec/fixtures/ssl/generated/ca.key +15 -0
  68. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/spec/fixtures/ssl/generated/selfsigned.crt +14 -0
  69. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/spec/fixtures/ssl/generated/server.crt +13 -0
  70. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/spec/fixtures/ssl/generated/server.key +15 -0
  71. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/spec/fixtures/ssl/openssl-exts.cnf +9 -0
  72. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/spec/fixtures/twitter.json +1 -0
  73. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/spec/fixtures/twitter.xml +403 -0
  74. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/spec/fixtures/undefined_method_add_node_for_nil.xml +2 -0
  75. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/spec/httparty/connection_adapter_spec.rb +223 -0
  76. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/spec/httparty/cookie_hash_spec.rb +76 -0
  77. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/spec/httparty/net_digest_auth_spec.rb +115 -0
  78. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/spec/httparty/parser_spec.rb +166 -0
  79. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/spec/httparty/request_spec.rb +514 -0
  80. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/spec/httparty/response_spec.rb +221 -0
  81. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/spec/httparty/ssl_spec.rb +62 -0
  82. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/spec/httparty_spec.rb +733 -0
  83. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/spec/spec.opts +2 -0
  84. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/spec/spec_helper.rb +30 -0
  85. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/spec/support/ssl_test_helper.rb +47 -0
  86. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/spec/support/ssl_test_server.rb +80 -0
  87. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/spec/support/stub_response.rb +43 -0
  88. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/website/css/common.css +47 -0
  89. data/vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/website/index.html +73 -0
  90. data/vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/.document +5 -0
  91. data/vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/.rspec +2 -0
  92. data/vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/.travis.yml +16 -0
  93. data/vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/.yardopts +6 -0
  94. data/vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/CHANGELOG.md +185 -0
  95. data/vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/CONTRIBUTING.md +46 -0
  96. data/vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/Gemfile +30 -0
  97. data/vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/LICENSE.md +20 -0
  98. data/vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/README.md +108 -0
  99. data/vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/Rakefile +25 -0
  100. data/vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/lib/multi_json/adapter.rb +57 -0
  101. data/vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/lib/multi_json/adapters/gson.rb +19 -0
  102. data/vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/lib/multi_json/adapters/jr_jackson.rb +19 -0
  103. data/vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/lib/multi_json/adapters/json_common.rb +25 -0
  104. data/vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/lib/multi_json/adapters/json_gem.rb +11 -0
  105. data/vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/lib/multi_json/adapters/json_pure.rb +11 -0
  106. data/vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/lib/multi_json/adapters/nsjsonserialization.rb +34 -0
  107. data/vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/lib/multi_json/adapters/oj.rb +24 -0
  108. data/vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/lib/multi_json/adapters/ok_json.rb +24 -0
  109. data/vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/lib/multi_json/adapters/yajl.rb +19 -0
  110. data/vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/lib/multi_json/convertible_hash_keys.rb +43 -0
  111. data/vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/lib/multi_json/load_error.rb +11 -0
  112. data/vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/lib/multi_json/options.rb +48 -0
  113. data/vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/lib/multi_json/vendor/okjson.rb +606 -0
  114. data/vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/lib/multi_json/version.rb +20 -0
  115. data/vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/lib/multi_json.rb +159 -0
  116. data/vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/multi_json.gemspec +22 -0
  117. data/vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/spec/gson_adapter_spec.rb +10 -0
  118. data/vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/spec/jr_jackson_adapter_spec.rb +10 -0
  119. data/vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/spec/json_gem_adapter_spec.rb +9 -0
  120. data/vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/spec/json_pure_adapter_spec.rb +9 -0
  121. data/vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/spec/multi_json_spec.rb +193 -0
  122. data/vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/spec/nsjsonserialization_adapter_spec.rb +10 -0
  123. data/vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/spec/oj_adapter_spec.rb +10 -0
  124. data/vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/spec/ok_json_adapter_spec.rb +7 -0
  125. data/vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/spec/shared/adapter.rb +230 -0
  126. data/vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/spec/shared/json_common_adapter.rb +30 -0
  127. data/vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/spec/shared/options.rb +119 -0
  128. data/vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/spec/spec_helper.rb +73 -0
  129. data/vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/spec/yajl_adapter_spec.rb +10 -0
  130. data/vendor/bundle/ruby/2.0.0/gems/multi_xml-0.5.5/.yardopts +8 -0
  131. data/vendor/bundle/ruby/2.0.0/gems/multi_xml-0.5.5/CHANGELOG.md +93 -0
  132. data/vendor/bundle/ruby/2.0.0/gems/multi_xml-0.5.5/CONTRIBUTING.md +49 -0
  133. data/vendor/bundle/ruby/2.0.0/gems/multi_xml-0.5.5/LICENSE.md +20 -0
  134. data/vendor/bundle/ruby/2.0.0/gems/multi_xml-0.5.5/README.md +97 -0
  135. data/vendor/bundle/ruby/2.0.0/gems/multi_xml-0.5.5/Rakefile +21 -0
  136. data/vendor/bundle/ruby/2.0.0/gems/multi_xml-0.5.5/lib/multi_xml/parsers/libxml.rb +30 -0
  137. data/vendor/bundle/ruby/2.0.0/gems/multi_xml-0.5.5/lib/multi_xml/parsers/libxml2_parser.rb +74 -0
  138. data/vendor/bundle/ruby/2.0.0/gems/multi_xml-0.5.5/lib/multi_xml/parsers/nokogiri.rb +32 -0
  139. data/vendor/bundle/ruby/2.0.0/gems/multi_xml-0.5.5/lib/multi_xml/parsers/ox.rb +97 -0
  140. data/vendor/bundle/ruby/2.0.0/gems/multi_xml-0.5.5/lib/multi_xml/parsers/rexml.rb +113 -0
  141. data/vendor/bundle/ruby/2.0.0/gems/multi_xml-0.5.5/lib/multi_xml/version.rb +3 -0
  142. data/vendor/bundle/ruby/2.0.0/gems/multi_xml-0.5.5/lib/multi_xml.rb +296 -0
  143. data/vendor/bundle/ruby/2.0.0/gems/multi_xml-0.5.5/multi_xml.gemspec +24 -0
  144. data/vendor/bundle/ruby/2.0.0/gems/multi_xml-0.5.5/spec/helper.rb +17 -0
  145. data/vendor/bundle/ruby/2.0.0/gems/multi_xml-0.5.5/spec/multi_xml_spec.rb +43 -0
  146. data/vendor/bundle/ruby/2.0.0/gems/multi_xml-0.5.5/spec/parser_shared_example.rb +694 -0
  147. data/vendor/bundle/ruby/2.0.0/gems/multi_xml-0.5.5/spec/speed.rb +63 -0
  148. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/.gemtest +0 -0
  149. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/CHANGES +530 -0
  150. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/MIT-LICENSE +21 -0
  151. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/README.rdoc +187 -0
  152. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/Rakefile +374 -0
  153. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/TODO +21 -0
  154. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/bin/rake +33 -0
  155. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/install.rb +80 -0
  156. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/alt_system.rb +108 -0
  157. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/application.rb +728 -0
  158. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/backtrace.rb +20 -0
  159. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/clean.rb +55 -0
  160. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/cloneable.rb +16 -0
  161. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/contrib/compositepublisher.rb +21 -0
  162. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/contrib/ftptools.rb +139 -0
  163. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/contrib/publisher.rb +73 -0
  164. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/contrib/rubyforgepublisher.rb +16 -0
  165. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/contrib/sshpublisher.rb +50 -0
  166. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/contrib/sys.rb +2 -0
  167. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/default_loader.rb +10 -0
  168. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/dsl_definition.rb +157 -0
  169. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/early_time.rb +18 -0
  170. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/ext/core.rb +28 -0
  171. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/ext/module.rb +0 -0
  172. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/ext/string.rb +166 -0
  173. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/ext/time.rb +15 -0
  174. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/file_creation_task.rb +24 -0
  175. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/file_list.rb +416 -0
  176. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/file_task.rb +46 -0
  177. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/file_utils.rb +116 -0
  178. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/file_utils_ext.rb +144 -0
  179. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/gempackagetask.rb +2 -0
  180. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/invocation_chain.rb +57 -0
  181. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/invocation_exception_mixin.rb +16 -0
  182. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/linked_list.rb +103 -0
  183. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/loaders/makefile.rb +40 -0
  184. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/multi_task.rb +13 -0
  185. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/name_space.rb +25 -0
  186. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/packagetask.rb +190 -0
  187. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/pathmap.rb +1 -0
  188. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/phony.rb +15 -0
  189. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/private_reader.rb +20 -0
  190. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/promise.rb +99 -0
  191. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/pseudo_status.rb +29 -0
  192. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/rake_module.rb +37 -0
  193. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/rake_test_loader.rb +22 -0
  194. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/rdoctask.rb +2 -0
  195. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/ruby182_test_unit_fix.rb +27 -0
  196. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/rule_recursion_overflow_error.rb +20 -0
  197. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/runtest.rb +22 -0
  198. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/scope.rb +42 -0
  199. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/task.rb +378 -0
  200. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/task_argument_error.rb +7 -0
  201. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/task_arguments.rb +89 -0
  202. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/task_manager.rb +297 -0
  203. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/tasklib.rb +22 -0
  204. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/testtask.rb +201 -0
  205. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/thread_history_display.rb +48 -0
  206. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/thread_pool.rb +161 -0
  207. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/trace_output.rb +22 -0
  208. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/version.rb +9 -0
  209. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/win32.rb +56 -0
  210. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake.rb +73 -0
  211. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/test/file_creation.rb +34 -0
  212. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/test/helper.rb +128 -0
  213. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/test/support/rakefile_definitions.rb +444 -0
  214. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/test/support/ruby_runner.rb +33 -0
  215. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/test/test_private_reader.rb +42 -0
  216. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/test/test_rake.rb +40 -0
  217. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/test/test_rake_application.rb +517 -0
  218. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/test/test_rake_application_options.rb +457 -0
  219. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/test/test_rake_backtrace.rb +113 -0
  220. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/test/test_rake_clean.rb +46 -0
  221. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/test/test_rake_definitions.rb +79 -0
  222. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/test/test_rake_directory_task.rb +57 -0
  223. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/test/test_rake_dsl.rb +40 -0
  224. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/test/test_rake_early_time.rb +31 -0
  225. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/test/test_rake_extension.rb +59 -0
  226. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/test/test_rake_file_creation_task.rb +56 -0
  227. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/test/test_rake_file_list.rb +627 -0
  228. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/test/test_rake_file_list_path_map.rb +8 -0
  229. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/test/test_rake_file_task.rb +122 -0
  230. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/test/test_rake_file_utils.rb +309 -0
  231. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/test/test_rake_ftp_file.rb +74 -0
  232. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/test/test_rake_functional.rb +466 -0
  233. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/test/test_rake_invocation_chain.rb +64 -0
  234. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/test/test_rake_linked_list.rb +84 -0
  235. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/test/test_rake_makefile_loader.rb +46 -0
  236. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/test/test_rake_multi_task.rb +58 -0
  237. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/test/test_rake_name_space.rb +43 -0
  238. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/test/test_rake_package_task.rb +79 -0
  239. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/test/test_rake_path_map.rb +168 -0
  240. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/test/test_rake_path_map_explode.rb +34 -0
  241. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/test/test_rake_path_map_partial.rb +18 -0
  242. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/test/test_rake_pseudo_status.rb +21 -0
  243. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/test/test_rake_rake_test_loader.rb +20 -0
  244. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/test/test_rake_reduce_compat.rb +26 -0
  245. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/test/test_rake_require.rb +40 -0
  246. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/test/test_rake_rules.rb +362 -0
  247. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/test/test_rake_scope.rb +44 -0
  248. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/test/test_rake_task.rb +376 -0
  249. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/test/test_rake_task_argument_parsing.rb +103 -0
  250. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/test/test_rake_task_arguments.rb +121 -0
  251. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/test/test_rake_task_lib.rb +9 -0
  252. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/test/test_rake_task_manager.rb +158 -0
  253. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/test/test_rake_task_manager_argument_resolution.rb +19 -0
  254. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/test/test_rake_task_with_arguments.rb +171 -0
  255. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/test/test_rake_test_task.rb +119 -0
  256. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/test/test_rake_thread_pool.rb +142 -0
  257. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/test/test_rake_top_level_functions.rb +71 -0
  258. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/test/test_rake_win32.rb +72 -0
  259. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/test/test_thread_history_display.rb +101 -0
  260. data/vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/test/test_trace_output.rb +52 -0
  261. data/vendor/bundle/ruby/2.0.0/specifications/httparty-0.11.0.gemspec +34 -0
  262. data/vendor/bundle/ruby/2.0.0/specifications/multi_json-1.8.2.gemspec +30 -0
  263. data/vendor/bundle/ruby/2.0.0/specifications/multi_xml-0.5.5.gemspec +30 -0
  264. data/vendor/bundle/ruby/2.0.0/specifications/rake-10.1.1.gemspec +34 -0
  265. metadata +262 -2
@@ -0,0 +1,166 @@
1
+ require 'rake/ext/core'
2
+
3
+ ######################################################################
4
+ # Rake extension methods for String.
5
+ #
6
+ class String
7
+
8
+ rake_extension("ext") do
9
+ # Replace the file extension with +newext+. If there is no extension on
10
+ # the string, append the new extension to the end. If the new extension
11
+ # is not given, or is the empty string, remove any existing extension.
12
+ #
13
+ # +ext+ is a user added method for the String class.
14
+ def ext(newext='')
15
+ return self.dup if ['.', '..'].include? self
16
+ newext = (newext =~ /^\./) ? newext : ("." + newext) if newext != ''
17
+ self.chomp(File.extname(self)) << newext
18
+ end
19
+ end
20
+
21
+ rake_extension("pathmap") do
22
+ # Explode a path into individual components. Used by +pathmap+.
23
+ def pathmap_explode
24
+ head, tail = File.split(self)
25
+ return [self] if head == self
26
+ return [tail] if head == '.' || tail == '/'
27
+ return [head, tail] if head == '/'
28
+ return head.pathmap_explode + [tail]
29
+ end
30
+ protected :pathmap_explode
31
+
32
+ # Extract a partial path from the path. Include +n+ directories from the
33
+ # front end (left hand side) if +n+ is positive. Include |+n+|
34
+ # directories from the back end (right hand side) if +n+ is negative.
35
+ def pathmap_partial(n)
36
+ dirs = File.dirname(self).pathmap_explode
37
+ partial_dirs =
38
+ if n > 0
39
+ dirs[0...n]
40
+ elsif n < 0
41
+ dirs.reverse[0...-n].reverse
42
+ else
43
+ "."
44
+ end
45
+ File.join(partial_dirs)
46
+ end
47
+ protected :pathmap_partial
48
+
49
+ # Preform the pathmap replacement operations on the given path. The
50
+ # patterns take the form 'pat1,rep1;pat2,rep2...'.
51
+ def pathmap_replace(patterns, &block)
52
+ result = self
53
+ patterns.split(';').each do |pair|
54
+ pattern, replacement = pair.split(',')
55
+ pattern = Regexp.new(pattern)
56
+ if replacement == '*' && block_given?
57
+ result = result.sub(pattern, &block)
58
+ elsif replacement
59
+ result = result.sub(pattern, replacement)
60
+ else
61
+ result = result.sub(pattern, '')
62
+ end
63
+ end
64
+ result
65
+ end
66
+ protected :pathmap_replace
67
+
68
+ # Map the path according to the given specification. The specification
69
+ # controls the details of the mapping. The following special patterns are
70
+ # recognized:
71
+ #
72
+ # * <b>%p</b> -- The complete path.
73
+ # * <b>%f</b> -- The base file name of the path, with its file extension,
74
+ # but without any directories.
75
+ # * <b>%n</b> -- The file name of the path without its file extension.
76
+ # * <b>%d</b> -- The directory list of the path.
77
+ # * <b>%x</b> -- The file extension of the path. An empty string if there
78
+ # is no extension.
79
+ # * <b>%X</b> -- Everything *but* the file extension.
80
+ # * <b>%s</b> -- The alternate file separator if defined, otherwise use
81
+ # the standard file separator.
82
+ # * <b>%%</b> -- A percent sign.
83
+ #
84
+ # The %d specifier can also have a numeric prefix (e.g. '%2d'). If the
85
+ # number is positive, only return (up to) +n+ directories in the path,
86
+ # starting from the left hand side. If +n+ is negative, return (up to)
87
+ # |+n+| directories from the right hand side of the path.
88
+ #
89
+ # Examples:
90
+ #
91
+ # 'a/b/c/d/file.txt'.pathmap("%2d") => 'a/b'
92
+ # 'a/b/c/d/file.txt'.pathmap("%-2d") => 'c/d'
93
+ #
94
+ # Also the %d, %p, %f, %n, %x, and %X operators can take a
95
+ # pattern/replacement argument to perform simple string substitutions on a
96
+ # particular part of the path. The pattern and replacement are separated
97
+ # by a comma and are enclosed by curly braces. The replacement spec comes
98
+ # after the % character but before the operator letter. (e.g.
99
+ # "%{old,new}d"). Multiple replacement specs should be separated by
100
+ # semi-colons (e.g. "%{old,new;src,bin}d").
101
+ #
102
+ # Regular expressions may be used for the pattern, and back refs may be
103
+ # used in the replacement text. Curly braces, commas and semi-colons are
104
+ # excluded from both the pattern and replacement text (let's keep parsing
105
+ # reasonable).
106
+ #
107
+ # For example:
108
+ #
109
+ # "src/org/onestepback/proj/A.java".pathmap("%{^src,bin}X.class")
110
+ #
111
+ # returns:
112
+ #
113
+ # "bin/org/onestepback/proj/A.class"
114
+ #
115
+ # If the replacement text is '*', then a block may be provided to perform
116
+ # some arbitrary calculation for the replacement.
117
+ #
118
+ # For example:
119
+ #
120
+ # "/path/to/file.TXT".pathmap("%X%{.*,*}x") { |ext|
121
+ # ext.downcase
122
+ # }
123
+ #
124
+ # Returns:
125
+ #
126
+ # "/path/to/file.txt"
127
+ #
128
+ def pathmap(spec=nil, &block)
129
+ return self if spec.nil?
130
+ result = ''
131
+ spec.scan(/%\{[^}]*\}-?\d*[sdpfnxX%]|%-?\d+d|%.|[^%]+/) do |frag|
132
+ case frag
133
+ when '%f'
134
+ result << File.basename(self)
135
+ when '%n'
136
+ result << File.basename(self).ext
137
+ when '%d'
138
+ result << File.dirname(self)
139
+ when '%x'
140
+ result << File.extname(self)
141
+ when '%X'
142
+ result << self.ext
143
+ when '%p'
144
+ result << self
145
+ when '%s'
146
+ result << (File::ALT_SEPARATOR || File::SEPARATOR)
147
+ when '%-'
148
+ # do nothing
149
+ when '%%'
150
+ result << "%"
151
+ when /%(-?\d+)d/
152
+ result << pathmap_partial($1.to_i)
153
+ when /^%\{([^}]*)\}(\d*[dpfnxX])/
154
+ patterns, operator = $1, $2
155
+ result << pathmap('%' + operator).pathmap_replace(patterns, &block)
156
+ when /^%/
157
+ fail ArgumentError, "Unknown pathmap specifier #{frag} in '#{spec}'"
158
+ else
159
+ result << frag
160
+ end
161
+ end
162
+ result
163
+ end
164
+ end
165
+
166
+ end
@@ -0,0 +1,15 @@
1
+ #--
2
+ # Extensions to time to allow comparisons with an early time class.
3
+
4
+ require 'rake/early_time'
5
+
6
+ class Time
7
+ alias rake_original_time_compare :<=>
8
+ def <=>(other)
9
+ if Rake::EarlyTime === other
10
+ - other.<=>(self)
11
+ else
12
+ rake_original_time_compare(other)
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,24 @@
1
+ require 'rake/file_task'
2
+ require 'rake/early_time'
3
+
4
+ module Rake
5
+
6
+ # A FileCreationTask is a file task that when used as a dependency will be
7
+ # needed if and only if the file has not been created. Once created, it is
8
+ # not re-triggered if any of its dependencies are newer, nor does trigger
9
+ # any rebuilds of tasks that depend on it whenever it is updated.
10
+ #
11
+ class FileCreationTask < FileTask
12
+ # Is this file task needed? Yes if it doesn't exist.
13
+ def needed?
14
+ ! File.exist?(name)
15
+ end
16
+
17
+ # Time stamp for file creation task. This time stamp is earlier
18
+ # than any other time stamp.
19
+ def timestamp
20
+ Rake::EARLY
21
+ end
22
+ end
23
+
24
+ end
@@ -0,0 +1,416 @@
1
+ require 'rake/cloneable'
2
+ require 'rake/file_utils_ext'
3
+ require 'rake/pathmap'
4
+
5
+ ######################################################################
6
+ module Rake
7
+
8
+ # #########################################################################
9
+ # A FileList is essentially an array with a few helper methods defined to
10
+ # make file manipulation a bit easier.
11
+ #
12
+ # FileLists are lazy. When given a list of glob patterns for possible files
13
+ # to be included in the file list, instead of searching the file structures
14
+ # to find the files, a FileList holds the pattern for latter use.
15
+ #
16
+ # This allows us to define a number of FileList to match any number of
17
+ # files, but only search out the actual files when then FileList itself is
18
+ # actually used. The key is that the first time an element of the
19
+ # FileList/Array is requested, the pending patterns are resolved into a real
20
+ # list of file names.
21
+ #
22
+ class FileList
23
+
24
+ include Cloneable
25
+
26
+ # == Method Delegation
27
+ #
28
+ # The lazy evaluation magic of FileLists happens by implementing all the
29
+ # array specific methods to call +resolve+ before delegating the heavy
30
+ # lifting to an embedded array object (@items).
31
+ #
32
+ # In addition, there are two kinds of delegation calls. The regular kind
33
+ # delegates to the @items array and returns the result directly. Well,
34
+ # almost directly. It checks if the returned value is the @items object
35
+ # itself, and if so will return the FileList object instead.
36
+ #
37
+ # The second kind of delegation call is used in methods that normally
38
+ # return a new Array object. We want to capture the return value of these
39
+ # methods and wrap them in a new FileList object. We enumerate these
40
+ # methods in the +SPECIAL_RETURN+ list below.
41
+
42
+ # List of array methods (that are not in +Object+) that need to be
43
+ # delegated.
44
+ ARRAY_METHODS = (Array.instance_methods - Object.instance_methods).
45
+ map { |n| n.to_s }
46
+
47
+ # List of additional methods that must be delegated.
48
+ MUST_DEFINE = %w[inspect <=>]
49
+
50
+ # List of methods that should not be delegated here (we define special
51
+ # versions of them explicitly below).
52
+ MUST_NOT_DEFINE = %w[to_a to_ary partition *]
53
+
54
+ # List of delegated methods that return new array values which need
55
+ # wrapping.
56
+ SPECIAL_RETURN = %w[
57
+ map collect sort sort_by select find_all reject grep
58
+ compact flatten uniq values_at
59
+ + - & |
60
+ ]
61
+
62
+ DELEGATING_METHODS = (ARRAY_METHODS + MUST_DEFINE - MUST_NOT_DEFINE).
63
+ map { |s| s.to_s }.sort.uniq
64
+
65
+ # Now do the delegation.
66
+ DELEGATING_METHODS.each do |sym|
67
+ if SPECIAL_RETURN.include?(sym)
68
+ ln = __LINE__ + 1
69
+ class_eval %{
70
+ def #{sym}(*args, &block)
71
+ resolve
72
+ result = @items.send(:#{sym}, *args, &block)
73
+ FileList.new.import(result)
74
+ end
75
+ }, __FILE__, ln
76
+ else
77
+ ln = __LINE__ + 1
78
+ class_eval %{
79
+ def #{sym}(*args, &block)
80
+ resolve
81
+ result = @items.send(:#{sym}, *args, &block)
82
+ result.object_id == @items.object_id ? self : result
83
+ end
84
+ }, __FILE__, ln
85
+ end
86
+ end
87
+
88
+ # Create a file list from the globbable patterns given. If you wish to
89
+ # perform multiple includes or excludes at object build time, use the
90
+ # "yield self" pattern.
91
+ #
92
+ # Example:
93
+ # file_list = FileList.new('lib/**/*.rb', 'test/test*.rb')
94
+ #
95
+ # pkg_files = FileList.new('lib/**/*') do |fl|
96
+ # fl.exclude(/\bCVS\b/)
97
+ # end
98
+ #
99
+ def initialize(*patterns)
100
+ @pending_add = []
101
+ @pending = false
102
+ @exclude_patterns = DEFAULT_IGNORE_PATTERNS.dup
103
+ @exclude_procs = DEFAULT_IGNORE_PROCS.dup
104
+ @items = []
105
+ patterns.each { |pattern| include(pattern) }
106
+ yield self if block_given?
107
+ end
108
+
109
+ # Add file names defined by glob patterns to the file list. If an array
110
+ # is given, add each element of the array.
111
+ #
112
+ # Example:
113
+ # file_list.include("*.java", "*.cfg")
114
+ # file_list.include %w( math.c lib.h *.o )
115
+ #
116
+ def include(*filenames)
117
+ # TODO: check for pending
118
+ filenames.each do |fn|
119
+ if fn.respond_to? :to_ary
120
+ include(*fn.to_ary)
121
+ else
122
+ @pending_add << fn
123
+ end
124
+ end
125
+ @pending = true
126
+ self
127
+ end
128
+ alias :add :include
129
+
130
+ # Register a list of file name patterns that should be excluded from the
131
+ # list. Patterns may be regular expressions, glob patterns or regular
132
+ # strings. In addition, a block given to exclude will remove entries that
133
+ # return true when given to the block.
134
+ #
135
+ # Note that glob patterns are expanded against the file system. If a file
136
+ # is explicitly added to a file list, but does not exist in the file
137
+ # system, then an glob pattern in the exclude list will not exclude the
138
+ # file.
139
+ #
140
+ # Examples:
141
+ # FileList['a.c', 'b.c'].exclude("a.c") => ['b.c']
142
+ # FileList['a.c', 'b.c'].exclude(/^a/) => ['b.c']
143
+ #
144
+ # If "a.c" is a file, then ...
145
+ # FileList['a.c', 'b.c'].exclude("a.*") => ['b.c']
146
+ #
147
+ # If "a.c" is not a file, then ...
148
+ # FileList['a.c', 'b.c'].exclude("a.*") => ['a.c', 'b.c']
149
+ #
150
+ def exclude(*patterns, &block)
151
+ patterns.each do |pat|
152
+ @exclude_patterns << pat
153
+ end
154
+ @exclude_procs << block if block_given?
155
+ resolve_exclude unless @pending
156
+ self
157
+ end
158
+
159
+
160
+ # Clear all the exclude patterns so that we exclude nothing.
161
+ def clear_exclude
162
+ @exclude_patterns = []
163
+ @exclude_procs = []
164
+ self
165
+ end
166
+
167
+ # Define equality.
168
+ def ==(array)
169
+ to_ary == array
170
+ end
171
+
172
+ # Return the internal array object.
173
+ def to_a
174
+ resolve
175
+ @items
176
+ end
177
+
178
+ # Return the internal array object.
179
+ def to_ary
180
+ to_a
181
+ end
182
+
183
+ # Lie about our class.
184
+ def is_a?(klass)
185
+ klass == Array || super(klass)
186
+ end
187
+ alias kind_of? is_a?
188
+
189
+ # Redefine * to return either a string or a new file list.
190
+ def *(other)
191
+ result = @items * other
192
+ case result
193
+ when Array
194
+ FileList.new.import(result)
195
+ else
196
+ result
197
+ end
198
+ end
199
+
200
+ # Resolve all the pending adds now.
201
+ def resolve
202
+ if @pending
203
+ @pending = false
204
+ @pending_add.each do |fn| resolve_add(fn) end
205
+ @pending_add = []
206
+ resolve_exclude
207
+ end
208
+ self
209
+ end
210
+
211
+ def resolve_add(fn)
212
+ case fn
213
+ when %r{[*?\[\{]}
214
+ add_matching(fn)
215
+ else
216
+ self << fn
217
+ end
218
+ end
219
+ private :resolve_add
220
+
221
+ def resolve_exclude
222
+ reject! { |fn| excluded_from_list?(fn) }
223
+ self
224
+ end
225
+ private :resolve_exclude
226
+
227
+ # Return a new FileList with the results of running +sub+ against each
228
+ # element of the original list.
229
+ #
230
+ # Example:
231
+ # FileList['a.c', 'b.c'].sub(/\.c$/, '.o') => ['a.o', 'b.o']
232
+ #
233
+ def sub(pat, rep)
234
+ inject(FileList.new) { |res, fn| res << fn.sub(pat, rep) }
235
+ end
236
+
237
+ # Return a new FileList with the results of running +gsub+ against each
238
+ # element of the original list.
239
+ #
240
+ # Example:
241
+ # FileList['lib/test/file', 'x/y'].gsub(/\//, "\\")
242
+ # => ['lib\\test\\file', 'x\\y']
243
+ #
244
+ def gsub(pat, rep)
245
+ inject(FileList.new) { |res, fn| res << fn.gsub(pat, rep) }
246
+ end
247
+
248
+ # Same as +sub+ except that the original file list is modified.
249
+ def sub!(pat, rep)
250
+ each_with_index { |fn, i| self[i] = fn.sub(pat, rep) }
251
+ self
252
+ end
253
+
254
+ # Same as +gsub+ except that the original file list is modified.
255
+ def gsub!(pat, rep)
256
+ each_with_index { |fn, i| self[i] = fn.gsub(pat, rep) }
257
+ self
258
+ end
259
+
260
+ # Apply the pathmap spec to each of the included file names, returning a
261
+ # new file list with the modified paths. (See String#pathmap for
262
+ # details.)
263
+ def pathmap(spec=nil)
264
+ collect { |fn| fn.pathmap(spec) }
265
+ end
266
+
267
+ # Return a new FileList with <tt>String#ext</tt> method applied to
268
+ # each member of the array.
269
+ #
270
+ # This method is a shortcut for:
271
+ #
272
+ # array.collect { |item| item.ext(newext) }
273
+ #
274
+ # +ext+ is a user added method for the Array class.
275
+ def ext(newext='')
276
+ collect { |fn| fn.ext(newext) }
277
+ end
278
+
279
+
280
+ # Grep each of the files in the filelist using the given pattern. If a
281
+ # block is given, call the block on each matching line, passing the file
282
+ # name, line number, and the matching line of text. If no block is given,
283
+ # a standard emacs style file:linenumber:line message will be printed to
284
+ # standard out. Returns the number of matched items.
285
+ def egrep(pattern, *options)
286
+ matched = 0
287
+ each do |fn|
288
+ begin
289
+ open(fn, "r", *options) do |inf|
290
+ count = 0
291
+ inf.each do |line|
292
+ count += 1
293
+ if pattern.match(line)
294
+ matched += 1
295
+ if block_given?
296
+ yield fn, count, line
297
+ else
298
+ puts "#{fn}:#{count}:#{line}"
299
+ end
300
+ end
301
+ end
302
+ end
303
+ rescue StandardError => ex
304
+ $stderr.puts "Error while processing '#{fn}': #{ex}"
305
+ end
306
+ end
307
+ matched
308
+ end
309
+
310
+ # Return a new file list that only contains file names from the current
311
+ # file list that exist on the file system.
312
+ def existing
313
+ select { |fn| File.exist?(fn) }
314
+ end
315
+
316
+ # Modify the current file list so that it contains only file name that
317
+ # exist on the file system.
318
+ def existing!
319
+ resolve
320
+ @items = @items.select { |fn| File.exist?(fn) }
321
+ self
322
+ end
323
+
324
+ # FileList version of partition. Needed because the nested arrays should
325
+ # be FileLists in this version.
326
+ def partition(&block) # :nodoc:
327
+ resolve
328
+ result = @items.partition(&block)
329
+ [
330
+ FileList.new.import(result[0]),
331
+ FileList.new.import(result[1]),
332
+ ]
333
+ end
334
+
335
+ # Convert a FileList to a string by joining all elements with a space.
336
+ def to_s
337
+ resolve
338
+ self.join(' ')
339
+ end
340
+
341
+ # Add matching glob patterns.
342
+ def add_matching(pattern)
343
+ FileList.glob(pattern).each do |fn|
344
+ self << fn unless excluded_from_list?(fn)
345
+ end
346
+ end
347
+ private :add_matching
348
+
349
+ # Should the given file name be excluded from the list?
350
+ #
351
+ # NOTE: This method was formally named "exclude?", but Rails
352
+ # introduced an exclude? method as an array method and setup a
353
+ # conflict with file list. We renamed the method to avoid
354
+ # confusion. If you were using "FileList#exclude?" in your user
355
+ # code, you will need to update.
356
+ def excluded_from_list?(fn)
357
+ return true if @exclude_patterns.any? do |pat|
358
+ case pat
359
+ when Regexp
360
+ fn =~ pat
361
+ when /[*?]/
362
+ File.fnmatch?(pat, fn, File::FNM_PATHNAME)
363
+ else
364
+ fn == pat
365
+ end
366
+ end
367
+ @exclude_procs.any? { |p| p.call(fn) }
368
+ end
369
+
370
+ DEFAULT_IGNORE_PATTERNS = [
371
+ /(^|[\/\\])CVS([\/\\]|$)/,
372
+ /(^|[\/\\])\.svn([\/\\]|$)/,
373
+ /\.bak$/,
374
+ /~$/
375
+ ]
376
+ DEFAULT_IGNORE_PROCS = [
377
+ proc { |fn| fn =~ /(^|[\/\\])core$/ && ! File.directory?(fn) }
378
+ ]
379
+
380
+ def import(array)
381
+ @items = array
382
+ self
383
+ end
384
+
385
+ class << self
386
+ # Create a new file list including the files listed. Similar to:
387
+ #
388
+ # FileList.new(*args)
389
+ def [](*args)
390
+ new(*args)
391
+ end
392
+
393
+ # Get a sorted list of files matching the pattern. This method
394
+ # should be prefered to Dir[pattern] and Dir.glob(pattern) because
395
+ # the files returned are guaranteed to be sorted.
396
+ def glob(pattern, *args)
397
+ Dir.glob(pattern, *args).sort
398
+ end
399
+ end
400
+ end
401
+ end
402
+
403
+ module Rake
404
+ class << self
405
+
406
+ # Yield each file or directory component.
407
+ def each_dir_parent(dir) # :nodoc:
408
+ old_length = nil
409
+ while dir != '.' && dir.length != old_length
410
+ yield(dir)
411
+ old_length = dir.length
412
+ dir = File.dirname(dir)
413
+ end
414
+ end
415
+ end
416
+ end # module Rake
@@ -0,0 +1,46 @@
1
+ require 'rake/task.rb'
2
+ require 'rake/early_time'
3
+
4
+ module Rake
5
+ # #########################################################################
6
+ # A FileTask is a task that includes time based dependencies. If any of a
7
+ # FileTask's prerequisites have a timestamp that is later than the file
8
+ # represented by this task, then the file must be rebuilt (using the
9
+ # supplied actions).
10
+ #
11
+ class FileTask < Task
12
+
13
+ # Is this file task needed? Yes if it doesn't exist, or if its time stamp
14
+ # is out of date.
15
+ def needed?
16
+ ! File.exist?(name) || out_of_date?(timestamp)
17
+ end
18
+
19
+ # Time stamp for file task.
20
+ def timestamp
21
+ if File.exist?(name)
22
+ File.mtime(name.to_s)
23
+ else
24
+ Rake::EARLY
25
+ end
26
+ end
27
+
28
+ private
29
+
30
+ # Are there any prerequisites with a later time than the given time stamp?
31
+ def out_of_date?(stamp)
32
+ @prerequisites.any? { |n| application[n, @scope].timestamp > stamp }
33
+ end
34
+
35
+ # ----------------------------------------------------------------
36
+ # Task class methods.
37
+ #
38
+ class << self
39
+ # Apply the scope to the task name according to the rules for this kind
40
+ # of task. File based tasks ignore the scope when creating the name.
41
+ def scope_name(scope, task_name)
42
+ task_name
43
+ end
44
+ end
45
+ end
46
+ end