wirb 1.0.3 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9e05f349d31a148f70a770c97929873ac2ea307d
4
- data.tar.gz: 463451317b4c61812b414d0496cbd80a7b0edcaa
3
+ metadata.gz: e66ad01b5a8d397758b52ad80a47c04088edd84a
4
+ data.tar.gz: 433bcf5da92a4a1e8a15b03f701a6e50b854f7d2
5
5
  SHA512:
6
- metadata.gz: dca03385ef04bcde1660451961b5f79655f1c27e88fd84549ee4f4c70a1925860f810282409490eb3947c47fb1a988f702eeaa300ce118463f6aff2f118ed804
7
- data.tar.gz: f312a562ebce3fc95614c2faa1ce40d75f6dc9eebff7bfa8859a8d6f73f17f57d9d6a308878ee0e3a5fc00129655c6b6a655949dd0c3f08376a87a8468968e8f
6
+ metadata.gz: 6c557117bcf11f894d1fe0fb03671bf3784bb24bc384bfd961b71519041be1ffefeb20aecaa941b5d376a89e826c612d06b6ae28485910f7744d85e99287e013
7
+ data.tar.gz: fe2d2e2662c8a92c75bd7eed4da18736beafea93ba064f564f92ba93b551d2dd13fa8334c9a4b96d134025aa48a9bb5f66e8b4a567818d0a6e2fd7aa9fd50e55
@@ -1,67 +1,93 @@
1
- == 1.0.3
1
+ ## 2.0.0
2
+ ### Main Changes
3
+ * Don't target Ruby 1 anymore, set required Ruby version to 2.0
4
+ * Change the way WIRB is integrated into IRB: Now uses the IRB API, instead
5
+ of monkey patch
6
+ * Remove abstraction for alternative colorizers, only use paint
7
+ * Introduce timeout option: If WIRB hasn't finised applying colors within 3
8
+ seconds, it will skip rendering the string
9
+ * Support rubinius enumerators
10
+
11
+ ### Minor Changes
12
+ * Rename :keyword token to :word (e.g. main) and more token renamings
13
+ * Simplify setting delimiters in schema (e.g. :array instead of :open_array
14
+ and :close_array)
15
+ * Move exception handling out of tokenizer
16
+ * Remove parsing rules for 1.8 and rubygem dependencies
17
+ * Fix that @instance variables beginning with underscore get detected
18
+
19
+ ## 1.0.3
2
20
  * Allow nestings of objects in object description
3
21
 
4
- == 1.0.2
22
+ ## 1.0.2
5
23
  * Fix a bug that would load wirb irb hooks in non irb environments
6
24
 
7
- == 1.0.0 / 1.0.1
25
+ ## 1.0.0 / 1.0.1
8
26
  * Paint gem is a dependency
9
27
 
10
- == 0.5.0
28
+ ## 0.5.0
11
29
  * Use magenta instead of black for strings (better readable)
12
30
  * Fix bug with StringScanner objects
13
31
  * Support complex numbers
14
32
  * Support Infinity and NaN as valid numbers
15
33
  * Default colorizer is now Paint
16
34
 
17
- == 0.4.2
35
+ ## 0.4.2
18
36
  * Fix a symbol string bug
19
37
  * Don't fail on nil input for Wirb.tokenize
20
38
 
21
- == 0.4.1
39
+ ## 0.4.1
22
40
  * New bundled color schema: colorless (use at least Paint version 0.8.2)
23
41
  * Fix minor bugs of 0.4.0
24
42
 
25
- == 0.4.0
43
+ ## 0.4.0
26
44
  * Add support for loading color schemas from yaml files
27
45
  * Add ability to hook in a custom colorizer
28
- * Support for Paint, HighLine (1.6.3), old Wirb color names (Wirb0) and even older Wirble color names
29
- * Wirb0(-like) colors are still default, but will be dropped (as default) in 1.0
30
- * Provides hybrid connectors to Paint and HighLine that also enable Wirb colors (Wirb0_Paint, Wirb0_HighLine)
31
- * Only display error on failed tokenizations if $VERBOSE is not false
46
+ * Support for Paint, HighLine (1.6.3), old Wirb color names (Wirb0) and
47
+ even older Wirble color names
48
+ * Wirb0(-like) colors are still default, but will be dropped (as
49
+ default) in 1.0
50
+ * Provides hybrid connectors to Paint and HighLine that also enable Wirb
51
+ colors (Wirb0_Paint, Wirb0_HighLine)
52
+ * Only display error on failed tokenizations if $VERBOSE is not false
32
53
 
33
- == 0.3.2
54
+ ## 0.3.2
34
55
  * Improve :<=> parsing :D
35
- * Support gem requirements (:gem_requirement_condition, :gem_requirement_version) and gem dependencies
56
+ * Support gem requirements (:gem_requirement_condition,
57
+ :gem_requirement_version) and gem dependencies
36
58
 
37
- == 0.3.1
59
+ ## 0.3.1
38
60
  * Fix ;$., ;$", :$,
39
61
 
40
- == 0.3.0
62
+ ## 0.3.0
41
63
  * Improve 1.9 enumerator detection/highlighting
42
- * Remove :open_enumerator / :close_enumerator (use nested usual base objects instead)
64
+ * Remove :open_enumerator / :close_enumerator (use nested usual base
65
+ objects instead)
43
66
  * Support timestamps (:timestamp)
44
- * Support instance variables and their contents (:object_variable, :object_variable_prefix)
67
+ * Support instance variables and their contents (:object_variable,
68
+ :object_variable_prefix)
45
69
  * Add Wirb.stop to not colorize anything, anymore (in irb)
46
70
  * Support RubyVM instruction sequences
47
71
 
48
- == 0.2.6
72
+ ## 0.2.6
49
73
  * Fix Ruby 1.8 "already initialized constant" warnings
50
74
 
51
- == 0.2.5
52
- * Fix wrong \\ escaping
75
+ ## 0.2.5
76
+ * Fix wrong \ escaping
53
77
  * Fix stupid rescue bug (no more wirb crashes)
54
78
 
55
- == 0.2.3 / 0.2.4
79
+ ## 0.2.3 / 0.2.4
56
80
  * Support for rubygems-test <gem-testers.org>
57
81
 
58
- == 0.2.2
59
- * Always return inspected string (even when errors happen) and endless-loop protection
82
+ ## 0.2.2
83
+ * Always return inspected string (even when errors happen) and endless-loop
84
+ protection
60
85
  * Recognize active record class descriptions
61
86
 
62
- == 0.2.1
87
+ ## 0.2.1
63
88
  * Fix 1.8 Rational after requiring 'mathn'
64
89
  * Return of string if tokenizer throws an error
65
90
 
66
- == 0.2.0
91
+ ## 0.2.0
67
92
  * Initial release.
93
+
data/COPYING.txt CHANGED
@@ -1,6 +1,6 @@
1
- Copyright (C) 2011-2014 Jan Lelis <mail@janlelis.de>
1
+ Copyright (C) 2011-2015 Jan Lelis <mail@janlelis.de>
2
2
  Copyright (C) 2006-2009 Paul Duncan <pabs@pablotron.org>
3
-
3
+
4
4
  Permission is hereby granted, free of charge, to any person obtaining a
5
5
  copy of this software and associated documentation files (the
6
6
  "Software"), to deal in the Software without restriction, including
@@ -8,14 +8,14 @@ without limitation the rights to use, copy, modify, merge, publish,
8
8
  distribute, sublicense, and/or sell copies of the Software, and to
9
9
  permit persons to whom the Software is furnished to do so, subject to
10
10
  the following conditions:
11
-
11
+
12
12
  The above copyright notice and this permission notice shall be included
13
13
  in all copies or substantial portions of the of the Software.
14
-
14
+
15
15
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
16
16
  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
17
  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18
18
  IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20
20
  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21
- DEALINGS IN THE SOFTWARE.
21
+ DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,75 @@
1
+ ## WIRB Interactive Ruby [![version](https://badge.fury.io/rb/wirb.svg)](http://badge.fury.io/rb/wirb) [<img src="https://travis-ci.org/janlelis/wirb.png" />](https://travis-ci.org/janlelis/wirb)
2
+
3
+ **WIRB** syntax highlights Ruby objects.
4
+
5
+ Supported Rubies: 2.2, 2.1, 2.0, jruby, rubinius.
6
+
7
+ Legacy Rubies (1.9, 1.8): Use [WIRB 1.0](https://github.com/janlelis/wirb/tree/1.0.3)
8
+
9
+ [Example output](https://travis-ci.org/janlelis/wirb/jobs/56299603)
10
+
11
+
12
+ ## Features
13
+
14
+ * Syntax highlighting for Ruby objects
15
+ * No monkey patches anywhere
16
+ * Support for generic objects, especially enumerators, and nested generic
17
+ objects
18
+ * Can be used without IRB
19
+ * Supports stdlib objects, like `Set`
20
+ * Custom color schemas via YAML
21
+
22
+ ## Install
23
+
24
+ Install the gem with:
25
+
26
+ $ gem install wirb
27
+
28
+ ## Usage
29
+
30
+ To start IRB with WIRB activated for one session, do:
31
+
32
+ $ irb -r wirb --inspect wirb
33
+
34
+ To activate WIRB permanently, you'll need to add this to the `~/.irbrc` file:
35
+
36
+ require 'wirb'
37
+ Wirb.start
38
+
39
+ ### Bundled Schemas
40
+
41
+ These are the bundled color schemas. You can load one with `Wirb.load_schema
42
+ :name`
43
+
44
+ * `:classic` (default)
45
+ * `:colorless` (only uses :bright, :underline and :inverse effect)
46
+
47
+
48
+ ## `Kernel#wp`
49
+
50
+ You can use WIRB like awesome_print to highlight any objects using `wp`:
51
+
52
+ require 'wirb/wp'
53
+ wp some_object
54
+
55
+ ## Also See
56
+
57
+ * Gem that allows you to configure views for specific objects:
58
+ [hirb](https://github.com/cldwalker/hirb)
59
+ * WIRB is part of: [irbtools](https://github.com/janlelis/irbtools)
60
+ * RIPL is an IRB alternative, syntax highlighting plugin (uses wirb by
61
+ default):
62
+ [ripl-color_result](https://github.com/janlelis/ripl-color_result)
63
+ * More about terminal colors: [Paint](https://github.com/janlelis/paint)
64
+ * [Wirble](http://pablotron.org/software/wirble/): WIRB's predecessor
65
+
66
+
67
+ ## Credits
68
+
69
+ Copyright (c) 2011-2015 Jan Lelis <http://janlelis.com> see COPYING for
70
+ details.
71
+
72
+ Influenced by code from: Copyright (C) 2006-2009 Paul Duncan
73
+ <pabs@pablotron.org>
74
+
75
+ [All contributors](https://github.com/janlelis/wirb/contributors)
@@ -1,23 +1,11 @@
1
- colorizer:
2
- - Paint
3
- - Wirb0_Paint
4
-
5
1
  # container
6
- open_hash:
7
- - :green
8
- - :bright
9
- close_hash:
10
- - :green
11
- - :bright
12
- open_array:
2
+ hash_delimiter:
13
3
  - :green
14
4
  - :bright
15
- close_array:
5
+ array_delimiter:
16
6
  - :green
17
7
  - :bright
18
- open_set:
19
- - :green
20
- close_set:
8
+ set_delimiter:
21
9
  - :green
22
10
 
23
11
  # delimiter
@@ -35,7 +23,7 @@ object_class:
35
23
  - :bright
36
24
 
37
25
  # object
38
- open_object:
26
+ object_delimiter:
39
27
  - :green
40
28
  object_description_prefix:
41
29
  - :green
@@ -62,8 +50,6 @@ object_variable_prefix:
62
50
  object_variable:
63
51
  - :magenta
64
52
  - :bright
65
- close_object:
66
- - :green
67
53
 
68
54
  # symbol
69
55
  symbol_prefix:
@@ -72,29 +58,22 @@ symbol_prefix:
72
58
  symbol:
73
59
  - :yellow
74
60
  - :bright
75
- open_symbol_string:
76
- - :yellow
77
61
  symbol_string:
78
62
  - :yellow
79
63
  - :bright
80
- close_symbol_string:
64
+ symbol_string_delimiter:
81
65
  - :yellow
82
66
 
83
67
  # string
84
- open_string:
85
- - :white
86
68
  string:
87
69
  - :magenta
88
- close_string:
70
+ string_delimiter:
89
71
  - :white
90
72
 
91
73
  # regexp
92
- open_regexp:
93
- - :blue
94
- - :bright
95
74
  regexp:
96
75
  - :magenta
97
- close_regexp:
76
+ regexp_delimiter:
98
77
  - :blue
99
78
  - :bright
100
79
  regexp_flags:
@@ -108,25 +87,20 @@ special_number:
108
87
  - :cyan
109
88
  range:
110
89
  - :red
111
- open_rational:
90
+ rational_delimiter:
112
91
  - :cyan
113
92
  - :bright
114
93
  rational_separator:
115
94
  - :cyan
116
95
  - :bright
117
- close_rational:
118
- - :cyan
119
- - :bright
120
- open_complex:
121
- - :cyan
122
- close_complex:
96
+ complex_delimiter:
123
97
  - :cyan
124
98
 
125
99
  # misc
126
- #default:
127
- #keyword:
128
100
  time:
129
101
  - :magenta
102
+ word:
103
+ - :blue
130
104
  nil:
131
105
  - :red
132
106
  - :bright
@@ -134,8 +108,3 @@ false:
134
108
  - :red
135
109
  true:
136
110
  - :green
137
- gem_requirement_condition:
138
- - :cyan
139
- gem_requirement_version:
140
- - :cyan
141
- - :bright
@@ -1,14 +1,7 @@
1
- colorizer:
2
- - Paint
3
- - Wirb0_Paint
4
-
5
1
  # container
6
- open_hash:
7
- close_hash:
8
- open_array:
9
- close_array:
10
- open_set:
11
- close_set:
2
+ hash_delimiter:
3
+ array_delimiter:
4
+ set_delimiter:
12
5
 
13
6
  # delimiter
14
7
  comma:
@@ -22,7 +15,7 @@ object_class:
22
15
  - :bright
23
16
 
24
17
  # object
25
- open_object:
18
+ object_delimiter:
26
19
  object_description_prefix:
27
20
  object_description:
28
21
  object_address_prefix:
@@ -32,28 +25,24 @@ object_line:
32
25
  object_line_number:
33
26
  object_variable_prefix:
34
27
  object_variable:
35
- close_object:
36
28
 
37
29
  # symbol
38
30
  symbol_prefix:
39
31
  symbol:
40
32
  - :bright
41
- open_symbol_string:
42
33
  symbol_string:
43
34
  - :bright
44
- close_symbol_string:
35
+ symbol_string_delimiter:
45
36
 
46
37
  # string
47
- open_string:
48
38
  string:
49
39
  - :underline
50
- close_string:
40
+ string_delimiter:
51
41
 
52
42
  # regexp
53
- open_regexp:
54
43
  regexp:
55
44
  - :underline
56
- close_regexp:
45
+ regexp_delimiter:
57
46
  regexp_flags:
58
47
 
59
48
  # number
@@ -62,22 +51,16 @@ number:
62
51
  special_number:
63
52
  - :bright
64
53
  range:
65
- open_rational:
54
+ rational:
66
55
  rational_separator:
67
- close_rational:
68
- open_complex:
69
- close_complex:
56
+ complex:
70
57
 
71
58
  # misc
72
- default:
73
- keyword:
74
59
  time:
60
+ word:
75
61
  nil:
76
62
  - :inverse
77
63
  false:
78
64
  - :inverse
79
65
  true:
80
66
  - :inverse
81
- gem_requirement_condition:
82
- - :bright
83
- gem_requirement_version:
@@ -0,0 +1,103 @@
1
+ # container
2
+ hash:
3
+ - "#ccc"
4
+ array:
5
+ - "#ddd"
6
+ set:
7
+ - "#bbb"
8
+
9
+ # delimiter
10
+ comma: "#fff"
11
+ refers: "#fff"
12
+
13
+ # class
14
+ class:
15
+ - "#999"
16
+ class_separator:
17
+ - "#777"
18
+ object_class:
19
+ - "#888"
20
+
21
+ # object
22
+ object:
23
+ - "#666"
24
+ object_description_prefix:
25
+ - "#222"
26
+ object_description:
27
+ - "#555"
28
+ object_address_prefix:
29
+ - "#111"
30
+ object_address:
31
+ - "#555"
32
+ object_line_prefix:
33
+ - "#222"
34
+ object_line:
35
+ - "yellow"
36
+ object_line_number:
37
+ - "gold"
38
+ object_variable_prefix:
39
+ - "white"
40
+ object_variable:
41
+ - "silver"
42
+
43
+ # symbol
44
+ symbol_prefix:
45
+ - "#9f9"
46
+ - :bright
47
+ symbol:
48
+ - "#9f9"
49
+ - :bright
50
+ symbol_string:
51
+ - "#9f9"
52
+ - :bright
53
+ symbol_string_delimetr:
54
+ - "#9f9"
55
+
56
+ # string
57
+ string:
58
+ - "#99f"
59
+ string_delimiter:
60
+ - "#99f"
61
+ - :bright
62
+
63
+ # regexp
64
+ regexp:
65
+ - :magenta
66
+ regexp_delimiter:
67
+ - :blue
68
+ - :bright
69
+ regexp_flags:
70
+ - :red
71
+ - :bright
72
+
73
+ # number
74
+ number:
75
+ - "white"
76
+ special_number:
77
+ - "silver"
78
+ range:
79
+ - "#f0f0f0"
80
+ rational:
81
+ - "#ddd"
82
+ rational_separator:
83
+ - "#ddd"
84
+ complex:
85
+ - "#ccc"
86
+
87
+ # misc
88
+ #default:
89
+ time:
90
+ - :underline
91
+ word:
92
+ - :blue
93
+ nil:
94
+ - :red
95
+ - :bright
96
+ false:
97
+ - :red
98
+ true:
99
+ - :green
100
+ gem_requirement_condition:
101
+ - "#eee"
102
+ gem_requirement_version:
103
+ - "#ddd"