wirb 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.rdoc CHANGED
@@ -1,3 +1,7 @@
1
+ == 0.4.2
2
+ * Fix a symbol string bug
3
+ * Don't fail on nil input for Wirb.tokenize
4
+
1
5
  == 0.4.1
2
6
  * New bundled color schema: colorless (use at least Paint version 0.8.2)
3
7
  * Fix minor bugs of 0.4.0
data/COPYING.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (C) 2011 Jan Lelis <mail@janlelis.de>
1
+ Copyright (C) 2011-2012 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
data/Rakefile CHANGED
@@ -1,5 +1,4 @@
1
1
  require 'rake'
2
- require 'rake/rdoctask'
3
2
  require 'fileutils'
4
3
  require "rspec/core/rake_task"
5
4
  task :default => :spec
@@ -38,11 +37,3 @@ task :gemspec do
38
37
  gemspec.validate
39
38
  end
40
39
 
41
- Rake::RDocTask.new do |rdoc|
42
- require File.expand_path( File.join( 'lib', 'wirb') )
43
-
44
- rdoc.rdoc_dir = 'doc'
45
- rdoc.title = "Wirb #{Wirb::VERSION}"
46
- rdoc.rdoc_files.include('README*')
47
- rdoc.rdoc_files.include('lib/**/*.rb')
48
- end
@@ -3,6 +3,7 @@ class << Wirb
3
3
  # Almost everyone would say that 400 lines long case statements need refactoring, but
4
4
  # ...sometimes it just doesn't matter ;)
5
5
  def tokenize(str)
6
+ return [] if str.nil?
6
7
  raise ArgumentError, 'Tokenizer needs an inspect-string' unless str.is_a? String
7
8
  return enum_for(:tokenize, str) unless block_given?
8
9
 
@@ -185,7 +186,6 @@ class << Wirb
185
186
  if c == '"' && ( !( @token =~ /\\+$/; $& ) || $&.size % 2 == 0 ) # see string
186
187
  pass[:open_symbol_string, '"']
187
188
  pass_state[:remove]
188
- pop_state[]
189
189
  pass[:close_symbol_string, '"']
190
190
  else
191
191
  @token << c
data/lib/wirb/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Wirb
2
- VERSION = '0.4.1'.freeze
2
+ VERSION = '0.4.2'.dup
3
3
  end
data/lib/wirb.rb CHANGED
@@ -57,7 +57,7 @@ class << Wirb
57
57
  def load_schema!(yaml_path = :classic_wirb0)
58
58
  if yaml_path.is_a? Symbol # bundled themes
59
59
  schema_name = yaml_path.to_s
60
- schema_yaml = YAML.load_file(File.join( Gem.datadir('wirb'), schema_name + '.yml' ))
60
+ schema_yaml = YAML.load_file(File.join(Gem.datadir('wirb'), schema_name + '.yml'))
61
61
  else
62
62
  schema_name = File.basename(yaml_path).gsub(/\.yml$/, '')
63
63
  schema_yaml = YAML.load_file(yaml_path)
data/spec/spec_helper.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'wirb'
2
2
  require 'wirb/wp'
3
3
  require 'zucker/engine'
4
- require 'zucker/version'
4
+ require 'zucker/ruby_version'
5
5
 
6
6
  Wirb.start
7
7
 
@@ -35,7 +35,7 @@ describe tokenizer(__FILE__) do
35
35
  [:object_line_prefix, "@"],
36
36
  [:object_line, /.*tokenizer_object_spec.rb:/],
37
37
  [:object_line_number, /\d+/],
38
- RubyVersion == 1.9 ? [:object_description, " (lambda)"] : nil,
38
+ RubyVersion >= 1.9 ? [:object_description, " (lambda)"] : nil,
39
39
  [:close_object, ">"],
40
40
  ].compact
41
41
  end
@@ -152,4 +152,15 @@ describe tokenizer(__FILE__) do
152
152
  [:close_array, "]"],
153
153
  ]
154
154
  end
155
+
156
+ please do check [:"42"]
157
+ tokens.should == [
158
+ [:open_array, "["],
159
+ [:symbol_prefix, ":"],
160
+ [:open_symbol_string, "\""],
161
+ [:symbol_string, "42"],
162
+ [:close_symbol_string, "\""],
163
+ [:close_array, "]"],
164
+ ]
165
+ end
155
166
  end
data/wirb.gemspec CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |s|
18
18
  s.add_development_dependency 'rspec'
19
19
  s.add_development_dependency 'rspec-core'
20
20
  s.add_development_dependency 'rake'
21
- s.add_development_dependency 'zucker', '>= 11'
21
+ s.add_development_dependency 'zucker', '>= 12.1'
22
22
  #s.add_development_dependency 'highline'
23
23
  s.add_development_dependency 'paint'
24
24
 
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: 0.4.1
4
+ version: 0.4.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-07-08 00:00:00.000000000Z
12
+ date: 2012-03-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &22010080 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,15 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *22010080
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: rspec-core
27
- requirement: &22009620 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
35
  - - ! '>='
@@ -32,10 +37,15 @@ dependencies:
32
37
  version: '0'
33
38
  type: :development
34
39
  prerelease: false
35
- version_requirements: *22009620
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
36
46
  - !ruby/object:Gem::Dependency
37
47
  name: rake
38
- requirement: &22009200 !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
39
49
  none: false
40
50
  requirements:
41
51
  - - ! '>='
@@ -43,21 +53,31 @@ dependencies:
43
53
  version: '0'
44
54
  type: :development
45
55
  prerelease: false
46
- version_requirements: *22009200
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
47
62
  - !ruby/object:Gem::Dependency
48
63
  name: zucker
49
- requirement: &22008700 !ruby/object:Gem::Requirement
64
+ requirement: !ruby/object:Gem::Requirement
50
65
  none: false
51
66
  requirements:
52
67
  - - ! '>='
53
68
  - !ruby/object:Gem::Version
54
- version: '11'
69
+ version: '12.1'
55
70
  type: :development
56
71
  prerelease: false
57
- version_requirements: *22008700
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '12.1'
58
78
  - !ruby/object:Gem::Dependency
59
79
  name: paint
60
- requirement: &22008280 !ruby/object:Gem::Requirement
80
+ requirement: !ruby/object:Gem::Requirement
61
81
  none: false
62
82
  requirements:
63
83
  - - ! '>='
@@ -65,7 +85,12 @@ dependencies:
65
85
  version: '0'
66
86
  type: :development
67
87
  prerelease: false
68
- version_requirements: *22008280
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
69
94
  description: ! 'Wavy IRB: Colorizes irb results. It originated from Wirble, but only
70
95
  provides result highlighting. Just call Wirb.start and enjoy the colors in your
71
96
  IRB ;). You can use it with your favorite colorizer engine. See README.rdoc for
@@ -77,47 +102,47 @@ extra_rdoc_files:
77
102
  - README.rdoc
78
103
  - COPYING.txt
79
104
  files:
80
- - lib/wirb.rb
81
- - lib/wirb/irb.rb
82
- - lib/wirb/colorizer/wirb0.rb
105
+ - lib/wirb/version.rb
106
+ - lib/wirb/wp.rb
107
+ - lib/wirb/colorizer.rb
83
108
  - lib/wirb/colorizer/wirb0_paint.rb
84
- - lib/wirb/colorizer/paint.rb
85
- - lib/wirb/colorizer/highline.rb
86
109
  - lib/wirb/colorizer/wirble.rb
110
+ - lib/wirb/colorizer/wirb0.rb
111
+ - lib/wirb/colorizer/highline.rb
112
+ - lib/wirb/colorizer/paint.rb
87
113
  - lib/wirb/colorizer/wirb0_highline.rb
88
114
  - lib/wirb/tokenizer.rb
89
- - lib/wirb/wp.rb
90
- - lib/wirb/version.rb
91
- - lib/wirb/colorizer.rb
92
- - spec/tokenizer_misc_spec.rb
93
- - spec/tokenizer_number_spec.rb
94
- - spec/colorizer_wirb0_spec.rb
95
- - spec/tokenizer_set_spec.rb
96
- - spec/tokenizer_object_spec.rb
115
+ - lib/wirb/irb.rb
116
+ - lib/wirb.rb
117
+ - spec/spec_helper.rb
118
+ - spec/colorizer_highline_spec.rb
97
119
  - spec/tokenizer_rails_spec.rb
98
- - spec/tokenizer_time_spec.rb
99
120
  - spec/tokenizer_enumerator_spec.rb
100
- - spec/colorizer_wirb0_paint_spec.rb
101
- - spec/tokenizer_regexp_spec.rb
102
- - spec/tokenizer_rubygems_spec.rb
103
- - spec/tokenizer_string_spec.rb
104
- - spec/colorizer_paint_spec.rb
121
+ - spec/tokenizer_array_spec.rb
105
122
  - spec/tokenizer_hash_spec.rb
106
- - spec/spec_helper.rb
107
- - spec/colorizer_spec.rb
123
+ - spec/colorizer_paint_spec.rb
124
+ - spec/tokenizer_misc_spec.rb
125
+ - spec/colorizer_wirb0_paint_spec.rb
126
+ - spec/colorizer_wirb0_spec.rb
127
+ - spec/tokenizer_object_spec.rb
128
+ - spec/colorizer_wirb0_highline_spec.rb
108
129
  - spec/tokenizer_symbol_spec.rb
109
- - spec/tokenizer_nil_false_true_spec.rb
130
+ - spec/colorizer_spec.rb
131
+ - spec/tokenizer_string_spec.rb
132
+ - spec/tokenizer_rubyvm_spec.rb
133
+ - spec/tokenizer_rubygems_spec.rb
134
+ - spec/tokenizer_set_spec.rb
110
135
  - spec/tokenizer_nested_spec.rb
111
- - spec/colorizer_highline_spec.rb
136
+ - spec/tokenizer_number_spec.rb
137
+ - spec/tokenizer_regexp_spec.rb
112
138
  - spec/colorizer_wirble_spec.rb
113
- - spec/tokenizer_rubyvm_spec.rb
114
- - spec/tokenizer_array_spec.rb
115
- - spec/colorizer_wirb0_highline_spec.rb
139
+ - spec/tokenizer_nil_false_true_spec.rb
140
+ - spec/tokenizer_time_spec.rb
116
141
  - COPYING.txt
117
- - README.rdoc
118
142
  - CHANGELOG.rdoc
119
- - data/wirb/colorless.yml
143
+ - README.rdoc
120
144
  - data/wirb/classic_paint.yml
145
+ - data/wirb/colorless.yml
121
146
  - data/wirb/classic_wirb0.yml
122
147
  - Rakefile
123
148
  - wirb.gemspec
@@ -145,7 +170,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
145
170
  version: 1.3.6
146
171
  requirements: []
147
172
  rubyforge_project:
148
- rubygems_version: 1.8.5
173
+ rubygems_version: 1.8.19
149
174
  signing_key:
150
175
  specification_version: 3
151
176
  summary: ! 'Wavy IRB: Colorizes irb results.'