repost 0.3.8 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/repost/senpai.rb +13 -13
- data/lib/repost/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 016666c656489330b6bcfe1eed7663fa1670210f211e2e7ad35cce82ea9a8322
|
4
|
+
data.tar.gz: 744a0637065596ddb685097a54dd9219d908fd659f69a731e94866f766ef8bd8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f607b05add6ffde3b3f93c37ed5621818b2c6dec4cd5d24899a57083b5aec972d693bd6fc8e0f21663a39c7b9045ed9101c03211a9eaef8295d1c692b6c947b5
|
7
|
+
data.tar.gz: b8b2ed81ceb699f67445ad7c9c0cbbc6ce98fde6ef09634f9ea021cf995af06f069de000cbd77563eb75b55bb5867d78af35b314808a748ef9a32080dd15476c
|
data/lib/repost/senpai.rb
CHANGED
@@ -35,7 +35,7 @@ module Repost
|
|
35
35
|
:submit_text, :authenticity_token, :charset, :autosubmit_nonce
|
36
36
|
|
37
37
|
def form_head
|
38
|
-
|
38
|
+
%Q(<form id="#{form_id}" action="#{url}" method="#{method}" accept-charset="#{charset}">)
|
39
39
|
end
|
40
40
|
|
41
41
|
def form_body
|
@@ -57,29 +57,29 @@ module Repost
|
|
57
57
|
form_input("#{key}[]", inner_value)
|
58
58
|
end.join
|
59
59
|
else
|
60
|
-
|
60
|
+
%Q(<input type="hidden" name="#{key}" value=#{process_value(value)}>)
|
61
61
|
end
|
62
62
|
end
|
63
63
|
|
64
64
|
def form_footer
|
65
|
-
|
65
|
+
%Q(</form>)
|
66
66
|
end
|
67
67
|
|
68
68
|
def csrf_token
|
69
|
-
|
69
|
+
%Q(<input name="authenticity_token" value="#{authenticity_token}" type="hidden">)
|
70
70
|
end
|
71
71
|
|
72
72
|
def no_script
|
73
|
-
|
73
|
+
%Q(<noscript>
|
74
74
|
#{submit_section}
|
75
|
-
</noscript>
|
75
|
+
</noscript>)
|
76
76
|
end
|
77
77
|
|
78
78
|
def submit_section
|
79
|
-
|
79
|
+
%Q(<div class="#{section_classes}">
|
80
80
|
#{section_html}
|
81
|
-
<input class=
|
82
|
-
</div>
|
81
|
+
<input class="#{submit_classes}" type="submit" value="#{submit_text}"></input>
|
82
|
+
</div>)
|
83
83
|
end
|
84
84
|
|
85
85
|
def generated_form_id
|
@@ -88,14 +88,14 @@ module Repost
|
|
88
88
|
|
89
89
|
def auto_submit_script
|
90
90
|
nonce_attr = %Q( nonce="#{autosubmit_nonce}") if autosubmit_nonce
|
91
|
-
|
92
|
-
document.getElementById(
|
93
|
-
</script>
|
91
|
+
%Q(<script#{nonce_attr}>
|
92
|
+
document.getElementById("#{form_id}").submit();
|
93
|
+
</script>)
|
94
94
|
end
|
95
95
|
|
96
96
|
def process_value(value)
|
97
97
|
return value if value.is_a?(Integer)
|
98
|
-
|
98
|
+
%Q("#{value.to_s.gsub("\"", '\'')}")
|
99
99
|
end
|
100
100
|
end
|
101
101
|
end
|
data/lib/repost/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: repost
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- YaroslavO
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-07-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -71,7 +71,7 @@ licenses:
|
|
71
71
|
- MIT
|
72
72
|
metadata:
|
73
73
|
homepage_uri: https://vergilet.github.io/repost/
|
74
|
-
post_install_message:
|
74
|
+
post_install_message:
|
75
75
|
rdoc_options: []
|
76
76
|
require_paths:
|
77
77
|
- lib
|
@@ -86,8 +86,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
86
86
|
- !ruby/object:Gem::Version
|
87
87
|
version: '0'
|
88
88
|
requirements: []
|
89
|
-
rubygems_version: 3.
|
90
|
-
signing_key:
|
89
|
+
rubygems_version: 3.2.15
|
90
|
+
signing_key:
|
91
91
|
specification_version: 4
|
92
92
|
summary: Gem implements Redirect using POST method
|
93
93
|
test_files: []
|