Permalink
Browse files

remove jruby and windows references. add ruby 2.2.3

  • Loading branch information...
1 parent b47b00e commit dc99e342ae175d09be903282432f1638da09c84e @joshuasiler joshuasiler committed Apr 29, 2016
View
@@ -3,21 +3,14 @@ cache: bundler
sudo: false
rvm:
- 2.0.0
+ - 2.2.3
- 1.9.3
- 1.9.2
- - jruby-18mode
- - jruby-19mode
- - rbx-2
- ruby-head
- - jruby-head
- 1.8.7
- ree
matrix:
fast_finish: true
- allow_failures:
- - rvm: jruby-18mode
- - rvm: jruby-19mode
- - rvm: jruby-head
compiler:
- clang
- gcc
View
@@ -1,4 +1,7 @@
-== Head
+== 4.3.0 / April 29th, 2016
+
+* Remove JRuby and Windows cross compilation and support
+* Add Ruby 2.2.3 testing and support
* include CVE-2012-6684 fix [Tomas Pospisek]
* fix by [Antonio Terceiro]
View
@@ -14,7 +14,7 @@ License:: MIT
RedCloth is a Ruby library for converting Textile into HTML.
-== Attention - Deprecating JRuby and Windows support in upcoming 4.3 release
+== Attention - Deprecating JRuby and Windows support in version 4.3
In order to prioritize merging a fix for the long standing vulnerability *CVE-2012-6684*, our {new maintainer}[https://github.com/joshuasiler] has elected to stop maintaining the precompiled versions for Windows and JRuby.
@@ -28,7 +28,7 @@ RedCloth can be installed via RubyGems:
If you just want to use RedCloth, you do NOT need to build/compile it. It is
compiled from C sources automatically when you install the gem on the ruby
-platform. Precompiled binary gems are provided for JRuby and Win32 platforms.
+platform. Precompiled binary gems are provided for JRuby and Win32 platforms prior to version 4.3.
RedCloth can be compiled with <tt>rake compile</tt>. Ragel 6.3 or greater is
required. Again, Ragel is NOT needed to simply use RedCloth.
@@ -1,8 +1,8 @@
module RedCloth
module VERSION
MAJOR = 4
- MINOR = 2
- TINY = 9
+ MINOR = 3
+ TINY = 0
RELEASE_CANDIDATE = 1
STRING = [MAJOR, MINOR, TINY, RELEASE_CANDIDATE].compact.join('.')
@@ -1,83 +0,0 @@
-/*
- * redcloth_attributes.rl
- *
- * Copyright (C) 2009 Jason Garber
- */
-import java.io.IOException;
-
-import org.jruby.Ruby;
-import org.jruby.RubyArray;
-import org.jruby.RubyClass;
-import org.jruby.RubyHash;
-import org.jruby.RubyModule;
-import org.jruby.RubyNumeric;
-import org.jruby.RubyObject;
-import org.jruby.RubyString;
-import org.jruby.RubySymbol;
-import org.jruby.anno.JRubyMethod;
-import org.jruby.runtime.Block;
-import org.jruby.runtime.CallbackFactory;
-import org.jruby.runtime.builtin.IRubyObject;
-import org.jruby.exceptions.RaiseException;
-import org.jruby.runtime.load.BasicLibraryService;
-
-import org.jruby.util.ByteList;
-
-public class RedclothAttributes extends RedclothScanService.Base {
-
-%%{
-
- machine redcloth_attributes;
- include redcloth_common "redcloth_common.java.rl";
- include redcloth_attributes "redcloth_attributes.rl";
-
-}%%
-
-%% write data nofinal;
-
- private int machine;
-
- public RedclothAttributes(int machine, IRubyObject self, byte[] data, int p, int pe) {
- this.runtime = self.getRuntime();
- this.self = self;
-
- // This is GROSS but necessary for EOF matching
- this.data = new byte[pe+1];
- System.arraycopy(data, p, this.data, 0, pe);
- this.data[pe] = 0;
-
- this.p = 0;
- this.pe = pe+1;
- this.eof = this.pe;
- this.orig_p = 0;
- this.orig_pe = this.pe;
-
- this.regs = RubyHash.newHash(runtime);
- this.attr_regs = RubyHash.newHash(runtime);
- this.machine = machine;
- }
-
- public IRubyObject parse() {
- %% write init;
-
- cs = machine;
-
- %% write exec;
-
- return regs;
- }
-
- public static IRubyObject attributes(IRubyObject self, IRubyObject str) {
- ByteList bl = str.convertToString().getByteList();
- int cs = redcloth_attributes_en_inline;
- return new RedclothAttributes(cs, self, bl.bytes, bl.begin, bl.realSize).parse();
- }
-
- public static IRubyObject link_attributes(IRubyObject self, IRubyObject str) {
- Ruby runtime = self.getRuntime();
-
- ByteList bl = str.convertToString().getByteList();
- int cs = redcloth_attributes_en_link_says;
- return new RedclothAttributes(cs, self, bl.bytes, bl.begin, bl.realSize).parse();
- }
-}
@@ -1,25 +0,0 @@
-%%{
-
- machine redcloth_common;
-
- action esc { strCatEscaped(self, block, data, ts, te); }
- action esc_pre { strCatEscapedForPreformatted(self, block, data, ts, te); }
- action ignore { ((RubyString)block).append(self.callMethod(runtime.getCurrentContext(), "ignore", regs)); }
-
- # conditionals
- action starts_line {
- p == orig_p || data[(p-1)] == '\r' || data[(p-1)] == '\n' || data[(p-1)] == '\f'
- }
- action starts_phrase {
- p == orig_p || data[(p-1)] == '\r' || data[(p-1)] == '\n' || data[(p-1)] == '\f' || data[(p-1)] == ' '
- }
- action extended { !extend.isNil() }
- action not_extended { extend.isNil() }
- action following_hash_is_ol_not_id {
- (data[(p+1)] == '#') ? (data[(p+2)] == '#' || data[(p+2)] == '*' || data[(p+2)] == ' ') : true
- }
-
-
- include redcloth_common "redcloth_common.rl";
-
-}%%;
@@ -1,141 +0,0 @@
-/*
- * redcloth_inline.rl
- *
- * Copyright (C) 2009 Jason Garber
- */
-import java.io.IOException;
-
-import org.jruby.Ruby;
-import org.jruby.RubyArray;
-import org.jruby.RubyClass;
-import org.jruby.RubyHash;
-import org.jruby.RubyModule;
-import org.jruby.RubyNumeric;
-import org.jruby.RubyObject;
-import org.jruby.RubyString;
-import org.jruby.RubySymbol;
-import org.jruby.anno.JRubyMethod;
-import org.jruby.runtime.Block;
-import org.jruby.runtime.CallbackFactory;
-import org.jruby.runtime.builtin.IRubyObject;
-import org.jruby.exceptions.RaiseException;
-import org.jruby.runtime.load.BasicLibraryService;
-
-import org.jruby.util.ByteList;
-
-public class RedclothInline extends RedclothScanService.Base {
-
-%%{
-
- machine redcloth_inline;
- include redcloth_common "redcloth_common.java.rl";
- include redcloth_inline "redcloth_inline.rl";
-
-}%%
-
-%% write data nofinal;
-
- public IRubyObject red_pass_code(IRubyObject self, IRubyObject regs, IRubyObject ref, String meth) {
- IRubyObject txt = ((RubyHash)regs).aref(ref);
- if(!txt.isNil()) {
- IRubyObject txt2 = RubyString.newEmptyString(runtime);
- strCatEscapedForPreformatted(self, txt2, ((RubyString)txt).getByteList().bytes, ((RubyString)txt).getByteList().begin, ((RubyString)txt).getByteList().begin + ((RubyString)txt).getByteList().realSize);
- ((RubyHash)regs).aset(ref, txt2);
- }
- return self.callMethod(runtime.getCurrentContext(), meth, regs);
- }
-
- public IRubyObject red_parse_attr(IRubyObject self, IRubyObject regs, IRubyObject ref) {
- IRubyObject txt = ((RubyHash)regs).aref(ref);
- IRubyObject new_regs = RedclothAttributes.attributes(self, txt);
- return regs.callMethod(runtime.getCurrentContext(), "merge!", new_regs);
- }
-
- public IRubyObject red_parse_link_attr(IRubyObject self, IRubyObject regs, IRubyObject ref) {
- IRubyObject txt = ((RubyHash)regs).aref(ref);
- IRubyObject new_regs = red_parse_title(RedclothAttributes.link_attributes(self, txt), ref);
- return regs.callMethod(runtime.getCurrentContext(), "merge!", new_regs);
- }
-
- public IRubyObject red_parse_image_attr(IRubyObject self, IRubyObject regs, IRubyObject ref) {
- return red_parse_title(regs, ref);
- }
-
- public IRubyObject red_parse_title(IRubyObject regs, IRubyObject ref) {
- IRubyObject name = ((RubyHash)regs).aref(ref);
- if ( !name.isNil() ) {
- String s = name.convertToString().toString();
- int p = s.length();
- if (s.charAt(p - 1) == ')') {
- int level = -1;
- p--;
- while (p > 0 && level < 0) {
- switch(s.charAt(p - 1)) {
- case '(': ++level; break;
- case ')': --level; break;
- }
- --p;
- }
- IRubyObject title = runtime.newString(s.substring(p + 1, s.length() - 1));
- if(p > 0 && s.charAt(p - 1) == ' ') --p;
- if(p != 0) {
- ((RubyHash)regs).aset(ref, runtime.newString(s.substring(0, p)));
- ((RubyHash)regs).aset(runtime.newSymbol("title"), title);
- }
- }
- }
- return regs;
- }
-
- public void PASS_CODE(IRubyObject H, String A, String T) {
- ((RubyString)H).append(red_pass_code(self, regs, runtime.newSymbol(A), T));
- }
-
- public void PARSE_ATTR(String A) {
- red_parse_attr(self, regs, runtime.newSymbol(A));
- }
-
- public void PARSE_LINK_ATTR(String A) {
- red_parse_link_attr(self, regs, runtime.newSymbol(A));
- }
-
- public void PARSE_IMAGE_ATTR(String A) {
- red_parse_image_attr(self, regs, runtime.newSymbol(A));
- }
-
- private int opts;
-
- public RedclothInline(IRubyObject self, byte[] data, int p, int pe, IRubyObject refs) {
- this.runtime = self.getRuntime();
- this.self = self;
-
- // This is GROSS but necessary for EOF matching
- this.data = new byte[pe+1];
- System.arraycopy(data, p, this.data, 0, pe);
- this.data[pe] = 0;
-
- this.p = 0;
- this.pe = pe+1;
- this.eof = this.pe;
- this.orig_p = 0;
- this.orig_pe = this.pe;
- this.refs = refs;
- this.block = RubyString.newEmptyString(runtime);
- this.regs = runtime.getNil();
- this.attr_regs = runtime.getNil();
- this.opts = 0;
- }
-
-
- public IRubyObject inline() {
- %% write init;
- %% write exec;
-
- return block;
- }
-
- public static IRubyObject inline2(IRubyObject self, IRubyObject str, IRubyObject refs) {
- ByteList bl = str.convertToString().getByteList();
- return new RedclothInline(self, bl.bytes, bl.begin, bl.realSize, refs).inline();
- }
-}
Oops, something went wrong.

0 comments on commit dc99e34

Please sign in to comment.