dietrb 0.4.0 → 0.4.1

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/LICENSE CHANGED
@@ -1,8 +1,60 @@
1
1
  Copyright (c) <2010> Eloy Duran, <eloy.de.enige@gmail.com>
2
2
 
3
- Portions Copyright (c) 2006-2010 Ben Bleything (history utils)
3
+ Portions Copyright (c) 2006-2010 Ben Bleything <ben@bleything.net> (history utils)
4
4
  Portions Copyright (c) 2006-2010 Paul Duncan <pabs@pablotron.org> (Wirble)
5
5
  Portions Copyright (c) 2009-2010 Jens Wille <jens.wille@gmail.com> (Wirble)
6
6
  Portions Copyright (c) 2006-2010 Giles Bowkett (light background color scheme)
7
7
 
8
- This software is available under the Ruby license.
8
+ This software is available under the Ruby license:
9
+
10
+ ===============================================================================
11
+
12
+ You can redistribute it and/or modify it under either the terms of the GPL, or
13
+ the conditions below:
14
+
15
+ 1. You may make and give away verbatim copies of the source form of the
16
+ software without restriction, provided that you duplicate all of the
17
+ original copyright notices and associated disclaimers.
18
+
19
+ 2. You may modify your copy of the software in any way, provided that
20
+ you do at least ONE of the following:
21
+
22
+ a) place your modifications in the Public Domain or otherwise make them
23
+ Freely Available, such as by posting said modifications to Usenet or
24
+ an equivalent medium, or by allowing the author to include your
25
+ modifications in the software.
26
+
27
+ b) use the modified software only within your corporation or
28
+ organization.
29
+
30
+ c) rename any non-standard executables so the names do not conflict with
31
+ standard executables, which must also be provided.
32
+
33
+ d) make other distribution arrangements with the author.
34
+
35
+ 3. You may distribute the software in object code or executable form,
36
+ provided that you do at least ONE of the following:
37
+
38
+ a) distribute the executables and library files of the software,
39
+ together with instructions (in the manual page or equivalent) on
40
+ where to get the original distribution.
41
+
42
+ b) accompany the distribution with the machine-readable source of the
43
+ software.
44
+
45
+ c) give non-standard executables non-standard names, with instructions
46
+ on where to get the original software distribution.
47
+
48
+ d) make other distribution arrangements with the author.
49
+
50
+ 4. You may modify and include the part of the software into any other
51
+ software (possibly commercial).
52
+
53
+ 5. The scripts and library files supplied as input to or produced as output
54
+ from the software do not automatically fall under the copyright of the
55
+ software, but belong to whomever generated them, and may be sold
56
+ commercially, and may be aggregated with this software.
57
+
58
+ 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
59
+ WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
60
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
data/Rakefile CHANGED
@@ -16,6 +16,20 @@ task :run do
16
16
  sh "ruby19 -Ilib ./bin/dietrb -r irb/ext/completion -r irb/ext/colorize -r pp"
17
17
  end
18
18
 
19
+ desc "AOT compile for MacRuby"
20
+ task :macruby_compile do
21
+ FileList["lib/**/*.rb"].each do |source|
22
+ sh "macrubyc --arch i386 --arch x86_64 -C '#{source}' -o '#{source}o'"
23
+ end
24
+ end
25
+
26
+ desc "Clean MacRuby binaries"
27
+ task :clean do
28
+ FileList["lib/**/*.rbo"].each do |bin|
29
+ rm bin
30
+ end
31
+ end
32
+
19
33
  begin
20
34
  require 'jeweler'
21
35
  Jeweler::Tasks.new do |gemspec|
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.0
1
+ 0.4.1
data/dietrb.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{dietrb}
8
- s.version = "0.4.0"
8
+ s.version = "0.4.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Eloy Duran"]
12
- s.date = %q{2010-04-18}
12
+ s.date = %q{2010-04-19}
13
13
  s.default_executable = %q{dietrb}
14
14
  s.description = %q{IRB on a diet, for MacRuby / Ruby 1.9}
15
15
  s.email = %q{eloy.de.enige@gmail.com}
@@ -48,7 +48,7 @@ Gem::Specification.new do |s|
48
48
  s.rdoc_options = ["--charset=UTF-8"]
49
49
  s.require_paths = ["lib"]
50
50
  s.required_ruby_version = Gem::Requirement.new("~> 1.9")
51
- s.rubygems_version = %q{1.3.5}
51
+ s.rubygems_version = %q{1.3.6}
52
52
  s.summary = %q{IRB on a diet, for MacRuby / Ruby 1.9}
53
53
  s.test_files = [
54
54
  "spec/colorize_spec.rb",
@@ -20,6 +20,7 @@ module IRB
20
20
  :on_tstring_end => :close_string,
21
21
 
22
22
  :on_int => :number,
23
+ :on_float => :number,
23
24
  :on_kw => :keyword,
24
25
  :on_const => :constant,
25
26
  :class => :constant # Wirble compat
@@ -26,7 +26,8 @@ module IRB
26
26
  end
27
27
 
28
28
  def to_a
29
- File.read(self.class.file).split("\n")
29
+ file = self.class.file
30
+ File.exist?(file) ? File.read(file).split("\n") : []
30
31
  end
31
32
 
32
33
  def clear!
@@ -13,6 +13,11 @@ describe "IRB::ColoredFormatter" do
13
13
  @formatter.result(Hash).should == "=> \e[1;32mHash\e[0;0m"
14
14
  end
15
15
 
16
+ it "colorizes a numeric" do
17
+ @formatter.result(1).should == "=> \e[0;36m1\e[0;0m"
18
+ @formatter.result(1.2).should == "=> \e[0;36m1.2\e[0;0m"
19
+ end
20
+
16
21
  # Not Wirble compliant
17
22
  it "colorizes a Range" do
18
23
  # @formatter.result(1..3).should == "=> \e[0;36m1\e[0;0m\e[0;31m..\e[0;0m\e[0;36m3\e[0;0m"
data/spec/history_spec.rb CHANGED
@@ -34,6 +34,18 @@ describe "IRB::History" do
34
34
  @history.to_a.should == ["puts :ok", "foo(x)"]
35
35
  end
36
36
 
37
+ it "returns an empty array if the history file doesn't exist yet and create it once input is added" do
38
+ @file.close
39
+ FileUtils.rm(@file.path)
40
+
41
+ @history.to_a.should == []
42
+ File.should.not.exist @file.path
43
+
44
+ @history.input "puts :ok"
45
+ File.should.exist @file.path
46
+ @history.to_a.should == ["puts :ok"]
47
+ end
48
+
37
49
  it "stores the contents of the history file in Readline::HISTORY once" do
38
50
  Readline::HISTORY.clear
39
51
 
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dietrb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 4
8
+ - 1
9
+ version: 0.4.1
5
10
  platform: ruby
6
11
  authors:
7
12
  - Eloy Duran
@@ -9,7 +14,7 @@ autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
16
 
12
- date: 2010-04-18 00:00:00 +02:00
17
+ date: 2010-04-19 00:00:00 +02:00
13
18
  default_executable: dietrb
14
19
  dependencies: []
15
20
 
@@ -60,18 +65,21 @@ required_ruby_version: !ruby/object:Gem::Requirement
60
65
  requirements:
61
66
  - - ~>
62
67
  - !ruby/object:Gem::Version
68
+ segments:
69
+ - 1
70
+ - 9
63
71
  version: "1.9"
64
- version:
65
72
  required_rubygems_version: !ruby/object:Gem::Requirement
66
73
  requirements:
67
74
  - - ">="
68
75
  - !ruby/object:Gem::Version
76
+ segments:
77
+ - 0
69
78
  version: "0"
70
- version:
71
79
  requirements: []
72
80
 
73
81
  rubyforge_project:
74
- rubygems_version: 1.3.5
82
+ rubygems_version: 1.3.6
75
83
  signing_key:
76
84
  specification_version: 3
77
85
  summary: IRB on a diet, for MacRuby / Ruby 1.9