flock_os 0.0.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 +7 -0
- data/LICENSE +18 -0
- data/README.md +61 -0
- data/lib/flock_os/api/base.rb +11 -0
- data/lib/flock_os/api/channels.rb +56 -0
- data/lib/flock_os/api/chat.rb +23 -0
- data/lib/flock_os/api/rooster.rb +13 -0
- data/lib/flock_os/api/users.rb +21 -0
- data/lib/flock_os/client.rb +67 -0
- data/lib/flock_os/collection/base.rb +9 -0
- data/lib/flock_os/collection/channel.rb +11 -0
- data/lib/flock_os/collection/channel_member.rb +11 -0
- data/lib/flock_os/collection/message.rb +11 -0
- data/lib/flock_os/collection/public_profile.rb +11 -0
- data/lib/flock_os/collection/user.rb +11 -0
- data/lib/flock_os/configuration.rb +13 -0
- data/lib/flock_os/helpers.rb +13 -0
- data/lib/flock_os/model/attachment.rb +16 -0
- data/lib/flock_os/model/base.rb +25 -0
- data/lib/flock_os/model/channel.rb +10 -0
- data/lib/flock_os/model/channel_member.rb +9 -0
- data/lib/flock_os/model/message.rb +18 -0
- data/lib/flock_os/model/modify_channel_member.rb +7 -0
- data/lib/flock_os/model/public_profile.rb +11 -0
- data/lib/flock_os/model/send_message.rb +7 -0
- data/lib/flock_os/model/user.rb +14 -0
- data/lib/flock_os/version.rb +3 -0
- data/lib/flock_os.rb +26 -0
- data/spec/api/channels_spec.rb +75 -0
- data/spec/api/chat_spec.rb +75 -0
- data/spec/flock_os_spec.rb +29 -0
- data/spec/helpers_spec.rb +13 -0
- data/spec/spec_helper.rb +19 -0
- metadata +200 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 96a20140815ca4f7ad3f80b64762095b551beb683ac741978d51a10aa94aca45
|
4
|
+
data.tar.gz: c5ea7b4084576793926b96c526d44d9b96627ff616898573f51ae08077590b8d
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 1ff5c749255a6d6ee0766ff9257241971e9c041df87a5583155865c9df5890392fa4b7103fd9a691a9dba5de297f49561dc3d347b4706abb1d71e06f18472f81
|
7
|
+
data.tar.gz: dd8667b8c603836718df977f86d05c9e725c2667935990f3e9eb3e7b3269a44a1987b344cadfd7ff6d8c198bfafca692c3fbbb8e9a82c58a4eaab991bb4a1122
|
data/LICENSE
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
MIT License
|
2
|
+
Copyright (c) 2020 Lokalise team, Ilya Bodrov
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
The above copyright notice and this permission notice shall be
|
11
|
+
included in all copies or substantial portions of the Software.
|
12
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
13
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
14
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
15
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
16
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
17
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
18
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,61 @@
|
|
1
|
+
# FlockOs API
|
2
|
+
FlockOs API client
|
3
|
+
|
4
|
+
WARNING This FlockOs client is under development.
|
5
|
+
|
6
|
+
## Installation
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```
|
10
|
+
gem 'flock_os'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
```
|
16
|
+
$ bundle install
|
17
|
+
```
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
```
|
22
|
+
$ gem install flock_os
|
23
|
+
```
|
24
|
+
|
25
|
+
## Usage
|
26
|
+
|
27
|
+
#### Init the client
|
28
|
+
|
29
|
+
There is multiple ways to set the config.
|
30
|
+
|
31
|
+
```
|
32
|
+
FlockOs.configure do |config|
|
33
|
+
config.token = 'token'
|
34
|
+
end
|
35
|
+
|
36
|
+
client = FlockOs.new
|
37
|
+
```
|
38
|
+
|
39
|
+
Alternatively, you can configure the FlockOs settings by passing a block:
|
40
|
+
|
41
|
+
```
|
42
|
+
client = FlockOs.new do |config|
|
43
|
+
config.token = 'token'
|
44
|
+
end
|
45
|
+
```
|
46
|
+
|
47
|
+
#### Interact with the interface
|
48
|
+
|
49
|
+
You can interact with FlockOs interface, for example send message, by issuing following calls that correspond directly to the FlockOs API hierarchy
|
50
|
+
|
51
|
+
```
|
52
|
+
response = client.chat.send_message({
|
53
|
+
to: 'u:xxx',
|
54
|
+
text: 'Hallo'
|
55
|
+
})
|
56
|
+
```
|
57
|
+
|
58
|
+
## Development
|
59
|
+
After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.
|
60
|
+
|
61
|
+
To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and the created tag, and push the .gem file to rubygems.org.
|
@@ -0,0 +1,56 @@
|
|
1
|
+
module FlockOs
|
2
|
+
module Api
|
3
|
+
class Channels < FlockOs::Api::Base
|
4
|
+
PATH = 'channels'
|
5
|
+
|
6
|
+
def add_members(channel_id, members)
|
7
|
+
response = @client.post("#{PATH}.addMembers", {
|
8
|
+
channelId: channel_id,
|
9
|
+
members: members
|
10
|
+
})
|
11
|
+
|
12
|
+
FlockOs::Model::ModifyChannelMember.new(response)
|
13
|
+
end
|
14
|
+
|
15
|
+
def create(params)
|
16
|
+
response = @client.post("#{PATH}.create", {
|
17
|
+
channel_id: channel_id,
|
18
|
+
members: members
|
19
|
+
})
|
20
|
+
|
21
|
+
FlockOs::Model::CreateChannel.new(response)
|
22
|
+
end
|
23
|
+
|
24
|
+
def get_info(channel_id)
|
25
|
+
response = @client.post("#{PATH}.getInfo", {
|
26
|
+
channelId: channel_id
|
27
|
+
})
|
28
|
+
|
29
|
+
FlockOs::Model::Channel.new(response)
|
30
|
+
end
|
31
|
+
|
32
|
+
def list
|
33
|
+
response = @client.post("#{PATH}.list")
|
34
|
+
|
35
|
+
FlockOs::Collection::Channel.new(response)
|
36
|
+
end
|
37
|
+
|
38
|
+
def list_members(channel_id)
|
39
|
+
response = @client.post("#{PATH}.listMembers", {
|
40
|
+
channelId: channel_id
|
41
|
+
})
|
42
|
+
|
43
|
+
FlockOs::Collection::Channel.new(response)
|
44
|
+
end
|
45
|
+
|
46
|
+
def remove_members(channel_id, members)
|
47
|
+
response = @client.post("#{PATH}.removeMembers", {
|
48
|
+
channelId: channel_id,
|
49
|
+
members: members
|
50
|
+
})
|
51
|
+
|
52
|
+
FlockOs::Model::ModifyChannelMember.new(response)
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module FlockOs
|
2
|
+
module Api
|
3
|
+
class Chat < FlockOs::Api::Base
|
4
|
+
PATH = 'chat'
|
5
|
+
|
6
|
+
def fetch_messages(chat, user_uids)
|
7
|
+
response = @client.post("#{PATH}.fetchMessages", {
|
8
|
+
chat: chat,
|
9
|
+
uids: user_uids
|
10
|
+
})
|
11
|
+
|
12
|
+
FlockOs::Collection::Message.new(response)
|
13
|
+
end
|
14
|
+
|
15
|
+
def send_message(params)
|
16
|
+
response = @client.post("#{PATH}.sendMessage", params)
|
17
|
+
|
18
|
+
binding.pry
|
19
|
+
FlockOs::Model::SendMessage.new(response)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module FlockOs
|
2
|
+
module Api
|
3
|
+
class Users < FlockOs::Api::Base
|
4
|
+
PATH = 'users'
|
5
|
+
|
6
|
+
def get_info
|
7
|
+
response = @client.post("#{PATH}.getInfo")
|
8
|
+
|
9
|
+
FlockOs::Model::User.new(response)
|
10
|
+
end
|
11
|
+
|
12
|
+
def get_public_profile(user_id)
|
13
|
+
response = @client.post("#{PATH}.getPublicProfile", {
|
14
|
+
userId: user_id
|
15
|
+
})
|
16
|
+
|
17
|
+
FlockOs::Model::PublicProfile.new(response)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,67 @@
|
|
1
|
+
require 'faraday_middleware'
|
2
|
+
|
3
|
+
require 'flock_os/api/base'
|
4
|
+
require 'flock_os/model/base'
|
5
|
+
require 'flock_os/collection/base'
|
6
|
+
|
7
|
+
require 'flock_os/api/channels'
|
8
|
+
require 'flock_os/api/chat'
|
9
|
+
require 'flock_os/api/rooster'
|
10
|
+
require 'flock_os/api/users'
|
11
|
+
|
12
|
+
require 'flock_os/collection/channel_member'
|
13
|
+
require 'flock_os/collection/channel'
|
14
|
+
require 'flock_os/collection/message'
|
15
|
+
require 'flock_os/collection/public_profile'
|
16
|
+
require 'flock_os/collection/user'
|
17
|
+
|
18
|
+
require 'flock_os/model/attachment'
|
19
|
+
require 'flock_os/model/channel_member'
|
20
|
+
require 'flock_os/model/channel'
|
21
|
+
require 'flock_os/model/message'
|
22
|
+
require 'flock_os/model/modify_channel_member'
|
23
|
+
require 'flock_os/model/public_profile'
|
24
|
+
require 'flock_os/model/send_message'
|
25
|
+
require 'flock_os/model/user'
|
26
|
+
|
27
|
+
module FlockOs
|
28
|
+
class Client
|
29
|
+
BASE_URL = 'https://api.flock.co/v1'.freeze
|
30
|
+
|
31
|
+
def initialize(options = {})
|
32
|
+
config = FlockOs::Configuration.new(options)
|
33
|
+
|
34
|
+
yield config if block_given?
|
35
|
+
|
36
|
+
@connection = Faraday.new(url: BASE_URL) do |conn|
|
37
|
+
conn.params[:token] = config.token
|
38
|
+
conn.request :json
|
39
|
+
conn.response :json
|
40
|
+
|
41
|
+
# conn.use ::Middleware::HandleResponseException
|
42
|
+
conn.adapter Faraday.default_adapter
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
def channels
|
47
|
+
@channels ||= FlockOs::Api::Channels.new(self)
|
48
|
+
end
|
49
|
+
|
50
|
+
def chat
|
51
|
+
@chat ||= FlockOs::Api::Chat.new(self)
|
52
|
+
end
|
53
|
+
|
54
|
+
def rooster
|
55
|
+
@rooster ||= FlockOs::Api::Rooster.new(self)
|
56
|
+
end
|
57
|
+
|
58
|
+
def users
|
59
|
+
@users ||= FlockOs::Api::Users.new(self)
|
60
|
+
end
|
61
|
+
|
62
|
+
def post(url, params = {})
|
63
|
+
response = @connection.post(url, params)
|
64
|
+
response.body
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module FlockOs
|
2
|
+
module Model
|
3
|
+
class Base
|
4
|
+
def initialize(attributes)
|
5
|
+
assign_attributes(attributes)
|
6
|
+
end
|
7
|
+
|
8
|
+
private
|
9
|
+
|
10
|
+
def assign_attributes(attributes)
|
11
|
+
raise ArgumentError, "Attributes is empty" if attributes.empty?
|
12
|
+
|
13
|
+
attributes.each do |key, value|
|
14
|
+
assign_attribute(key, value)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
# Private: Set attribute with only defined resource attribute
|
19
|
+
def assign_attribute(key, value)
|
20
|
+
setter = :"#{FlockOs::Helpers.underscore(key)}="
|
21
|
+
public_send(setter, value) if respond_to?(setter)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
data/lib/flock_os.rb
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
require_relative 'flock_os/version'
|
2
|
+
require 'flock_os/client'
|
3
|
+
require 'flock_os/configuration'
|
4
|
+
require 'flock_os/helpers'
|
5
|
+
|
6
|
+
module FlockOs
|
7
|
+
class << self
|
8
|
+
attr_accessor :client, :config
|
9
|
+
|
10
|
+
def new(options = {}, &block)
|
11
|
+
@client = FlockOs::Client.new(options, &block)
|
12
|
+
end
|
13
|
+
|
14
|
+
def config
|
15
|
+
@config ||= Configuration.new
|
16
|
+
end
|
17
|
+
|
18
|
+
def reset
|
19
|
+
@config = Configuration.new
|
20
|
+
end
|
21
|
+
|
22
|
+
def configure
|
23
|
+
yield config
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe FlockOs::Api::Channels do
|
4
|
+
let(:client) { FlockOs::Client.new }
|
5
|
+
let(:stub_fetch_response) do
|
6
|
+
[
|
7
|
+
{
|
8
|
+
"from": "u:xxx",
|
9
|
+
"to": "u:xxx",
|
10
|
+
"uid": "fd4877b719b1",
|
11
|
+
"text": "Hello"
|
12
|
+
}
|
13
|
+
]
|
14
|
+
end
|
15
|
+
|
16
|
+
let(:send_message_params) do
|
17
|
+
{
|
18
|
+
"to": "u:xxx",
|
19
|
+
"text": "Hello"
|
20
|
+
}
|
21
|
+
end
|
22
|
+
|
23
|
+
let(:stub_send_response) { { uid: 'uuid' } }
|
24
|
+
|
25
|
+
subject(:chat) { described_class.new(client) }
|
26
|
+
|
27
|
+
describe '#add_members' do
|
28
|
+
context 'when successfully fetch messages' do
|
29
|
+
it 'return message collection class' do
|
30
|
+
expect(chat.add_members('channel_id', ['member'])).to be_an FlockOs::Collection::Message
|
31
|
+
end
|
32
|
+
|
33
|
+
it 'return message collection class' do
|
34
|
+
allow_any_instance_of(FlockOs::Client).to receive(:post).and_return(stub_fetch_response)
|
35
|
+
|
36
|
+
response = chat.fetch_messages('chat', 'user_uids')
|
37
|
+
messages = response.collection
|
38
|
+
message = messages.first
|
39
|
+
|
40
|
+
expect(messages.count).to eq 1
|
41
|
+
|
42
|
+
expect(message.text).to eq stub_fetch_response.first[:text]
|
43
|
+
expect(message.from).to eq stub_fetch_response.first[:from]
|
44
|
+
expect(message.to).to eq stub_fetch_response.first[:to]
|
45
|
+
expect(message.uid).to eq stub_fetch_response.first[:uid]
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
describe '#send_message' do
|
51
|
+
context 'when successfully send message' do
|
52
|
+
it 'return message model class' do
|
53
|
+
expect(chat.send_message(send_message_params)).to be_an FlockOs::Model::SendMessage
|
54
|
+
end
|
55
|
+
|
56
|
+
it 'return uuid' do
|
57
|
+
allow_any_instance_of(FlockOs::Client).to receive(:post).and_return(stub_send_response)
|
58
|
+
|
59
|
+
response = chat.send_message(send_message_params)
|
60
|
+
|
61
|
+
expect(response.uid).to eq stub_send_response[:uid]
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
pending 'when send message failed' do
|
66
|
+
it 'uuid nil' do
|
67
|
+
allow_any_instance_of(FlockOs::Client).to receive(:post).and_return({})
|
68
|
+
|
69
|
+
response = chat.send_message(send_message_params)
|
70
|
+
|
71
|
+
expect(response.uid).to eq nil
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe FlockOs::Api::Chat do
|
4
|
+
let(:client) { FlockOs::Client.new }
|
5
|
+
let(:stub_fetch_response) do
|
6
|
+
[
|
7
|
+
{
|
8
|
+
"from": "u:xxx",
|
9
|
+
"to": "u:xxx",
|
10
|
+
"uid": "fd4877b719b1",
|
11
|
+
"text": "Hello"
|
12
|
+
}
|
13
|
+
]
|
14
|
+
end
|
15
|
+
|
16
|
+
let(:send_message_params) do
|
17
|
+
{
|
18
|
+
"to": "u:xxx",
|
19
|
+
"text": "Hello"
|
20
|
+
}
|
21
|
+
end
|
22
|
+
|
23
|
+
let(:stub_send_response) { { uid: 'uuid' } }
|
24
|
+
|
25
|
+
subject(:chat) { described_class.new(client) }
|
26
|
+
|
27
|
+
describe '#fetch_messages' do
|
28
|
+
context 'when successfully fetch messages' do
|
29
|
+
it 'return message collection class' do
|
30
|
+
expect(chat.fetch_messages('chat', 'user_uids')).to be_an FlockOs::Collection::Message
|
31
|
+
end
|
32
|
+
|
33
|
+
it 'return message collection class' do
|
34
|
+
allow_any_instance_of(FlockOs::Client).to receive(:post).and_return(stub_fetch_response)
|
35
|
+
|
36
|
+
response = chat.fetch_messages('chat', 'user_uids')
|
37
|
+
messages = response.collection
|
38
|
+
message = messages.first
|
39
|
+
|
40
|
+
expect(messages.count).to eq 1
|
41
|
+
|
42
|
+
expect(message.text).to eq stub_fetch_response.first[:text]
|
43
|
+
expect(message.from).to eq stub_fetch_response.first[:from]
|
44
|
+
expect(message.to).to eq stub_fetch_response.first[:to]
|
45
|
+
expect(message.uid).to eq stub_fetch_response.first[:uid]
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
describe '#send_message' do
|
51
|
+
context 'when successfully send message' do
|
52
|
+
it 'return message model class' do
|
53
|
+
expect(chat.send_message(send_message_params)).to be_an FlockOs::Model::SendMessage
|
54
|
+
end
|
55
|
+
|
56
|
+
it 'return uuid' do
|
57
|
+
allow_any_instance_of(FlockOs::Client).to receive(:post).and_return(stub_send_response)
|
58
|
+
|
59
|
+
response = chat.send_message(send_message_params)
|
60
|
+
|
61
|
+
expect(response.uid).to eq stub_send_response[:uid]
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
pending 'when send message failed' do
|
66
|
+
it 'uuid nil' do
|
67
|
+
allow_any_instance_of(FlockOs::Client).to receive(:post).and_return({})
|
68
|
+
|
69
|
+
response = chat.send_message(send_message_params)
|
70
|
+
|
71
|
+
expect(response.uid).to eq nil
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe FlockOs do
|
4
|
+
describe '#new' do
|
5
|
+
it 'return alias of FlockOs::Client' do
|
6
|
+
expect(described_class.new).to be_an described_class::Client
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
describe 'config' do
|
11
|
+
context 'when set config using block' do
|
12
|
+
it 'return correct value' do
|
13
|
+
described_class.configure do |config|
|
14
|
+
config.token = 'token'
|
15
|
+
end
|
16
|
+
|
17
|
+
expect(described_class.config.token).to eq 'token'
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
context 'when set config using options' do
|
22
|
+
it 'return correct value' do
|
23
|
+
client = described_class.new({ token: 'token' })
|
24
|
+
|
25
|
+
expect(described_class.config.token).to eq 'token'
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe FlockOs::Helpers do
|
4
|
+
before do
|
5
|
+
@util = described_class
|
6
|
+
end
|
7
|
+
|
8
|
+
describe '#underscore' do
|
9
|
+
it 'convert cammel case to underscore' do
|
10
|
+
expect(@util.underscore('BananaChocoCheese')).to eq 'banana_choco_cheese'
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'simplecov'
|
2
|
+
SimpleCov.start
|
3
|
+
|
4
|
+
# require 'webmock/rspec'
|
5
|
+
require 'pry'
|
6
|
+
# require 'vcr'
|
7
|
+
|
8
|
+
require 'flock_os'
|
9
|
+
|
10
|
+
RSpec.configure do |config|
|
11
|
+
config.expect_with :rspec do |expectations|
|
12
|
+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
13
|
+
# config.mock_with :mocha
|
14
|
+
end
|
15
|
+
|
16
|
+
# config.mock_with :rspec do |mocks|
|
17
|
+
# mocks.verify_partial_doubles = true
|
18
|
+
# end
|
19
|
+
end
|
metadata
ADDED
@@ -0,0 +1,200 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: flock_os
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Risal Hidayat
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2022-10-12 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: faraday
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.10'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.10'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: faraday_middleware
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.2'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.2'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: webmock
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: vcr
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: simplecov
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rake
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: bundler
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: pry
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
description: " The ruby SDK for the FlockOs integration "
|
140
|
+
email: risalhidayat88@gmail.com
|
141
|
+
executables: []
|
142
|
+
extensions: []
|
143
|
+
extra_rdoc_files: []
|
144
|
+
files:
|
145
|
+
- LICENSE
|
146
|
+
- README.md
|
147
|
+
- lib/flock_os.rb
|
148
|
+
- lib/flock_os/api/base.rb
|
149
|
+
- lib/flock_os/api/channels.rb
|
150
|
+
- lib/flock_os/api/chat.rb
|
151
|
+
- lib/flock_os/api/rooster.rb
|
152
|
+
- lib/flock_os/api/users.rb
|
153
|
+
- lib/flock_os/client.rb
|
154
|
+
- lib/flock_os/collection/base.rb
|
155
|
+
- lib/flock_os/collection/channel.rb
|
156
|
+
- lib/flock_os/collection/channel_member.rb
|
157
|
+
- lib/flock_os/collection/message.rb
|
158
|
+
- lib/flock_os/collection/public_profile.rb
|
159
|
+
- lib/flock_os/collection/user.rb
|
160
|
+
- lib/flock_os/configuration.rb
|
161
|
+
- lib/flock_os/helpers.rb
|
162
|
+
- lib/flock_os/model/attachment.rb
|
163
|
+
- lib/flock_os/model/base.rb
|
164
|
+
- lib/flock_os/model/channel.rb
|
165
|
+
- lib/flock_os/model/channel_member.rb
|
166
|
+
- lib/flock_os/model/message.rb
|
167
|
+
- lib/flock_os/model/modify_channel_member.rb
|
168
|
+
- lib/flock_os/model/public_profile.rb
|
169
|
+
- lib/flock_os/model/send_message.rb
|
170
|
+
- lib/flock_os/model/user.rb
|
171
|
+
- lib/flock_os/version.rb
|
172
|
+
- spec/api/channels_spec.rb
|
173
|
+
- spec/api/chat_spec.rb
|
174
|
+
- spec/flock_os_spec.rb
|
175
|
+
- spec/helpers_spec.rb
|
176
|
+
- spec/spec_helper.rb
|
177
|
+
homepage: https://github.com/rslhdyt/flock_os
|
178
|
+
licenses:
|
179
|
+
- MIT
|
180
|
+
metadata: {}
|
181
|
+
post_install_message:
|
182
|
+
rdoc_options: []
|
183
|
+
require_paths:
|
184
|
+
- lib
|
185
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
186
|
+
requirements:
|
187
|
+
- - ">="
|
188
|
+
- !ruby/object:Gem::Version
|
189
|
+
version: 2.5.0
|
190
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - ">="
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0'
|
195
|
+
requirements: []
|
196
|
+
rubygems_version: 3.1.4
|
197
|
+
signing_key:
|
198
|
+
specification_version: 4
|
199
|
+
summary: Ruby SDK for the FlockOs
|
200
|
+
test_files: []
|