brice 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
data/README CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  == VERSION
4
4
 
5
- This documentation refers to brice version 0.2.4
5
+ This documentation refers to brice version 0.2.5
6
6
 
7
7
 
8
8
  == DESCRIPTION
data/lib/brice/history.rb CHANGED
@@ -75,7 +75,7 @@ module Brice
75
75
  @libedit = begin
76
76
  Readline.emacs_editing_mode
77
77
  true
78
- rescue NotImplementedError
78
+ rescue NotImplementedError, NoMethodError
79
79
  false
80
80
  end
81
81
 
@@ -4,9 +4,12 @@ brice 'prompt' => nil do |config|
4
4
 
5
5
  class IRB::Context
6
6
  %w[prompt_i prompt_s prompt_c prompt_n return_format].each { |name|
7
+ alias_method "_brice_original_#{name}", name
8
+
7
9
  define_method(name) {
8
- ivar = instance_variable_get("@#{name}")
9
- ivar.respond_to?(:call) ? ivar['%.4f' % @runtime ||= 0] : ivar
10
+ (v = instance_variable_get("@#{name}")).respond_to?(:call) ? v[
11
+ (t = @_brice_tms) ? '%.4f (%.4f)' % [t.total, t.real] : 'n/a'
12
+ ] : v
10
13
  }
11
14
  }
12
15
 
@@ -14,8 +17,8 @@ brice 'prompt' => nil do |config|
14
17
  alias_method :_brice_original_evaluate, :evaluate
15
18
 
16
19
  # Capture execution time
17
- def evaluate(*args)
18
- @runtime = Benchmark.realtime { _brice_original_evaluate(*args) }
20
+ def evaluate(*a)
21
+ @_brice_tms = Benchmark.measure { _brice_original_evaluate(*a) }
19
22
  end
20
23
  end
21
24
  end
data/lib/brice/version.rb CHANGED
@@ -4,7 +4,7 @@ module Brice
4
4
 
5
5
  MAJOR = 0
6
6
  MINOR = 2
7
- TINY = 4
7
+ TINY = 5
8
8
 
9
9
  class << self
10
10
 
metadata CHANGED
@@ -1,113 +1,96 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: brice
3
- version: !ruby/object:Gem::Version
4
- hash: 31
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.5
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 2
9
- - 4
10
- version: 0.2.4
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Jens Wille
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2012-01-28 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
12
+ date: 2012-06-29 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
21
15
  name: ruby-nuggets
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
24
17
  none: false
25
- requirements:
26
- - - ">="
27
- - !ruby/object:Gem::Version
28
- hash: 15
29
- segments:
30
- - 0
31
- - 5
32
- - 2
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
33
21
  version: 0.5.2
34
22
  type: :runtime
35
- version_requirements: *id001
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: 0.5.2
36
30
  description: Extra cool IRb goodness for the masses
37
31
  email: jens.wille@uni-koeln.de
38
32
  executables: []
39
-
40
33
  extensions: []
41
-
42
- extra_rdoc_files:
34
+ extra_rdoc_files:
43
35
  - README
44
36
  - COPYING
45
37
  - ChangeLog
46
- files:
47
- - lib/brice/shortcuts.rb
48
- - lib/brice/version.rb
38
+ files:
39
+ - lib/brice.rb
49
40
  - lib/brice/config.rb
50
- - lib/brice/init.rb
51
- - lib/brice/dsl.rb
52
- - lib/brice/colours.rb
41
+ - lib/brice/version.rb
53
42
  - lib/brice/history.rb
54
- - lib/brice/rc/060_init.rb
55
- - lib/brice/rc/090_devel.rb
56
- - lib/brice/rc/050_shortcuts.rb
57
- - lib/brice/rc/040_colours.rb
58
- - lib/brice/rc/070_prompt.rb
43
+ - lib/brice/shortcuts.rb
59
44
  - lib/brice/rc/030_history.rb
45
+ - lib/brice/rc/050_shortcuts.rb
60
46
  - lib/brice/rc/080_rails.rb
61
47
  - lib/brice/rc/020_libs.rb
48
+ - lib/brice/rc/070_prompt.rb
62
49
  - lib/brice/rc/010_added_methods.rb
63
- - lib/brice.rb
50
+ - lib/brice/rc/040_colours.rb
51
+ - lib/brice/rc/060_init.rb
52
+ - lib/brice/rc/090_devel.rb
53
+ - lib/brice/dsl.rb
54
+ - lib/brice/colours.rb
55
+ - lib/brice/init.rb
56
+ - COPYING
64
57
  - TODO
65
- - README
66
58
  - ChangeLog
67
- - COPYING
68
59
  - Rakefile
69
- - spec/brice/history_spec.rb
60
+ - README
70
61
  - spec/spec_helper.rb
62
+ - spec/brice/history_spec.rb
71
63
  - .rspec
72
- homepage: http://prometheus.rubyforge.org/
64
+ homepage: http://prometheus.rubyforge.org/brice
73
65
  licenses: []
74
-
75
66
  post_install_message:
76
- rdoc_options:
77
- - --all
78
- - --main
79
- - README
67
+ rdoc_options:
80
68
  - --charset
81
69
  - UTF-8
82
- - --title
83
- - brice Application documentation (v0.2.4)
84
70
  - --line-numbers
85
- require_paths:
71
+ - --all
72
+ - --title
73
+ - brice Application documentation (v0.2.5)
74
+ - --main
75
+ - README
76
+ require_paths:
86
77
  - lib
87
- required_ruby_version: !ruby/object:Gem::Requirement
78
+ required_ruby_version: !ruby/object:Gem::Requirement
88
79
  none: false
89
- requirements:
90
- - - ">="
91
- - !ruby/object:Gem::Version
92
- hash: 3
93
- segments:
94
- - 0
95
- version: "0"
96
- required_rubygems_version: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ! '>='
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
84
+ required_rubygems_version: !ruby/object:Gem::Requirement
97
85
  none: false
98
- requirements:
99
- - - ">="
100
- - !ruby/object:Gem::Version
101
- hash: 3
102
- segments:
103
- - 0
104
- version: "0"
86
+ requirements:
87
+ - - ! '>='
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
105
90
  requirements: []
106
-
107
91
  rubyforge_project: prometheus
108
- rubygems_version: 1.8.11
92
+ rubygems_version: 1.8.24
109
93
  signing_key:
110
94
  specification_version: 3
111
95
  summary: Extra cool IRb goodness for the masses
112
96
  test_files: []
113
-