Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Using bundler config for all gem related stuff instead of hoe. Replace strand with new empathy implementation for using zkruby with eventmachine
- Loading branch information
1 parent
98ff620
commit 3fd75da
Showing
31 changed files
with
988 additions
and
1,021 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
#No hidden files (except for .gitignore) | ||
.* | ||
!.gitignore | ||
!.yardopts | ||
# Gems should not checking Gemfile.lock | ||
Gemfile.lock | ||
#Files generated by rake | ||
*.gemspec | ||
zk.out | ||
zookeeper.out | ||
lib/jute/ | ||
*.out | ||
doc | ||
pkg | ||
#Jedit stupid default backup settings | ||
*'`' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
- | ||
History.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
source "http://rubygems.org" | ||
|
||
# Specify your gem's dependencies in rfuse.gemspec | ||
gemspec |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,34 @@ | ||
# -*- ruby -*- | ||
# hoe 2.12.5 goes looking for the plugins so we have to do it this way.. | ||
$LOAD_PATH.unshift File.dirname(__FILE__) + '/jute/lib' | ||
#!/usr/bin/env rake | ||
$:.unshift "jute/lib" | ||
|
||
require 'rubygems' | ||
require 'hoe' | ||
require 'rake/clean' | ||
require 'yard' | ||
require './yard_ext/enum_handler.rb' | ||
require "bundler/gem_tasks" | ||
require 'rspec/core/rake_task' | ||
require 'jute/task' | ||
|
||
begin | ||
require './yard_ext/enum_handler' | ||
rescue LoadError => err | ||
warn "%p while trying to load yard extensions: %s" % [ err.class, err.message ] | ||
RSpec::Core::RakeTask.new | ||
RSpec::Core::RakeTask.new(:perf_spec) do |t| | ||
t.rspec_opts = "--tag perf" | ||
end | ||
|
||
|
||
YARD::Rake::YardocTask.new | ||
|
||
# Hoe.plugin :compiler | ||
#Hoe.plugin :gem_prelude_sucks | ||
Hoe.plugin :git | ||
# Hoe.plugin :inline | ||
# Hoe.plugin :racc | ||
# Hoe.plugin :rubyforge | ||
Hoe.plugin :yard | ||
Hoe.plugin :jute | ||
|
||
Hoe.spec 'zkruby' do | ||
self.readme_file="README.rdoc" | ||
developer('Grant Gardner', 'grant@lastweekend.com.au') | ||
dependency 'slf4r' , '~> 0.4.2' | ||
dependency 'eventmachine', '~> 0.12.10', :development | ||
dependency 'strand', '~> 0.1.0', :development | ||
dependency 'logging', '>= 1.4.1', :development | ||
dependency 'rspec', '>=2.7.0', :development | ||
dependency 'hoe-yard', '>=0.1.2', :development | ||
|
||
self.jute_modules = { | ||
Jute::Task.new() do |t| | ||
t.modules = { | ||
"org.apache.zookeeper.data" => "ZooKeeper::Data", | ||
"org.apache.zookeeper.proto" => "ZooKeeper::Proto"} | ||
end | ||
# vim: syntax=ruby | ||
|
||
task :perf_spec => :jute | ||
task :spec => :jute | ||
task :build => :jute | ||
task :install => :jute | ||
task :release => :jute | ||
task :yard => :jute | ||
|
||
task :default => [:spec,:yard] | ||
|
||
CLEAN.include "*.out","Gemfile.lock",".yardoc/" | ||
CLOBBER.include "doc/","pkg/","lib/jute" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# coding: utf-8 | ||
require 'rake/tasklib' | ||
require 'jute' | ||
|
||
class Jute::Task < Rake::TaskLib | ||
|
||
attr_accessor :modules | ||
attr_accessor :files | ||
attr_accessor :pathmap | ||
|
||
def initialize name = :jute | ||
|
||
defaults | ||
|
||
@name = name | ||
|
||
yield self if block_given? | ||
|
||
define_jute_tasks | ||
end | ||
|
||
def defaults | ||
@files = "src/jute/*.jute" | ||
@pathmap = "%{src,lib}X.rb" | ||
end | ||
|
||
def define_jute_tasks | ||
desc "Compile jute files to ruby classes" | ||
task jute_task_name | ||
|
||
raise "modules hash must be defined" unless Hash === @modules | ||
FileList.new(@files).each do | source | | ||
target = source.pathmap(@pathmap) | ||
|
||
target_dir = target.pathmap("%d") | ||
directory target_dir | ||
|
||
file target => [source,target_dir] do | ||
compile_jute(source,target) | ||
end | ||
task jute_task_name => target | ||
end | ||
end | ||
|
||
def jute_task_name | ||
@name | ||
end | ||
|
||
def compile_jute(source,target) | ||
|
||
@jute_compiler = ::Jute::Compiler.new() unless @jute_compiler | ||
|
||
File.open(source) do |input| | ||
File.open(target,"w") do |output| | ||
puts "Compiling #{input.inspect} to #{output.inspect}" | ||
@jute_compiler.compile(input,output,modules) | ||
end | ||
end | ||
end | ||
end | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
# This is the main require for standard ruby io/thread based binding | ||
|
||
# This is the main require for the eventmachine based binding | ||
# Only use this if all use of zkruby will be within the EM Reactor | ||
require 'zkruby/zkruby' | ||
require 'zkruby/eventmachine' | ||
|
||
Empathy::EM.empathise(ZooKeeper) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# This is the main require for standard ruby io/thread based binding | ||
|
||
require 'zkruby/zkruby' | ||
require 'zkruby/rubyio' |
Oops, something went wrong.