Skip to content

Commit 3d7cd6e

Browse files
committed
fix hound
1 parent 9a4d889 commit 3d7cd6e

File tree

3 files changed

+15
-13
lines changed

3 files changed

+15
-13
lines changed

lib/fcm/client/instance_topic_management.rb

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ def manage_topics_relationship(topic, registration_ids, action)
1717

1818
def topic_subscription(topic, registration_id)
1919
end_point = "/iid/v1/#{registration_id}/rel/topics/#{topic}"
20-
res = make_request(:post, INSTANCE_ID_API, end_point, nil, authorization_headers)
20+
res = make_request(
21+
:post, INSTANCE_ID_API, end_point, nil, authorization_headers
22+
)
2123
build_response(res)
2224
end
2325

@@ -33,26 +35,26 @@ def get_instance_id_info(iid_token, options = {})
3335
def batch_topic_subscription(topic, registration_ids)
3436
manage_topics_relationship(topic, registration_ids, 'Add')
3537
end
36-
38+
3739
def batch_topic_unsubscription(topic, registration_ids)
3840
manage_topics_relationship(topic, registration_ids, 'Remove')
3941
end
40-
42+
4143
def batch_subscribe_instance_ids_to_topic(instance_ids, topic_name)
4244
manage_topics_relationship(topic_name, instance_ids, 'Add')
4345
end
44-
46+
4547
def batch_unsubscribe_instance_ids_from_topic(instance_ids, topic_name)
4648
manage_topics_relationship(topic_name, instance_ids, 'Remove')
4749
end
48-
50+
4951
def subscribe_instance_id_to_topic(iid_token, topic_name)
5052
batch_subscribe_instance_ids_to_topic([iid_token], topic_name)
5153
end
52-
54+
5355
def unsubscribe_instance_id_from_topic(iid_token, topic_name)
5456
batch_unsubscribe_instance_ids_from_topic([iid_token], topic_name)
55-
end
57+
end
5658
end
5759
end
58-
end
60+
end

lib/fcm/client/notification_delivery.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@ def validate_condition?(condition)
4848
condition
4949
)
5050
end
51-
51+
5252
def validate_condition_format?(condition)
5353
bad_characters = condition.gsub(
5454
/(topics|in|\s|\(|\)|(&&)|[!]|(\|\|)|'([a-zA-Z0-9\-_.~%]+)')/,
5555
''
5656
)
5757
bad_characters.length.zero?
5858
end
59-
59+
6060
def validate_condition_topics?(condition)
6161
topics = condition.scan(/(?:^|\S|\s)'([^']*?)'(?:$|\S|\s)/).flatten
6262
topics.all? { |topic| topic.gsub(TOPIC_REGEX, '').length.zero? }

lib/fcm/client_v1/notification_delivery.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ module NotificationDilivery
99

1010
def send_notification_v1(message, project_name)
1111
return if project_name.empty?
12-
12+
1313
post_body = { 'message': message }
1414
end_point = "#{project_name}/messages:send"
15-
15+
1616
res = make_request(
1717
:post, BASE_URI_V1, end_point, post_body.to_json, authorization_headers
1818
)
1919
build_response(res)
2020
end
2121
end
2222
end
23-
end
23+
end

0 commit comments

Comments
 (0)