Koyaaan 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/Koyaaan/convert.rb +18 -18
- data/lib/Koyaaan/convert_toot.rb +7 -7
- data/lib/Koyaaan/statuses_controller.rb +15 -15
- data/lib/Koyaaan/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: c9f951138f14674f19638c97acbffb6f267f859aa071eb23984fbdb1b83f4dfe
|
4
|
+
data.tar.gz: 4997c11bcc0c315b62a962d5a9c790960a490194a884f46a5279547ecbeba491
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2eb498aa9c7b7ee70960d19e000071b91be722077a74577d3b8efcf8b4e04cd77b3e5ecc3544be1285e5ee5fd3e2534528e8c69a8c4ed3588d468a0f73e90af
|
7
|
+
data.tar.gz: 1d15eb645f14ef309dd61f2e9cc7838dc064818b86aedeb65e17eae8559e68b3680e63ae5fe08e02bcb8c2aeb4f28c12ab638dd72d53224ad0e6de8bea73b185
|
data/lib/Koyaaan/convert.rb
CHANGED
@@ -1,19 +1,19 @@
|
|
1
|
-
module Koyaaan
|
2
|
-
class Convert
|
3
|
-
attr_accessor :pattern
|
4
|
-
attr_accessor :replaces
|
5
|
-
|
6
|
-
def initialize(pattern, replaces)
|
7
|
-
@pattern = pattern
|
8
|
-
@replaces = replaces
|
9
|
-
end
|
10
|
-
|
11
|
-
def match(input)
|
12
|
-
input.match(@pattern)
|
13
|
-
end
|
14
|
-
|
15
|
-
def convert(input)
|
16
|
-
input
|
17
|
-
end
|
18
|
-
end
|
1
|
+
module Koyaaan
|
2
|
+
class Convert
|
3
|
+
attr_accessor :pattern
|
4
|
+
attr_accessor :replaces
|
5
|
+
|
6
|
+
def initialize(pattern, replaces)
|
7
|
+
@pattern = pattern
|
8
|
+
@replaces = replaces
|
9
|
+
end
|
10
|
+
|
11
|
+
def match(input)
|
12
|
+
input.match(@pattern)
|
13
|
+
end
|
14
|
+
|
15
|
+
def convert(input)
|
16
|
+
input
|
17
|
+
end
|
18
|
+
end
|
19
19
|
end
|
data/lib/Koyaaan/convert_toot.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
module MastodonCthulhu
|
2
|
-
class Random < MastodonCthulhu::Convert
|
3
|
-
|
4
|
-
def convert(input)
|
5
|
-
input.replace(@replaces.sample)
|
6
|
-
end
|
7
|
-
end
|
1
|
+
module MastodonCthulhu
|
2
|
+
class Random < MastodonCthulhu::Convert
|
3
|
+
|
4
|
+
def convert(input)
|
5
|
+
input.replace(@replaces.sample)
|
6
|
+
end
|
7
|
+
end
|
8
8
|
end
|
@@ -1,16 +1,16 @@
|
|
1
|
-
module ApiV1StatusesControllerPatch
|
2
|
-
def create
|
3
|
-
status = Koyaaan.convert_toot(status_params[:status])
|
4
|
-
@status = PostStatusService.new.call(current_user.account,
|
5
|
-
status,
|
6
|
-
status_params[:in_reply_to_id].blank? ? nil : Status.find(status_params[:in_reply_to_id]),
|
7
|
-
media_ids: status_params[:media_ids],
|
8
|
-
sensitive: status_params[:sensitive],
|
9
|
-
spoiler_text: status_params[:spoiler_text],
|
10
|
-
visibility: status_params[:visibility],
|
11
|
-
application: doorkeeper_token.application,
|
12
|
-
idempotency: request.headers['Idempotency-Key'])
|
13
|
-
|
14
|
-
render json: @status, serializer: REST::StatusSerializer
|
15
|
-
end
|
1
|
+
module ApiV1StatusesControllerPatch
|
2
|
+
def create
|
3
|
+
status = Koyaaan.convert_toot(status_params[:status])
|
4
|
+
@status = PostStatusService.new.call(current_user.account,
|
5
|
+
status,
|
6
|
+
status_params[:in_reply_to_id].blank? ? nil : Status.find(status_params[:in_reply_to_id]),
|
7
|
+
media_ids: status_params[:media_ids],
|
8
|
+
sensitive: status_params[:sensitive],
|
9
|
+
spoiler_text: status_params[:spoiler_text],
|
10
|
+
visibility: status_params[:visibility],
|
11
|
+
application: doorkeeper_token.application,
|
12
|
+
idempotency: request.headers['Idempotency-Key'])
|
13
|
+
|
14
|
+
render json: @status, serializer: REST::StatusSerializer
|
15
|
+
end
|
16
16
|
end
|
data/lib/Koyaaan/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: Koyaaan
|
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
|
- S-H-GAMELINKS
|
@@ -95,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
95
95
|
version: '0'
|
96
96
|
requirements: []
|
97
97
|
rubyforge_project:
|
98
|
-
rubygems_version: 2.7.
|
98
|
+
rubygems_version: 2.7.6
|
99
99
|
signing_key:
|
100
100
|
specification_version: 4
|
101
101
|
summary: using for social filter on Mastoson
|