Skip to content
Browse files

* Added error toleration for moulds, now a broken mould won't crash J…

…ello

* Shortener now supports dashes in URLs
* Version bump to 4
  • Loading branch information...
1 parent 636b88d commit 758db48a8b9361eb8c422c2b167a961248ad8d9a @ELLIOTTCABLE committed Oct 13, 2008
Showing with 16 additions and 6 deletions.
  1. +1 −0 .manifest
  2. +1 −1 Rakefile.rb
  3. +4 −3 jello.gemspec
  4. +7 −2 lib/jello.rb
  5. +3 −0 moulds/fail.rb
View
1 .manifest
@@ -4,6 +4,7 @@ lib/jello/logger.rb
lib/jello/mould.rb
lib/jello/pasteboard.rb
lib/jello.rb
+moulds/fail.rb
moulds/grabup_fixer.rb
moulds/say.rb
moulds/shortener.rb
View
2 Rakefile.rb
@@ -72,7 +72,7 @@
# release the fix as it's own gem at some point in the near future.
require 'stringray/core_ext/spec/rake/verify_rcov'
RCov::VerifyTask.new(:verify) do |t|
- t.threshold = 65.0
+ t.threshold = 50.0
t.index_html = File.join('meta', 'coverage', 'index.html')
t.require_exact_threshold = false
end
View
7 jello.gemspec
@@ -1,18 +1,18 @@
-# Gem::Specification for Jello-3
+# Gem::Specification for Jello-4
# Originally generated by Echoe
--- !ruby/object:Gem::Specification
name: jello
version: !ruby/object:Gem::Version
- version: "3"
+ version: "4"
platform: ruby
authors:
- elliottcable
autorequire:
bindir: bin
-date: 2008-10-09 00:00:00 -08:00
+date: 2008-10-13 00:00:00 -08:00
default_executable:
dependencies:
- !ruby/object:Gem::Dependency
@@ -87,6 +87,7 @@ files:
- lib/jello/mould.rb
- lib/jello/pasteboard.rb
- lib/jello.rb
+- moulds/fail.rb
- moulds/grabup_fixer.rb
- moulds/say.rb
- moulds/shortener.rb
View
9 lib/jello.rb
@@ -3,7 +3,7 @@
require 'jello/mould'
module Jello
- Version = 3
+ Version = 4
def self.start! options = {}
options = {:verbose => false, :period => 0.5}.merge(options)
@@ -19,7 +19,12 @@ def self.start! options = {}
puts "#{pasteboard.board} received: [#{initial_paste}]" if options[:verbose]
moulds.each do |mould|
- modified = mould.on_paste[paste]
+ modified = begin
+ mould.on_paste[paste]
+ rescue => error
+ puts " !!> #{error}"
+ nil
+ end
paste = modified if modified.is_a?(String)
end
View
3 moulds/fail.rb
@@ -0,0 +1,3 @@
+Jello::Mould.new do |paste|
+ raise 'FAIL'
+end

0 comments on commit 758db48

Please sign in to comment.
Something went wrong with that request. Please try again.