Comments (9)
Thanks for reporting, I'll look into that.
from coderay.
By the way, which Ruby version are you using?
from coderay.
ruby 1.9.3p194
from coderay.
test:exe
: It seems your setup is somehow different — it works for me. Can you post the output?
test:scanners
: It might not be up to date. On master, the first 3 tests in diff
are red. However, they work on the multiline-inline-diff
branch.
from coderay.
Running CodeRay 1.0.8 executable tests...
Run options:
# Running tests:
........F.....FF..FFF
Finished tests in 11.464094s, 1.8318 tests/s, 3.2275 assertions/s.
1) Failure:
test: highlighting a file into a pipe (source.rb -html > source.rb.html) should output valid HTML. (TestCodeRayExecutable) [./test/executable/suite.rb:137]:
Expected /\A<!DOCTYPE html>\n<html>\n<head>/ to match "/Users/nathany/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/definition.rb:233: warning: assigned but unused variable - e\n/Users/nathany/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/source.rb:516: warning: method redefined; discarding old revision\n<!DOCTYPE html>\n<html>\n<head>\n [snip...]".
2) Failure:
test: highlighting a file to the terminal should output its contents to stdout. (TestCodeRayExecutable) [./test/executable/suite.rb:101]:
<"class ClassName(): pass"> expected but was
<"/Users/nathany/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/definition.rb:233: warning: assigned but unused variable - e\n/Users/nathany/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/source.rb:516: warning: method redefined; discarding old revision\nclass ClassName(): pass">.
3) Failure:
test: highlighting a file with explicit input and output type (-ruby source.py -span) should just respect the output type and include span tags. (TestCodeRayExecutable) [./test/executable/suite.rb:206]:
<"class ClassName(): pass"> expected but was
<"/Users/nathany/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/definition.rb:233: warning: assigned but unused variable - e\n/Users/nathany/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/source.rb:516: warning: method redefined; discarding old revision\nclass ClassName(): pass">.
4) Failure:
test: the LOC counter should work. (TestCodeRayExecutable) [./test/executable/suite.rb:221]:
<"1\n"> expected but was
<"/Users/nathany/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/definition.rb:233: warning: assigned but unused variable - e\n/Users/nathany/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/source.rb:516: warning: method redefined; discarding old revision\n1\n">.
5) Failure:
test: version should be printed with --version. (TestCodeRayExecutable) [./test/executable/suite.rb:66]:
Expected /\ACodeRay 1.0.8\Z/ to match "/Users/nathany/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/definition.rb:233: warning: assigned but unused variable - e\n/Users/nathany/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/source.rb:516: warning: method redefined; discarding old revision\nCodeRay 1.0.8\n".
6) Failure:
test: version should be printed with -v. (TestCodeRayExecutable) [./test/executable/suite.rb:63]:
Expected /\ACodeRay 1.0.8\Z/ to match "/Users/nathany/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/definition.rb:233: warning: assigned but unused variable - e\n/Users/nathany/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/source.rb:516: warning: method redefined; discarding old revision\nCodeRay 1.0.8\n".
21 tests, 37 assertions, 6 failures, 0 errors, 0 skips
rake aborted!
Command failed with status (6): [/Users/nathany/.rbenv/versions/1.9.3-p194/...]
Tasks: TOP => test:exe
(See full trace by running task with --trace)
from coderay.
This has high priority.
from coderay.
Well, it seems it's your bogus rbenv setup ;)
/Users/nathany/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/definition.rb:233: warning: assigned but unused variable - e
Can you fix that and check again? rake test:exe
should work.
from coderay.
I pulled master (1.0.8) and rake test:exe
is all green! 👍
This is with Ruby 1.9.3-p327.
I did see a few test failures on Diff when running rake test:scanners
.
from coderay.
I did see a few test failures on Diff when running rake test:scanners.
I'm working on fixing those, but not in this release.
from coderay.
Related Issues (20)
- Could the API for CodeRay.scan(dataset, :python).term also allow for some variant that works on the file extension? (e. g. "rb" for ruby files, "py" or python files etc..)
- ActionView::Template::Error (Symbol or String expected, but NilClass given.)
- Elixir Scanner HOT 1
- Regex with slashes are broken for Javascript
- add 1C Enterprise syntax
- Placeholder $ character in prepared statements (SQL) is marked invalid
- Misaligned line numbers in diff files with `line_numbers: :inline` HOT 1
- Install coderay with permission error in macosx HOT 1
- Invalid rdoc option in gemspec
- CodeRay hangs on multi-code in content
- Add support for CakePHP ctp template
- Support for Kotlin
- Coderay breaks with embedded backticks
- Uninitialized constant Coderay (Redmine 4.1)
- $ method in Groovy code is highlighted as error
- ruby 3.0: test/unit/suite.rb fails due to change in flatten behavior for subclass of Array
- Support for C#
- Support for GraphQL
- License? HOT 1
- Can we easily redefine the colours? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coderay.