cuboid 0.2.6 → 0.2.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 16117ddd8bcfeb196beb164a425a2a42643a121ba8b511f5f78ed193b177c858
4
- data.tar.gz: 9553e538510f8b9f1262c7d11cac98dffca53e1989d0d2dabc56e201bd555a63
3
+ metadata.gz: b237755aebb4be309f39a1f9d313a87dc51a289b1b03bc79c039ab8c3e8f23f2
4
+ data.tar.gz: 3b3c5ce7a0437d4f9cfc98f1e358829189f64a3e7b9e238cbc5ca77ff40ce6af
5
5
  SHA512:
6
- metadata.gz: b3af03cb62af997478c66ae905e43c1a10efc7971833dd12cd8d46e964cdfa7469578d8ed86c02117448a91beff5020a1418872e6d9a117638289c77969331aa
7
- data.tar.gz: c16194307cd888377f2a9030de4c7540d1c15bd5458e696f11c3b417f38ca08ed0c956eb6e41d328d4afa5b10bd3652e2e2b6d30990d7136924c6d14e2e82598
6
+ metadata.gz: f8a3160ef72009ff4646879464b45212d74f54f93e3fcaa5adf70b2d824a4a31a5dadc77eab05a060538058c4273a9bfa3eaf58c36dc3a685ca7b500e637cbd4
7
+ data.tar.gz: e2bdf10828b0f11ddc35f33b4b5b64b856b70c2759004f23c380cf58a5e3782191c0440871825e8951895af0c02a6777d776ed210facf6add05434b9c05e59a1
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ # 0.2.8
2
+
3
+ * `File.exists?` => `File.exist?`
4
+ * `Dir.exists?` => `Dir.exist?`
5
+
6
+ # 0.2.7
7
+
8
+ * `RPC::Server::Agent::Node#unplug` -- Use Raktr iterator.
9
+
1
10
  # 0.2.6
2
11
 
3
12
  * `Application.serializer` now defaults to JSON for REST API compatibility.
@@ -88,7 +88,7 @@ module InstanceHelpers
88
88
  end
89
89
  end
90
90
 
91
- def exists?( id )
91
+ def exist?( id )
92
92
  instances.include? id
93
93
  end
94
94
 
@@ -76,7 +76,7 @@ class Server < Sinatra::Base
76
76
 
77
77
  id = params[:instance]
78
78
 
79
- return if exists? id
79
+ return if exist? id
80
80
 
81
81
  halt 404, json( "Scan not found for id: #{h id}." )
82
82
  end
@@ -76,8 +76,8 @@ class Server::Agent::Node
76
76
  end
77
77
 
78
78
  def unplug
79
- @peers.each do |peer|
80
- connect_to_peer( peer ).remove_peer( @url ) {}
79
+ Raktr.global.create_iterator( @peers, 20 ).each do |peer, iterator|
80
+ connect_to_peer( peer ).remove_peer( @url ) { iterator.next }
81
81
  end
82
82
 
83
83
  @peers.clear
@@ -41,7 +41,7 @@ class Base
41
41
  end
42
42
 
43
43
  def disk_space_for( pid )
44
- return 0 if !Dir.exists?( Options.paths.tmp_dir_for( pid ) )
44
+ return 0 if !Dir.exist?( Options.paths.tmp_dir_for( pid ) )
45
45
 
46
46
  IO.read( disk_space_file_for( pid ) ).to_i
47
47
  end
data/lib/version CHANGED
@@ -1 +1 @@
1
- 0.2.6
1
+ 0.2.8
@@ -20,7 +20,7 @@ describe Cuboid::OptionGroups::Paths do
20
20
 
21
21
  describe "##{method}" do
22
22
  it 'points to an existing directory' do
23
- expect(File.exists?( subject.send method )).to be_truthy
23
+ expect(File.exist?( subject.send method )).to be_truthy
24
24
  end
25
25
  end
26
26
 
@@ -959,7 +959,7 @@ describe Cuboid::Rest::Server do
959
959
 
960
960
  get url
961
961
  expect(response_data.size).to be 1
962
- expect(File.exists? response_data[@id]).to be true
962
+ expect(File.exist? response_data[@id]).to be true
963
963
  end
964
964
  end
965
965
 
@@ -49,7 +49,7 @@ describe 'Cuboid::RPC::Server::Instance' do
49
49
  sleep 1 while !subject.suspended?
50
50
  end
51
51
 
52
- expect(File.exists?( subject.snapshot_path )).to be_truthy
52
+ expect(File.exist?( subject.snapshot_path )).to be_truthy
53
53
  end
54
54
  end
55
55
 
@@ -132,7 +132,7 @@ describe Cuboid::Support::Database::Queue do
132
132
 
133
133
  expect(subject.disk.size).to eq(2)
134
134
  subject.disk.each do |path|
135
- expect(File.exists?( path )).to be_truthy
135
+ expect(File.exist?( path )).to be_truthy
136
136
  end
137
137
  end
138
138
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cuboid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tasos Laskos
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-26 00:00:00.000000000 Z
11
+ date: 2024-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: awesome_print
@@ -469,103 +469,103 @@ required_rubygems_version: !ruby/object:Gem::Requirement
469
469
  - !ruby/object:Gem::Version
470
470
  version: '0'
471
471
  requirements: []
472
- rubygems_version: 3.4.13
472
+ rubygems_version: 3.4.22
473
473
  signing_key:
474
474
  specification_version: 4
475
475
  summary: An application-centric, decentralised and distributed computing solution.
476
476
  test_files:
477
- - spec/spec_helper.rb
478
- - spec/support/snapshots/placeholder
479
- - spec/support/helpers/misc.rb
480
- - spec/support/helpers/framework.rb
481
- - spec/support/helpers/matchers.rb
482
- - spec/support/helpers/requires.rb
483
- - spec/support/helpers/resets.rb
484
- - spec/support/helpers/request_helpers.rb
485
- - spec/support/helpers/web_server.rb
486
- - spec/support/helpers/paths.rb
487
- - spec/support/fixtures/services/echo.rb
488
- - spec/support/fixtures/mock_app/test_service.rb
489
- - spec/support/fixtures/executables/node.rb
490
- - spec/support/fixtures/empty/placeholder
491
- - spec/support/fixtures/mock_app.rb
492
- - spec/support/shared/application.rb
493
- - spec/support/shared/component/options/base.rb
494
- - spec/support/shared/component.rb
495
- - spec/support/shared/support/filter.rb
496
- - spec/support/shared/support/cache.rb
497
- - spec/support/shared/system/platforms/base.rb
498
- - spec/support/shared/system/platforms/mixins/unix.rb
499
- - spec/support/shared/option_group.rb
500
- - spec/support/factories/scan_report.rb
501
- - spec/support/factories/placeholder
502
- - spec/support/lib/web_server_dispatcher.rb
503
- - spec/support/lib/web_server_client.rb
504
- - spec/support/lib/factory.rb
505
- - spec/support/lib/web_server_manager.rb
506
- - spec/support/logs/placeholder
507
- - spec/support/reports/placeholder
508
- - spec/support/pems/cacert.pem
509
- - spec/support/pems/server/cert.pem
510
- - spec/support/pems/server/key.pem
511
- - spec/support/pems/client/foo-key.pem
512
- - spec/support/pems/client/foo-cert.pem
513
- - spec/support/pems/client/cert.pem
514
- - spec/support/pems/client/key.pem
515
- - spec/cuboid/ruby/array_spec.rb
516
- - spec/cuboid/ruby/hash_spec.rb
517
- - spec/cuboid/ruby/object_spec.rb
518
- - spec/cuboid/snapshot_spec.rb
519
- - spec/cuboid/rest/server_spec.rb
520
- - spec/cuboid/data_spec.rb
477
+ - spec/cuboid/application/parts/data_spec.rb
478
+ - spec/cuboid/application/parts/report_spec.rb
479
+ - spec/cuboid/application/parts/state_spec.rb
480
+ - spec/cuboid/application/runtime_spec.rb
481
+ - spec/cuboid/application_spec.rb
521
482
  - spec/cuboid/data/application_spec.rb
522
- - spec/cuboid/state_spec.rb
483
+ - spec/cuboid/data_spec.rb
484
+ - spec/cuboid/error_spec.rb
485
+ - spec/cuboid/option_groups/datastore_spec.rb
486
+ - spec/cuboid/option_groups/dispatcher_spec.rb
487
+ - spec/cuboid/option_groups/output_spec.rb
488
+ - spec/cuboid/option_groups/paths_spec.rb
489
+ - spec/cuboid/option_groups/report_spec.rb
490
+ - spec/cuboid/option_groups/rpc_spec.rb
491
+ - spec/cuboid/option_groups/snapshot_spec.rb
492
+ - spec/cuboid/option_groups/system.rb
523
493
  - spec/cuboid/options_spec.rb
524
494
  - spec/cuboid/report_spec.rb
525
- - spec/cuboid/state/options_spec.rb
526
- - spec/cuboid/state/application_spec.rb
527
- - spec/cuboid/application_spec.rb
528
- - spec/cuboid/rpc/server/output_spec.rb
495
+ - spec/cuboid/rest/server_spec.rb
496
+ - spec/cuboid/rpc/client/base_spec.rb
497
+ - spec/cuboid/rpc/client/dispatcher_spec.rb
498
+ - spec/cuboid/rpc/client/instance_spec.rb
499
+ - spec/cuboid/rpc/server/active_options_spec.rb
529
500
  - spec/cuboid/rpc/server/agent/node_spec.rb
530
501
  - spec/cuboid/rpc/server/agent/service_spec.rb
531
502
  - spec/cuboid/rpc/server/agent_spec.rb
503
+ - spec/cuboid/rpc/server/base_spec.rb
532
504
  - spec/cuboid/rpc/server/instance_spec.rb
505
+ - spec/cuboid/rpc/server/output_spec.rb
533
506
  - spec/cuboid/rpc/server/scheduler_spec.rb
534
- - spec/cuboid/rpc/server/active_options_spec.rb
535
- - spec/cuboid/rpc/server/base_spec.rb
536
- - spec/cuboid/rpc/client/instance_spec.rb
537
- - spec/cuboid/rpc/client/dispatcher_spec.rb
538
- - spec/cuboid/rpc/client/base_spec.rb
539
- - spec/cuboid/error_spec.rb
540
- - spec/cuboid/utilities_spec.rb
541
- - spec/cuboid/application/parts/data_spec.rb
542
- - spec/cuboid/application/parts/state_spec.rb
543
- - spec/cuboid/application/parts/report_spec.rb
544
- - spec/cuboid/application/runtime_spec.rb
545
- - spec/cuboid/support/cache/random_replacement_spec.rb
507
+ - spec/cuboid/ruby/array_spec.rb
508
+ - spec/cuboid/ruby/hash_spec.rb
509
+ - spec/cuboid/ruby/object_spec.rb
510
+ - spec/cuboid/snapshot_spec.rb
511
+ - spec/cuboid/state/application_spec.rb
512
+ - spec/cuboid/state/options_spec.rb
513
+ - spec/cuboid/state_spec.rb
514
+ - spec/cuboid/support/buffer/autoflush_spec.rb
515
+ - spec/cuboid/support/buffer/base_spec.rb
546
516
  - spec/cuboid/support/cache/least_cost_replacement_spec.rb
547
517
  - spec/cuboid/support/cache/least_recently_pushed_spec.rb
548
- - spec/cuboid/support/cache/preference_spec.rb
549
518
  - spec/cuboid/support/cache/least_recently_used_spec.rb
550
- - spec/cuboid/support/glob_spec.rb
551
- - spec/cuboid/support/database/scheduler_spec.rb
552
- - spec/cuboid/support/database/hash_spec.rb
519
+ - spec/cuboid/support/cache/preference_spec.rb
520
+ - spec/cuboid/support/cache/random_replacement_spec.rb
521
+ - spec/cuboid/support/crypto/rsa_aes_cbc_spec.rb
553
522
  - spec/cuboid/support/database/categorized_queue_spec.rb
554
- - spec/cuboid/support/mixins/observable_spec.rb
555
- - spec/cuboid/support/buffer/autoflush_spec.rb
556
- - spec/cuboid/support/buffer/base_spec.rb
523
+ - spec/cuboid/support/database/hash_spec.rb
524
+ - spec/cuboid/support/database/scheduler_spec.rb
557
525
  - spec/cuboid/support/filter/set_spec.rb
558
- - spec/cuboid/support/crypto/rsa_aes_cbc_spec.rb
559
- - spec/cuboid/system_spec.rb
560
- - spec/cuboid/option_groups/output_spec.rb
561
- - spec/cuboid/option_groups/snapshot_spec.rb
562
- - spec/cuboid/option_groups/datastore_spec.rb
563
- - spec/cuboid/option_groups/system.rb
564
- - spec/cuboid/option_groups/report_spec.rb
565
- - spec/cuboid/option_groups/rpc_spec.rb
566
- - spec/cuboid/option_groups/dispatcher_spec.rb
567
- - spec/cuboid/option_groups/paths_spec.rb
568
- - spec/cuboid/system/platforms/osx_spec.rb
526
+ - spec/cuboid/support/glob_spec.rb
527
+ - spec/cuboid/support/mixins/observable_spec.rb
569
528
  - spec/cuboid/system/platforms/linux_spec.rb
529
+ - spec/cuboid/system/platforms/osx_spec.rb
570
530
  - spec/cuboid/system/platforms/windows_spec.rb
571
531
  - spec/cuboid/system/slots_spec.rb
532
+ - spec/cuboid/system_spec.rb
533
+ - spec/cuboid/utilities_spec.rb
534
+ - spec/spec_helper.rb
535
+ - spec/support/factories/placeholder
536
+ - spec/support/factories/scan_report.rb
537
+ - spec/support/fixtures/empty/placeholder
538
+ - spec/support/fixtures/executables/node.rb
539
+ - spec/support/fixtures/mock_app/test_service.rb
540
+ - spec/support/fixtures/mock_app.rb
541
+ - spec/support/fixtures/services/echo.rb
542
+ - spec/support/helpers/framework.rb
543
+ - spec/support/helpers/matchers.rb
544
+ - spec/support/helpers/misc.rb
545
+ - spec/support/helpers/paths.rb
546
+ - spec/support/helpers/request_helpers.rb
547
+ - spec/support/helpers/requires.rb
548
+ - spec/support/helpers/resets.rb
549
+ - spec/support/helpers/web_server.rb
550
+ - spec/support/lib/factory.rb
551
+ - spec/support/lib/web_server_client.rb
552
+ - spec/support/lib/web_server_dispatcher.rb
553
+ - spec/support/lib/web_server_manager.rb
554
+ - spec/support/logs/placeholder
555
+ - spec/support/pems/cacert.pem
556
+ - spec/support/pems/client/cert.pem
557
+ - spec/support/pems/client/foo-cert.pem
558
+ - spec/support/pems/client/foo-key.pem
559
+ - spec/support/pems/client/key.pem
560
+ - spec/support/pems/server/cert.pem
561
+ - spec/support/pems/server/key.pem
562
+ - spec/support/reports/placeholder
563
+ - spec/support/shared/application.rb
564
+ - spec/support/shared/component/options/base.rb
565
+ - spec/support/shared/component.rb
566
+ - spec/support/shared/option_group.rb
567
+ - spec/support/shared/support/cache.rb
568
+ - spec/support/shared/support/filter.rb
569
+ - spec/support/shared/system/platforms/base.rb
570
+ - spec/support/shared/system/platforms/mixins/unix.rb
571
+ - spec/support/snapshots/placeholder