repost 0.3.2 → 0.3.3
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 +11 -1
- data/lib/repost/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 998c57594b27cb1c140eb6e141b2e64467a5cde407410c58bd3547f3529e7d20
|
4
|
+
data.tar.gz: d7fef86b10e728d49154e6883fdf53659bbbacd0f281283e6ff586f82cc67199
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ce51773149c3bb5afc481c415753a46e2136d2ef1e41aa17709028ec24682c95a44a913dddba3ea20c06a15bb201384478ab6cac42cb1f41eba97316d35e875
|
7
|
+
data.tar.gz: 97a6ab774d780fbe9cf238ee6172764adbc10d6dd6b0282f3c8950e967f413b560cb4852179d419c27d62dc1dd5ee542c66108864d90444902388a8c8235af64
|
data/lib/repost/senpai.rb
CHANGED
@@ -39,12 +39,22 @@ module Repost
|
|
39
39
|
|
40
40
|
def form_body
|
41
41
|
inputs = params.map do |key, value|
|
42
|
-
|
42
|
+
form_input(key, value)
|
43
43
|
end
|
44
44
|
inputs.unshift(csrf_token) if authenticity_token
|
45
45
|
inputs.join
|
46
46
|
end
|
47
47
|
|
48
|
+
def form_input(key, value)
|
49
|
+
if value.is_a?(Hash)
|
50
|
+
value.map do |inner_key, inner_value|
|
51
|
+
form_input("#{key}[#{inner_key}]", inner_value)
|
52
|
+
end.join
|
53
|
+
else
|
54
|
+
"<input type='hidden' name='#{key}' value='#{value}'>"
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
48
58
|
def form_footer
|
49
59
|
"</form>"
|
50
60
|
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.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- YaroslavO
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-06-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|