htty 1.5.4 → 1.5.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +12 -9
- data/.rspec +2 -1
- data/.travis.yml +11 -8
- data/.yardopts +1 -1
- data/Gemfile +22 -10
- data/Guardfile +31 -13
- data/History.markdown +6 -0
- data/README.markdown +29 -13
- data/Rakefile +2 -64
- data/bin/console +10 -0
- data/bin/setup +8 -0
- data/exe/htty +5 -0
- data/htty.gemspec +27 -29
- data/lib/htty.rb +29 -4
- data/lib/htty/cli.rb +9 -16
- data/lib/htty/cli/body_open_command.rb +2 -7
- data/lib/htty/cli/command.rb +10 -18
- data/lib/htty/cli/commands.rb +76 -11
- data/lib/htty/cli/commands/address.rb +1 -14
- data/lib/htty/cli/commands/body_clear.rb +1 -8
- data/lib/htty/cli/commands/body_edit.rb +1 -11
- data/lib/htty/cli/commands/body_request.rb +1 -12
- data/lib/htty/cli/commands/body_request_open.rb +1 -10
- data/lib/htty/cli/commands/body_response.rb +1 -12
- data/lib/htty/cli/commands/body_response_open.rb +1 -11
- data/lib/htty/cli/commands/body_set.rb +1 -10
- data/lib/htty/cli/commands/body_unset.rb +1 -9
- data/lib/htty/cli/commands/cd.rb +1 -8
- data/lib/htty/cli/commands/cookie_add.rb +1 -8
- data/lib/htty/cli/commands/cookie_remove.rb +1 -8
- data/lib/htty/cli/commands/cookies.rb +1 -15
- data/lib/htty/cli/commands/cookies_add.rb +1 -11
- data/lib/htty/cli/commands/cookies_clear.rb +1 -8
- data/lib/htty/cli/commands/cookies_remove.rb +1 -11
- data/lib/htty/cli/commands/cookies_remove_all.rb +1 -11
- data/lib/htty/cli/commands/cookies_use.rb +1 -14
- data/lib/htty/cli/commands/delete.rb +1 -8
- data/lib/htty/cli/commands/exit.rb +1 -8
- data/lib/htty/cli/commands/follow.rb +1 -10
- data/lib/htty/cli/commands/form.rb +1 -7
- data/lib/htty/cli/commands/form_add.rb +1 -7
- data/lib/htty/cli/commands/form_clear.rb +1 -8
- data/lib/htty/cli/commands/form_remove.rb +1 -7
- data/lib/htty/cli/commands/form_remove_all.rb +1 -7
- data/lib/htty/cli/commands/fragment_clear.rb +1 -8
- data/lib/htty/cli/commands/fragment_set.rb +1 -10
- data/lib/htty/cli/commands/fragment_unset.rb +1 -9
- data/lib/htty/cli/commands/get.rb +1 -8
- data/lib/htty/cli/commands/header_set.rb +1 -8
- data/lib/htty/cli/commands/header_unset.rb +1 -8
- data/lib/htty/cli/commands/headers_clear.rb +1 -8
- data/lib/htty/cli/commands/headers_request.rb +1 -15
- data/lib/htty/cli/commands/headers_response.rb +1 -15
- data/lib/htty/cli/commands/headers_set.rb +1 -10
- data/lib/htty/cli/commands/headers_unset.rb +1 -10
- data/lib/htty/cli/commands/headers_unset_all.rb +1 -10
- data/lib/htty/cli/commands/help.rb +4 -12
- data/lib/htty/cli/commands/history.rb +1 -10
- data/lib/htty/cli/commands/history_verbose.rb +1 -12
- data/lib/htty/cli/commands/host_set.rb +1 -8
- data/lib/htty/cli/commands/http_delete.rb +1 -12
- data/lib/htty/cli/commands/http_get.rb +1 -13
- data/lib/htty/cli/commands/http_head.rb +1 -9
- data/lib/htty/cli/commands/http_options.rb +1 -9
- data/lib/htty/cli/commands/http_patch.rb +1 -13
- data/lib/htty/cli/commands/http_post.rb +1 -13
- data/lib/htty/cli/commands/http_put.rb +1 -12
- data/lib/htty/cli/commands/http_trace.rb +1 -9
- data/lib/htty/cli/commands/patch.rb +1 -8
- data/lib/htty/cli/commands/path_set.rb +11 -11
- data/lib/htty/cli/commands/port_set.rb +1 -9
- data/lib/htty/cli/commands/post.rb +1 -8
- data/lib/htty/cli/commands/put.rb +1 -8
- data/lib/htty/cli/commands/query_add.rb +1 -13
- data/lib/htty/cli/commands/query_clear.rb +1 -8
- data/lib/htty/cli/commands/query_remove.rb +1 -13
- data/lib/htty/cli/commands/query_set.rb +1 -13
- data/lib/htty/cli/commands/query_unset.rb +1 -13
- data/lib/htty/cli/commands/query_unset_all.rb +1 -10
- data/lib/htty/cli/commands/quit.rb +1 -7
- data/lib/htty/cli/commands/reuse.rb +5 -12
- data/lib/htty/cli/commands/scheme_set.rb +1 -9
- data/lib/htty/cli/commands/ssl_verification.rb +1 -11
- data/lib/htty/cli/commands/ssl_verification_off.rb +1 -10
- data/lib/htty/cli/commands/ssl_verification_on.rb +1 -10
- data/lib/htty/cli/commands/status.rb +1 -11
- data/lib/htty/cli/commands/undo.rb +1 -7
- data/lib/htty/cli/commands/userinfo_clear.rb +1 -8
- data/lib/htty/cli/commands/userinfo_set.rb +1 -11
- data/lib/htty/cli/commands/userinfo_unset.rb +1 -9
- data/lib/htty/cli/display.rb +4 -6
- data/lib/htty/cli/http_method_command.rb +1 -10
- data/lib/htty/cli/input_device.rb +1 -0
- data/lib/htty/cli/url_escaping.rb +1 -6
- data/lib/htty/cookies_util.rb +3 -3
- data/lib/htty/headers.rb +3 -4
- data/lib/htty/http_patch.rb +20 -23
- data/lib/htty/no_header_error.rb +1 -1
- data/lib/htty/no_location_header_error.rb +1 -3
- data/lib/htty/no_response_error.rb +1 -1
- data/lib/htty/no_set_cookie_header_error.rb +1 -3
- data/lib/htty/payload.rb +1 -5
- data/lib/htty/platform.rb +1 -1
- data/lib/htty/preferences.rb +1 -1
- data/lib/htty/request.rb +3 -13
- data/lib/htty/requests_util.rb +1 -5
- data/lib/htty/response.rb +1 -4
- data/lib/htty/session.rb +1 -3
- data/lib/htty/tempfile_preserving_extname.rb +1 -2
- data/lib/htty/uri.rb +1 -2
- data/lib/htty/version.rb +1 -1
- data/lib/tasks.rb +3 -0
- data/lib/tasks/build_doc.rake +8 -0
- data/lib/tasks/lib_each.rake +25 -0
- data/lib/tasks/spec.rake +68 -0
- data/lib/tasks/spec_each.rake +19 -0
- metadata +48 -209
- data/bin/htty +0 -5
- data/spec/integration/htty/cli/commands/query_add_spec.rb +0 -57
- data/spec/integration/htty/cli/commands/query_remove_spec.rb +0 -55
- data/spec/integration/htty/cli/commands/query_set_spec.rb +0 -78
- data/spec/integration/htty/cli/commands/query_unset_spec.rb +0 -43
- data/spec/spec_helper.rb +0 -76
- data/spec/unit/htty/cli/commands/address_spec.rb +0 -103
- data/spec/unit/htty/cli/commands/body_clear_spec.rb +0 -64
- data/spec/unit/htty/cli/commands/body_edit_spec.rb +0 -18
- data/spec/unit/htty/cli/commands/body_request_spec.rb +0 -67
- data/spec/unit/htty/cli/commands/body_response_spec.rb +0 -72
- data/spec/unit/htty/cli/commands/body_set_spec.rb +0 -71
- data/spec/unit/htty/cli/commands/body_unset_spec.rb +0 -69
- data/spec/unit/htty/cli/commands/cd_spec.rb +0 -57
- data/spec/unit/htty/cli/commands/cookie_add_spec.rb +0 -64
- data/spec/unit/htty/cli/commands/cookie_remove_spec.rb +0 -64
- data/spec/unit/htty/cli/commands/cookies_add_spec.rb +0 -78
- data/spec/unit/htty/cli/commands/cookies_clear_spec.rb +0 -64
- data/spec/unit/htty/cli/commands/cookies_remove_all_spec.rb +0 -73
- data/spec/unit/htty/cli/commands/cookies_remove_spec.rb +0 -69
- data/spec/unit/htty/cli/commands/cookies_spec.rb +0 -76
- data/spec/unit/htty/cli/commands/cookies_use_spec.rb +0 -75
- data/spec/unit/htty/cli/commands/delete_spec.rb +0 -64
- data/spec/unit/htty/cli/commands/exit_spec.rb +0 -64
- data/spec/unit/htty/cli/commands/follow_spec.rb +0 -70
- data/spec/unit/htty/cli/commands/form_add_spec.rb +0 -64
- data/spec/unit/htty/cli/commands/form_clear_spec.rb +0 -64
- data/spec/unit/htty/cli/commands/form_remove_all_spec.rb +0 -66
- data/spec/unit/htty/cli/commands/form_remove_spec.rb +0 -57
- data/spec/unit/htty/cli/commands/form_spec.rb +0 -57
- data/spec/unit/htty/cli/commands/fragment_clear_spec.rb +0 -64
- data/spec/unit/htty/cli/commands/fragment_set_spec.rb +0 -73
- data/spec/unit/htty/cli/commands/fragment_unset_spec.rb +0 -72
- data/spec/unit/htty/cli/commands/get_spec.rb +0 -64
- data/spec/unit/htty/cli/commands/header_set_spec.rb +0 -64
- data/spec/unit/htty/cli/commands/header_unset_spec.rb +0 -64
- data/spec/unit/htty/cli/commands/headers_clear_spec.rb +0 -64
- data/spec/unit/htty/cli/commands/headers_request_spec.rb +0 -81
- data/spec/unit/htty/cli/commands/headers_response_spec.rb +0 -77
- data/spec/unit/htty/cli/commands/headers_set_spec.rb +0 -74
- data/spec/unit/htty/cli/commands/headers_unset_all_spec.rb +0 -71
- data/spec/unit/htty/cli/commands/headers_unset_spec.rb +0 -63
- data/spec/unit/htty/cli/commands/help_spec.rb +0 -67
- data/spec/unit/htty/cli/commands/history_spec.rb +0 -65
- data/spec/unit/htty/cli/commands/history_verbose_spec.rb +0 -72
- data/spec/unit/htty/cli/commands/host_set_spec.rb +0 -71
- data/spec/unit/htty/cli/commands/http_delete_spec.rb +0 -75
- data/spec/unit/htty/cli/commands/http_get_spec.rb +0 -77
- data/spec/unit/htty/cli/commands/http_head_spec.rb +0 -69
- data/spec/unit/htty/cli/commands/http_options_spec.rb +0 -69
- data/spec/unit/htty/cli/commands/http_patch_spec.rb +0 -73
- data/spec/unit/htty/cli/commands/http_post_spec.rb +0 -73
- data/spec/unit/htty/cli/commands/http_put_spec.rb +0 -71
- data/spec/unit/htty/cli/commands/http_trace_spec.rb +0 -69
- data/spec/unit/htty/cli/commands/patch_spec.rb +0 -64
- data/spec/unit/htty/cli/commands/path_set_spec.rb +0 -72
- data/spec/unit/htty/cli/commands/port_set_spec.rb +0 -73
- data/spec/unit/htty/cli/commands/post_spec.rb +0 -64
- data/spec/unit/htty/cli/commands/put_spec.rb +0 -64
- data/spec/unit/htty/cli/commands/query_add_spec.rb +0 -82
- data/spec/unit/htty/cli/commands/query_clear_spec.rb +0 -64
- data/spec/unit/htty/cli/commands/query_remove_spec.rb +0 -82
- data/spec/unit/htty/cli/commands/query_set_spec.rb +0 -82
- data/spec/unit/htty/cli/commands/query_unset_all_spec.rb +0 -74
- data/spec/unit/htty/cli/commands/query_unset_spec.rb +0 -75
- data/spec/unit/htty/cli/commands/quit_spec.rb +0 -64
- data/spec/unit/htty/cli/commands/reuse_spec.rb +0 -72
- data/spec/unit/htty/cli/commands/scheme_set_spec.rb +0 -74
- data/spec/unit/htty/cli/commands/shared_examples_for_commands.rb +0 -55
- data/spec/unit/htty/cli/commands/ssl_verification_off_spec.rb +0 -67
- data/spec/unit/htty/cli/commands/ssl_verification_on_spec.rb +0 -60
- data/spec/unit/htty/cli/commands/ssl_verification_spec.rb +0 -65
- data/spec/unit/htty/cli/commands/status_spec.rb +0 -73
- data/spec/unit/htty/cli/commands/undo_spec.rb +0 -57
- data/spec/unit/htty/cli/commands/userinfo_clear_spec.rb +0 -64
- data/spec/unit/htty/cli/commands/userinfo_set_spec.rb +0 -97
- data/spec/unit/htty/cli/commands/userinfo_unset_spec.rb +0 -72
- data/spec/unit/htty/cli/display_spec.rb +0 -84
- data/spec/unit/htty/cli_spec.rb +0 -28
- data/spec/unit/htty/command.rb +0 -47
- data/spec/unit/htty/headers_spec.rb +0 -40
- data/spec/unit/htty/payload_spec.rb +0 -60
- data/spec/unit/htty/preferences_spec.rb +0 -8
- data/spec/unit/htty/request_follow_spec.rb +0 -94
- data/spec/unit/htty/request_spec.rb +0 -1232
- data/spec/unit/htty/request_userinfo_spec.rb +0 -208
- data/spec/unit/htty/response_spec.rb +0 -0
- data/spec/unit/htty/session_spec.rb +0 -10
- data/spec/unit/htty/shared_examples_for_requests.rb +0 -32
- data/spec/unit/htty/url_escaping.rb +0 -70
- data/spec/unit/htty/version_spec.rb +0 -8
@@ -1,16 +1,4 @@
|
|
1
|
-
require
|
2
|
-
require File.expand_path("#{File.dirname __FILE__}/../http_method_command")
|
3
|
-
require File.expand_path("#{File.dirname __FILE__}/follow")
|
4
|
-
require File.expand_path("#{File.dirname __FILE__}/http_delete")
|
5
|
-
require File.expand_path("#{File.dirname __FILE__}/http_patch")
|
6
|
-
require File.expand_path("#{File.dirname __FILE__}/http_post")
|
7
|
-
require File.expand_path("#{File.dirname __FILE__}/http_put")
|
8
|
-
|
9
|
-
module HTTY; end
|
10
|
-
|
11
|
-
class HTTY::CLI; end
|
12
|
-
|
13
|
-
module HTTY::CLI::Commands; end
|
1
|
+
require 'htty'
|
14
2
|
|
15
3
|
# Encapsulates the _http-get_ command.
|
16
4
|
class HTTY::CLI::Commands::HttpGet < HTTY::CLI::Command
|
@@ -1,12 +1,4 @@
|
|
1
|
-
require
|
2
|
-
require File.expand_path("#{File.dirname __FILE__}/../http_method_command")
|
3
|
-
require File.expand_path("#{File.dirname __FILE__}/http_get")
|
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 _http-head_ command.
|
12
4
|
class HTTY::CLI::Commands::HttpHead < HTTY::CLI::Command
|
@@ -1,12 +1,4 @@
|
|
1
|
-
require
|
2
|
-
require File.expand_path("#{File.dirname __FILE__}/../http_method_command")
|
3
|
-
require File.expand_path("#{File.dirname __FILE__}/http_get")
|
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 _http-options_ command.
|
12
4
|
class HTTY::CLI::Commands::HttpOptions < HTTY::CLI::Command
|
@@ -1,16 +1,4 @@
|
|
1
|
-
require
|
2
|
-
require File.expand_path("#{File.dirname __FILE__}/../http_method_command")
|
3
|
-
require File.expand_path("#{File.dirname __FILE__}/follow")
|
4
|
-
require File.expand_path("#{File.dirname __FILE__}/http_delete")
|
5
|
-
require File.expand_path("#{File.dirname __FILE__}/http_get")
|
6
|
-
require File.expand_path("#{File.dirname __FILE__}/http_post")
|
7
|
-
require File.expand_path("#{File.dirname __FILE__}/http_put")
|
8
|
-
|
9
|
-
module HTTY; end
|
10
|
-
|
11
|
-
class HTTY::CLI; end
|
12
|
-
|
13
|
-
module HTTY::CLI::Commands; end
|
1
|
+
require 'htty'
|
14
2
|
|
15
3
|
# Encapsulates the _http-patch_ command.
|
16
4
|
class HTTY::CLI::Commands::HttpPatch < HTTY::CLI::Command
|
@@ -1,16 +1,4 @@
|
|
1
|
-
require
|
2
|
-
require File.expand_path("#{File.dirname __FILE__}/../http_method_command")
|
3
|
-
require File.expand_path("#{File.dirname __FILE__}/follow")
|
4
|
-
require File.expand_path("#{File.dirname __FILE__}/http_delete")
|
5
|
-
require File.expand_path("#{File.dirname __FILE__}/http_get")
|
6
|
-
require File.expand_path("#{File.dirname __FILE__}/http_patch")
|
7
|
-
require File.expand_path("#{File.dirname __FILE__}/http_put")
|
8
|
-
|
9
|
-
module HTTY; end
|
10
|
-
|
11
|
-
class HTTY::CLI; end
|
12
|
-
|
13
|
-
module HTTY::CLI::Commands; end
|
1
|
+
require 'htty'
|
14
2
|
|
15
3
|
# Encapsulates the _http-post_ command.
|
16
4
|
class HTTY::CLI::Commands::HttpPost < HTTY::CLI::Command
|
@@ -1,15 +1,4 @@
|
|
1
|
-
require
|
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_delete")
|
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-put_ command.
|
15
4
|
class HTTY::CLI::Commands::HttpPut < HTTY::CLI::Command
|
@@ -1,12 +1,4 @@
|
|
1
|
-
require
|
2
|
-
require File.expand_path("#{File.dirname __FILE__}/../http_method_command")
|
3
|
-
require File.expand_path("#{File.dirname __FILE__}/http_get")
|
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 _http-trace_ command.
|
12
4
|
class HTTY::CLI::Commands::HttpTrace < HTTY::CLI::Command
|
@@ -1,11 +1,4 @@
|
|
1
|
-
require
|
2
|
-
require File.expand_path("#{File.dirname __FILE__}/http_patch")
|
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 _patch_ command.
|
11
4
|
class HTTY::CLI::Commands::Patch < HTTY::CLI::Command
|
@@ -1,17 +1,9 @@
|
|
1
|
-
require
|
2
|
-
require File.expand_path("#{File.dirname __FILE__}/../url_escaping")
|
3
|
-
require File.expand_path("#{File.dirname __FILE__}/address")
|
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 _path-set_ command.
|
12
4
|
class HTTY::CLI::Commands::PathSet < HTTY::CLI::Command
|
13
5
|
|
14
|
-
|
6
|
+
extend HTTY::CLI::UrlEscaping
|
15
7
|
|
16
8
|
# Returns the name of a category under which help for the _path-set_ command
|
17
9
|
# should appear.
|
@@ -44,11 +36,19 @@ class HTTY::CLI::Commands::PathSet < HTTY::CLI::Command
|
|
44
36
|
[HTTY::CLI::Commands::Address]
|
45
37
|
end
|
46
38
|
|
39
|
+
def self.sanitize_arguments(arguments)
|
40
|
+
path = arguments[0]
|
41
|
+
path_components = path.split('/')
|
42
|
+
escaped_components = escape_or_warn_of_escape_sequences(path_components)
|
43
|
+
escaped_path = escaped_components.join('/')
|
44
|
+
[escaped_path]
|
45
|
+
end
|
46
|
+
|
47
47
|
# Performs the _path-set_ command.
|
48
48
|
def perform
|
49
49
|
add_request_if_new do |request|
|
50
50
|
self.class.notify_if_cookies_cleared request do
|
51
|
-
request.path_set(
|
51
|
+
request.path_set(arguments[0])
|
52
52
|
end
|
53
53
|
end
|
54
54
|
end
|
@@ -1,12 +1,4 @@
|
|
1
|
-
require
|
2
|
-
require File.expand_path("#{File.dirname __FILE__}/address")
|
3
|
-
require File.expand_path("#{File.dirname __FILE__}/scheme_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 _port-set_ command.
|
12
4
|
class HTTY::CLI::Commands::PortSet < HTTY::CLI::Command
|
@@ -1,11 +1,4 @@
|
|
1
|
-
require
|
2
|
-
require File.expand_path("#{File.dirname __FILE__}/http_post")
|
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 _post_ command.
|
11
4
|
class HTTY::CLI::Commands::Post < HTTY::CLI::Command
|
@@ -1,11 +1,4 @@
|
|
1
|
-
require
|
2
|
-
require File.expand_path("#{File.dirname __FILE__}/http_put")
|
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 _put_ command.
|
11
4
|
class HTTY::CLI::Commands::Put < HTTY::CLI::Command
|
@@ -1,16 +1,4 @@
|
|
1
|
-
require
|
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__}/query_remove")
|
5
|
-
require File.expand_path("#{File.dirname __FILE__}/query_set")
|
6
|
-
require File.expand_path("#{File.dirname __FILE__}/query_unset")
|
7
|
-
require File.expand_path("#{File.dirname __FILE__}/query_unset_all")
|
8
|
-
|
9
|
-
module HTTY; end
|
10
|
-
|
11
|
-
class HTTY::CLI; end
|
12
|
-
|
13
|
-
module HTTY::CLI::Commands; end
|
1
|
+
require 'htty'
|
14
2
|
|
15
3
|
# Encapsulates the _query-add_ command.
|
16
4
|
class HTTY::CLI::Commands::QueryAdd < HTTY::CLI::Command
|
@@ -1,11 +1,4 @@
|
|
1
|
-
require
|
2
|
-
require File.expand_path("#{File.dirname __FILE__}/query_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 _query-clear_ command.
|
11
4
|
class HTTY::CLI::Commands::QueryClear < HTTY::CLI::Command
|
@@ -1,16 +1,4 @@
|
|
1
|
-
require
|
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__}/query_add")
|
5
|
-
require File.expand_path("#{File.dirname __FILE__}/query_set")
|
6
|
-
require File.expand_path("#{File.dirname __FILE__}/query_unset")
|
7
|
-
require File.expand_path("#{File.dirname __FILE__}/query_unset_all")
|
8
|
-
|
9
|
-
module HTTY; end
|
10
|
-
|
11
|
-
class HTTY::CLI; end
|
12
|
-
|
13
|
-
module HTTY::CLI::Commands; end
|
1
|
+
require 'htty'
|
14
2
|
|
15
3
|
# Encapsulates the _query-remove_ command.
|
16
4
|
class HTTY::CLI::Commands::QueryRemove < HTTY::CLI::Command
|
@@ -1,16 +1,4 @@
|
|
1
|
-
require
|
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__}/query_add")
|
5
|
-
require File.expand_path("#{File.dirname __FILE__}/query_remove")
|
6
|
-
require File.expand_path("#{File.dirname __FILE__}/query_unset")
|
7
|
-
require File.expand_path("#{File.dirname __FILE__}/query_unset_all")
|
8
|
-
|
9
|
-
module HTTY; end
|
10
|
-
|
11
|
-
class HTTY::CLI; end
|
12
|
-
|
13
|
-
module HTTY::CLI::Commands; end
|
1
|
+
require 'htty'
|
14
2
|
|
15
3
|
# Encapsulates the _query-set_ command.
|
16
4
|
class HTTY::CLI::Commands::QuerySet < HTTY::CLI::Command
|
@@ -1,16 +1,4 @@
|
|
1
|
-
require
|
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__}/query_add")
|
5
|
-
require File.expand_path("#{File.dirname __FILE__}/query_remove")
|
6
|
-
require File.expand_path("#{File.dirname __FILE__}/query_set")
|
7
|
-
require File.expand_path("#{File.dirname __FILE__}/query_unset_all")
|
8
|
-
|
9
|
-
module HTTY; end
|
10
|
-
|
11
|
-
class HTTY::CLI; end
|
12
|
-
|
13
|
-
module HTTY::CLI::Commands; end
|
1
|
+
require 'htty'
|
14
2
|
|
15
3
|
# Encapsulates the _query-unset_ command.
|
16
4
|
class HTTY::CLI::Commands::QueryUnset < HTTY::CLI::Command
|
@@ -1,13 +1,4 @@
|
|
1
|
-
require
|
2
|
-
require File.expand_path("#{File.dirname __FILE__}/address")
|
3
|
-
require File.expand_path("#{File.dirname __FILE__}/query_set")
|
4
|
-
require File.expand_path("#{File.dirname __FILE__}/query_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 _query-unset-all_ command.
|
13
4
|
class HTTY::CLI::Commands::QueryUnsetAll < HTTY::CLI::Command
|
@@ -1,13 +1,4 @@
|
|
1
|
-
require
|
2
|
-
require File.expand_path("#{File.dirname __FILE__}/../display")
|
3
|
-
require File.expand_path("#{File.dirname __FILE__}/history")
|
4
|
-
require File.expand_path("#{File.dirname __FILE__}/history_verbose")
|
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 _reuse_ command.
|
13
4
|
class HTTY::CLI::Commands::Reuse < HTTY::CLI::Command
|
@@ -69,8 +60,10 @@ class HTTY::CLI::Commands::Reuse < HTTY::CLI::Command
|
|
69
60
|
end
|
70
61
|
end
|
71
62
|
|
72
|
-
add_request_if_new do
|
73
|
-
requests
|
63
|
+
add_request_if_new do |request|
|
64
|
+
session.requests.pop if request.response.nil?
|
65
|
+
|
66
|
+
requests[index - 1].send(:dup_without_response)
|
74
67
|
end
|
75
68
|
|
76
69
|
puts notice("Using a copy of request ##{index}")
|
@@ -1,12 +1,4 @@
|
|
1
|
-
require
|
2
|
-
require File.expand_path("#{File.dirname __FILE__}/address")
|
3
|
-
require File.expand_path("#{File.dirname __FILE__}/port_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 _scheme-set_ command.
|
12
4
|
class HTTY::CLI::Commands::SchemeSet < HTTY::CLI::Command
|
@@ -1,14 +1,4 @@
|
|
1
|
-
require
|
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__}/ssl_verification_off")
|
5
|
-
require File.expand_path("#{File.dirname __FILE__}/ssl_verification_on")
|
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 _ssl-verification_ command.
|
14
4
|
class HTTY::CLI::Commands::SslVerification < HTTY::CLI::Command
|
@@ -1,13 +1,4 @@
|
|
1
|
-
require
|
2
|
-
require File.expand_path("#{File.dirname __FILE__}/../command")
|
3
|
-
require File.expand_path("#{File.dirname __FILE__}/ssl_verification")
|
4
|
-
require File.expand_path("#{File.dirname __FILE__}/ssl_verification_on")
|
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 _ssl-verification-off_ command.
|
13
4
|
class HTTY::CLI::Commands::SslVerificationOff < HTTY::CLI::Command
|
@@ -1,13 +1,4 @@
|
|
1
|
-
require
|
2
|
-
require File.expand_path("#{File.dirname __FILE__}/../command")
|
3
|
-
require File.expand_path("#{File.dirname __FILE__}/ssl_verification")
|
4
|
-
require File.expand_path("#{File.dirname __FILE__}/ssl_verification_off")
|
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 _ssl-verification-on_ command.
|
13
4
|
class HTTY::CLI::Commands::SslVerificationOn < HTTY::CLI::Command
|
@@ -1,14 +1,4 @@
|
|
1
|
-
require
|
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_response")
|
5
|
-
require File.expand_path("#{File.dirname __FILE__}/headers_response")
|
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 _status_ command.
|
14
4
|
class HTTY::CLI::Commands::Status < HTTY::CLI::Command
|