cirro-ruby-client 2.6.1 → 2.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +2 -2
- data/.rubocop.yml +3 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +75 -55
- data/lib/cirro_io/client/gig.rb +1 -1
- data/lib/cirro_io/client/gig_invitation.rb +1 -1
- data/lib/cirro_io/client/version.rb +1 -1
- data/lib/cirro_io_v2/client.rb +1 -1
- data/lib/cirro_io_v2/resources/gig.rb +2 -1
- data/lib/cirro_io_v2/resources/gig_invitation.rb +1 -1
- data/lib/cirro_io_v2/resources/gig_result.rb +1 -1
- data/lib/cirro_io_v2/resources/gig_time_activity.rb +1 -1
- data/lib/cirro_io_v2/resources/notification_configuration.rb +1 -1
- data/lib/cirro_io_v2/resources/notification_layout.rb +1 -1
- data/lib/cirro_io_v2/resources/notification_template.rb +1 -1
- data/lib/cirro_io_v2/resources/notification_topic.rb +1 -1
- data/lib/cirro_io_v2/resources/notification_topic_preference.rb +1 -1
- data/lib/cirro_io_v2/resources/payout.rb +1 -1
- data/lib/cirro_io_v2/resources/user.rb +5 -0
- data/lib/cirro_io_v2/responses/responses.rb +13 -0
- 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: 2f60b3aa8db76a0baf7c0ce89eed44b999ff6439afec256f9588df8b5c96b0ad
|
4
|
+
data.tar.gz: e59888c01115556f222741b06e0f7b36a9a698c60f6f3d4089c266e7d3d360da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49bdf363a8a7ece722d79f1448a08ff71b0a9f8b6a79aa9c0570e671b405ef74a478422d89514667112efdfa6012a593991924eb6c9f76e792b48fd2d686e99b
|
7
|
+
data.tar.gz: 5089c1c98d406d9f9a739317f485addf3978723d321e999bae68e70f80c291c7b7cb3414f4b87e862cb0e45f48d3c66951f85d9b0f07108d1c4a7d3cfa07657d
|
data/.circleci/config.yml
CHANGED
@@ -12,7 +12,7 @@ infra_container_registry_auth:
|
|
12
12
|
jobs:
|
13
13
|
test:
|
14
14
|
docker:
|
15
|
-
- image: cimg/ruby:2.
|
15
|
+
- image: cimg/ruby:3.2.2-node
|
16
16
|
environment:
|
17
17
|
- RAILS_ENV=test
|
18
18
|
- RACK_ENV=test
|
@@ -37,7 +37,7 @@ jobs:
|
|
37
37
|
|
38
38
|
deploy:
|
39
39
|
docker:
|
40
|
-
- image: cimg/ruby:2.
|
40
|
+
- image: cimg/ruby:3.2.2-node
|
41
41
|
steps:
|
42
42
|
- checkout
|
43
43
|
- run:
|
data/.rubocop.yml
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
cirro-ruby-client (2.6.
|
4
|
+
cirro-ruby-client (2.6.3)
|
5
5
|
activesupport
|
6
6
|
faraday (< 1.2.0)
|
7
7
|
faraday_middleware
|
@@ -11,9 +11,11 @@ PATH
|
|
11
11
|
GEM
|
12
12
|
remote: https://rubygems.org/
|
13
13
|
specs:
|
14
|
-
activemodel (7.
|
15
|
-
activesupport (= 7.
|
16
|
-
activesupport (7.
|
14
|
+
activemodel (7.1.3.2)
|
15
|
+
activesupport (= 7.1.3.2)
|
16
|
+
activesupport (7.1.3.2)
|
17
|
+
base64
|
18
|
+
bigdecimal
|
17
19
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
18
20
|
connection_pool (>= 2.2.5)
|
19
21
|
drb
|
@@ -21,85 +23,100 @@ GEM
|
|
21
23
|
minitest (>= 5.1)
|
22
24
|
mutex_m
|
23
25
|
tzinfo (~> 2.0)
|
24
|
-
addressable (2.8.
|
25
|
-
public_suffix (>= 2.0.2, <
|
26
|
-
ast (2.4.
|
27
|
-
base64 (0.
|
28
|
-
bigdecimal (3.1.
|
26
|
+
addressable (2.8.6)
|
27
|
+
public_suffix (>= 2.0.2, < 6.0)
|
28
|
+
ast (2.4.2)
|
29
|
+
base64 (0.2.0)
|
30
|
+
bigdecimal (3.1.6)
|
29
31
|
coderay (1.1.3)
|
30
|
-
concurrent-ruby (1.
|
32
|
+
concurrent-ruby (1.2.3)
|
31
33
|
connection_pool (2.4.1)
|
32
|
-
crack (0.
|
33
|
-
|
34
|
-
|
34
|
+
crack (1.0.0)
|
35
|
+
bigdecimal
|
36
|
+
rexml
|
37
|
+
diff-lcs (1.5.1)
|
38
|
+
drb (2.2.0)
|
35
39
|
ruby2_keywords
|
36
|
-
faker (2.
|
37
|
-
i18n (>= 1.
|
40
|
+
faker (3.2.3)
|
41
|
+
i18n (>= 1.8.11, < 2)
|
38
42
|
faraday (1.1.0)
|
39
43
|
multipart-post (>= 1.2, < 3)
|
40
44
|
ruby2_keywords
|
41
45
|
faraday_middleware (1.2.0)
|
42
46
|
faraday (~> 1.0)
|
43
|
-
hashdiff (1.0
|
44
|
-
i18n (1.
|
47
|
+
hashdiff (1.1.0)
|
48
|
+
i18n (1.14.1)
|
45
49
|
concurrent-ruby (~> 1.0)
|
46
|
-
|
50
|
+
json (2.7.1)
|
51
|
+
json_api_client (1.22.0)
|
47
52
|
activemodel (>= 3.2.0)
|
48
53
|
activesupport (>= 3.2.0)
|
49
54
|
addressable (~> 2.2)
|
50
55
|
faraday (>= 0.15.2, < 2.0)
|
51
56
|
faraday_middleware (>= 0.9.0, < 2.0)
|
52
57
|
rack (>= 0.2)
|
53
|
-
jwt (2.
|
58
|
+
jwt (2.8.0)
|
59
|
+
base64
|
60
|
+
language_server-protocol (3.17.0.3)
|
54
61
|
method_source (1.0.0)
|
55
|
-
minitest (5.
|
56
|
-
multipart-post (2.
|
57
|
-
mutex_m (0.
|
58
|
-
parallel (1.
|
59
|
-
parser (
|
62
|
+
minitest (5.22.2)
|
63
|
+
multipart-post (2.4.0)
|
64
|
+
mutex_m (0.2.0)
|
65
|
+
parallel (1.24.0)
|
66
|
+
parser (3.3.0.5)
|
60
67
|
ast (~> 2.4.1)
|
61
|
-
|
68
|
+
racc
|
69
|
+
pry (0.14.2)
|
62
70
|
coderay (~> 1.1)
|
63
71
|
method_source (~> 1.0)
|
64
|
-
public_suffix (
|
65
|
-
|
66
|
-
|
72
|
+
public_suffix (5.0.4)
|
73
|
+
racc (1.7.3)
|
74
|
+
rack (3.0.9.1)
|
75
|
+
rainbow (3.1.1)
|
67
76
|
rake (12.3.3)
|
68
|
-
regexp_parser (
|
69
|
-
rexml (3.2.
|
70
|
-
rspec (3.
|
71
|
-
rspec-core (~> 3.
|
72
|
-
rspec-expectations (~> 3.
|
73
|
-
rspec-mocks (~> 3.
|
74
|
-
rspec-core (3.
|
75
|
-
rspec-support (~> 3.
|
76
|
-
rspec-expectations (3.
|
77
|
+
regexp_parser (2.9.0)
|
78
|
+
rexml (3.2.6)
|
79
|
+
rspec (3.13.0)
|
80
|
+
rspec-core (~> 3.13.0)
|
81
|
+
rspec-expectations (~> 3.13.0)
|
82
|
+
rspec-mocks (~> 3.13.0)
|
83
|
+
rspec-core (3.13.0)
|
84
|
+
rspec-support (~> 3.13.0)
|
85
|
+
rspec-expectations (3.13.0)
|
77
86
|
diff-lcs (>= 1.2.0, < 2.0)
|
78
|
-
rspec-support (~> 3.
|
79
|
-
rspec-mocks (3.
|
87
|
+
rspec-support (~> 3.13.0)
|
88
|
+
rspec-mocks (3.13.0)
|
80
89
|
diff-lcs (>= 1.2.0, < 2.0)
|
81
|
-
rspec-support (~> 3.
|
82
|
-
rspec-support (3.
|
83
|
-
rubocop (
|
90
|
+
rspec-support (~> 3.13.0)
|
91
|
+
rspec-support (3.13.1)
|
92
|
+
rubocop (1.60.2)
|
93
|
+
json (~> 2.3)
|
94
|
+
language_server-protocol (>= 3.17.0)
|
84
95
|
parallel (~> 1.10)
|
85
|
-
parser (>=
|
96
|
+
parser (>= 3.3.0.2)
|
86
97
|
rainbow (>= 2.2.2, < 4.0)
|
87
|
-
regexp_parser (>= 1.
|
88
|
-
rexml
|
89
|
-
rubocop-ast (>=
|
98
|
+
regexp_parser (>= 1.8, < 3.0)
|
99
|
+
rexml (>= 3.2.5, < 4.0)
|
100
|
+
rubocop-ast (>= 1.30.0, < 2.0)
|
90
101
|
ruby-progressbar (~> 1.7)
|
91
|
-
unicode-display_width (>=
|
92
|
-
rubocop-ast (
|
93
|
-
parser (>= 2.
|
94
|
-
rubocop-
|
95
|
-
rubocop (~>
|
96
|
-
|
102
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
103
|
+
rubocop-ast (1.30.0)
|
104
|
+
parser (>= 3.2.1.0)
|
105
|
+
rubocop-capybara (2.20.0)
|
106
|
+
rubocop (~> 1.41)
|
107
|
+
rubocop-factory_bot (2.25.1)
|
108
|
+
rubocop (~> 1.41)
|
109
|
+
rubocop-rspec (2.26.1)
|
110
|
+
rubocop (~> 1.40)
|
111
|
+
rubocop-capybara (~> 2.17)
|
112
|
+
rubocop-factory_bot (~> 2.22)
|
113
|
+
ruby-progressbar (1.13.0)
|
97
114
|
ruby2_keywords (0.0.5)
|
98
115
|
tzinfo (2.0.6)
|
99
116
|
concurrent-ruby (~> 1.0)
|
100
|
-
unicode-display_width (
|
101
|
-
webmock (3.
|
102
|
-
addressable (>= 2.
|
117
|
+
unicode-display_width (2.5.0)
|
118
|
+
webmock (3.23.0)
|
119
|
+
addressable (>= 2.8.0)
|
103
120
|
crack (>= 0.3.2)
|
104
121
|
hashdiff (>= 0.4.0, < 2.0.0)
|
105
122
|
|
@@ -116,5 +133,8 @@ DEPENDENCIES
|
|
116
133
|
rubocop-rspec
|
117
134
|
webmock
|
118
135
|
|
136
|
+
RUBY VERSION
|
137
|
+
ruby 3.2.2p53
|
138
|
+
|
119
139
|
BUNDLED WITH
|
120
140
|
2.3.20
|
data/lib/cirro_io/client/gig.rb
CHANGED
@@ -9,7 +9,7 @@ module CirroIO
|
|
9
9
|
has_many :gig_time_activities
|
10
10
|
|
11
11
|
def bulk_create_with(worker_filter, gig_tasks)
|
12
|
-
payload = { data: { attributes
|
12
|
+
payload = { data: { attributes:, relationships: {} } }
|
13
13
|
payload[:data][:relationships][:gig_tasks] = gig_tasks.map(&:attributes)
|
14
14
|
payload[:data][:relationships][:worker_filter] = worker_filter.attributes
|
15
15
|
|
@@ -7,7 +7,7 @@ module CirroIO
|
|
7
7
|
has_one :app_worker
|
8
8
|
|
9
9
|
def bulk_create_with(worker_filter, auto_accept: false)
|
10
|
-
payload = { data: { attributes: attributes.merge(worker_filter: worker_filter.attributes, auto_accept:
|
10
|
+
payload = { data: { attributes: attributes.merge(worker_filter: worker_filter.attributes, auto_accept:) } }
|
11
11
|
|
12
12
|
response = self.class.custom_post("bulk/gigs/#{gig.id}/gig_invitations", format_to_dashed_keys(payload))
|
13
13
|
|
data/lib/cirro_io_v2/client.rb
CHANGED
@@ -54,7 +54,7 @@ module CirroIOV2
|
|
54
54
|
private_key = OpenSSL::PKey::RSA.new(File.read(@options[:private_key_path])) if @options[:private_key_path]
|
55
55
|
@request_client = RequestClients::Jwt.new(base_url: "#{@options[:site]}/#{@options[:api_version]}",
|
56
56
|
client_id: @options[:client_id],
|
57
|
-
private_key:
|
57
|
+
private_key:)
|
58
58
|
else
|
59
59
|
raise ArgumentError, 'Options: ":auth_type" must be ":jwt"'
|
60
60
|
end
|
@@ -40,7 +40,8 @@ module CirroIOV2
|
|
40
40
|
response = client.request_client.request(:post, "#{resource_root}/#{id}/invite", body: params)
|
41
41
|
|
42
42
|
return Responses::GigInvitationResponse.new(response.body) if response.body['object'] == 'gig_invitation'
|
43
|
-
|
43
|
+
|
44
|
+
Responses::GigInvitationListResponse.new(response.body) if response.body['object'] == 'list'
|
44
45
|
end
|
45
46
|
end
|
46
47
|
end
|
@@ -2,7 +2,7 @@ module CirroIOV2
|
|
2
2
|
module Resources
|
3
3
|
class GigInvitation < Base
|
4
4
|
def list(params = nil)
|
5
|
-
response = client.request_client.request(:get, resource_root, params:
|
5
|
+
response = client.request_client.request(:get, resource_root, params:)
|
6
6
|
Responses::GigInvitationListResponse.new(response.body)
|
7
7
|
end
|
8
8
|
|
@@ -2,7 +2,7 @@ module CirroIOV2
|
|
2
2
|
module Resources
|
3
3
|
class GigResult < Base
|
4
4
|
def list(params = nil)
|
5
|
-
response = client.request_client.request(:get, resource_root, params:
|
5
|
+
response = client.request_client.request(:get, resource_root, params:)
|
6
6
|
Responses::GigResultListResponse.new(response.body)
|
7
7
|
end
|
8
8
|
|
@@ -2,7 +2,7 @@ module CirroIOV2
|
|
2
2
|
module Resources
|
3
3
|
class GigTimeActivity < Base
|
4
4
|
def list(params = nil)
|
5
|
-
response = client.request_client.request(:get, resource_root, params:
|
5
|
+
response = client.request_client.request(:get, resource_root, params:)
|
6
6
|
Responses::GigTimeActivityListResponse.new(response.body)
|
7
7
|
end
|
8
8
|
|
@@ -2,7 +2,7 @@ module CirroIOV2
|
|
2
2
|
module Resources
|
3
3
|
class NotificationConfiguration < Base
|
4
4
|
def list(params = nil)
|
5
|
-
response = client.request_client.request(:get, resource_root, params:
|
5
|
+
response = client.request_client.request(:get, resource_root, params:)
|
6
6
|
Responses::NotificationConfigurationListResponse.new(response.body)
|
7
7
|
end
|
8
8
|
end
|
@@ -2,7 +2,7 @@ module CirroIOV2
|
|
2
2
|
module Resources
|
3
3
|
class NotificationLayout < Base
|
4
4
|
def list(params = nil)
|
5
|
-
response = client.request_client.request(:get, resource_root, params:
|
5
|
+
response = client.request_client.request(:get, resource_root, params:)
|
6
6
|
Responses::NotificationLayoutListResponse.new(response.body)
|
7
7
|
end
|
8
8
|
|
@@ -2,7 +2,7 @@ module CirroIOV2
|
|
2
2
|
module Resources
|
3
3
|
class NotificationTemplate < Base
|
4
4
|
def list(params = nil)
|
5
|
-
response = client.request_client.request(:get, resource_root, params:
|
5
|
+
response = client.request_client.request(:get, resource_root, params:)
|
6
6
|
Responses::NotificationTemplateListResponse.new(response.body)
|
7
7
|
end
|
8
8
|
|
@@ -16,7 +16,7 @@ module CirroIOV2
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def list(params = nil)
|
19
|
-
response = client.request_client.request(:get, resource_root, params:
|
19
|
+
response = client.request_client.request(:get, resource_root, params:)
|
20
20
|
Responses::NotificationTopicListResponse.new(response.body)
|
21
21
|
end
|
22
22
|
|
@@ -6,7 +6,7 @@ module CirroIOV2
|
|
6
6
|
end
|
7
7
|
|
8
8
|
def list(params = nil)
|
9
|
-
response = client.request_client.request(:get, resource_root, params:
|
9
|
+
response = client.request_client.request(:get, resource_root, params:)
|
10
10
|
Responses::NotificationTopicPreferenceListResponse.new(response.body)
|
11
11
|
end
|
12
12
|
end
|
@@ -2,7 +2,7 @@ module CirroIOV2
|
|
2
2
|
module Resources
|
3
3
|
class Payout < Base
|
4
4
|
def list(params = nil)
|
5
|
-
response = client.request_client.request(:get, resource_root, params:
|
5
|
+
response = client.request_client.request(:get, resource_root, params:)
|
6
6
|
Responses::PayoutListResponse.new(response.body)
|
7
7
|
end
|
8
8
|
|
@@ -25,6 +25,11 @@ module CirroIOV2
|
|
25
25
|
response = client.request_client.request(:post, "#{resource_root}/#{id}/worker", body: params)
|
26
26
|
CirroIOV2::Responses::UserResponse.new(response.body)
|
27
27
|
end
|
28
|
+
|
29
|
+
def invitation_attempt(id, params)
|
30
|
+
response = client.request_client.request(:post, "#{resource_root}/#{id}/invitation_attempt", body: params)
|
31
|
+
CirroIOV2::Responses::UserInvitationAttemptResponse.new(response.body)
|
32
|
+
end
|
28
33
|
end
|
29
34
|
end
|
30
35
|
end
|
@@ -37,6 +37,16 @@ module CirroIOV2
|
|
37
37
|
include Base
|
38
38
|
end
|
39
39
|
|
40
|
+
UserInvitationAttemptResponse = Struct.new(:id,
|
41
|
+
:object,
|
42
|
+
:payload,
|
43
|
+
:gig_ids,
|
44
|
+
:app_worker_id,
|
45
|
+
:created_at,
|
46
|
+
keyword_init: true) do
|
47
|
+
include Base
|
48
|
+
end
|
49
|
+
|
40
50
|
UserNotificationPreferenceResponse = Struct.new(:id, :object, :locale, :topics, keyword_init: true) do
|
41
51
|
self::NESTED_RESPONSES = { topics: :NotificationTopicPreferenceListResponse }.freeze
|
42
52
|
include Base
|
@@ -68,7 +78,10 @@ module CirroIOV2
|
|
68
78
|
:seats_min,
|
69
79
|
:seats_max,
|
70
80
|
:invitation_mode,
|
81
|
+
:invitation_multiplier,
|
82
|
+
:invitation_frequency,
|
71
83
|
:filter_query,
|
84
|
+
:sort_query,
|
72
85
|
:tasks,
|
73
86
|
:notification_payload,
|
74
87
|
:invitation_notification_topic,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cirro-ruby-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.6.
|
4
|
+
version: 2.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cirro Dev Team
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-04-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -168,7 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
168
168
|
- !ruby/object:Gem::Version
|
169
169
|
version: '0'
|
170
170
|
requirements: []
|
171
|
-
rubygems_version: 3.
|
171
|
+
rubygems_version: 3.4.19
|
172
172
|
signing_key:
|
173
173
|
specification_version: 4
|
174
174
|
summary: Ruby client library for Cirro API
|