Pulse 1.2.6 → 1.2.8
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.
- data/library/pulse/client.rb +4 -4
- data/library/pulse/enhancements.rb +6 -0
- data/library/pulse/script.rb +3 -1
- data/library/pulse/user.rb +1 -1
- data/library/pulse.rb +1 -1
- metadata +3 -3
data/library/pulse/client.rb
CHANGED
@@ -91,14 +91,14 @@ module Pulse
|
|
91
91
|
end if @callbacks[name]
|
92
92
|
|
93
93
|
|
94
|
-
|
95
|
-
|
94
|
+
@scripts.each do |script|
|
95
|
+
begin
|
96
96
|
if script.respond_to? name
|
97
97
|
script.__send__ name, *args
|
98
98
|
end
|
99
|
+
rescue => exception
|
100
|
+
puts "Script error: #{exception.message} on line #{exception.line + 1} in #{script.path}"
|
99
101
|
end
|
100
|
-
rescue
|
101
|
-
puts "Script error #$!"
|
102
102
|
end
|
103
103
|
end
|
104
104
|
|
data/library/pulse/script.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
module Pulse
|
4
4
|
class Script < Module
|
5
5
|
|
6
|
-
attr_accessor :name, :author, :version
|
6
|
+
attr_accessor :name, :author, :version, :path
|
7
7
|
|
8
8
|
def initialize path, client
|
9
9
|
@path, @client = path, client
|
@@ -37,6 +37,8 @@ module Pulse
|
|
37
37
|
script ? script.cache : nil
|
38
38
|
end
|
39
39
|
|
40
|
+
def script name; @client.scripts.find { |script| script.name == name } end
|
41
|
+
|
40
42
|
def has_cache?
|
41
43
|
File.exists? "#{File.expand_path File.dirname $0}/cache/#@name.yml"
|
42
44
|
end
|
data/library/pulse/user.rb
CHANGED
data/library/pulse.rb
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 2
|
8
|
-
-
|
9
|
-
version: 1.2.
|
8
|
+
- 8
|
9
|
+
version: 1.2.8
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Mikkel Kroman
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: executables
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-11
|
17
|
+
date: 2010-12-11 00:00:00 +01:00
|
18
18
|
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|