htty 1.5.4 → 1.5.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (209) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +12 -9
  3. data/.rspec +2 -1
  4. data/.travis.yml +11 -8
  5. data/.yardopts +1 -1
  6. data/Gemfile +22 -10
  7. data/Guardfile +31 -13
  8. data/History.markdown +6 -0
  9. data/README.markdown +29 -13
  10. data/Rakefile +2 -64
  11. data/bin/console +10 -0
  12. data/bin/setup +8 -0
  13. data/exe/htty +5 -0
  14. data/htty.gemspec +27 -29
  15. data/lib/htty.rb +29 -4
  16. data/lib/htty/cli.rb +9 -16
  17. data/lib/htty/cli/body_open_command.rb +2 -7
  18. data/lib/htty/cli/command.rb +10 -18
  19. data/lib/htty/cli/commands.rb +76 -11
  20. data/lib/htty/cli/commands/address.rb +1 -14
  21. data/lib/htty/cli/commands/body_clear.rb +1 -8
  22. data/lib/htty/cli/commands/body_edit.rb +1 -11
  23. data/lib/htty/cli/commands/body_request.rb +1 -12
  24. data/lib/htty/cli/commands/body_request_open.rb +1 -10
  25. data/lib/htty/cli/commands/body_response.rb +1 -12
  26. data/lib/htty/cli/commands/body_response_open.rb +1 -11
  27. data/lib/htty/cli/commands/body_set.rb +1 -10
  28. data/lib/htty/cli/commands/body_unset.rb +1 -9
  29. data/lib/htty/cli/commands/cd.rb +1 -8
  30. data/lib/htty/cli/commands/cookie_add.rb +1 -8
  31. data/lib/htty/cli/commands/cookie_remove.rb +1 -8
  32. data/lib/htty/cli/commands/cookies.rb +1 -15
  33. data/lib/htty/cli/commands/cookies_add.rb +1 -11
  34. data/lib/htty/cli/commands/cookies_clear.rb +1 -8
  35. data/lib/htty/cli/commands/cookies_remove.rb +1 -11
  36. data/lib/htty/cli/commands/cookies_remove_all.rb +1 -11
  37. data/lib/htty/cli/commands/cookies_use.rb +1 -14
  38. data/lib/htty/cli/commands/delete.rb +1 -8
  39. data/lib/htty/cli/commands/exit.rb +1 -8
  40. data/lib/htty/cli/commands/follow.rb +1 -10
  41. data/lib/htty/cli/commands/form.rb +1 -7
  42. data/lib/htty/cli/commands/form_add.rb +1 -7
  43. data/lib/htty/cli/commands/form_clear.rb +1 -8
  44. data/lib/htty/cli/commands/form_remove.rb +1 -7
  45. data/lib/htty/cli/commands/form_remove_all.rb +1 -7
  46. data/lib/htty/cli/commands/fragment_clear.rb +1 -8
  47. data/lib/htty/cli/commands/fragment_set.rb +1 -10
  48. data/lib/htty/cli/commands/fragment_unset.rb +1 -9
  49. data/lib/htty/cli/commands/get.rb +1 -8
  50. data/lib/htty/cli/commands/header_set.rb +1 -8
  51. data/lib/htty/cli/commands/header_unset.rb +1 -8
  52. data/lib/htty/cli/commands/headers_clear.rb +1 -8
  53. data/lib/htty/cli/commands/headers_request.rb +1 -15
  54. data/lib/htty/cli/commands/headers_response.rb +1 -15
  55. data/lib/htty/cli/commands/headers_set.rb +1 -10
  56. data/lib/htty/cli/commands/headers_unset.rb +1 -10
  57. data/lib/htty/cli/commands/headers_unset_all.rb +1 -10
  58. data/lib/htty/cli/commands/help.rb +4 -12
  59. data/lib/htty/cli/commands/history.rb +1 -10
  60. data/lib/htty/cli/commands/history_verbose.rb +1 -12
  61. data/lib/htty/cli/commands/host_set.rb +1 -8
  62. data/lib/htty/cli/commands/http_delete.rb +1 -12
  63. data/lib/htty/cli/commands/http_get.rb +1 -13
  64. data/lib/htty/cli/commands/http_head.rb +1 -9
  65. data/lib/htty/cli/commands/http_options.rb +1 -9
  66. data/lib/htty/cli/commands/http_patch.rb +1 -13
  67. data/lib/htty/cli/commands/http_post.rb +1 -13
  68. data/lib/htty/cli/commands/http_put.rb +1 -12
  69. data/lib/htty/cli/commands/http_trace.rb +1 -9
  70. data/lib/htty/cli/commands/patch.rb +1 -8
  71. data/lib/htty/cli/commands/path_set.rb +11 -11
  72. data/lib/htty/cli/commands/port_set.rb +1 -9
  73. data/lib/htty/cli/commands/post.rb +1 -8
  74. data/lib/htty/cli/commands/put.rb +1 -8
  75. data/lib/htty/cli/commands/query_add.rb +1 -13
  76. data/lib/htty/cli/commands/query_clear.rb +1 -8
  77. data/lib/htty/cli/commands/query_remove.rb +1 -13
  78. data/lib/htty/cli/commands/query_set.rb +1 -13
  79. data/lib/htty/cli/commands/query_unset.rb +1 -13
  80. data/lib/htty/cli/commands/query_unset_all.rb +1 -10
  81. data/lib/htty/cli/commands/quit.rb +1 -7
  82. data/lib/htty/cli/commands/reuse.rb +5 -12
  83. data/lib/htty/cli/commands/scheme_set.rb +1 -9
  84. data/lib/htty/cli/commands/ssl_verification.rb +1 -11
  85. data/lib/htty/cli/commands/ssl_verification_off.rb +1 -10
  86. data/lib/htty/cli/commands/ssl_verification_on.rb +1 -10
  87. data/lib/htty/cli/commands/status.rb +1 -11
  88. data/lib/htty/cli/commands/undo.rb +1 -7
  89. data/lib/htty/cli/commands/userinfo_clear.rb +1 -8
  90. data/lib/htty/cli/commands/userinfo_set.rb +1 -11
  91. data/lib/htty/cli/commands/userinfo_unset.rb +1 -9
  92. data/lib/htty/cli/display.rb +4 -6
  93. data/lib/htty/cli/http_method_command.rb +1 -10
  94. data/lib/htty/cli/input_device.rb +1 -0
  95. data/lib/htty/cli/url_escaping.rb +1 -6
  96. data/lib/htty/cookies_util.rb +3 -3
  97. data/lib/htty/headers.rb +3 -4
  98. data/lib/htty/http_patch.rb +20 -23
  99. data/lib/htty/no_header_error.rb +1 -1
  100. data/lib/htty/no_location_header_error.rb +1 -3
  101. data/lib/htty/no_response_error.rb +1 -1
  102. data/lib/htty/no_set_cookie_header_error.rb +1 -3
  103. data/lib/htty/payload.rb +1 -5
  104. data/lib/htty/platform.rb +1 -1
  105. data/lib/htty/preferences.rb +1 -1
  106. data/lib/htty/request.rb +3 -13
  107. data/lib/htty/requests_util.rb +1 -5
  108. data/lib/htty/response.rb +1 -4
  109. data/lib/htty/session.rb +1 -3
  110. data/lib/htty/tempfile_preserving_extname.rb +1 -2
  111. data/lib/htty/uri.rb +1 -2
  112. data/lib/htty/version.rb +1 -1
  113. data/lib/tasks.rb +3 -0
  114. data/lib/tasks/build_doc.rake +8 -0
  115. data/lib/tasks/lib_each.rake +25 -0
  116. data/lib/tasks/spec.rake +68 -0
  117. data/lib/tasks/spec_each.rake +19 -0
  118. metadata +48 -209
  119. data/bin/htty +0 -5
  120. data/spec/integration/htty/cli/commands/query_add_spec.rb +0 -57
  121. data/spec/integration/htty/cli/commands/query_remove_spec.rb +0 -55
  122. data/spec/integration/htty/cli/commands/query_set_spec.rb +0 -78
  123. data/spec/integration/htty/cli/commands/query_unset_spec.rb +0 -43
  124. data/spec/spec_helper.rb +0 -76
  125. data/spec/unit/htty/cli/commands/address_spec.rb +0 -103
  126. data/spec/unit/htty/cli/commands/body_clear_spec.rb +0 -64
  127. data/spec/unit/htty/cli/commands/body_edit_spec.rb +0 -18
  128. data/spec/unit/htty/cli/commands/body_request_spec.rb +0 -67
  129. data/spec/unit/htty/cli/commands/body_response_spec.rb +0 -72
  130. data/spec/unit/htty/cli/commands/body_set_spec.rb +0 -71
  131. data/spec/unit/htty/cli/commands/body_unset_spec.rb +0 -69
  132. data/spec/unit/htty/cli/commands/cd_spec.rb +0 -57
  133. data/spec/unit/htty/cli/commands/cookie_add_spec.rb +0 -64
  134. data/spec/unit/htty/cli/commands/cookie_remove_spec.rb +0 -64
  135. data/spec/unit/htty/cli/commands/cookies_add_spec.rb +0 -78
  136. data/spec/unit/htty/cli/commands/cookies_clear_spec.rb +0 -64
  137. data/spec/unit/htty/cli/commands/cookies_remove_all_spec.rb +0 -73
  138. data/spec/unit/htty/cli/commands/cookies_remove_spec.rb +0 -69
  139. data/spec/unit/htty/cli/commands/cookies_spec.rb +0 -76
  140. data/spec/unit/htty/cli/commands/cookies_use_spec.rb +0 -75
  141. data/spec/unit/htty/cli/commands/delete_spec.rb +0 -64
  142. data/spec/unit/htty/cli/commands/exit_spec.rb +0 -64
  143. data/spec/unit/htty/cli/commands/follow_spec.rb +0 -70
  144. data/spec/unit/htty/cli/commands/form_add_spec.rb +0 -64
  145. data/spec/unit/htty/cli/commands/form_clear_spec.rb +0 -64
  146. data/spec/unit/htty/cli/commands/form_remove_all_spec.rb +0 -66
  147. data/spec/unit/htty/cli/commands/form_remove_spec.rb +0 -57
  148. data/spec/unit/htty/cli/commands/form_spec.rb +0 -57
  149. data/spec/unit/htty/cli/commands/fragment_clear_spec.rb +0 -64
  150. data/spec/unit/htty/cli/commands/fragment_set_spec.rb +0 -73
  151. data/spec/unit/htty/cli/commands/fragment_unset_spec.rb +0 -72
  152. data/spec/unit/htty/cli/commands/get_spec.rb +0 -64
  153. data/spec/unit/htty/cli/commands/header_set_spec.rb +0 -64
  154. data/spec/unit/htty/cli/commands/header_unset_spec.rb +0 -64
  155. data/spec/unit/htty/cli/commands/headers_clear_spec.rb +0 -64
  156. data/spec/unit/htty/cli/commands/headers_request_spec.rb +0 -81
  157. data/spec/unit/htty/cli/commands/headers_response_spec.rb +0 -77
  158. data/spec/unit/htty/cli/commands/headers_set_spec.rb +0 -74
  159. data/spec/unit/htty/cli/commands/headers_unset_all_spec.rb +0 -71
  160. data/spec/unit/htty/cli/commands/headers_unset_spec.rb +0 -63
  161. data/spec/unit/htty/cli/commands/help_spec.rb +0 -67
  162. data/spec/unit/htty/cli/commands/history_spec.rb +0 -65
  163. data/spec/unit/htty/cli/commands/history_verbose_spec.rb +0 -72
  164. data/spec/unit/htty/cli/commands/host_set_spec.rb +0 -71
  165. data/spec/unit/htty/cli/commands/http_delete_spec.rb +0 -75
  166. data/spec/unit/htty/cli/commands/http_get_spec.rb +0 -77
  167. data/spec/unit/htty/cli/commands/http_head_spec.rb +0 -69
  168. data/spec/unit/htty/cli/commands/http_options_spec.rb +0 -69
  169. data/spec/unit/htty/cli/commands/http_patch_spec.rb +0 -73
  170. data/spec/unit/htty/cli/commands/http_post_spec.rb +0 -73
  171. data/spec/unit/htty/cli/commands/http_put_spec.rb +0 -71
  172. data/spec/unit/htty/cli/commands/http_trace_spec.rb +0 -69
  173. data/spec/unit/htty/cli/commands/patch_spec.rb +0 -64
  174. data/spec/unit/htty/cli/commands/path_set_spec.rb +0 -72
  175. data/spec/unit/htty/cli/commands/port_set_spec.rb +0 -73
  176. data/spec/unit/htty/cli/commands/post_spec.rb +0 -64
  177. data/spec/unit/htty/cli/commands/put_spec.rb +0 -64
  178. data/spec/unit/htty/cli/commands/query_add_spec.rb +0 -82
  179. data/spec/unit/htty/cli/commands/query_clear_spec.rb +0 -64
  180. data/spec/unit/htty/cli/commands/query_remove_spec.rb +0 -82
  181. data/spec/unit/htty/cli/commands/query_set_spec.rb +0 -82
  182. data/spec/unit/htty/cli/commands/query_unset_all_spec.rb +0 -74
  183. data/spec/unit/htty/cli/commands/query_unset_spec.rb +0 -75
  184. data/spec/unit/htty/cli/commands/quit_spec.rb +0 -64
  185. data/spec/unit/htty/cli/commands/reuse_spec.rb +0 -72
  186. data/spec/unit/htty/cli/commands/scheme_set_spec.rb +0 -74
  187. data/spec/unit/htty/cli/commands/shared_examples_for_commands.rb +0 -55
  188. data/spec/unit/htty/cli/commands/ssl_verification_off_spec.rb +0 -67
  189. data/spec/unit/htty/cli/commands/ssl_verification_on_spec.rb +0 -60
  190. data/spec/unit/htty/cli/commands/ssl_verification_spec.rb +0 -65
  191. data/spec/unit/htty/cli/commands/status_spec.rb +0 -73
  192. data/spec/unit/htty/cli/commands/undo_spec.rb +0 -57
  193. data/spec/unit/htty/cli/commands/userinfo_clear_spec.rb +0 -64
  194. data/spec/unit/htty/cli/commands/userinfo_set_spec.rb +0 -97
  195. data/spec/unit/htty/cli/commands/userinfo_unset_spec.rb +0 -72
  196. data/spec/unit/htty/cli/display_spec.rb +0 -84
  197. data/spec/unit/htty/cli_spec.rb +0 -28
  198. data/spec/unit/htty/command.rb +0 -47
  199. data/spec/unit/htty/headers_spec.rb +0 -40
  200. data/spec/unit/htty/payload_spec.rb +0 -60
  201. data/spec/unit/htty/preferences_spec.rb +0 -8
  202. data/spec/unit/htty/request_follow_spec.rb +0 -94
  203. data/spec/unit/htty/request_spec.rb +0 -1232
  204. data/spec/unit/htty/request_userinfo_spec.rb +0 -208
  205. data/spec/unit/htty/response_spec.rb +0 -0
  206. data/spec/unit/htty/session_spec.rb +0 -10
  207. data/spec/unit/htty/shared_examples_for_requests.rb +0 -32
  208. data/spec/unit/htty/url_escaping.rb +0 -70
  209. data/spec/unit/htty/version_spec.rb +0 -8
@@ -1,11 +1,4 @@
1
- require File.expand_path("#{File.dirname __FILE__}/../command")
2
- require File.expand_path("#{File.dirname __FILE__}/cookies_remove_all")
3
-
4
- module HTTY; end
5
-
6
- class HTTY::CLI; end
7
-
8
- module HTTY::CLI::Commands; end
1
+ require 'htty'
9
2
 
10
3
  # Encapsulates the _cookies-clear_ command.
11
4
  class HTTY::CLI::Commands::CookiesClear < HTTY::CLI::Command
@@ -1,14 +1,4 @@
1
- require File.expand_path("#{File.dirname __FILE__}/../command")
2
- require File.expand_path("#{File.dirname __FILE__}/cookies")
3
- require File.expand_path("#{File.dirname __FILE__}/cookies_add")
4
- require File.expand_path("#{File.dirname __FILE__}/cookies_remove_all")
5
- require File.expand_path("#{File.dirname __FILE__}/cookies_use")
6
-
7
- module HTTY; end
8
-
9
- class HTTY::CLI; end
10
-
11
- module HTTY::CLI::Commands; end
1
+ require 'htty'
12
2
 
13
3
  # Encapsulates the _cookies-remove_ command.
14
4
  class HTTY::CLI::Commands::CookiesRemove < HTTY::CLI::Command
@@ -1,14 +1,4 @@
1
- require File.expand_path("#{File.dirname __FILE__}/../command")
2
- require File.expand_path("#{File.dirname __FILE__}/cookies")
3
- require File.expand_path("#{File.dirname __FILE__}/cookies_add")
4
- require File.expand_path("#{File.dirname __FILE__}/cookies_remove")
5
- require File.expand_path("#{File.dirname __FILE__}/cookies_use")
6
-
7
- module HTTY; end
8
-
9
- class HTTY::CLI; end
10
-
11
- module HTTY::CLI::Commands; end
1
+ require 'htty'
12
2
 
13
3
  # Encapsulates the _cookies-remove-all_ command.
14
4
  class HTTY::CLI::Commands::CookiesRemoveAll < HTTY::CLI::Command
@@ -1,17 +1,4 @@
1
- require File.expand_path("#{File.dirname __FILE__}/../../response")
2
- require File.expand_path("#{File.dirname __FILE__}/../command")
3
- require File.expand_path("#{File.dirname __FILE__}/../display")
4
- require File.expand_path("#{File.dirname __FILE__}/cookies")
5
- require File.expand_path("#{File.dirname __FILE__}/cookies_add")
6
- require File.expand_path("#{File.dirname __FILE__}/cookies_remove")
7
- require File.expand_path("#{File.dirname __FILE__}/cookies_remove_all")
8
- require File.expand_path("#{File.dirname __FILE__}/headers_response")
9
-
10
- module HTTY; end
11
-
12
- class HTTY::CLI; end
13
-
14
- module HTTY::CLI::Commands; end
1
+ require 'htty'
15
2
 
16
3
  # Encapsulates the _cookies-use_ command.
17
4
  class HTTY::CLI::Commands::CookiesUse < HTTY::CLI::Command
@@ -1,11 +1,4 @@
1
- require File.expand_path("#{File.dirname __FILE__}/../command")
2
- require File.expand_path("#{File.dirname __FILE__}/http_delete")
3
-
4
- module HTTY; end
5
-
6
- class HTTY::CLI; end
7
-
8
- module HTTY::CLI::Commands; end
1
+ require 'htty'
9
2
 
10
3
  # Encapsulates the _delete_ command.
11
4
  class HTTY::CLI::Commands::Delete < HTTY::CLI::Command
@@ -1,11 +1,4 @@
1
- require File.expand_path("#{File.dirname __FILE__}/../command")
2
- require File.expand_path("#{File.dirname __FILE__}/quit")
3
-
4
- module HTTY; end
5
-
6
- class HTTY::CLI; end
7
-
8
- module HTTY::CLI::Commands; end
1
+ require 'htty'
9
2
 
10
3
  # Encapsulates the _exit_ command.
11
4
  class HTTY::CLI::Commands::Exit < HTTY::CLI::Command
@@ -1,13 +1,4 @@
1
- require File.expand_path("#{File.dirname __FILE__}/../../response")
2
- require File.expand_path("#{File.dirname __FILE__}/../command")
3
- require File.expand_path("#{File.dirname __FILE__}/address")
4
- require File.expand_path("#{File.dirname __FILE__}/http_get")
5
-
6
- module HTTY; end
7
-
8
- class HTTY::CLI; end
9
-
10
- module HTTY::CLI::Commands; end
1
+ require 'htty'
11
2
 
12
3
  # Encapsulates the _follow_ command.
13
4
  class HTTY::CLI::Commands::Follow < HTTY::CLI::Command
@@ -1,10 +1,4 @@
1
- require File.expand_path("#{File.dirname __FILE__}/../command")
2
-
3
- module HTTY; end
4
-
5
- class HTTY::CLI; end
6
-
7
- module HTTY::CLI::Commands; end
1
+ require 'htty'
8
2
 
9
3
  # Encapsulates the _form_ command.
10
4
  class HTTY::CLI::Commands::Form < HTTY::CLI::Command
@@ -1,10 +1,4 @@
1
- require File.expand_path("#{File.dirname __FILE__}/../command")
2
-
3
- module HTTY; end
4
-
5
- class HTTY::CLI; end
6
-
7
- module HTTY::CLI::Commands; end
1
+ require 'htty'
8
2
 
9
3
  # Encapsulates the _form-add_ command.
10
4
  class HTTY::CLI::Commands::FormAdd < HTTY::CLI::Command
@@ -1,11 +1,4 @@
1
- require File.expand_path("#{File.dirname __FILE__}/../command")
2
- require File.expand_path("#{File.dirname __FILE__}/form_remove_all")
3
-
4
- module HTTY; end
5
-
6
- class HTTY::CLI; end
7
-
8
- module HTTY::CLI::Commands; end
1
+ require 'htty'
9
2
 
10
3
  # Encapsulates the _form-clear_ command.
11
4
  class HTTY::CLI::Commands::FormClear < HTTY::CLI::Command
@@ -1,10 +1,4 @@
1
- require File.expand_path("#{File.dirname __FILE__}/../command")
2
-
3
- module HTTY; end
4
-
5
- class HTTY::CLI; end
6
-
7
- module HTTY::CLI::Commands; end
1
+ require 'htty'
8
2
 
9
3
  # Encapsulates the _form-remove_ command.
10
4
  class HTTY::CLI::Commands::FormRemove < HTTY::CLI::Command
@@ -1,10 +1,4 @@
1
- require File.expand_path("#{File.dirname __FILE__}/../command")
2
-
3
- module HTTY; end
4
-
5
- class HTTY::CLI; end
6
-
7
- module HTTY::CLI::Commands; end
1
+ require 'htty'
8
2
 
9
3
  # Encapsulates the _form-remove-all_ command.
10
4
  class HTTY::CLI::Commands::FormRemoveAll < HTTY::CLI::Command
@@ -1,11 +1,4 @@
1
- require File.expand_path("#{File.dirname __FILE__}/../command")
2
- require File.expand_path("#{File.dirname __FILE__}/fragment_unset")
3
-
4
- module HTTY; end
5
-
6
- class HTTY::CLI; end
7
-
8
- module HTTY::CLI::Commands; end
1
+ require 'htty'
9
2
 
10
3
  # Encapsulates the _fragment-clear_ command.
11
4
  class HTTY::CLI::Commands::FragmentClear < HTTY::CLI::Command
@@ -1,13 +1,4 @@
1
- require File.expand_path("#{File.dirname __FILE__}/../command")
2
- require File.expand_path("#{File.dirname __FILE__}/../url_escaping")
3
- require File.expand_path("#{File.dirname __FILE__}/address")
4
- require File.expand_path("#{File.dirname __FILE__}/fragment_unset")
5
-
6
- module HTTY; end
7
-
8
- class HTTY::CLI; end
9
-
10
- module HTTY::CLI::Commands; end
1
+ require 'htty'
11
2
 
12
3
  # Encapsulates the _fragment-set_ command.
13
4
  class HTTY::CLI::Commands::FragmentSet < HTTY::CLI::Command
@@ -1,12 +1,4 @@
1
- require File.expand_path("#{File.dirname __FILE__}/../command")
2
- require File.expand_path("#{File.dirname __FILE__}/address")
3
- require File.expand_path("#{File.dirname __FILE__}/fragment_set")
4
-
5
- module HTTY; end
6
-
7
- class HTTY::CLI; end
8
-
9
- module HTTY::CLI::Commands; end
1
+ require 'htty'
10
2
 
11
3
  # Encapsulates the _fragment-unset_ command.
12
4
  class HTTY::CLI::Commands::FragmentUnset < HTTY::CLI::Command
@@ -1,11 +1,4 @@
1
- require File.expand_path("#{File.dirname __FILE__}/../command")
2
- require File.expand_path("#{File.dirname __FILE__}/http_get")
3
-
4
- module HTTY; end
5
-
6
- class HTTY::CLI; end
7
-
8
- module HTTY::CLI::Commands; end
1
+ require 'htty'
9
2
 
10
3
  # Encapsulates the _get_ command.
11
4
  class HTTY::CLI::Commands::Get < HTTY::CLI::Command
@@ -1,11 +1,4 @@
1
- require File.expand_path("#{File.dirname __FILE__}/../command")
2
- require File.expand_path("#{File.dirname __FILE__}/headers_set")
3
-
4
- module HTTY; end
5
-
6
- class HTTY::CLI; end
7
-
8
- module HTTY::CLI::Commands; end
1
+ require 'htty'
9
2
 
10
3
  # Encapsulates the _header-set_ command.
11
4
  class HTTY::CLI::Commands::HeaderSet < HTTY::CLI::Command
@@ -1,11 +1,4 @@
1
- require File.expand_path("#{File.dirname __FILE__}/../command")
2
- require File.expand_path("#{File.dirname __FILE__}/headers_unset")
3
-
4
- module HTTY; end
5
-
6
- class HTTY::CLI; end
7
-
8
- module HTTY::CLI::Commands; end
1
+ require 'htty'
9
2
 
10
3
  # Encapsulates the _header-unset_ command.
11
4
  class HTTY::CLI::Commands::HeaderUnset < HTTY::CLI::Command
@@ -1,11 +1,4 @@
1
- require File.expand_path("#{File.dirname __FILE__}/../command")
2
- require File.expand_path("#{File.dirname __FILE__}/headers_unset_all")
3
-
4
- module HTTY; end
5
-
6
- class HTTY::CLI; end
7
-
8
- module HTTY::CLI::Commands; end
1
+ require 'htty'
9
2
 
10
3
  # Encapsulates the _headers-clear_ command.
11
4
  class HTTY::CLI::Commands::HeadersClear < HTTY::CLI::Command
@@ -1,18 +1,4 @@
1
- require File.expand_path("#{File.dirname __FILE__}/../../request")
2
- require File.expand_path("#{File.dirname __FILE__}/../command")
3
- require File.expand_path("#{File.dirname __FILE__}/../display")
4
- require File.expand_path("#{File.dirname __FILE__}/body_request")
5
- require File.expand_path("#{File.dirname __FILE__}/cookies")
6
- require File.expand_path("#{File.dirname __FILE__}/headers_response")
7
- require File.expand_path("#{File.dirname __FILE__}/headers_set")
8
- require File.expand_path("#{File.dirname __FILE__}/headers_unset")
9
- require File.expand_path("#{File.dirname __FILE__}/headers_unset_all")
10
-
11
- module HTTY; end
12
-
13
- class HTTY::CLI; end
14
-
15
- module HTTY::CLI::Commands; end
1
+ require 'htty'
16
2
 
17
3
  # Encapsulates the _headers-request_ command.
18
4
  class HTTY::CLI::Commands::HeadersRequest < HTTY::CLI::Command
@@ -1,18 +1,4 @@
1
- require File.expand_path("#{File.dirname __FILE__}/../../response")
2
- require File.expand_path("#{File.dirname __FILE__}/../../no_response_error")
3
- require File.expand_path("#{File.dirname __FILE__}/../command")
4
- require File.expand_path("#{File.dirname __FILE__}/../display")
5
- require File.expand_path("#{File.dirname __FILE__}/body_response")
6
- require File.expand_path("#{File.dirname __FILE__}/cookies")
7
- require File.expand_path("#{File.dirname __FILE__}/cookies_use")
8
- require File.expand_path("#{File.dirname __FILE__}/headers_request")
9
- require File.expand_path("#{File.dirname __FILE__}/status")
10
-
11
- module HTTY; end
12
-
13
- class HTTY::CLI; end
14
-
15
- module HTTY::CLI::Commands; end
1
+ require 'htty'
16
2
 
17
3
  # Encapsulates the _headers-response_ command.
18
4
  class HTTY::CLI::Commands::HeadersResponse < HTTY::CLI::Command
@@ -1,13 +1,4 @@
1
- require File.expand_path("#{File.dirname __FILE__}/../command")
2
- require File.expand_path("#{File.dirname __FILE__}/headers_request")
3
- require File.expand_path("#{File.dirname __FILE__}/headers_unset")
4
- require File.expand_path("#{File.dirname __FILE__}/headers_unset_all")
5
-
6
- module HTTY; end
7
-
8
- class HTTY::CLI; end
9
-
10
- module HTTY::CLI::Commands; end
1
+ require 'htty'
11
2
 
12
3
  # Encapsulates the _headers-set_ command.
13
4
  class HTTY::CLI::Commands::HeadersSet < HTTY::CLI::Command
@@ -1,13 +1,4 @@
1
- require File.expand_path("#{File.dirname __FILE__}/../command")
2
- require File.expand_path("#{File.dirname __FILE__}/headers_request")
3
- require File.expand_path("#{File.dirname __FILE__}/headers_set")
4
- require File.expand_path("#{File.dirname __FILE__}/headers_unset_all")
5
-
6
- module HTTY; end
7
-
8
- class HTTY::CLI; end
9
-
10
- module HTTY::CLI::Commands; end
1
+ require 'htty'
11
2
 
12
3
  # Encapsulates the _headers-unset_ command.
13
4
  class HTTY::CLI::Commands::HeadersUnset < HTTY::CLI::Command
@@ -1,13 +1,4 @@
1
- require File.expand_path("#{File.dirname __FILE__}/../command")
2
- require File.expand_path("#{File.dirname __FILE__}/headers_request")
3
- require File.expand_path("#{File.dirname __FILE__}/headers_set")
4
- require File.expand_path("#{File.dirname __FILE__}/headers_unset")
5
-
6
- module HTTY; end
7
-
8
- class HTTY::CLI; end
9
-
10
- module HTTY::CLI::Commands; end
1
+ require 'htty'
11
2
 
12
3
  # Encapsulates the _headers-unset-all_ command.
13
4
  class HTTY::CLI::Commands::HeadersUnsetAll < HTTY::CLI::Command
@@ -1,12 +1,4 @@
1
- require File.expand_path("#{File.dirname __FILE__}/../command")
2
- require File.expand_path("#{File.dirname __FILE__}/../commands")
3
- require File.expand_path("#{File.dirname __FILE__}/../display")
4
-
5
- module HTTY; end
6
-
7
- class HTTY::CLI; end
8
-
9
- module HTTY::CLI::Commands; end
1
+ require 'htty'
10
2
 
11
3
  # Encapsulates the _help_ command.
12
4
  class HTTY::CLI::Commands::Help < HTTY::CLI::Command
@@ -54,15 +46,15 @@ private
54
46
  'Inspecting Responses',
55
47
  'Preferences',
56
48
  nil]
57
- HTTY::CLI::Commands.select do |c|
49
+ HTTY::CLI::Commands.select { |c|
58
50
  # Filter out commands not yet implemented.
59
51
  c.instance_methods.collect(&:to_sym).include?(:perform) ||
60
52
  (c.alias_for &&
61
53
  c.alias_for.instance_methods.collect(&:to_sym).include?(:perform))
62
- end.group_by(&:category).sort_by do |category, commands|
54
+ }.group_by(&:category).sort_by { |category, commands|
63
55
  # Group commands by category and give the categories a custom order.
64
56
  categories_in_order.index(category) || 0
65
- end.each do |category, commands|
57
+ }.each do |category, commands|
66
58
  category ||= 'Miscellaneous'
67
59
  puts
68
60
  puts((' ' * ((80 - category.length) / 2)) +
@@ -1,13 +1,4 @@
1
- require File.expand_path("#{File.dirname __FILE__}/../command")
2
- require File.expand_path("#{File.dirname __FILE__}/../display")
3
- require File.expand_path("#{File.dirname __FILE__}/history_verbose")
4
- require File.expand_path("#{File.dirname __FILE__}/reuse")
5
-
6
- module HTTY; end
7
-
8
- class HTTY::CLI; end
9
-
10
- module HTTY::CLI::Commands; end
1
+ require 'htty'
11
2
 
12
3
  # Encapsulates the _history_ command.
13
4
  class HTTY::CLI::Commands::History < HTTY::CLI::Command
@@ -1,15 +1,4 @@
1
- require File.expand_path("#{File.dirname __FILE__}/../../request")
2
- require File.expand_path("#{File.dirname __FILE__}/../../response")
3
- require File.expand_path("#{File.dirname __FILE__}/../command")
4
- require File.expand_path("#{File.dirname __FILE__}/../display")
5
- require File.expand_path("#{File.dirname __FILE__}/history")
6
- require File.expand_path("#{File.dirname __FILE__}/reuse")
7
-
8
- module HTTY; end
9
-
10
- class HTTY::CLI; end
11
-
12
- module HTTY::CLI::Commands; end
1
+ require 'htty'
13
2
 
14
3
  # Encapsulates the _history-verbose_ command.
15
4
  class HTTY::CLI::Commands::HistoryVerbose < HTTY::CLI::Command
@@ -1,11 +1,4 @@
1
- require File.expand_path("#{File.dirname __FILE__}/../command")
2
- require File.expand_path("#{File.dirname __FILE__}/address")
3
-
4
- module HTTY; end
5
-
6
- class HTTY::CLI; end
7
-
8
- module HTTY::CLI::Commands; end
1
+ require 'htty'
9
2
 
10
3
  # Encapsulates the _host-set_ command.
11
4
  class HTTY::CLI::Commands::HostSet < HTTY::CLI::Command
@@ -1,15 +1,4 @@
1
- require File.expand_path("#{File.dirname __FILE__}/../command")
2
- require File.expand_path("#{File.dirname __FILE__}/../http_method_command")
3
- require File.expand_path("#{File.dirname __FILE__}/http_get")
4
- require File.expand_path("#{File.dirname __FILE__}/http_patch")
5
- require File.expand_path("#{File.dirname __FILE__}/http_post")
6
- require File.expand_path("#{File.dirname __FILE__}/http_put")
7
-
8
- module HTTY; end
9
-
10
- class HTTY::CLI; end
11
-
12
- module HTTY::CLI::Commands; end
1
+ require 'htty'
13
2
 
14
3
  # Encapsulates the _http-delete_ command.
15
4
  class HTTY::CLI::Commands::HttpDelete < HTTY::CLI::Command