File tree Expand file tree Collapse file tree 7 files changed +27
-27
lines changed Expand file tree Collapse file tree 7 files changed +27
-27
lines changed Original file line number Diff line number Diff line change 1
1
PATH
2
2
remote: .
3
3
specs:
4
- cirro-ruby-client (1.2.1 )
4
+ cirro-ruby-client (1.3.0 )
5
+ faraday (< 1.2.0 )
5
6
faraday_middleware
6
- json_api_client
7
+ json_api_client ( >= 1.10.0 )
7
8
jwt
8
9
9
10
GEM
10
11
remote: https://rubygems.org/
11
12
specs:
12
- activemodel (6.0.3.4 )
13
- activesupport (= 6.0.3.4 )
14
- activesupport (6.0.3.4 )
13
+ activemodel (6.1.1 )
14
+ activesupport (= 6.1.1 )
15
+ activesupport (6.1.1 )
15
16
concurrent-ruby (~> 1.0 , >= 1.0.2 )
16
- i18n (>= 0.7 , < 2 )
17
- minitest (~> 5.1 )
18
- tzinfo (~> 1.1 )
19
- zeitwerk (~> 2.2 , >= 2.2.2 )
17
+ i18n (>= 1.6 , < 2 )
18
+ minitest (>= 5.1 )
19
+ tzinfo (~> 2.0 )
20
+ zeitwerk (~> 2.3 )
20
21
addressable (2.7.0 )
21
22
public_suffix (>= 2.0.2 , < 5.0 )
22
23
ast (2.4.1 )
43
44
rack (>= 0.2 )
44
45
jwt (2.2.2 )
45
46
method_source (1.0.0 )
46
- minitest (5.14.2 )
47
+ minitest (5.14.3 )
47
48
multipart-post (2.1.1 )
48
49
parallel (1.19.2 )
49
50
parser (2.7.2.0 )
84
85
rubocop-rspec (1.43.2 )
85
86
rubocop (~> 0.87 )
86
87
ruby-progressbar (1.10.1 )
87
- ruby2_keywords (0.0.2 )
88
- thread_safe (0.3.6 )
89
- tzinfo (1.2.8 )
90
- thread_safe (~> 0.1 )
88
+ ruby2_keywords (0.0.4 )
89
+ tzinfo (2.0.4 )
90
+ concurrent-ruby (~> 1.0 )
91
91
unicode-display_width (1.7.0 )
92
92
webmock (3.9.1 )
93
93
addressable (>= 2.3.6 )
Original file line number Diff line number Diff line change 8
8
require 'cirro_io/client/gig_invitation'
9
9
require 'cirro_io/client/app_user'
10
10
require 'cirro_io/client/app_worker'
11
- require 'cirro_io/client/worker_invitation_filter '
11
+ require 'cirro_io/client/worker_filter '
12
12
require 'cirro_io/client/gig_task'
13
13
require 'cirro_io/client/gig_result'
14
14
require 'cirro_io/client/gig_time_activity'
Original file line number Diff line number Diff line change 1
1
module CirroIO
2
2
module Client
3
3
class Gig < Base
4
- has_one :worker_invitation_filter
4
+ has_one :worker_filter
5
5
has_many :gig_tasks
6
6
has_many :gig_results
7
7
has_many :gig_time_activities
8
8
9
9
# rubocop:disable Metrics/AbcSize
10
- def bulk_create_with ( worker_invitation_filter , gig_tasks )
10
+ def bulk_create_with ( worker_filter , gig_tasks )
11
11
payload = { data : { attributes : attributes , relationships : { } } }
12
12
payload [ :data ] [ :relationships ] [ :gig_tasks ] = gig_tasks . map ( &:attributes )
13
- payload [ :data ] [ :relationships ] [ :worker_invitation_filter ] = worker_invitation_filter . attributes
13
+ payload [ :data ] [ :relationships ] [ :worker_filter ] = worker_filter . attributes
14
14
15
15
response = self . class . custom_post ( 'bulk/gigs' , format_to_dashed_keys ( payload ) )
16
16
Original file line number Diff line number Diff line change 1
1
# rubocop:disable Style/MutableConstant
2
2
module CirroIO
3
3
module Client
4
- VERSION = '1.2.3 '
4
+ VERSION = '1.3.0 '
5
5
end
6
6
end
7
7
# rubocop:enable Style/MutableConstant
Original file line number Diff line number Diff line change 1
1
module CirroIO
2
2
module Client
3
- class WorkerInvitationFilter < Base
3
+ class WorkerFilter < Base
4
4
end
5
5
end
6
6
end
Original file line number Diff line number Diff line change 13
13
archive_at : 1 . month . from_now )
14
14
end
15
15
16
- let ( :worker_invitation_filter ) { CirroIO ::Client ::WorkerInvitationFilter . new ( filter_query : '{}' ) }
16
+ let ( :worker_filter ) { CirroIO ::Client ::WorkerFilter . new ( filter_query : '{}' ) }
17
17
let ( :gig_task1 ) { CirroIO ::Client ::GigTask . new ( title : Faker ::Hipster . sentence , base_price : 5 ) }
18
18
let ( :gig_task2 ) { CirroIO ::Client ::GigTask . new ( title : Faker ::Hipster . sentence , base_price : 10 ) }
19
19
20
20
it 'bulk create a gig with gig tasks and filter query' do
21
21
stub_request ( :post , "#{ test_site } /v1/bulk/gigs" )
22
22
. to_return ( body : File . read ( './spec/fixtures/gig_with_filter_and_gig_tasks.json' ) , headers : { 'Content-Type' => 'application/json' } )
23
23
24
- created_gig = gig . bulk_create_with ( worker_invitation_filter , [ gig_task1 , gig_task2 ] )
24
+ created_gig = gig . bulk_create_with ( worker_filter , [ gig_task1 , gig_task2 ] )
25
25
26
26
expect ( created_gig ) . to be_valid
27
27
expect ( created_gig . id ) . to eq ( '15' )
28
- expect ( created_gig . worker_invitation_filter . id ) . to eq ( '20' )
28
+ expect ( created_gig . worker_filter . id ) . to eq ( '20' )
29
29
expect ( created_gig . gig_tasks . map ( &:id ) ) . to eq ( %w[ 24 25 ] )
30
30
end
31
31
end
Original file line number Diff line number Diff line change 14
14
"archive-at" : " 2020-12-30T10:27:18.000Z"
15
15
},
16
16
"relationships" : {
17
- "worker-invitation- filter" : {
17
+ "worker-filter" : {
18
18
"data" : {
19
- "type" : " worker-invitation- filters" ,
19
+ "type" : " worker-filters" ,
20
20
"id" : " 20"
21
21
}
22
22
},
41
41
"included" : [
42
42
{
43
43
"id" : " 20" ,
44
- "type" : " worker-invitation- filters" ,
44
+ "type" : " worker-filters" ,
45
45
"links" : {
46
- "self" : " /api/v1/worker-invitation- filters/20"
46
+ "self" : " /api/v1/worker-filters/20"
47
47
},
48
48
"attributes" : {
49
49
"filter-query" : " {}"
You can’t perform that action at this time.
0 commit comments