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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6f2d03246916f0f0c9284b80fb3528006f3684db
4
- data.tar.gz: c08b4a4cae3bbb351100ee55292e862a35678b19
3
+ metadata.gz: 18bb0b409e56cf1ae50ce94df0b2dc205022051c
4
+ data.tar.gz: 9b0608dda16537402198e813e72726b44c50ee7f
5
5
  SHA512:
6
- metadata.gz: 3fb8f98ea028114b70658d59b0676b60cd19e05c0c84b3ccfde2257fbbe7edace5dc925c36d3a82046b8cd1f5fa6be3ce913ae9070a0797077904dbe37d55851
7
- data.tar.gz: 4ec386b988df20d77970c4bfd533a28f820e92af40bbca3a8fdc828169568da72c01cca12a56285544def25ef2f5da6893815f13dccfcdaeea857956c1cea934
6
+ metadata.gz: 88996751076a9f64938d47a92cc8d6af21acb658ba2e41e43d6e7c5ad298a97ee135f4f779791b7ec3c165548f68654ce257fabe8ac2a4e5d466963c77022f40
7
+ data.tar.gz: fe81f639adac9293213a140477fa585a706b3c1bce09d749fb39dbf619ec74ccb4e6507904e9318903039f2daea758f367613ecc6003a38f73649534d6781d6e
data/README.md CHANGED
@@ -64,6 +64,7 @@ MastodonCommand.setup do |status|
64
64
 
65
65
  ])
66
66
  status = osaka.convert(status) if osaka.match(status)
67
+ status
67
68
  end
68
69
  ```
69
70
 
@@ -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
@@ -1,3 +1,3 @@
1
1
  module MastodonCommand
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -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
- require "mastodon_command/statuses_controller"
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.0
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-08 00:00:00.000000000 Z
11
+ date: 2017-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler