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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a14ab972e2dc07c9812af6c4faaa53a800f747fc2ea10d0270ef77a5860f9947
4
- data.tar.gz: c27f117e61525fcdd16c9b7ca3fee667ce5740ab0a4407ea7106a608684bd341
3
+ metadata.gz: 016666c656489330b6bcfe1eed7663fa1670210f211e2e7ad35cce82ea9a8322
4
+ data.tar.gz: 744a0637065596ddb685097a54dd9219d908fd659f69a731e94866f766ef8bd8
5
5
  SHA512:
6
- metadata.gz: d354a54440a8089075e919b9a8f4f15f1f17a4f849dffd91602561e6d2ea8d393e0eb503bdb6fd1eda353e3b8f3d704e852020c5aaca2f6e91b4596301280a72
7
- data.tar.gz: dfce38fbd72e5d8fd8d2896767cfa257721b33c4fdeeefdbcaba73a68dd6d5193dae91a8a26e45cbd7993fc6fcc01d4bfb7fd2b5549068130b965c625cb2899e
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
- "<form id='#{form_id}' action='#{url}' method='#{method}' accept-charset='#{charset}'>"
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
- "<input type='hidden' name='#{key}' value=#{process_value(value)}>"
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
- "</form>"
65
+ %Q(</form>)
66
66
  end
67
67
 
68
68
  def csrf_token
69
- "<input name='authenticity_token' value='#{authenticity_token}' type='hidden'>"
69
+ %Q(<input name="authenticity_token" value="#{authenticity_token}" type="hidden">)
70
70
  end
71
71
 
72
72
  def no_script
73
- "<noscript>
73
+ %Q(<noscript>
74
74
  #{submit_section}
75
- </noscript>"
75
+ </noscript>)
76
76
  end
77
77
 
78
78
  def submit_section
79
- "<div class='#{section_classes}'>
79
+ %Q(<div class="#{section_classes}">
80
80
  #{section_html}
81
- <input class='#{submit_classes}' type='submit' value='#{submit_text}'></input>
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
- "<script#{nonce_attr}>
92
- document.getElementById('#{form_id}').submit();
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
- '\'' + value.to_s + '\''
98
+ %Q("#{value.to_s.gsub("\"", '\'')}")
99
99
  end
100
100
  end
101
101
  end
@@ -1,3 +1,3 @@
1
1
  module Repost
2
- VERSION = "0.3.8"
2
+ VERSION = "0.4.0"
3
3
  end
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.3.8
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: 2021-05-13 00:00:00.000000000 Z
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.0.8
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: []