Permalink
Browse files

* Removed gem distribution that was added by a mistake

  • Loading branch information...
1 parent 357820a commit 70f8202fe313bb750d9de51291f0f7a5f593bbce @donv donv committed with enebo Jul 1, 2011
Showing 322 changed files with 0 additions and 31,580 deletions.
Binary file not shown.
Binary file not shown.
@@ -1,7 +0,0 @@
-*~
-output
-pkg/*
-build/*
-dist/*
-*.gem
-.bundle
@@ -1,4 +0,0 @@
-source "http://rubygems.org"
-
-# Specify your gem's dependencies in jruby-win32ole.gemspec
-gemspec
@@ -1,8 +0,0 @@
-require 'bundler'
-Bundler::GemHelper.install_tasks
-
-task :compile do
- require 'ant'
- ant ['-f', 'build.xml']
- cp 'dist/win32ole.jar', 'lib/win32ole/win32ole.jar'
-end
@@ -1,12 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'fileutils'
-
-number_of_files = 1_000
-directory = "c:/opt/test_data"
-
-Dir.mkdir directory unless File.exists? directory
-number_of_files.times do |i|
- file = directory + "/" + i.to_s
- FileUtils.touch file
-end
@@ -1,11 +0,0 @@
-#!/bin/sh
-
-#jruby --server -J-Xdebug -J-Xrunjdwp:transport=dt_socket,address=8001,server=y,suspend=y -J-Djava.library.path=lib -Ilib samples/$1.rb
-#jruby --server -J-Dcom.jacob.debug=true -J-Djava.library.path=lib -Ilib samples/$1.rb
-#jruby --server -J-agentlib:hprof=heap=dump -J-Djava.library.path=lib -Ilib samples/$1.rb
-#jruby --server -J-verbose:gc -J-Djava.library.path=lib -Ilib samples/$1.rb
-#jruby --server -J-agentpath:"C:\Program Files\NetBeans 6.8\profiler3\lib\deployed\jdk15\windows\profilerinterface.dll=\"C:\Program Files\NetBeans 6.8\profiler3\lib\"",5140 -J-Djava.library.path=lib -Ilib samples/$1.rb
-
-jruby -J-verbose:gc -J-Dcom.jacob.autogc=true -J-Dcom.jacob.gc_count=50000 -J-Dcom.jacob.debug=true -J-Djruby.backtrace.style=raw --server -J-Djava.library.path=lib -Ilib samples/$1.rb $2 $3
-
-#jruby -J-Dcom.jacob.autogc=false -J-Dcom.jacob.debug=true -J-Djruby.backtrace.style=raw -J-Dcom.jacob.autogc=true -J-Djruby.ji.objectProxyCache=false --server -J-Djava.library.path=. -Idist samples/$1.rb $2 $3
@@ -1,74 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- You may freely edit this file. See commented blocks below for -->
-<!-- some examples of how to customize the build. -->
-<!-- (If you delete it and reopen the project it will be recreated.) -->
-<!-- By default, only the Clean and Build commands use this build script. -->
-<!-- Commands such as Run, Debug, and Test only use this build script if -->
-<!-- the Compile on Save feature is turned off for the project. -->
-<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
-<!-- in the project's Project Properties dialog box.-->
-<project name="win32ole" default="default" basedir=".">
- <description>Builds, tests, and runs the project win32ole.</description>
- <import file="nbproject/build-impl.xml"/>
- <!--
-
- There exist several targets which are by default empty and which can be
- used for execution of your tasks. These targets are usually executed
- before and after some main targets. They are:
-
- -pre-init: called before initialization of project properties
- -post-init: called after initialization of project properties
- -pre-compile: called before javac compilation
- -post-compile: called after javac compilation
- -pre-compile-single: called before javac compilation of single file
- -post-compile-single: called after javac compilation of single file
- -pre-compile-test: called before javac compilation of JUnit tests
- -post-compile-test: called after javac compilation of JUnit tests
- -pre-compile-test-single: called before javac compilation of single JUnit test
- -post-compile-test-single: called after javac compilation of single JUunit test
- -pre-jar: called before JAR building
- -post-jar: called after JAR building
- -post-clean: called after cleaning build products
-
- (Targets beginning with '-' are not intended to be called on their own.)
-
- Example of inserting an obfuscator after compilation could look like this:
-
- <target name="-post-compile">
- <obfuscate>
- <fileset dir="${build.classes.dir}"/>
- </obfuscate>
- </target>
-
- For list of available properties check the imported
- nbproject/build-impl.xml file.
-
-
- Another way to customize the build is by overriding existing main targets.
- The targets of interest are:
-
- -init-macrodef-javac: defines macro for javac compilation
- -init-macrodef-junit: defines macro for junit execution
- -init-macrodef-debug: defines macro for class debugging
- -init-macrodef-java: defines macro for class execution
- -do-jar-with-manifest: JAR building (if you are using a manifest)
- -do-jar-without-manifest: JAR building (if you are not using a manifest)
- run: execution of project
- -javadoc-build: Javadoc generation
- test-report: JUnit report generation
-
- An example of overriding the target for project execution could look like this:
-
- <target name="run" depends="win32ole-impl.jar">
- <exec dir="bin" executable="launcher.exe">
- <arg file="${dist.jar}"/>
- </exec>
- </target>
-
- Notice that the overridden target depends on the jar target and not only on
- the compile target as the regular run target does. Again, for a list of available
- properties which you can use, check the target you are overriding in the
- nbproject/build-impl.xml file.
-
- -->
-</project>
@@ -1,21 +0,0 @@
-# -*- encoding: utf-8 -*-
-$:.push File.expand_path("../lib", __FILE__)
-require "jruby-win32ole/version"
-
-Gem::Specification.new do |s|
- s.name = 'jruby-win32ole'
- s.version = JRuby::WIN32OLE::VERSION
- s.platform = Gem::Platform::RUBY
- s.authors = 'Thomas E. Enebo'
- s.email = 'tom.enebo@gmail.com'
- s.homepage = 'http://github.com/enebo/jruby-win32ole'
- s.summary = %q{A Gem for win32ole support on JRuby}
- s.description = %q{A Gem for win32ole support on JRuby}
-
- s.rubyforge_project = "jruby-win32ole"
-
- s.files = `git ls-files`.split("\n")
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
- s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
- s.require_paths = ["lib"]
-end
@@ -1,25 +0,0 @@
-require 'java'
-
-# Set location so the loader can find the native dll it needs
-arch = ENV_JAVA['sun.arch.data.model'] == '32' ? 'x86' : 'x64'
-java.lang.System.set_property 'racob.dll.path',
- File.dirname(__FILE__) + "/racob-#{arch}.dll"
-
-require 'racob.jar'
-
-require 'win32ole/win32ole' # <- java native impl of WIN32OLE
-require 'win32ole/win32ole_ruby' # <- ruby impl of WIN32OLE
-
-java_import org.racob.com.Variant # Needed for static native initializer :(
-
-java_import org.jruby.ext.win32ole.RubyWIN32OLE
-java_import org.jruby.ext.win32ole.RubyInvocationProxy
-
-require 'win32ole/win32ole_error'
-require 'win32ole/win32ole_method'
-require 'win32ole/win32ole_variant'
-require 'win32ole/win32ole_variable'
-require 'win32ole/win32ole_event'
-require 'win32ole/win32ole_param'
-require 'win32ole/win32ole_type'
-require 'win32ole/win32ole_typelib'
@@ -1,5 +0,0 @@
-module JRuby
- module WIN32OLE
- VERSION = "0.8.3"
- end
-end
@@ -1,177 +0,0 @@
-require 'win32ole/win32ole_variant'
-
-class WIN32OLE
- module Utils
- java_import org.racob.com.ComFailException
- java_import org.racob.com.Dispatch
-
- def SafeStringValue(str)
- return str if str.kind_of?(::String)
- if str.respond_to?(:to_str)
- str = str.to_str
- return str if str.kind_of?(::String)
- end
- raise TypeError
- end
-
- def WIN32OLE_TYPEValue(value)
- raise TypeError.new("1st argument should be WIN32OLE_TYPE object") unless value.kind_of? WIN32OLE_TYPE
- value
- end
-
- def methods_with_flag(flag)
- members = []
- all_methods(typeinfo_from_ole) do |typeinfo, old_typeinfo, desc, docs, i|
- if desc.invkind & flag
- members << WIN32OLE_METHOD.new(nil, typeinfo, old_typeinfo, desc, docs, i)
- end
- nil
- end
- members
- end
-
- def all_methods(typeinfo, &block) # MRI: olemethod_from_typeinfo
- return unless typeinfo # Not all ole servers have this info
-
- # Find method in this type.
- ret = find_all_methods_in(nil, typeinfo, &block)
- return ret if ret
-
- # Now check all other type impls
- typeinfo.impl_types_count.times do |i|
- begin
- href = typeinfo.get_ref_type_of_impl_type(i)
- ref_typeinfo = typeinfo.get_ref_type_info(href)
- ret = find_all_methods_in(typeinfo, ref_typeinfo, &block)
- return ret if ret
- rescue ComFailException => e
- puts "Error getting impl types #{e}"
- end
- end
- nil
- end
-
- # MRI: ole_method_sub
- def find_all_methods_in(old_typeinfo, typeinfo, &block)
- typeinfo.funcs_count.times do |i|
- begin
- desc = typeinfo.get_func_desc(i)
- docs = typeinfo.get_documentation(desc.memid)
- ret = yield typeinfo, old_typeinfo, desc, docs, i
- return ret if ret
- rescue ComFailException => e
- puts "Error getting method info #{e}"
- end
- end
- nil
- end
-
- def typeinfo_from_ole # MRI: typeinfo_from_ole
- typeinfo = type_info
- docs = typeinfo.get_documentation(-1)
- type_lib = typeinfo.get_containing_type_lib
- type_lib.get_type_info_count.times do |i|
- begin
- tdocs = type_lib.get_documentation(i)
- return type_lib.get_type_info(i) if tdocs.name == docs.name
- rescue ComFailException => e
- # We continue on failure.
- end
- end
- type_info # Actually MRI seems like it could fail in weird case
- end
-
- def load_typelib(path_reg, arch)
- path = path_reg.open(arch) { |r| r.read(nil) }[1]
-# puts "PATH = #{path}"
- begin
- org.racob.com.Automation.loadTypeLib(path)
- rescue ComFailException => e
-# puts "Failed to load #{name} fom #{path} because: #{e}"
- nil
- end
- end
-
- def find_all_typeinfo(typelib)
- typelib.type_info_count.times do |i|
- docs = typelib.get_documentation(i)
- next unless docs
- info = typelib.get_type_info(i)
- next unless info
- yield info, docs
- end
- end
-
- def all_vars(typeinfo)
- typeinfo.vars_count.times do |i|
- desc = typeinfo.get_var_desc(i)
- next unless desc
- names = typeinfo.get_names(desc.memid)
- next if !names || names.length == 0
- name = names[0]
- next unless name
- yield desc, name
- end
- end
-
- def reg_each_key_for(reg, subkey, &block)
- reg.open(subkey) do |subkey_reg|
- subkey_reg.each_key { |key, wtime| block.call(subkey_reg, key) }
- end
- end
-
- # Walks all guid/clsid entries and yields every single version
- # of those entries to the supplied block. See search_registry as
- # an example of its usage.
- def typelib_registry_each_guid_version
- Win32::Registry::HKEY_CLASSES_ROOT.open('TypeLib') do |reg|
- reg.each_key do |guid, wtime|
- reg.open(guid) do |guid_reg|
- guid_reg.each_key do |version_string, wtime|
- version = version_string.to_f
- begin
- guid_reg.open(version_string) do |version_reg|
- yield guid, version, version_reg
- end
- rescue Win32::Registry::Error => e
- # Version Entry may not contain anything. Skip.
- end
- end
- end
- end
- end
- end
-
- def registry_subkey(reg, *valid_subkeys)
- reg.each_key do |inner, wtime|
- reg_each_key_for(reg, inner) do |subkey_reg, subkey|
- yield subkey_reg, subkey if valid_subkeys.include? subkey
- end
- end
- end
-
- def search_registry(typelib_name) # MRI: oletypelib_search_registry
- typelib_registry_each_guid_version do |guid, version, reg|
- name = reg.read(nil)[1] || ''
- registry_subkey(reg, 'win32', 'win64') do |arch_reg, arch|
- type_lib = load_typelib(arch_reg, arch)
-# puts "GUID #{guid} #{version} #{arch} #{type_lib}"
- return type_lib if type_lib && name == typelib_name
- end
- end
- nil
- end
-
- def typedesc_value(vt, type_details=nil)
- type_string = WIN32OLE::VARIANT.variant_to_string(vt) || "Unknown Type #{vt}"
-
- type_details << type_string if type_details
-
- if vt == WIN32OLE::VARIANT::VT_PTR && type_details
- # TODO: Add detail logic
- end
-
- type_details ? type_details : type_string
- end
- end
-end
@@ -1,13 +0,0 @@
-class WIN32OLERuntimeError < RuntimeError
- def initialize(cause=nil)
- @cause = cause
- end
-
- def backtrace
- @cause ? @cause.backtrace : super
- end
-
- def to_s
- @cause ? @cause.to_s : super
- end
-end
Oops, something went wrong.

0 comments on commit 70f8202

Please sign in to comment.