Repository: qpid-proton
Updated Branches:
  refs/heads/master c31ca95ac -> bbeb78caa


PROTON-1560: ruby: cmake builds the ruby gem.

The ruby gem is built automatically from the build tree, no need to have
proton installed locally. `make ruby-gem` to build it explicitly.


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/213a78be
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/213a78be
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/213a78be

Branch: refs/heads/master
Commit: 213a78be840a601f8aa168534cbefad2caac581d
Parents: 5b3b283
Author: Alan Conway <acon...@redhat.com>
Authored: Thu Sep 28 14:19:58 2017 -0400
Committer: Alan Conway <acon...@redhat.com>
Committed: Thu Sep 28 16:37:27 2017 -0400

----------------------------------------------------------------------
 proton-c/bindings/ruby/CMakeLists.txt         |  18 +-
 proton-c/bindings/ruby/ChangeLog              | 203 ++++++++++++++++++---
 proton-c/bindings/ruby/TODO                   |  10 +-
 proton-c/bindings/ruby/changelog.rb           |  28 +++
 proton-c/bindings/ruby/qpid_proton.gemspec    |  36 ----
 proton-c/bindings/ruby/qpid_proton.gemspec.in |  32 ++++
 6 files changed, 248 insertions(+), 79 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/213a78be/proton-c/bindings/ruby/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/proton-c/bindings/ruby/CMakeLists.txt 
b/proton-c/bindings/ruby/CMakeLists.txt
index eb84a6c..2c50027a 100644
--- a/proton-c/bindings/ruby/CMakeLists.txt
+++ b/proton-c/bindings/ruby/CMakeLists.txt
@@ -17,6 +17,11 @@
 # under the License.
 #
 
+set(src "${CMAKE_CURRENT_SOURCE_DIR}")
+set(bin "${CMAKE_CURRENT_BINARY_DIR}")
+
+## Build the swig library
+
 list(APPEND SWIG_MODULE_cproton-ruby_EXTRA_DEPS
     ${CMAKE_SOURCE_DIR}/proton-c/include/proton/cproton.i
     ${PROTON_HEADERS}
@@ -45,15 +50,14 @@ file(GLOB_RECURSE RUBY_SRC RELATIVE . *.rb *.rdoc)
 find_program(GEM_EXE gem DOC "Program to build and install ruby gem packages")
 mark_as_advanced(GEM_EXE)
 if (GEM_EXE)
-  configure_file(qpid_proton.gemspec.in qpid_proton.gemspec)
+  # Copy source and generated files to the build tree so we can build the gem 
in one place
+  configure_file(${src}/qpid_proton.gemspec.in ${bin}/qpid_proton.gemspec)
   add_custom_command(
     OUTPUT ${bin}/qpid_proton-${PN_VERSION}.gem
-    DEPENDS ${RUBY_SRC} ${src}/LICENSE ${src}/TODO ${src}/ChangeLog 
${bin}/rubyRUBY_wrap.c
-    COMMAND ${CMAKE_COMMAND} -E copy_directory ${src}/lib ${bin}/lib
-    COMMAND ${CMAKE_COMMAND} -E copy_directory ${src}/ext ${bin}/ext
-    COMMAND ${CMAKE_COMMAND} -E copy ${src}/LICENSE ${src}/TODO 
${src}/ChangeLog ${bin}
+    COMMAND ${CMAKE_COMMAND} -E copy_directory ${src} ${bin}
     COMMAND ${CMAKE_COMMAND} -E copy ${bin}/rubyRUBY_wrap.c 
${bin}/ext/cproton/cproton.c
     COMMAND ${GEM_EXE} build qpid_proton.gemspec
+    DEPENDS ${RUBY_SRC} ${src}/LICENSE ${src}/TODO ${src}/ChangeLog 
${bin}/rubyRUBY_wrap.c
     WORKING_DIRECTORY ${bin})
 
   add_custom_target(ruby-gem ALL DEPENDS ${bin}/qpid_proton-${PN_VERSION}.gem )
@@ -86,10 +90,8 @@ endif()
 install(TARGETS cproton-ruby DESTINATION ${RUBY_ARCHLIB_DIR} COMPONENT Ruby)
 install(DIRECTORY lib DESTINATION ${RUBY_ARCHLIB_DIR} COMPONENT Ruby)
 
-#### Tests
+## Tests
 
-set(src "${CMAKE_CURRENT_SOURCE_DIR}")
-set(bin "${CMAKE_CURRENT_BINARY_DIR}")
 set(bld "$<TARGET_FILE_DIR:qpid-proton>")
 
 
to_native_path("$ENV{RUBYLIB};${src}/lib;${src}/tests;${src}/spec;${bin};${bld}"
 RUBYLIB)

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/213a78be/proton-c/bindings/ruby/ChangeLog
----------------------------------------------------------------------
diff --git a/proton-c/bindings/ruby/ChangeLog b/proton-c/bindings/ruby/ChangeLog
index ec0429e..3d2092b 100644
--- a/proton-c/bindings/ruby/ChangeLog
+++ b/proton-c/bindings/ruby/ChangeLog
@@ -1,36 +1,185 @@
-Version 0.7:
-       * PROTON-452: Exposed Messenger interrupt method.
-       * PROTON-454: Add route method to Messenger.
-       * PROTON-455: Add rewrite method to Messenger.
-       * PROTON-456: Add password property to Messenger.
 
-Version 0.6:
-       * PROTON-427: Removed the flag argument from Messenger.settle.
+version 0.17.0:
+
+version 0.16.0:
+       * PROTON-1350 PROTON-1351: Introduce proton-c core library - Created 
new core proton library qpid-proton-core which only contains   protocol 
processsing and no IO. - Rearranged source tree to separate core protocol code 
and io/reactor/extra code - Rearranged code so that compiler dependent code is 
isolated and platform (OS)   dependent code is isolated
+
+version 0.15.0:
+       * PROTON-1282: Seg Fault in Ruby Messenger pn_messenger_free
+
+version 0.14.0:
+
+version 0.13.1:
+
+version 0.13.0:
+
+version 0.12.2:
+
+version 0.12.1:
+
+version 0.12.0:
+       * PROTON-1059: ruby binding broken in 0.11 release and on master
+       * PROTON-949: fix proton build with ccache swig
+
+version 0.11.1:
+       * PROTON-1059: ruby binding broken in 0.11 release and on master
+
+version 0.11.0:
+       * PROTON-949: fix proton build with ccache swig
+
+version 0.10:
+       * PROTON-904: No longer need to include libuuid header
+       * PROTON-781: Update CMake to install new Ruby packages.
+       * PROTON-781: Added the set of LinkOption classes to Ruby.
+       * PROTON-781: Added support for reactors to the Ruby Endpoint class.
+       * PROTON-781: Added Container to the Ruby reactive APIs.
+       * PROTON-781: Added SessionPerConnection to the Ruby reactive APIs.
+       * PROTON-781: Added Backoff to the Ruby reactive APIs.
+       * PROTON-781: Added Connector to the Ruby reactive APIs.
+       * PROTON-781: Added URLs to the Ruby reactive APIs.
+       * PROTON-781: Added the URL class to the Ruby core APIs.
+       * PROTON-781: Added Reactor and Task to the ClassWrapper
+       * PROTON-781: Added the Reactor mixin to the Ruby reactive APIs.
+       * PROTON-781: Added the Handler mixin to the Ruby reactive APIs.
+       * PROTON-781: Added the Timeout mixin to the Ruby APIs.
+       * PROTON-781: Added GlobalOverrides to the Ruby reactive APIs.
+       * PROTON-781: Added SSLConfig to the Ruby reactive APIs.
+       * PROTON-781: Added reactor support to the Ruby Event class.
+       * PROTON-781: Added the Reactor class to the Ruby reactor APIs.
+       * PROTON-781: Added Acceptor to the Ruby reactive APIs.
+       * PROTON-781: Added the Task class to the Ruby reactor APIs.
+       * PROTON-781: Added MessagingHandler to the Ruby reactive APIs.
+       * PROTON-781: Added OutgoingMessageHandler to the Ruby reactive APIs.
+       * PROTON-781: Added IncomingMessageHandler to the Ruby reactive APIs.
+       * PROTON-781: Added the BaseHandler class to the Ruby reactive APIs.
+       * PROTON-781: Added the CFlowController class to the Ruby reactive APIs.
+       * PROTON-781: Added EndpointStateHandler to the Ruby reactive APIs.
+       * PROTON-781: Added the Acking mixin to the Ruby reactive APIs.
+       * PROTON-781: Refactored the Ruby Selectable class.
+       * PROTON-781: Repackaged the Ruby Selectable class to Qpid::Proton.
+       * PROTON-781: Deleted the Ruby Filter mixin.
+       * PROTON-781: Added the WrappedHandler class to the Ruby reactor APIs.
+       * PROTON-799: Update CMake INSTALL for 81a5449
+       * PROTON-914: Fix for getting the SSL peer hostname in Ruby.
+       * PROTON-898: Update Ruby bindings to use pn_selectable_get_fd
+       * PROTON-799: Test for the Wrapper and rbkey system
+       * PROTON-799: Adjusted the Ruby error macro
+       * PROTON-799: Added yardopts
+       * PROTON-799: Added the Event classes to the Ruby engine APIs.
+       * PROTON-799: Added the ClassWrapper mixin for the Ruby engine APIs.
+       * PROTON-799: Added the Transport class to the Ruby engine APIs.
+       * PROTON-799: Added the SSL classes to the Ruby engine APIs.
+       * PROTON-799: Added the SASL class to the Ruby engine APIs.
+       * PROTON-799: Added the SASLError and TransportError errors to Ruby.
+       * PROTON-799: Added the Connection class to the Ruby engine APIs.
+       * PROTON-799: Added the Receiver class to the Ruby engine APIs.
+       * PROTON-799: Added the Sender class to the Ruby engine APIs.
+       * PROTON-799: Added the Link class to the Ruby engine APIs.
+       * PROTON-799: Added the Delivery class to the Ruby engine APIs.
+       * PROTON-799: Added the Disposition class to the Ruby engine APIs.
+       * PROTON-799: Added the Terminus class to the Ruby engine APIs.
+       * PROTON-799: Added the Session class to the Ruby engine APIs.
+       * PROTON-799: Added the Endpoint class to the Ruby engine APIs.
+       * PROTON-799: Added the Wrapper mixin to the Ruby engine APIs.
+       * PROTON-799: Added the Condition class to the Ruby engine APIs.
+       * PROTON-799: Added the UUID mixin for the Ruby reactive APIs.
+       * PROTON-799: Created a utility module for the Ruby Engine APIs.
+       * PROTON-799: Added the Collector class to the Ruby engine APIs.
+       * PROTON-799: Added the pn_rbkey_t type to the Ruby APIs.
+       * PROTON-799: Created a wrapper helper module for Ruby bindings.
+       * PROTON-799: Added a constants value mixin to the Ruby bindings.
+       * PROTON-799: Added the object/object= methods to Ruby Data class
+       * PROTON-799: Updated the Ruby namespaces.
+       * PROTON-799: Rearranged Ruby library.
+       * PROTON-883: Fixed using a pointer value as a size - It's not clear to 
me how the warning message this caused went ignored - It's also not clear to me 
why this error passed the tests without   crashing, probably the ruby tests 
need improving.
+       * PROTON-883: Wrap pn_transport_peek for Ruby.
+       * PROTON-873: Replaced send with __send__ in Ruby Mapping class
+
+version 0.9.1:
+
+version 0.9:
+       * PROTON-822: removed some references I missed in my prior purge of 
deprecated message cruft
+       * PROTON-822: removed deprecated message save/load as it has been 
deprecated for a while now and was also the cause of a valgrind error
+       * PROTON-775: Ensure that annotation keys in Ruby are encoded as 
symbols.
+       * PROTON-737: add missing PN_STATE_ERR error to ruby
+       * PROTON-765: Fix Ruby's support for 64-bit values on 32-bit systems
+       * PROTON-755: Changed how the Data rspec test sets a single random 
character.
+       * PROTON-755: Add SecureRandom for use by Ruby 1.8 tests
+       * PROTON-755: Updated rspec tests to use the newer expect syntax
+       * PROTON-752: Release the GIL on blocking calls in Ruby.
+       * PROTON-736: Tweaked how Ruby 1.8 determines if a string is UTF-8
+       * PROTON-752: Provide a non-blocking means to receive messages in Ruby.
+       * PROTON-747: Around wrappers for Ruby Messenger methods that raise 
errors
+       * PROTON-736: Replace missed force_encoding with encode
+       * PROTON-743: Provide a means to clear errors in a Ruby Messenger.
+       * PROTON-746: Fix encoding a Ruby symbol into a message body.
+       * PROTON-736: Default Ruby 1.8 encoding to be binary unless explicit
+       * PROTON-736: Created the UTFString and BinaryString classes for Ruby.
+       * PROTON-739: Add TTL to Ruby Messenger subscribe method.
+       * PROTON-736: Only encode Ruby strings as UTF-8 if it says it's UTF-8
+       * PROTON-736: Ruby Message does not return all content.
+
+version 0.8:
+       * PROTON-693: Python Url class to wrap C function pni_parse_url
+       * PROTON-651: remove the extraineous 'PN_' if under the proton 
namespace.
+       * PROTON-651: added version constants for python, php, and ruby bindings
+       * PROTON-615: Fix binding dependencies
+       * PROTON-549: fixed warnings from ruby binding
+       * PROTON-531: Removed Selectable.killable? from Ruby bindings
+       * PROTON-531: Created the Selectable class for Ruby.
+       * PROTON-531: Expose the passive mode in Ruby bindings.
+
+version 0.7:
+       * PROTON-550: Fail build if Ruby is enabled but missing dependencies.
+       * PROTON-551: Fixed a typo in the Ruby Messenger blocking call.
+       * PROTON-538: more readme fixes and install tweaks
+       * PROTON-538: fixed install to not use irregular paths, marked a lot of 
noisy variables as advanced, removed extra level of caching from cmake 
variables that had confusing effects, updated the readme to match what the 
build actually does
+       * PROTON-445: Dynamic languages honor CMAKE_INSTALL_PREFIX
+
+version 0.6:
+       * PROTON-482: Fix the Ruby install directory.
+       * PROTON-479: Fixed typo in status
+       * PROTON-479: Added PENDING status to Ruby Trackers
+       * PROTON-260   Improve API rdoc comments for Ruby.
+       * PROTON-464: Install Ruby bindings to install prefix if specified.
+       * PROTON-456: Added password property to Ruby Messenger class.
+       * PROTON-455: Added rewrite method to Ruby Messenger class.
+       * PROTON-454: Added the route method to Ruby's Messenger class.
+       * PROTON-452: Expose the Messenger interrupt method in Ruby.
+       * PROTON-450: Use random ports for Ruby Rspec tests.
+       * PROTON-448: Backing out the Ruby data change.
+       * PROTON-448: Added missed ChangeLog entry
+       * PROTON-448: Added support for Data encode/decode to Ruby Swig.
+       * PROTON-431: Fixed the Ruby spec tests.
+       * PROTON-273: Removed the content Rspec test for Ruby.
+       * PROTON-427: Removed the flag argument from Messenger.settle
 
 version 0.5:
-       * Duck typed the Array class to work with Qpid::Proton::Data.
-       * Duck typed the Hash class to work with Qpid::Proton::Data.
-       * Fixed broken Rspec tests due to changes in under Proton C.
-         - Messenger.receive can accept a negative maximum
-         - When testing bad subscribe attempts, tests now use a random string.
-       * Fixed encoding decimal128 values.
-       * Added properties field to Qpid::Proton::Message.
-       * Hashes are now automatically encoded into Data objects.
-       * Fixed encoding Time objects.
-       * Added instructions field to Qpid::Proton::Message.
-       * Added annotations field to Qpid::Proton::Message.
-       * Fixed encoding Symbol objects.
-       * Added body field to Qpid::Proton::Message.
+       * PROTON-406: Fix installing the Ruby bindings.
+       * PROTON-399: Ruby bindings now install with the rest of Proton.
+       * PROTON-369: Add the properties= method to Ruby Message.
+       * PROTON-380: Added the body property to Ruby Message class.
+       * PROTON-379: Added annotations property to Ruby Message class.
+       * PROTON-381: Fixed encoding a Ruby symbol into a Data object.
+       * PROTON-378: Add instructions property to Ruby Message class.
+       * PROTON-369: Ruby Message.clear clears out properties
+       * PROTON-377: Ruby automatically encodes an instance of Time.
+       * PROTON-376: Fix how a ::hash is automatically added to Data in Ruby
+       * PROTON-369: Add properties field to Qpid:Proton::Message
+       * PROTON-341: Update the Ruby interop tests.
+       * PROTON-322: Extend the Ruby Hash class to work with the Data class.
+       * PROTON-322: Extended the Ruby Array class to work with the Data class.
+       * PROTON-306: Fixes to the Ruby list helper type for Data.
+       * PROTON-304: Removed accept mode from the Ruby bindings.
+       * PROTON-227: Added missing elements to the Rdoc for qpid::proton::Data
+       * PROTON-215: Added ruby interop test.
+       * PROTON-227: Created the Data class for the Ruby bindings.
 
 version 0.4:
-       * No language-specific features developed in this release.
 
 version 0.3:
-       * No language-specific features developed in this release.
-       * Dropped the Rakefile in favor of packaging with a gemspec.
-       * Removed the qpid_proton/version.rb file as unused.
+       * PROTON-188: applied modified patch
 
 version 0.2:
-       * 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.
+
+version 0.1:

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/213a78be/proton-c/bindings/ruby/TODO
----------------------------------------------------------------------
diff --git a/proton-c/bindings/ruby/TODO b/proton-c/bindings/ruby/TODO
index 80e0272..12c7d1f 100644
--- a/proton-c/bindings/ruby/TODO
+++ b/proton-c/bindings/ruby/TODO
@@ -1,14 +1,8 @@
 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:
+You can find the list of bugs and enhacements to be fixed at:
 
-    https://issues.apache.org/jira/browse/PROTON
+  
https://issues.apache.org/jira/issues/?jql=project%20%3D%20PROTON%20AND%20status%20in%20(Open%2C%20%22In%20Progress%22%2C%20Reopened)%20AND%20component%20%3D%20ruby-binding
 
-Fixes & Improvements
-========================================================================
-* Fix the data mangling that occurs at specific lengths.
-* Find a better way to map between nil/empty strings for pn_atom_t.
-* Fill out the remaining tests for Qpid::Proton::Messenger
 

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/213a78be/proton-c/bindings/ruby/changelog.rb
----------------------------------------------------------------------
diff --git a/proton-c/bindings/ruby/changelog.rb 
b/proton-c/bindings/ruby/changelog.rb
new file mode 100755
index 0000000..ea650c4
--- /dev/null
+++ b/proton-c/bindings/ruby/changelog.rb
@@ -0,0 +1,28 @@
+#!/bin/env ruby
+#
+# Generate a changelog from git history.
+# - Assume each version has a 0.0[.0] tag
+# - Write the subject line from each commit with a JIRA number that touches 
files under this dir
+#
+
+if ARGV.size != 2
+  STDERR.puts "Usage: #{$0} <rubydir> <outfile>"
+end
+rubydir = ARGV[0]
+outfile = ARGV[1]
+
+version_re = /^[0-9]+(\.[0-9]+)+$/
+releases = `git tag --sort=-creatordate`.split.select { |t| 
version_re.match(t) }
+exit(1) unless $?.success?
+
+def tag(x) x ? "tags/#{x}" : ""; end
+
+changelog=""
+while r = releases.shift do
+  changelog << "\nversion #{r}:\n"
+  p = releases[0]
+  changelog << `git log --grep='^PROTON-' #{tag(p)}..#{tag(r)} --format='      
* %s' -- #{rubydir}`
+  exit(1) unless $?.success?
+end
+
+File.open(outfile, "w") { |f| f.puts(changelog) }

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/213a78be/proton-c/bindings/ruby/qpid_proton.gemspec
----------------------------------------------------------------------
diff --git a/proton-c/bindings/ruby/qpid_proton.gemspec 
b/proton-c/bindings/ruby/qpid_proton.gemspec
deleted file mode 100644
index 1acaff1..0000000
--- a/proton-c/bindings/ruby/qpid_proton.gemspec
+++ /dev/null
@@ -1,36 +0,0 @@
-# -*- encoding: utf-8 -*-
-lib = File.expand_path('lib/', __FILE__)
-$:.unshift lib unless $:.include?(lib)
-
-# Generate the Swig wrapper
-system "swig -ruby -I/usr/include -o ext/cproton/cproton.c ruby.i"
-
-Gem::Specification.new do |s|
-  s.name        = "qpid_proton"
-  s.version     = "0.3"
-  s.licenses    = ['Apache-2.0']
-  s.platform    = Gem::Platform::RUBY
-  s.authors     = ["Darryl L. Pierce"]
-  s.email       = ["pro...@qpid.apache.org"]
-  s.homepage    = "http://qpid.apache.org/proton";
-  s.summary     = "Ruby language bindings for the Qpid Proton messaging 
framework"
-  s.description = <<-EOF
-Proton is a high performance, lightweight messaging library. It can be used in
-the widest range of messaging applications including brokers, client libraries,
-routers, bridges, proxies, and more. Proton is based on the AMQP 1.0 messaging
-standard.
-EOF
-
-  s.extensions   = "ext/cproton/extconf.rb"
-  s.files        = Dir[
-                "LICENSE",
-                "TODO",
-                "ChangeLog",
-                "ext/cproton/*.rb",
-                "ext/cproton/*.c",
-                "lib/**/*.rb",
-                ]
-  s.require_path = 'lib'
-  s.add_runtime_dependency "json"
-end
-

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/213a78be/proton-c/bindings/ruby/qpid_proton.gemspec.in
----------------------------------------------------------------------
diff --git a/proton-c/bindings/ruby/qpid_proton.gemspec.in 
b/proton-c/bindings/ruby/qpid_proton.gemspec.in
new file mode 100644
index 0000000..8dbcee6
--- /dev/null
+++ b/proton-c/bindings/ruby/qpid_proton.gemspec.in
@@ -0,0 +1,32 @@
+# -- encoding: utf-8 --
+lib = File.expand_path('lib/', __FILE__)
+$:.unshift lib unless $:.include?(lib)
+
+Gem::Specification.new do |s|
+  s.name        = "qpid_proton"
+  s.version     = "@PN_VERSION@"
+  s.licenses    = ['Apache-2.0']
+  s.platform    = Gem::Platform::RUBY
+  s.authors     = ["Darryl L. Pierce", "Alan Conway"]
+  s.email       = ["pro...@qpid.apache.org"]
+  s.homepage    = "http://qpid.apache.org/proton";
+  s.summary     = "Ruby language bindings for the Qpid Proton messaging 
framework"
+  s.description = <<-EOF
+Proton is a high performance, lightweight messaging library. It can be used in
+the widest range of messaging applications including brokers, client libraries,
+routers, bridges, proxies, and more. Proton is based on the AMQP 1.0 messaging
+standard.
+EOF
+
+  s.extensions   = "ext/cproton/extconf.rb"
+  s.files        = Dir[
+                "LICENSE",
+                "TODO",
+                "ChangeLog",
+                "ext/cproton/*.rb",
+                "ext/cproton/*.c",
+                "lib/**/*.rb",
+                ]
+  s.require_path = 'lib'
+  s.add_runtime_dependency "json", "~> 0"
+end


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

Reply via email to