wirb 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,9 @@
1
+ == 1.0.2
2
+ * Fix a bug that would load wirb irb hooks in non irb environments
3
+
4
+ == 1.0.0 / 1.0.1
5
+ * Paint gem is a dependency
6
+
1
7
  == 0.5.0
2
8
  * Use magenta instead of black for strings (better readable)
3
9
  * Fix bug with StringScanner objects
@@ -1,23 +1,22 @@
1
- == Wavy Interactive Ruby
2
- *Wirb* colorizes your inspected Ruby objects. It is based on Wirble[http://pablotron.org/software/wirble/], but only provides and improves result highlighting. It also provides a colorization engine abstraction layer and offers flexible schemas using yaml. Wirb is part of the {irbtools suite}[https://github.com/janlelis/irbtools].
3
-
4
- {<img src="https://travis-ci.org/janlelis/wirb.png" />}[https://travis-ci.org/janlelis/wirb]
5
-
1
+ == Wavy Interactive Ruby {<img src="https://travis-ci.org/janlelis/wirb.png" />}[https://travis-ci.org/janlelis/wirb]
6
2
 
3
+ *Wirb* colorizes your inspected Ruby objects. It is based on Wirble[http://pablotron.org/software/wirble/], but only provides and improves result highlighting. It also provides a colorization engine abstraction layer and offers flexible schemas using yaml. Wirb is part of the {irbtools suite}[https://github.com/janlelis/irbtools].
7
4
 
8
5
  == Install
6
+
9
7
  Install the gem with:
10
8
 
11
9
  gem install wirb
12
10
 
13
11
  == Usage
12
+
14
13
  Add to your <tt>~/.irbrc</tt>
15
14
 
16
- require 'rubygems' unless defined? Gem
17
15
  require 'wirb'
18
16
  Wirb.start
19
17
 
20
18
  == Features
19
+
21
20
  * Syntax highlighting for Ruby objects
22
21
  * Does not change the inspect value
23
22
  * Support for generic objects, especially sets and enumerators
@@ -29,9 +28,11 @@ Add to your <tt>~/.irbrc</tt>
29
28
  * Color schemas in yaml files
30
29
 
31
30
  == Colors
31
+
32
32
  To only tweak some colors, take a look at the <tt>Wirb.schema</tt> hash. To use a custom schema, inspect the yaml files in the <tt>data/wirb/</tt> directory. You can create your own schema and load it using <tt>Wirb.load_schema(path_to_yaml_file)</tt>. Alternatively, you can use one of the bundled ones by passing a symbol instead of a path.
33
33
 
34
34
  === Colorizer
35
+
35
36
  Wirb supports multiple colorization engines. Available engines can be found in <tt>lib/wirb/colorizer/*</tt>. Some of them require external gems as dependencies (e.g. HighLine). The current default engine is <em>Paint</em>. You can change the colorizer using:
36
37
 
37
38
  Wirb.load_colorizer :Paint # or :HighLine or whatever
@@ -52,12 +53,9 @@ Colorizers wanted! Your favorite terminal colors gem is not supported yet? Pleas
52
53
 
53
54
  The following schemas are bundled (load with <tt>Wirb.load_schema :name</tt> and make sure the used colorizer is available).
54
55
 
55
- ==== Wirb0
56
- * <tt>:classic_wirb0</tt> (current default)
57
-
58
- ==== Paint
59
56
  * <tt>:classic_paint</tt> (paint implementation of default)
60
57
  * <tt>:colorless</tt> (only uses :bright, :underline and :inverse effect)
58
+ * <tt>:classic_wirb0</tt> (default implemented with wirb0)
61
59
 
62
60
  == wp
63
61
  You can colorize any object with <tt>wp</tt> (wavy_print):
@@ -65,6 +63,7 @@ You can colorize any object with <tt>wp</tt> (wavy_print):
65
63
  wp some_object
66
64
 
67
65
  == Also see
66
+
68
67
  * Configure views for specific objects: hirb[https://github.com/cldwalker/hirb]
69
68
  * Wirb is part of: irbtools[https://github.com/janlelis/irbtools]
70
69
  * ripl is an irb alternative, syntax highlighting plugin (uses wirb by default): ripl-color_result[https://github.com/janlelis/ripl-color_result]
@@ -74,9 +73,10 @@ You can colorize any object with <tt>wp</tt> (wavy_print):
74
73
  * Tests for schema stuff
75
74
  * More colorizers and themes
76
75
  * Keep up with latest core/stdlib/rubygems inspects
76
+ * Keep up with new Rubinius versions
77
77
 
78
78
  == Credits
79
- * Copyright (c) 2011 Jan Lelis <http://rbjl.net>, see COPYING for details.
79
+ * Copyright (c) 2011, 2013 Jan Lelis <http://happycode.org>, see COPYING for details.
80
80
 
81
81
  Contributions[https://github.com/janlelis/wirb/contributors] by and thanks to:
82
82
  * {Richard LeBer}[https://github.com/rleber]
@@ -10,7 +10,7 @@ class << Wirb
10
10
 
11
11
  # Start colorizing results, will hook into irb if IRB is defined
12
12
  def start
13
- require File.dirname(__FILE__) + '/wirb/irb' if defined?(IRB) && !IRB::Irb.instance_methods.include?(:prompt_non_fancy)
13
+ require File.dirname(__FILE__) + '/wirb/irb' if defined?(IRB) && defined?(IRB::Irb) && !IRB::Irb.instance_methods.include?(:prompt_non_fancy)
14
14
  @running = true
15
15
  rescue LoadError
16
16
  warn "Couldn't activate Wirb"
@@ -1,3 +1,3 @@
1
1
  module Wirb
2
- VERSION = '1.0.1'
2
+ VERSION = '1.0.2'
3
3
  end
@@ -42,17 +42,19 @@ describe tokenizer(__FILE__) do
42
42
  only19 do
43
43
  please do
44
44
  require 'rspec'
45
- check [Gem::Specification.find_by_name('rspec').dependencies.first.requirement]*2
45
+ rspec_version = Gem::Specification.find_by_name('rspec').dependencies.first.requirement
46
+ only_version_number = rspec_version.requirements[0][1].to_s
47
+ check [rspec_version]*2
46
48
  tokens.should == [
47
49
  [:open_array, '['],
48
50
  [:gem_requirement_condition, "~>"],
49
51
  [:whitespace, " "],
50
- [:gem_requirement_version, RSpec::Version::STRING],
52
+ [:gem_requirement_version, only_version_number],
51
53
  [:comma, ","],
52
54
  [:whitespace, " "],
53
55
  [:gem_requirement_condition, "~>"],
54
56
  [:whitespace, " "],
55
- [:gem_requirement_version, RSpec::Version::STRING],
57
+ [:gem_requirement_version, only_version_number],
56
58
  [:close_array, ']'],
57
59
  ]
58
60
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wirb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,14 +9,14 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-07 00:00:00.000000000 Z
12
+ date: 2013-10-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
- - - ! '>='
19
+ - - '>='
20
20
  - !ruby/object:Gem::Version
21
21
  version: '0'
22
22
  type: :development
@@ -24,7 +24,7 @@ dependencies:
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  none: false
26
26
  requirements:
27
- - - ! '>='
27
+ - - '>='
28
28
  - !ruby/object:Gem::Version
29
29
  version: '0'
30
30
  - !ruby/object:Gem::Dependency
@@ -32,7 +32,7 @@ dependencies:
32
32
  requirement: !ruby/object:Gem::Requirement
33
33
  none: false
34
34
  requirements:
35
- - - ! '>='
35
+ - - '>='
36
36
  - !ruby/object:Gem::Version
37
37
  version: '0'
38
38
  type: :development
@@ -40,7 +40,7 @@ dependencies:
40
40
  version_requirements: !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
43
- - - ! '>='
43
+ - - '>='
44
44
  - !ruby/object:Gem::Version
45
45
  version: '0'
46
46
  - !ruby/object:Gem::Dependency
@@ -48,7 +48,7 @@ dependencies:
48
48
  requirement: !ruby/object:Gem::Requirement
49
49
  none: false
50
50
  requirements:
51
- - - ! '>='
51
+ - - '>='
52
52
  - !ruby/object:Gem::Version
53
53
  version: '0'
54
54
  type: :development
@@ -56,7 +56,7 @@ dependencies:
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  none: false
58
58
  requirements:
59
- - - ! '>='
59
+ - - '>='
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  - !ruby/object:Gem::Dependency
@@ -64,7 +64,7 @@ dependencies:
64
64
  requirement: !ruby/object:Gem::Requirement
65
65
  none: false
66
66
  requirements:
67
- - - ! '>='
67
+ - - '>='
68
68
  - !ruby/object:Gem::Version
69
69
  version: '12.1'
70
70
  type: :development
@@ -72,7 +72,7 @@ dependencies:
72
72
  version_requirements: !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements:
75
- - - ! '>='
75
+ - - '>='
76
76
  - !ruby/object:Gem::Version
77
77
  version: '12.1'
78
78
  - !ruby/object:Gem::Dependency
@@ -80,7 +80,7 @@ dependencies:
80
80
  requirement: !ruby/object:Gem::Requirement
81
81
  none: false
82
82
  requirements:
83
- - - ! '>='
83
+ - - '>='
84
84
  - !ruby/object:Gem::Version
85
85
  version: '0'
86
86
  type: :runtime
@@ -88,10 +88,10 @@ dependencies:
88
88
  version_requirements: !ruby/object:Gem::Requirement
89
89
  none: false
90
90
  requirements:
91
- - - ! '>='
91
+ - - '>='
92
92
  - !ruby/object:Gem::Version
93
93
  version: '0'
94
- description: ! 'Wavy IRB: Colorizes irb results. It originated from Wirble, but only
94
+ description: 'Wavy IRB: Colorizes irb results. It originated from Wirble, but only
95
95
  provides result highlighting. Just call Wirb.start and enjoy the colors in your
96
96
  IRB ;). You can use it with your favorite colorizer engine. See README.rdoc for
97
97
  more details.'
@@ -102,45 +102,45 @@ extra_rdoc_files:
102
102
  - README.rdoc
103
103
  - COPYING.txt
104
104
  files:
105
- - lib/wirb/tokenizer.rb
106
- - lib/wirb/irb.rb
107
- - lib/wirb/wp.rb
108
- - lib/wirb/colorizer.rb
109
105
  - lib/wirb/version.rb
110
- - lib/wirb/colorizer/paint.rb
111
- - lib/wirb/colorizer/highline.rb
112
- - lib/wirb/colorizer/wirb0_paint.rb
106
+ - lib/wirb/irb.rb
107
+ - lib/wirb/tokenizer.rb
113
108
  - lib/wirb/colorizer/wirb0_highline.rb
114
- - lib/wirb/colorizer/wirb0.rb
109
+ - lib/wirb/colorizer/highline.rb
115
110
  - lib/wirb/colorizer/wirble.rb
111
+ - lib/wirb/colorizer/wirb0.rb
112
+ - lib/wirb/colorizer/paint.rb
113
+ - lib/wirb/colorizer/wirb0_paint.rb
114
+ - lib/wirb/wp.rb
115
+ - lib/wirb/colorizer.rb
116
116
  - lib/wirb.rb
117
+ - spec/tokenizer_string_spec.rb
118
+ - spec/tokenizer_misc_spec.rb
119
+ - spec/tokenizer_symbol_spec.rb
120
+ - spec/colorizer_paint_spec.rb
121
+ - spec/tokenizer_object_spec.rb
122
+ - spec/colorizer_wirb0_spec.rb
117
123
  - spec/tokenizer_enumerator_spec.rb
124
+ - spec/colorizer_spec.rb
125
+ - spec/tokenizer_nil_false_true_spec.rb
126
+ - spec/spec_helper.rb
127
+ - spec/tokenizer_regexp_spec.rb
128
+ - spec/tokenizer_rails_spec.rb
129
+ - spec/tokenizer_set_spec.rb
130
+ - spec/tokenizer_hash_spec.rb
118
131
  - spec/colorizer_wirb0_highline_spec.rb
132
+ - spec/tokenizer_array_spec.rb
133
+ - spec/tokenizer_nested_spec.rb
134
+ - spec/colorizer_wirble_spec.rb
119
135
  - spec/colorizer_highline_spec.rb
120
- - spec/tokenizer_set_spec.rb
121
- - spec/colorizer_wirb0_spec.rb
136
+ - spec/tokenizer_number_spec.rb
137
+ - spec/colorizer_wirb0_paint_spec.rb
122
138
  - spec/tokenizer_rubygems_spec.rb
123
- - spec/spec_helper.rb
124
139
  - spec/tokenizer_rubyvm_spec.rb
125
- - spec/colorizer_wirb0_paint_spec.rb
126
- - spec/tokenizer_string_spec.rb
127
- - spec/tokenizer_nil_false_true_spec.rb
128
- - spec/tokenizer_array_spec.rb
129
- - spec/tokenizer_symbol_spec.rb
130
- - spec/tokenizer_hash_spec.rb
131
- - spec/tokenizer_nested_spec.rb
132
- - spec/tokenizer_rails_spec.rb
133
- - spec/colorizer_spec.rb
134
- - spec/colorizer_paint_spec.rb
135
140
  - spec/tokenizer_time_spec.rb
136
- - spec/tokenizer_misc_spec.rb
137
- - spec/tokenizer_regexp_spec.rb
138
- - spec/tokenizer_object_spec.rb
139
- - spec/tokenizer_number_spec.rb
140
- - spec/colorizer_wirble_spec.rb
141
141
  - COPYING.txt
142
- - CHANGELOG.rdoc
143
142
  - README.rdoc
143
+ - CHANGELOG.rdoc
144
144
  - data/wirb/classic_wirb0.yml
145
145
  - data/wirb/classic_paint.yml
146
146
  - data/wirb/colorless.yml
@@ -150,28 +150,32 @@ files:
150
150
  homepage: https://github.com/janlelis/wirb
151
151
  licenses:
152
152
  - MIT
153
- post_install_message: ! " ┌── info ──────────────────────────┐\n J-_-L │ https://github.com/janlelis/wirb
154
- │\n ├── usage ─────────────────────────┤\n │ require 'wirb' │\n
155
- \ Wirb.start │\n └──────────────────────────────────┘"
153
+ post_install_message: |2-
154
+ ┌── info ──────────────────────────┐
155
+ J-_-L https://github.com/janlelis/wirb │
156
+ ├── usage ─────────────────────────┤
157
+ │ require 'wirb' │
158
+ │ Wirb.start │
159
+ └──────────────────────────────────┘
156
160
  rdoc_options: []
157
161
  require_paths:
158
162
  - lib
159
163
  required_ruby_version: !ruby/object:Gem::Requirement
160
164
  none: false
161
165
  requirements:
162
- - - ! '>='
166
+ - - '>='
163
167
  - !ruby/object:Gem::Version
164
168
  version: 1.8.7
165
169
  required_rubygems_version: !ruby/object:Gem::Requirement
166
170
  none: false
167
171
  requirements:
168
- - - ! '>='
172
+ - - '>='
169
173
  - !ruby/object:Gem::Version
170
174
  version: 1.3.6
171
175
  requirements: []
172
176
  rubyforge_project:
173
- rubygems_version: 1.8.24
177
+ rubygems_version: 1.8.26
174
178
  signing_key:
175
179
  specification_version: 3
176
- summary: ! 'Wavy IRB: Colorizes irb results.'
180
+ summary: 'Wavy IRB: Colorizes irb results.'
177
181
  test_files: []