summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Frank <flori@ping.de>2011-01-26 02:10:56 +0100
committerFlorian Frank <flori@ping.de>2011-01-26 02:14:04 +0100
commit514d791dd8602ad1d70d45a824927aafe44e838c (patch)
treeaf3bfae5698bafd8c3859b237b9cb92a4792be82
parent0b15820e245f4048d1bcd29cd60693e4e211ab43 (diff)
downloadjson-514d791dd8602ad1d70d45a824927aafe44e838c.tar.gz
Support building of fat binary gemv1.5.1
This should fix issue #51 on Windows
-rw-r--r--CHANGES5
-rw-r--r--Rakefile6
-rw-r--r--VERSION2
-rw-r--r--lib/json/ext.rb17
-rw-r--r--lib/json/version.rb2
5 files changed, 26 insertions, 6 deletions
diff --git a/CHANGES b/CHANGES
index fa76a97..3ee1a8b 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,7 @@
-2010-08-15 (1.5.0)
+2011-01-24 (1.5.1)
+ * Made rake-compiler build a fat binary gem. This should fix issue
+ https://github.com/flori/json/issues#issue/54.
+2011-01-22 (1.5.0)
* Included Java source codes for the Jruby extension made by Daniel Luz
<dev@mernen.com>.
* Output full exception message of deep_const_get to aid debugging.
diff --git a/Rakefile b/Rakefile
index 05871c9..8bbd7d9 100644
--- a/Rakefile
+++ b/Rakefile
@@ -386,8 +386,12 @@ else
desc "Generate diagrams of ragel parser"
task :ragel_dot => [ :ragel_dot_png, :ragel_dot_ps ]
+ task :environment do
+ ENV['RUBY_CC_VERSION'] = '1.8.7:1.9.2'
+ end
+
desc "Build all gems and archives for a new release of json and json_pure."
- task :release => [ :clean, :version, :cross, :native, :gem, ] do
+ task :release => [ :clean, :version, :environment, :cross, :native, :gem, ] do
sh "#$0 clean native gem"
sh "#$0 clean package"
end
diff --git a/VERSION b/VERSION
index bc80560..26ca594 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.5.0
+1.5.1
diff --git a/lib/json/ext.rb b/lib/json/ext.rb
index 7264a85..1fbc3fd 100644
--- a/lib/json/ext.rb
+++ b/lib/json/ext.rb
@@ -4,8 +4,21 @@ module JSON
# This module holds all the modules/classes that implement JSON's
# functionality as C extensions.
module Ext
- require 'json/ext/parser'
- require 'json/ext/generator'
+ begin
+ if defined?(RUBY_ENGINE) == 'constant' and RUBY_ENGINE == 'ruby' and RUBY_VERSION =~ /\A1\.9\./
+ require 'json/ext/1.9/parser'
+ require 'json/ext/1.9/generator'
+ elsif !defined?(RUBY_ENGINE) && RUBY_VERSION =~ /\A1\.8\./
+ require 'json/ext/1.8/parser'
+ require 'json/ext/1.8/generator'
+ else
+ require 'json/ext/parser'
+ require 'json/ext/generator'
+ end
+ rescue LoadError
+ require 'json/ext/parser'
+ require 'json/ext/generator'
+ end
$DEBUG and warn "Using Ext extension for JSON."
JSON.parser = Parser
JSON.generator = Generator
diff --git a/lib/json/version.rb b/lib/json/version.rb
index beff08b..86a741a 100644
--- a/lib/json/version.rb
+++ b/lib/json/version.rb
@@ -1,6 +1,6 @@
module JSON
# JSON version
- VERSION = '1.5.0'
+ VERSION = '1.5.1'
VERSION_ARRAY = VERSION.split(/\./).map { |x| x.to_i } # :nodoc:
VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
VERSION_MINOR = VERSION_ARRAY[1] # :nodoc: