repost 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/repost/extend_controller.rb +13 -12
- 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: 6114a27e75f7df1a3141808e436d8ed6e1c9bffd7842676c88da1ddd2701ab07
|
4
|
+
data.tar.gz: 597fe2588e85b5d786f58bd776cfb1416368360fc5aa35fc5df35ee73490b037
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: afa10ba26be16c930543283efb1af2069e69020f43edf5602fa7572737bd0763002d9d6fc39d3aea649dbab1a815ec605590bb23074bde9a32c441a379431aa2
|
7
|
+
data.tar.gz: 176ecebcdc79ffd03aa036aac4000b1c3612d392177e91f80f1b36e76442bdc1bd2c91c0542bd0c41d4f01268b319e8070b3cfefec00facc412e8c27f59934b5
|
@@ -1,18 +1,19 @@
|
|
1
|
-
if defined?(Rails)
|
2
|
-
|
3
|
-
|
1
|
+
if defined?(Rails) && defined?(ActiveSupport)
|
2
|
+
ActiveSupport.on_load(:action_controller) do
|
3
|
+
class ::ActionController::Base
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
5
|
+
def repost(url, params: {}, options: {})
|
6
|
+
authenticity_token = form_authenticity_token if ['auto', :auto].include?(options[:authenticity_token])
|
7
|
+
render html: Repost::Senpai.perform(
|
8
|
+
url,
|
9
|
+
params: params,
|
10
|
+
options: options.merge({authenticity_token: authenticity_token}.compact)
|
11
|
+
).html_safe
|
12
|
+
end
|
13
13
|
|
14
|
-
|
14
|
+
alias :redirect_post :repost
|
15
15
|
|
16
|
+
end
|
16
17
|
end
|
17
18
|
end
|
18
19
|
|
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.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- YaroslavO
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-10-
|
11
|
+
date: 2019-10-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|