jacs 0.4.2 → 0.5

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.
Files changed (2) hide show
  1. data/lib/actionjabber.rb +5 -1
  2. metadata +2 -3
@@ -31,7 +31,7 @@ module ActionJabber
31
31
  @debug = debug
32
32
  end
33
33
  # Initiates the loop to check for new messages.
34
- def run!
34
+ def run!(frequency = 0)
35
35
  while @jabber.connected?
36
36
  @jabber.received_messages do |message|
37
37
  start = Time.now
@@ -64,6 +64,10 @@ module ActionJabber
64
64
  end
65
65
  #puts "\n"
66
66
  end
67
+ if frequency > 0
68
+ # Keep it from hogging up CPU cycles.
69
+ sleep frequency
70
+ end
67
71
  end
68
72
  end
69
73
  # Handles actually sending response data to the client.
metadata CHANGED
@@ -4,9 +4,8 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 4
8
- - 2
9
- version: 0.4.2
7
+ - 5
8
+ version: "0.5"
10
9
  platform: ruby
11
10
  authors:
12
11
  - Dirk Gadsden