Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
...
  • 5 commits
  • 10 files changed
  • 0 commit comments
  • 1 contributor
Showing with 34 additions and 28 deletions.
  1. +4 −0 CHANGELOG.rdoc
  2. +1 −1 COPYING.txt
  3. +13 −13 Gemfile.lock
  4. +0 −9 Rakefile
  5. +1 −1 lib/wirb.rb
  6. +1 −1 lib/wirb/tokenizer.rb
  7. +1 −1 lib/wirb/version.rb
  8. +1 −1 spec/spec_helper.rb
  9. +11 −0 spec/tokenizer_symbol_spec.rb
  10. +1 −1 wirb.gemspec
View
4 CHANGELOG.rdoc
@@ -1,3 +1,7 @@
+== 0.4.2
+* Fix a symbol string bug
+* Don't fail on nil input for Wirb.tokenize
+
== 0.4.1
* New bundled color schema: colorless (use at least Paint version 0.8.2)
* Fix minor bugs of 0.4.0
View
2 COPYING.txt
@@ -1,4 +1,4 @@
-Copyright (C) 2011 Jan Lelis <mail@janlelis.de>
+Copyright (C) 2011-2012 Jan Lelis <mail@janlelis.de>
Copyright (C) 2006-2009 Paul Duncan <pabs@pablotron.org>
Permission is hereby granted, free of charge, to any person obtaining a
View
26 Gemfile.lock
@@ -1,23 +1,23 @@
PATH
remote: .
specs:
- wirb (0.4.1)
+ wirb (0.4.2)
GEM
remote: http://rubygems.org/
specs:
- diff-lcs (1.1.2)
- paint (0.8.2)
- rake (0.8.7)
- rspec (2.6.0)
- rspec-core (~> 2.6.0)
- rspec-expectations (~> 2.6.0)
- rspec-mocks (~> 2.6.0)
- rspec-core (2.6.4)
- rspec-expectations (2.6.0)
+ diff-lcs (1.1.3)
+ paint (0.8.4)
+ rake (0.9.2)
+ rspec (2.8.0)
+ rspec-core (~> 2.8.0)
+ rspec-expectations (~> 2.8.0)
+ rspec-mocks (~> 2.8.0)
+ rspec-core (2.8.0)
+ rspec-expectations (2.8.0)
diff-lcs (~> 1.1.2)
- rspec-mocks (2.6.0)
- zucker (11)
+ rspec-mocks (2.8.0)
+ zucker (12.1)
PLATFORMS
ruby
@@ -28,4 +28,4 @@ DEPENDENCIES
rspec
rspec-core
wirb!
- zucker (>= 11)
+ zucker (>= 12.1)
View
9 Rakefile
@@ -1,5 +1,4 @@
require 'rake'
-require 'rake/rdoctask'
require 'fileutils'
require "rspec/core/rake_task"
task :default => :spec
@@ -38,11 +37,3 @@ task :gemspec do
gemspec.validate
end
-Rake::RDocTask.new do |rdoc|
- require File.expand_path( File.join( 'lib', 'wirb') )
-
- rdoc.rdoc_dir = 'doc'
- rdoc.title = "Wirb #{Wirb::VERSION}"
- rdoc.rdoc_files.include('README*')
- rdoc.rdoc_files.include('lib/**/*.rb')
-end
View
2 lib/wirb.rb
@@ -57,7 +57,7 @@ def schema=(val)
def load_schema!(yaml_path = :classic_wirb0)
if yaml_path.is_a? Symbol # bundled themes
schema_name = yaml_path.to_s
- schema_yaml = YAML.load_file(File.join( Gem.datadir('wirb'), schema_name + '.yml' ))
+ schema_yaml = YAML.load_file(File.join(Gem.datadir('wirb'), schema_name + '.yml'))
else
schema_name = File.basename(yaml_path).gsub(/\.yml$/, '')
schema_yaml = YAML.load_file(yaml_path)
View
2 lib/wirb/tokenizer.rb
@@ -3,6 +3,7 @@ class << Wirb
# Almost everyone would say that 400 lines long case statements need refactoring, but
# ...sometimes it just doesn't matter ;)
def tokenize(str)
+ return [] if str.nil?
raise ArgumentError, 'Tokenizer needs an inspect-string' unless str.is_a? String
return enum_for(:tokenize, str) unless block_given?
@@ -185,7 +186,6 @@ def tokenize(str)
if c == '"' && ( !( @token =~ /\\+$/; $& ) || $&.size % 2 == 0 ) # see string
pass[:open_symbol_string, '"']
pass_state[:remove]
- pop_state[]
pass[:close_symbol_string, '"']
else
@token << c
View
2 lib/wirb/version.rb
@@ -1,3 +1,3 @@
module Wirb
- VERSION = '0.4.1'.freeze
+ VERSION = '0.4.2'.dup
end
View
2 spec/spec_helper.rb
@@ -1,7 +1,7 @@
require 'wirb'
require 'wirb/wp'
require 'zucker/engine'
-require 'zucker/version'
+require 'zucker/ruby_version'
Wirb.start
View
11 spec/tokenizer_symbol_spec.rb
@@ -152,4 +152,15 @@
[:close_array, "]"],
]
end
+
+ please do check [:"42"]
+ tokens.should == [
+ [:open_array, "["],
+ [:symbol_prefix, ":"],
+ [:open_symbol_string, "\""],
+ [:symbol_string, "42"],
+ [:close_symbol_string, "\""],
+ [:close_array, "]"],
+ ]
+ end
end
View
2 wirb.gemspec
@@ -18,7 +18,7 @@ Gem::Specification.new do |s|
s.add_development_dependency 'rspec'
s.add_development_dependency 'rspec-core'
s.add_development_dependency 'rake'
- s.add_development_dependency 'zucker', '>= 11'
+ s.add_development_dependency 'zucker', '>= 12.1'
#s.add_development_dependency 'highline'
s.add_development_dependency 'paint'

No commit comments for this range

Something went wrong with that request. Please try again.