[macruby-changes] [4611] DietRB/trunk

source_changes at macosforge.org source_changes at macosforge.org
Fri Oct 8 03:48:24 PDT 2010


Revision: 4611
          http://trac.macosforge.org/projects/ruby/changeset/4611
Author:   eloy.de.enige at gmail.com
Date:     2010-10-08 03:48:23 -0700 (Fri, 08 Oct 2010)
Log Message:
-----------
Prepare for 0.1.0 release.

From: Eloy Duran <eloy.de.enige at gmail.com>

Modified Paths:
--------------
    DietRB/trunk/Rakefile

Added Paths:
-----------
    DietRB/trunk/VERSION

Removed Paths:
-------------
    DietRB/trunk/napkin.rb

Modified: DietRB/trunk/Rakefile
===================================================================
--- DietRB/trunk/Rakefile	2010-10-08 10:48:15 UTC (rev 4610)
+++ DietRB/trunk/Rakefile	2010-10-08 10:48:23 UTC (rev 4611)
@@ -8,4 +8,16 @@
 desc "Run specs with Kicker"
 task :kick do
   sh "kicker -e 'rake spec' lib spec"
+end
+
+begin
+  require 'jeweler'
+  Jeweler::Tasks.new do |gemspec|
+    gemspec.name = "dietrb"
+    gemspec.summary = gemspec.description = "IRB on a diet, for MacRuby / Ruby 1.9"
+    gemspec.email = "eloy.de.enige at gmail.com"
+    gemspec.homepage = "http://github.com/alloy/dietrb"
+    gemspec.authors = ["Eloy Duran"]
+  end
+rescue LoadError
 end
\ No newline at end of file

Added: DietRB/trunk/VERSION
===================================================================
--- DietRB/trunk/VERSION	                        (rev 0)
+++ DietRB/trunk/VERSION	2010-10-08 10:48:23 UTC (rev 4611)
@@ -0,0 +1 @@
+0.1.0
\ No newline at end of file

Deleted: DietRB/trunk/napkin.rb
===================================================================
--- DietRB/trunk/napkin.rb	2010-10-08 10:48:15 UTC (rev 4610)
+++ DietRB/trunk/napkin.rb	2010-10-08 10:48:23 UTC (rev 4611)
@@ -1,68 +0,0 @@
-#!/usr/bin/env macruby
-
-require 'readline'
-require 'ripper'
-
-module IRB
-  class << self
-    def start
-      Context.new.run
-    end
-  end
-  
-  class Context
-    def initialize
-      @line = 1
-      @source = ""
-    end
-    
-    def run
-      while @source << gets
-        exit if @source == "quit\n"
-        if valid_code_block?
-          eval
-          @source = ""
-        end
-      end
-    end
-    
-    def gets
-      result = "#{Readline.readline(prompt, true)}\n"
-      @line += 1
-      result
-    end
-    
-    def eval
-      print_result(super(@source, TOPLEVEL_BINDING))
-    rescue Object => e
-      print_exception(e)
-    end
-    
-    # we need to print the level, which means we need to do actual parsing
-    #
-    # eg:
-    #
-    #   irb(main):001:0> class A
-    #   irb(main):002:1> def foo
-    #   irb(main):003:2> p :ok
-    #   irb(main):004:2> end
-    #   irb(main):005:1> end
-    def prompt
-      "irb(main):00#{@line}:0> "
-    end
-    
-    def print_result(output)
-      puts "=> #{output.inspect}"
-    end
-    
-    def print_exception(e)
-      puts "#{e.class.name}: #{e.message}\n\t#{e.backtrace.join("\n\t")}"
-    end
-    
-    def valid_code_block?
-      !!Ripper::SexpBuilder.new(@source).parse
-    end
-  end
-end
-
-IRB.start
\ No newline at end of file
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20101008/1ddeec5a/attachment-0001.html>


More information about the macruby-changes mailing list