mastodon_command 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/mastodon_command/statuses_controller.rb +1 -9
- data/lib/mastodon_command/version.rb +1 -1
- data/lib/mastodon_command.rb +3 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 18bb0b409e56cf1ae50ce94df0b2dc205022051c
|
4
|
+
data.tar.gz: 9b0608dda16537402198e813e72726b44c50ee7f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 88996751076a9f64938d47a92cc8d6af21acb658ba2e41e43d6e7c5ad298a97ee135f4f779791b7ec3c165548f68654ce257fabe8ac2a4e5d466963c77022f40
|
7
|
+
data.tar.gz: fe81f639adac9293213a140477fa585a706b3c1bce09d749fb39dbf619ec74ccb4e6507904e9318903039f2daea758f367613ecc6003a38f73649534d6781d6e
|
data/README.md
CHANGED
@@ -1,6 +1,4 @@
|
|
1
|
-
|
2
|
-
class Api::V1::StatusesController < Api::BaseController
|
3
|
-
|
1
|
+
module ApiV1StatusesControllerPatch
|
4
2
|
def create
|
5
3
|
status = MastodonCommand.convert_toot(status_params[:status])
|
6
4
|
@status = PostStatusService.new.call(current_user.account,
|
@@ -15,10 +13,4 @@ class Api::V1::StatusesController < Api::BaseController
|
|
15
13
|
|
16
14
|
render :show
|
17
15
|
end
|
18
|
-
|
19
|
-
private
|
20
|
-
# 使用されているprivateメソッドも入れておかないとモンキーパッチが動かなかった
|
21
|
-
def status_params
|
22
|
-
params.permit(:status, :in_reply_to_id, :sensitive, :spoiler_text, :visibility, media_ids: [])
|
23
|
-
end
|
24
16
|
end
|
data/lib/mastodon_command.rb
CHANGED
@@ -2,6 +2,7 @@ require "mastodon_command/version"
|
|
2
2
|
require "mastodon_command/convert"
|
3
3
|
require "mastodon_command/convert_random"
|
4
4
|
require "mastodon_command/convert_lang"
|
5
|
+
require "mastodon_command/statuses_controller"
|
5
6
|
|
6
7
|
module MastodonCommand
|
7
8
|
def self.setup(&proc)
|
@@ -18,6 +19,7 @@ module MastodonCommand
|
|
18
19
|
end
|
19
20
|
|
20
21
|
# Monkey patch
|
21
|
-
|
22
|
+
Api::V1::StatusesController.prepend(ApiV1StatusesControllerPatch)
|
22
23
|
end
|
23
24
|
end
|
25
|
+
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mastodon_command
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kenchiki
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07-
|
11
|
+
date: 2017-07-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|