rails_request 0.1.0 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +5 -0
- data/Gemfile +0 -3
- data/README.md +1 -1
- data/lib/rails_request.rb +1 -1
- data/lib/rails_request/application_controller_extension.rb +2 -1
- data/lib/rails_request/payload.rb +4 -1
- data/lib/rails_request/version.rb +1 -1
- data/rails_request.gemspec +1 -1
- metadata +4 -5
- data/Gemfile.lock +0 -184
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e5cb23ab22d0925ff96c839ccf1d5240643255a6f8b4526c5e8929ec665c6f12
|
4
|
+
data.tar.gz: c512182a2e6530c944d36dfb05b8d78d00bb5edd553d3d0cd6c292f201103963
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d6190f67477926c323d65b460c77a59dca3c5361f97362cc47864b3416690a8ac202f2db80c27f9b0c5a5d4a7408f085885d9060c997eed1ccb29c23102e257
|
7
|
+
data.tar.gz: e86b451b17589e29fb4ac3dc2f8916efbaad9e3e5a60e5db2ce97943d7829e2cc27d74efdffc19974931ffd67ab2737142fe1b4b72c2f56fda8dca53675ee36a
|
data/.gitignore
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
data/lib/rails_request.rb
CHANGED
@@ -5,8 +5,8 @@ require 'tempfile'
|
|
5
5
|
require 'rails'
|
6
6
|
|
7
7
|
require 'rails_request/version'
|
8
|
-
require 'rails_request/railtie' if Rails.env.development?
|
9
8
|
require 'rails_request/application_controller_extension'
|
9
|
+
require 'rails_request/railtie' if Rails.env.development?
|
10
10
|
require 'rails_request/payload'
|
11
11
|
|
12
12
|
module RailsRequest
|
@@ -5,7 +5,8 @@ module RailsRequest
|
|
5
5
|
extend ActiveSupport::Concern
|
6
6
|
|
7
7
|
included do
|
8
|
-
before_action :__rails_request_capture_host_and_port
|
8
|
+
before_action :__rails_request_capture_host_and_port if respond_to?(:before_action)
|
9
|
+
before_filter :__rails_request_capture_host_and_port if respond_to?(:before_filter)
|
9
10
|
end
|
10
11
|
|
11
12
|
def __rails_request_capture_host_and_port
|
@@ -13,9 +13,10 @@ module RailsRequest
|
|
13
13
|
port = RailsRequest.port
|
14
14
|
[
|
15
15
|
'curl',
|
16
|
+
'-v',
|
16
17
|
"--request '#{method}'",
|
17
18
|
headers.map { |key, value| "--header '#{key}: #{value}'" },
|
18
|
-
"http://#{host}:#{port}#{path}#{query}"
|
19
|
+
"'http://#{host}:#{port}#{path}#{query}'"
|
19
20
|
].flatten.join(" \\\n")
|
20
21
|
end
|
21
22
|
|
@@ -30,6 +31,8 @@ module RailsRequest
|
|
30
31
|
private
|
31
32
|
|
32
33
|
def headers
|
34
|
+
return [] if @payload[:headers].nil?
|
35
|
+
|
33
36
|
@payload[:headers]
|
34
37
|
.select { |key, *_| key.start_with?('HTTP') }
|
35
38
|
.map do |key, value|
|
data/rails_request.gemspec
CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
|
|
25
25
|
|
26
26
|
spec.add_development_dependency 'bundler', '~> 2.1'
|
27
27
|
spec.add_development_dependency 'rails', '~> 6.0'
|
28
|
-
spec.add_development_dependency 'rake', '~>
|
28
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
29
29
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
30
30
|
spec.add_development_dependency 'rubocop', '~> 0.85.1'
|
31
31
|
spec.add_development_dependency 'strong_versions', '~> 0.4.4'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_request
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bob Farrell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '13.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '13.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -106,7 +106,6 @@ files:
|
|
106
106
|
- ".rubocop.yml"
|
107
107
|
- ".ruby-version"
|
108
108
|
- Gemfile
|
109
|
-
- Gemfile.lock
|
110
109
|
- LICENSE.txt
|
111
110
|
- Makefile
|
112
111
|
- README.md
|
data/Gemfile.lock
DELETED
@@ -1,184 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
rails_request (0.1.0)
|
5
|
-
|
6
|
-
GEM
|
7
|
-
remote: https://rubygems.org/
|
8
|
-
specs:
|
9
|
-
actioncable (6.0.3.2)
|
10
|
-
actionpack (= 6.0.3.2)
|
11
|
-
nio4r (~> 2.0)
|
12
|
-
websocket-driver (>= 0.6.1)
|
13
|
-
actionmailbox (6.0.3.2)
|
14
|
-
actionpack (= 6.0.3.2)
|
15
|
-
activejob (= 6.0.3.2)
|
16
|
-
activerecord (= 6.0.3.2)
|
17
|
-
activestorage (= 6.0.3.2)
|
18
|
-
activesupport (= 6.0.3.2)
|
19
|
-
mail (>= 2.7.1)
|
20
|
-
actionmailer (6.0.3.2)
|
21
|
-
actionpack (= 6.0.3.2)
|
22
|
-
actionview (= 6.0.3.2)
|
23
|
-
activejob (= 6.0.3.2)
|
24
|
-
mail (~> 2.5, >= 2.5.4)
|
25
|
-
rails-dom-testing (~> 2.0)
|
26
|
-
actionpack (6.0.3.2)
|
27
|
-
actionview (= 6.0.3.2)
|
28
|
-
activesupport (= 6.0.3.2)
|
29
|
-
rack (~> 2.0, >= 2.0.8)
|
30
|
-
rack-test (>= 0.6.3)
|
31
|
-
rails-dom-testing (~> 2.0)
|
32
|
-
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
33
|
-
actiontext (6.0.3.2)
|
34
|
-
actionpack (= 6.0.3.2)
|
35
|
-
activerecord (= 6.0.3.2)
|
36
|
-
activestorage (= 6.0.3.2)
|
37
|
-
activesupport (= 6.0.3.2)
|
38
|
-
nokogiri (>= 1.8.5)
|
39
|
-
actionview (6.0.3.2)
|
40
|
-
activesupport (= 6.0.3.2)
|
41
|
-
builder (~> 3.1)
|
42
|
-
erubi (~> 1.4)
|
43
|
-
rails-dom-testing (~> 2.0)
|
44
|
-
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
45
|
-
activejob (6.0.3.2)
|
46
|
-
activesupport (= 6.0.3.2)
|
47
|
-
globalid (>= 0.3.6)
|
48
|
-
activemodel (6.0.3.2)
|
49
|
-
activesupport (= 6.0.3.2)
|
50
|
-
activerecord (6.0.3.2)
|
51
|
-
activemodel (= 6.0.3.2)
|
52
|
-
activesupport (= 6.0.3.2)
|
53
|
-
activestorage (6.0.3.2)
|
54
|
-
actionpack (= 6.0.3.2)
|
55
|
-
activejob (= 6.0.3.2)
|
56
|
-
activerecord (= 6.0.3.2)
|
57
|
-
marcel (~> 0.3.1)
|
58
|
-
activesupport (6.0.3.2)
|
59
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
60
|
-
i18n (>= 0.7, < 2)
|
61
|
-
minitest (~> 5.1)
|
62
|
-
tzinfo (~> 1.1)
|
63
|
-
zeitwerk (~> 2.2, >= 2.2.2)
|
64
|
-
ast (2.4.1)
|
65
|
-
builder (3.2.4)
|
66
|
-
concurrent-ruby (1.1.6)
|
67
|
-
crass (1.0.6)
|
68
|
-
diff-lcs (1.3)
|
69
|
-
erubi (1.9.0)
|
70
|
-
globalid (0.4.2)
|
71
|
-
activesupport (>= 4.2.0)
|
72
|
-
i18n (1.8.3)
|
73
|
-
concurrent-ruby (~> 1.0)
|
74
|
-
loofah (2.6.0)
|
75
|
-
crass (~> 1.0.2)
|
76
|
-
nokogiri (>= 1.5.9)
|
77
|
-
mail (2.7.1)
|
78
|
-
mini_mime (>= 0.1.1)
|
79
|
-
marcel (0.3.3)
|
80
|
-
mimemagic (~> 0.3.2)
|
81
|
-
method_source (1.0.0)
|
82
|
-
mimemagic (0.3.5)
|
83
|
-
mini_mime (1.0.2)
|
84
|
-
mini_portile2 (2.4.0)
|
85
|
-
minitest (5.14.1)
|
86
|
-
nio4r (2.5.2)
|
87
|
-
nokogiri (1.10.9)
|
88
|
-
mini_portile2 (~> 2.4.0)
|
89
|
-
paint (2.2.0)
|
90
|
-
parallel (1.19.2)
|
91
|
-
parser (2.7.1.4)
|
92
|
-
ast (~> 2.4.1)
|
93
|
-
rack (2.2.3)
|
94
|
-
rack-test (1.1.0)
|
95
|
-
rack (>= 1.0, < 3)
|
96
|
-
rails (6.0.3.2)
|
97
|
-
actioncable (= 6.0.3.2)
|
98
|
-
actionmailbox (= 6.0.3.2)
|
99
|
-
actionmailer (= 6.0.3.2)
|
100
|
-
actionpack (= 6.0.3.2)
|
101
|
-
actiontext (= 6.0.3.2)
|
102
|
-
actionview (= 6.0.3.2)
|
103
|
-
activejob (= 6.0.3.2)
|
104
|
-
activemodel (= 6.0.3.2)
|
105
|
-
activerecord (= 6.0.3.2)
|
106
|
-
activestorage (= 6.0.3.2)
|
107
|
-
activesupport (= 6.0.3.2)
|
108
|
-
bundler (>= 1.3.0)
|
109
|
-
railties (= 6.0.3.2)
|
110
|
-
sprockets-rails (>= 2.0.0)
|
111
|
-
rails-dom-testing (2.0.3)
|
112
|
-
activesupport (>= 4.2.0)
|
113
|
-
nokogiri (>= 1.6)
|
114
|
-
rails-html-sanitizer (1.3.0)
|
115
|
-
loofah (~> 2.3)
|
116
|
-
railties (6.0.3.2)
|
117
|
-
actionpack (= 6.0.3.2)
|
118
|
-
activesupport (= 6.0.3.2)
|
119
|
-
method_source
|
120
|
-
rake (>= 0.8.7)
|
121
|
-
thor (>= 0.20.3, < 2.0)
|
122
|
-
rainbow (3.0.0)
|
123
|
-
rake (12.3.3)
|
124
|
-
regexp_parser (1.7.1)
|
125
|
-
rexml (3.2.4)
|
126
|
-
rspec (3.9.0)
|
127
|
-
rspec-core (~> 3.9.0)
|
128
|
-
rspec-expectations (~> 3.9.0)
|
129
|
-
rspec-mocks (~> 3.9.0)
|
130
|
-
rspec-core (3.9.2)
|
131
|
-
rspec-support (~> 3.9.3)
|
132
|
-
rspec-expectations (3.9.2)
|
133
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
134
|
-
rspec-support (~> 3.9.0)
|
135
|
-
rspec-mocks (3.9.1)
|
136
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
137
|
-
rspec-support (~> 3.9.0)
|
138
|
-
rspec-support (3.9.3)
|
139
|
-
rubocop (0.85.1)
|
140
|
-
parallel (~> 1.10)
|
141
|
-
parser (>= 2.7.0.1)
|
142
|
-
rainbow (>= 2.2.2, < 4.0)
|
143
|
-
regexp_parser (>= 1.7)
|
144
|
-
rexml
|
145
|
-
rubocop-ast (>= 0.0.3)
|
146
|
-
ruby-progressbar (~> 1.7)
|
147
|
-
unicode-display_width (>= 1.4.0, < 2.0)
|
148
|
-
rubocop-ast (0.0.3)
|
149
|
-
parser (>= 2.7.0.1)
|
150
|
-
ruby-progressbar (1.10.1)
|
151
|
-
sprockets (4.0.2)
|
152
|
-
concurrent-ruby (~> 1.0)
|
153
|
-
rack (> 1, < 3)
|
154
|
-
sprockets-rails (3.2.1)
|
155
|
-
actionpack (>= 4.0)
|
156
|
-
activesupport (>= 4.0)
|
157
|
-
sprockets (>= 3.0.0)
|
158
|
-
strong_versions (0.4.4)
|
159
|
-
i18n (>= 0.5.0)
|
160
|
-
paint (~> 2.0)
|
161
|
-
thor (1.0.1)
|
162
|
-
thread_safe (0.3.6)
|
163
|
-
tzinfo (1.2.7)
|
164
|
-
thread_safe (~> 0.1)
|
165
|
-
unicode-display_width (1.7.0)
|
166
|
-
websocket-driver (0.7.2)
|
167
|
-
websocket-extensions (>= 0.1.0)
|
168
|
-
websocket-extensions (0.1.5)
|
169
|
-
zeitwerk (2.3.0)
|
170
|
-
|
171
|
-
PLATFORMS
|
172
|
-
ruby
|
173
|
-
|
174
|
-
DEPENDENCIES
|
175
|
-
bundler (~> 2.1)
|
176
|
-
rails (~> 6.0)
|
177
|
-
rails_request!
|
178
|
-
rake (~> 12.0)
|
179
|
-
rspec (~> 3.0)
|
180
|
-
rubocop (~> 0.85.1)
|
181
|
-
strong_versions (~> 0.4.4)
|
182
|
-
|
183
|
-
BUNDLED WITH
|
184
|
-
2.1.4
|