• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

payrollhero / dispatch-rider / #3015

02 Sep 2022 11:22PM UTC coverage: 0.409% (-84.7%) from 85.154%
#3015

push

web-flow
Layout/SpaceInsideStringInterpolation-20220901233630 (#89)

* :police_car: regenerate rubocop todo

* :police_car: Layout/SpaceInsideStringInterpolation

* :police_car: regenerate rubocop todo

Co-authored-by: Rubocop Challenger <rubocop@payrollhero.com>

0 of 1 new or added line in 1 file covered. (0.0%)

1529 existing lines in 63 files now uncovered.

7 of 1711 relevant lines covered (0.41%)

0.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/lib/dispatch-rider/queue_services/file_system.rb
1
# This is a rudementary queue service that uses file system instead of
2
# Aws::SQS or SimpleQueue. It addresses SimpleQueue's inability to be used
3
# by only one application instance while avoiding the cost of setting up Aws::SQS.
4
# This is ideal to be used in development mode between multiple applications.
UNCOV
5
module DispatchRider
×
UNCOV
6
  module QueueServices
×
UNCOV
7
    require "dispatch-rider/queue_services/file_system/queue"
×
UNCOV
8
    require "dispatch-rider/queue_services/file_system/fs_received_message"
×
UNCOV
9
    class FileSystem < Base
×
UNCOV
10
      def assign_storage(attrs)
×
UNCOV
11
        begin
×
UNCOV
12
          path = attrs.fetch(:path)
×
UNCOV
13
          Queue.new(path)
×
14
        rescue IndexError
×
15
          raise RecordInvalid.new(self, ["Path can not be blank"])
×
UNCOV
16
        end
×
UNCOV
17
      end
×
18

UNCOV
19
      def insert(item)
×
UNCOV
20
        queue.add item
×
UNCOV
21
      end
×
22

UNCOV
23
      def raw_head
×
UNCOV
24
        queue.pop
×
UNCOV
25
      end
×
26
      
UNCOV
27
      def received_message_for(raw_item)
×
UNCOV
28
         FsReceivedMessage.new(construct_message_from(raw_item), raw_item, queue)
×
UNCOV
29
      end
×
30

UNCOV
31
      def construct_message_from(item)
×
UNCOV
32
        deserialize(item.read)
×
UNCOV
33
      end
×
34
      
UNCOV
35
      def put_back(item)
×
UNCOV
36
        queue.put_back(item)
×
UNCOV
37
      end
×
38

UNCOV
39
      def delete(item)
×
UNCOV
40
        queue.remove item
×
UNCOV
41
      end
×
42

UNCOV
43
      def size
×
UNCOV
44
        queue.size
×
UNCOV
45
      end
×
UNCOV
46
    end
×
UNCOV
47
  end
×
UNCOV
48
end
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc