qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcpie...@apache.org
Subject svn commit: r1394227 - in /qpid/proton/trunk/proton-c/bindings/ruby: .gitignore ChangeLog Rakefile TODO spec/ spec/spec_helper.rb
Date Thu, 04 Oct 2012 19:54:44 GMT
Author: mcpierce
Date: Thu Oct  4 19:54:43 2012
New Revision: 1394227

URL: http://svn.apache.org/viewvc?rev=1394227&view=rev
Log:
PROTON-27 : Provides a more robust environment for developing the Ruby bindings.

Fixes the Rspec target name to be "rspec" rather than "spec".
Added a TODO and ChangeLog file for the Ruby language bindings.
Updated the Rakefile to include these in the gem.
Added new files to the gitignore file for the Ruby bindings.
Added a rake target to generate the Ruby documentation.
Added support for using SimpleCov to provide test coverage.

Added:
    qpid/proton/trunk/proton-c/bindings/ruby/ChangeLog
    qpid/proton/trunk/proton-c/bindings/ruby/TODO
    qpid/proton/trunk/proton-c/bindings/ruby/spec/
    qpid/proton/trunk/proton-c/bindings/ruby/spec/spec_helper.rb
Modified:
    qpid/proton/trunk/proton-c/bindings/ruby/.gitignore
    qpid/proton/trunk/proton-c/bindings/ruby/Rakefile

Modified: qpid/proton/trunk/proton-c/bindings/ruby/.gitignore
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/bindings/ruby/.gitignore?rev=1394227&r1=1394226&r2=1394227&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/bindings/ruby/.gitignore (original)
+++ qpid/proton/trunk/proton-c/bindings/ruby/.gitignore Thu Oct  4 19:54:43 2012
@@ -1 +1,6 @@
+coverage
 ext/cproton/cproton.c
+html
+lib/*.so
+pkg
+tmp

Added: qpid/proton/trunk/proton-c/bindings/ruby/ChangeLog
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/bindings/ruby/ChangeLog?rev=1394227&view=auto
==============================================================================
--- qpid/proton/trunk/proton-c/bindings/ruby/ChangeLog (added)
+++ qpid/proton/trunk/proton-c/bindings/ruby/ChangeLog Thu Oct  4 19:54:43 2012
@@ -0,0 +1,4 @@
+version 0.1 (TBA):
+	* First implementation of the stable APIs on top of swig.
+	* Wrote the Rspec tests to test the new APIs.
+	* Added SimpleCov support to monitor Rspec test coverage.

Modified: qpid/proton/trunk/proton-c/bindings/ruby/Rakefile
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/bindings/ruby/Rakefile?rev=1394227&r1=1394226&r2=1394227&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/bindings/ruby/Rakefile (original)
+++ qpid/proton/trunk/proton-c/bindings/ruby/Rakefile Thu Oct  4 19:54:43 2012
@@ -22,6 +22,29 @@ require "rubygems"
 require "rubygems/package_task"
 
 require "rake/clean"
+require "rake/extensiontask"
+require "rake/rdoctask"
+
+CPROTON_BUILD=ENV["CPROTON_BUILD"].nil? ? nil : "#{ENV['CPROTON_BUILD']}/bindings/ruby"
+
+if CPROTON_BUILD.nil?
+  puts "********************************************************"
+  puts "Please set CPROTON_BUILD to build the native extensions."
+  puts "********************************************************"
+  puts ""
+end
+
+PROTON_HOME=ENV["PROTON_HOME"]
+
+if PROTON_HOME.nil?
+  puts "*************************************************************"
+  puts "Please source the config.sh file to set the PROTON_HOME path."
+  puts "*************************************************************"
+  puts ""
+end
+
+
+require "rspec/core/rake_task"
 
 CLOBBER.include("ext/cproton/cproton.c")
 
@@ -33,6 +56,24 @@ task :swig do
   system "swig -ruby -I../../include -o ext/cproton/cproton.c ruby.i"
 end
 
+RSpec::Core::RakeTask.new(:rspec) do |t|
+  t.ruby_opts = [
+                 "-I #{CPROTON_BUILD}",
+                 "-I lib"
+                 ]
+  t.rspec_opts = [
+                  "--color",
+                  "--format",
+                  "progress"
+                 ]
+end
+
+Rake::RDocTask.new do |rd|
+  rd.main = "README.rdoc"
+  rd.rdoc_files.include("README.rdoc",
+                        "lib/**/*.rb")
+end
+
 # Gem specification and packaging
 spec = Gem::Specification.new do |s|
   s.name = Qpid::Proton::NAME
@@ -58,11 +99,19 @@ EOF
   s.extensions << "ext/cproton/extconf.rb"
 
   s.files = Dir[
+                "TODO",
+                "ChangeLog",
                 "ext/cproton/*.rb",
                 "ext/cproton/*.c",
-                "lib/**/*.rb"
+                "lib/**/*.rb",
+                "features/**/*.rb"
                 ]
 end
 
+Rake::ExtensionTask.new("cproton", spec) do |t|
+  t.config_options << "--with-qpid-proton-lib=${CPROTON_BUILD}"
+  t.config_options << "--with-qpid-proton-include=#{PROTON_HOME}/proton-c/include"
+end
+
 Gem::PackageTask.new(spec) do |pkg|
 end

Added: qpid/proton/trunk/proton-c/bindings/ruby/TODO
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/bindings/ruby/TODO?rev=1394227&view=auto
==============================================================================
--- qpid/proton/trunk/proton-c/bindings/ruby/TODO (added)
+++ qpid/proton/trunk/proton-c/bindings/ruby/TODO Thu Oct  4 19:54:43 2012
@@ -0,0 +1,11 @@
+Proton Ruby bindings TODO List
+========================================================================
+
+Beyond this simple laundry list, you can find the list of bugs and
+enhacements to be fixed by going to Apache Proton JIRA instance:
+
+    https://issues.apache.org/jira/browse/PROTON
+
+Fixes & Improvements
+========================================================================
+* Fix the data mangling that occurs at specific lengths.
\ No newline at end of file

Added: qpid/proton/trunk/proton-c/bindings/ruby/spec/spec_helper.rb
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/bindings/ruby/spec/spec_helper.rb?rev=1394227&view=auto
==============================================================================
--- qpid/proton/trunk/proton-c/bindings/ruby/spec/spec_helper.rb (added)
+++ qpid/proton/trunk/proton-c/bindings/ruby/spec/spec_helper.rb Thu Oct  4 19:54:43 2012
@@ -0,0 +1,31 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+begin
+  require "simplecov"
+  puts "simplecov available"
+
+  SimpleCov.start do
+    add_filter "/lib/*/*.rb"
+  end
+
+rescue
+  puts "simplecov not available"
+end
+



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message