Koyaaan 0.1.1 → 0.1.2
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 +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d065a701d9014ad6c388db88af78d7fd6b6b4587acf6ae09de550c4e226f599
|
4
|
+
data.tar.gz: af0fd41ec34c4f56368ead6d1dabd77811867b04ce45245f152ef4b67671f828
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5906a2006fc279fc55ae649a00f4828759b1bcf81cf7838a8360507e3a100358e216480fbe0d0acf4f8aefd5ce99608a8ba7298a1758dcc66c5bccfd810b5981
|
7
|
+
data.tar.gz: bcf77eed6328f1b341430adfd1f87e50d4f299a3779b471fa62dafbe842829dc777030c23641c0c3282df72e1e52cbff795ee7e494abd4dd82dfd16f873ffb72
|
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
|
2
|
-
class Random <
|
3
|
-
|
4
|
-
def convert(input)
|
5
|
-
input.replace(@replaces.sample)
|
6
|
-
end
|
7
|
-
end
|
1
|
+
module Koyaaan
|
2
|
+
class Random < Koyaaan::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,14 +1,14 @@
|
|
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.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- S-H-GAMELINKS
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-07-
|
11
|
+
date: 2018-07-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -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.7
|
99
99
|
signing_key:
|
100
100
|
specification_version: 4
|
101
101
|
summary: using for social filter on Mastoson
|