yakg 0.0.10 → 0.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +6 -14
- data/.gitignore +1 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +27 -19
- data/VERSION +1 -1
- data/lib/yakg.rb +6 -6
- data/spec/spec_helper.rb +1 -3
- data/spec/yakg_spec.rb +13 -13
- data/vendor/gems/README.md +26 -20
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/COPYING +49 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/LICENSE +24 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/README.md +7 -7
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/Rakefile +31 -41
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/ffi.gemspec +7 -6
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/autopointer.rb +24 -14
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/enum.rb +34 -22
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/lib/ffi/errno.rb +43 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/lib/ffi/ffi.rb +44 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/lib/ffi/io.rb +62 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/library.rb +79 -44
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/managedstruct.rb +29 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/lib/ffi/platform/aarch64-linux/types.conf +104 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/lib/ffi/platform/mips64el-linux/types.conf +104 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/lib/ffi/platform/powerpc64-linux/types.conf +104 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/lib/ffi/platform/x86_64-cygwin/types.conf +3 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/lib/ffi/platform/x86_64-darwin/types.conf +126 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/lib/ffi/platform/x86_64-openbsd/types.conf +128 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform.rb +35 -15
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/pointer.rb +22 -10
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/struct.rb +31 -14
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/struct_layout_builder.rb +46 -30
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/types.rb +24 -11
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/lib/ffi/union.rb +43 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/lib/ffi/variadic.rb +78 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/lib/ffi/version.rb +4 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi.rb +1 -9
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/lib/ffi_c.bundle +0 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/libtest/Benchmark.c +52 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/libtest/BoolTest.c +34 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/libtest/BufferTest.c +31 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/libtest/ClosureTest.c +205 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/libtest/EnumTest.c +51 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/libtest/FunctionTest.c +70 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/libtest/GNUmakefile +149 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/libtest/GlobalVariable.c +62 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/libtest/LastErrorTest.c +21 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/libtest/NumberTest.c +132 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/libtest/PointerTest.c +63 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/libtest/ReferenceTest.c +23 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/libtest/StringTest.c +34 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/libtest/StructTest.c +243 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/libtest/UnionTest.c +43 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/libtest/VariadicTest.c +62 -0
- data/vendor/gems/ruby/2.0.0/specifications/ffi-1.9.10.gemspec +45 -0
- data/vendor/gems/ruby/2.1.0/gems/corefoundation-0.2.0/CHANGELOG +12 -0
- data/vendor/gems/ruby/2.1.0/gems/corefoundation-0.2.0/LICENSE +8 -0
- data/vendor/gems/ruby/2.1.0/gems/corefoundation-0.2.0/README.md +40 -0
- data/vendor/gems/ruby/2.1.0/gems/corefoundation-0.2.0/lib/corefoundation/array.rb +123 -0
- data/vendor/gems/ruby/2.1.0/gems/corefoundation-0.2.0/lib/corefoundation/base.rb +197 -0
- data/vendor/gems/ruby/2.1.0/gems/corefoundation-0.2.0/lib/corefoundation/boolean.rb +25 -0
- data/vendor/gems/ruby/2.1.0/gems/corefoundation-0.2.0/lib/corefoundation/data.rb +42 -0
- data/vendor/gems/ruby/2.1.0/gems/corefoundation-0.2.0/lib/corefoundation/date.rb +32 -0
- data/vendor/gems/ruby/2.1.0/gems/corefoundation-0.2.0/lib/corefoundation/dictionary.rb +114 -0
- data/vendor/gems/ruby/2.1.0/gems/corefoundation-0.2.0/lib/corefoundation/extensions.rb +158 -0
- data/vendor/gems/ruby/2.1.0/gems/corefoundation-0.2.0/lib/corefoundation/null.rb +11 -0
- data/vendor/gems/ruby/2.1.0/gems/corefoundation-0.2.0/lib/corefoundation/number.rb +98 -0
- data/vendor/gems/ruby/2.1.0/gems/corefoundation-0.2.0/lib/corefoundation/string.rb +91 -0
- data/vendor/gems/ruby/2.1.0/gems/corefoundation-0.2.0/lib/corefoundation/version.rb +4 -0
- data/vendor/gems/ruby/2.1.0/gems/corefoundation-0.2.0/lib/corefoundation.rb +13 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/COPYING +49 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/LICENSE +24 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/README.md +109 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/Rakefile +210 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/ffi.gemspec +23 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/gen/Rakefile +30 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/autopointer.rb +194 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/buffer.rb +4 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/callback.rb +4 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/enum.rb +174 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/errno.rb +43 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/ffi.rb +44 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/io.rb +62 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/library.rb +524 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/managedstruct.rb +84 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/memorypointer.rb +1 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/aarch64-linux/types.conf +104 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/arm-linux/types.conf +104 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/i386-cygwin/types.conf +3 -0
- data/vendor/gems/ruby/{2.0.0/gems/ffi-1.9.0/lib/ffi/platform/x86_64-darwin → 2.1.0/gems/ffi-1.9.10/lib/ffi/platform/i386-darwin}/types.conf +2 -2
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/i386-freebsd/types.conf +152 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/i386-gnu/types.conf +107 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/i386-linux/types.conf +103 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/i386-openbsd/types.conf +128 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/i386-solaris/types.conf +122 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/i386-windows/types.conf +105 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/ia64-linux/types.conf +104 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/mips-linux/types.conf +102 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/mips64el-linux/types.conf +104 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/mipsel-linux/types.conf +102 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/powerpc-aix/types.conf +180 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/powerpc-darwin/types.conf +100 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/powerpc-linux/types.conf +100 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/powerpc64-linux/types.conf +104 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/s390-linux/types.conf +102 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/s390x-linux/types.conf +102 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/sparc-linux/types.conf +102 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/sparc-solaris/types.conf +128 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/sparcv9-solaris/types.conf +128 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/x86_64-cygwin/types.conf +3 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/x86_64-darwin/types.conf +126 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/x86_64-freebsd/types.conf +128 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/x86_64-linux/types.conf +102 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/x86_64-netbsd/types.conf +128 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/x86_64-openbsd/types.conf +128 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/x86_64-solaris/types.conf +122 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/x86_64-windows/types.conf +27 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform.rb +159 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/pointer.rb +134 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/struct.rb +373 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/struct_layout_builder.rb +227 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/tools/const_generator.rb +229 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/tools/generator.rb +60 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/tools/generator_task.rb +36 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/tools/struct_generator.rb +194 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/tools/types_generator.rb +135 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/types.rb +190 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/union.rb +43 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/variadic.rb +78 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/version.rb +4 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi.rb +20 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi_c.bundle +0 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/libtest/Benchmark.c +52 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/libtest/BoolTest.c +34 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/libtest/BufferTest.c +31 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/libtest/ClosureTest.c +205 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/libtest/EnumTest.c +51 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/libtest/FunctionTest.c +70 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/libtest/GNUmakefile +149 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/libtest/GlobalVariable.c +62 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/libtest/LastErrorTest.c +21 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/libtest/NumberTest.c +132 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/libtest/PointerTest.c +63 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/libtest/ReferenceTest.c +23 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/libtest/StringTest.c +34 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/libtest/StructTest.c +243 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/libtest/UnionTest.c +43 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/libtest/VariadicTest.c +62 -0
- data/vendor/gems/ruby/2.1.0/specifications/corefoundation-0.2.0.gemspec +45 -0
- data/vendor/gems/ruby/2.1.0/specifications/ffi-1.9.10.gemspec +49 -0
- data/vendor/gems/ruby/2.2.0/gems/corefoundation-0.2.0/CHANGELOG +12 -0
- data/vendor/gems/ruby/2.2.0/gems/corefoundation-0.2.0/LICENSE +8 -0
- data/vendor/gems/ruby/2.2.0/gems/corefoundation-0.2.0/README.md +40 -0
- data/vendor/gems/ruby/2.2.0/gems/corefoundation-0.2.0/lib/corefoundation/array.rb +123 -0
- data/vendor/gems/ruby/2.2.0/gems/corefoundation-0.2.0/lib/corefoundation/base.rb +197 -0
- data/vendor/gems/ruby/2.2.0/gems/corefoundation-0.2.0/lib/corefoundation/boolean.rb +25 -0
- data/vendor/gems/ruby/2.2.0/gems/corefoundation-0.2.0/lib/corefoundation/data.rb +42 -0
- data/vendor/gems/ruby/2.2.0/gems/corefoundation-0.2.0/lib/corefoundation/date.rb +32 -0
- data/vendor/gems/ruby/2.2.0/gems/corefoundation-0.2.0/lib/corefoundation/dictionary.rb +114 -0
- data/vendor/gems/ruby/2.2.0/gems/corefoundation-0.2.0/lib/corefoundation/extensions.rb +158 -0
- data/vendor/gems/ruby/2.2.0/gems/corefoundation-0.2.0/lib/corefoundation/null.rb +11 -0
- data/vendor/gems/ruby/2.2.0/gems/corefoundation-0.2.0/lib/corefoundation/number.rb +98 -0
- data/vendor/gems/ruby/2.2.0/gems/corefoundation-0.2.0/lib/corefoundation/string.rb +91 -0
- data/vendor/gems/ruby/2.2.0/gems/corefoundation-0.2.0/lib/corefoundation/version.rb +4 -0
- data/vendor/gems/ruby/2.2.0/gems/corefoundation-0.2.0/lib/corefoundation.rb +13 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/COPYING +49 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/LICENSE +24 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/README.md +109 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/Rakefile +210 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/ffi.gemspec +23 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/gen/Rakefile +30 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/autopointer.rb +194 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/buffer.rb +4 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/callback.rb +4 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/enum.rb +174 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/errno.rb +43 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/ffi.rb +44 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/io.rb +62 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/library.rb +524 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/managedstruct.rb +84 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/memorypointer.rb +1 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/aarch64-linux/types.conf +104 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/arm-linux/types.conf +104 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/i386-cygwin/types.conf +3 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/i386-darwin/types.conf +100 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/i386-freebsd/types.conf +152 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/i386-gnu/types.conf +107 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/i386-linux/types.conf +103 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/i386-netbsd/types.conf +126 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/i386-openbsd/types.conf +128 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/i386-solaris/types.conf +122 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/i386-windows/types.conf +105 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/ia64-linux/types.conf +104 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/mips-linux/types.conf +102 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/mips64el-linux/types.conf +104 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/mipsel-linux/types.conf +102 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/powerpc-aix/types.conf +180 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/powerpc-darwin/types.conf +100 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/powerpc-linux/types.conf +100 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/powerpc64-linux/types.conf +104 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/s390-linux/types.conf +102 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/s390x-linux/types.conf +102 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/sparc-linux/types.conf +102 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/sparc-solaris/types.conf +128 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/sparcv9-solaris/types.conf +128 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/x86_64-cygwin/types.conf +3 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/x86_64-darwin/types.conf +126 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/x86_64-freebsd/types.conf +128 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/x86_64-linux/types.conf +102 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/x86_64-netbsd/types.conf +128 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/x86_64-openbsd/types.conf +128 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/x86_64-solaris/types.conf +122 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/x86_64-windows/types.conf +27 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform.rb +159 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/pointer.rb +134 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/struct.rb +373 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/struct_layout_builder.rb +227 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/tools/const_generator.rb +229 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/tools/generator.rb +60 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/tools/generator_task.rb +36 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/tools/struct_generator.rb +194 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/tools/types_generator.rb +135 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/types.rb +190 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/union.rb +43 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/variadic.rb +78 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/version.rb +4 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi.rb +20 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi_c.bundle +0 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/libtest/Benchmark.c +52 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/libtest/BoolTest.c +34 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/libtest/BufferTest.c +31 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/libtest/ClosureTest.c +205 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/libtest/EnumTest.c +51 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/libtest/FunctionTest.c +70 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/libtest/GNUmakefile +149 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/libtest/GlobalVariable.c +62 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/libtest/LastErrorTest.c +21 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/libtest/NumberTest.c +132 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/libtest/PointerTest.c +63 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/libtest/ReferenceTest.c +23 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/libtest/StringTest.c +34 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/libtest/StructTest.c +243 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/libtest/UnionTest.c +43 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/libtest/VariadicTest.c +62 -0
- data/vendor/gems/ruby/2.2.0/specifications/corefoundation-0.2.0.gemspec +45 -0
- data/vendor/gems/ruby/2.2.0/specifications/ffi-1.9.10.gemspec +49 -0
- data/yakg.gemspec +3 -3
- metadata +288 -83
- data/vendor/gems/Gemfile +0 -4
- data/vendor/gems/Gemfile.lock +0 -13
- data/vendor/gems/installit.sh +0 -65
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.0/COPYING +0 -674
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.0/COPYING.LESSER +0 -165
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.0/History.txt +0 -1
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.0/LICENSE +0 -14
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.0/gen/log +0 -1
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.0/lib/ffi/errno.rb +0 -33
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.0/lib/ffi/ffi.iml +0 -11
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.0/lib/ffi/ffi.rb +0 -33
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.0/lib/ffi/io.rb +0 -52
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.0/lib/ffi/union.rb +0 -32
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.0/lib/ffi/variadic.rb +0 -65
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.0/lib/ffi/version.rb +0 -4
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.0/lib/ffi_c.bundle +0 -0
- data/vendor/gems/ruby/2.0.0/specifications/ffi-1.9.0.gemspec +0 -42
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/gen/Rakefile +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/buffer.rb +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/callback.rb +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/memorypointer.rb +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform/arm-linux/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform/i386-cygwin/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform/i386-darwin/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform/i386-freebsd/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform/i386-gnu/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform/i386-linux/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform/i386-netbsd/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform/i386-openbsd/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform/i386-solaris/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform/i386-windows/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform/ia64-linux/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform/mips-linux/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform/mipsel-linux/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform/powerpc-aix/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform/powerpc-darwin/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform/powerpc-linux/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform/s390-linux/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform/s390x-linux/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform/sparc-linux/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform/sparc-solaris/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform/sparcv9-solaris/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform/x86_64-freebsd/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform/x86_64-linux/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0/lib/ffi/platform/x86_64-openbsd → ffi-1.9.10/lib/ffi/platform/x86_64-netbsd}/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform/x86_64-solaris/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform/x86_64-windows/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/tools/const_generator.rb +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/tools/generator.rb +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/tools/generator_task.rb +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/tools/struct_generator.rb +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/tools/types_generator.rb +0 -0
- /data/vendor/gems/ruby/{2.0.0/gems/ffi-1.9.0/lib/ffi/platform/x86_64-netbsd → 2.1.0/gems/ffi-1.9.10/lib/ffi/platform/i386-netbsd}/types.conf +0 -0
checksums.yaml
CHANGED
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
metadata.gz: !binary |-
|
|
9
|
-
ZDUwNmI2NzJkZDJjYzlhNTY1Zjg5OWVjNzM3NWIxMGQ5MjJiNmVmZTBkNzNm
|
|
10
|
-
YzIzYWUyNmM1YzIyNTA3N2NiOWYzZDQ4MjZiNjMwOTQyYzBiNjk3OWJjMTQ4
|
|
11
|
-
NGIzNjk5YWZmNzI5MGIzZTlmN2ZhNGU0MjM2OTFmYmQyNWQwNzM=
|
|
12
|
-
data.tar.gz: !binary |-
|
|
13
|
-
Y2U4Mzg3Njg0YjNkYzdiZGRhYzllYTkzNzBiNzU3ZThmNGRmZjIyNjUyMzk1
|
|
14
|
-
N2IzMjk2OGNmZTExYjMzOTBlZTQ3ZTY4ZTA3ODQ5ODk5ZjczNWZkZTY3YmRh
|
|
15
|
-
MDAyNjhiNzU4ODk3OWViZWMyYWY4MmYyMTA0MjM3MTUzNTg2YzI=
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: 10120897df9830c5557c34d9e899633a24bcfae2
|
|
4
|
+
data.tar.gz: 19543a288c260b98e364943c68b4a60678cab655
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 5440d0794043ad8e4f62aa624a5227e447d43f1ba525129dc2ce02d3f6ad8a6b22a6441bd6b879fd22e1f22518692b53b18acb22dcddbbf945af786f58e498d1
|
|
7
|
+
data.tar.gz: b19f32430b29992de59b7568393aa9ea8befae4bf9aa74b7a25db8964c0cd362f8050bf737636c3b4e007b9c540699fb9b92a9cd82bdf6d9591b012479d9e1ea
|
data/.gitignore
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,28 +1,33 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
yakg (0.0.
|
|
4
|
+
yakg (0.0.11)
|
|
5
5
|
|
|
6
6
|
GEM
|
|
7
7
|
remote: https://rubygems.org/
|
|
8
8
|
specs:
|
|
9
9
|
corefoundation (0.2.0)
|
|
10
10
|
ffi
|
|
11
|
-
diff-lcs (1.2.
|
|
11
|
+
diff-lcs (1.2.5)
|
|
12
12
|
excon (0.16.10)
|
|
13
|
-
ffi (1.
|
|
14
|
-
highline (1.6.
|
|
15
|
-
netrc (0.
|
|
16
|
-
rake (10.
|
|
17
|
-
rspec (
|
|
18
|
-
rspec-core (~>
|
|
19
|
-
rspec-expectations (~>
|
|
20
|
-
rspec-mocks (~>
|
|
21
|
-
rspec-core (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
13
|
+
ffi (1.9.10)
|
|
14
|
+
highline (1.6.21)
|
|
15
|
+
netrc (0.10.3)
|
|
16
|
+
rake (10.4.2)
|
|
17
|
+
rspec (3.3.0)
|
|
18
|
+
rspec-core (~> 3.3.0)
|
|
19
|
+
rspec-expectations (~> 3.3.0)
|
|
20
|
+
rspec-mocks (~> 3.3.0)
|
|
21
|
+
rspec-core (3.3.2)
|
|
22
|
+
rspec-support (~> 3.3.0)
|
|
23
|
+
rspec-expectations (3.3.1)
|
|
24
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
25
|
+
rspec-support (~> 3.3.0)
|
|
26
|
+
rspec-mocks (3.3.2)
|
|
27
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
28
|
+
rspec-support (~> 3.3.0)
|
|
29
|
+
rspec-support (3.3.0)
|
|
30
|
+
woof_util (0.0.18)
|
|
26
31
|
excon (~> 0.16.10)
|
|
27
32
|
highline (~> 1.6.15)
|
|
28
33
|
|
|
@@ -31,9 +36,12 @@ PLATFORMS
|
|
|
31
36
|
|
|
32
37
|
DEPENDENCIES
|
|
33
38
|
corefoundation
|
|
34
|
-
ffi (~> 1.
|
|
39
|
+
ffi (~> 1.9.10)
|
|
35
40
|
netrc
|
|
36
|
-
rake
|
|
37
|
-
rspec
|
|
38
|
-
woof_util
|
|
41
|
+
rake (~> 10)
|
|
42
|
+
rspec (~> 3)
|
|
43
|
+
woof_util (~> 0)
|
|
39
44
|
yakg!
|
|
45
|
+
|
|
46
|
+
BUNDLED WITH
|
|
47
|
+
1.10.6
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.0.
|
|
1
|
+
0.0.11
|
data/lib/yakg.rb
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
class Yakg
|
|
2
2
|
module Misc
|
|
3
3
|
def self.get_abi
|
|
4
|
-
if RUBY_VERSION.match /^1
|
|
4
|
+
if RUBY_VERSION.match /^1\.8/
|
|
5
5
|
"1.8"
|
|
6
|
-
elsif RUBY_VERSION.match /^1
|
|
6
|
+
elsif RUBY_VERSION.match /^1\.9/
|
|
7
7
|
"1.9.1"
|
|
8
|
-
elsif RUBY_VERSION.match /^2
|
|
9
|
-
|
|
8
|
+
elsif RUBY_VERSION.match /^2\./
|
|
9
|
+
RUBY_VERSION.sub /\A(\d\.\d).*\z/, '\1\.0'
|
|
10
10
|
end
|
|
11
11
|
end
|
|
12
12
|
|
|
@@ -22,7 +22,7 @@ class Yakg
|
|
|
22
22
|
@@DEFAULT_SERVICE_NAME = "ruby-yakg-gem"
|
|
23
23
|
def self.DEFAULT_SERVICE_NAME= x; @@DEFAULT_SERVICE_NAME = x; end
|
|
24
24
|
def self.DEFAULT_SERVICE_NAME ; @@DEFAULT_SERVICE_NAME; end
|
|
25
|
-
|
|
25
|
+
|
|
26
26
|
def self.set acct, value, svc=@@DEFAULT_SERVICE_NAME
|
|
27
27
|
Backend.set acct, value, svc
|
|
28
28
|
end
|
|
@@ -38,5 +38,5 @@ class Yakg
|
|
|
38
38
|
def self.list svc=@@DEFAULT_SERVICE_NAME
|
|
39
39
|
Backend.list svc
|
|
40
40
|
end
|
|
41
|
-
|
|
41
|
+
|
|
42
42
|
end
|
data/spec/spec_helper.rb
CHANGED
|
@@ -8,10 +8,8 @@ Yakg.DEFAULT_SERVICE_NAME = "yakg-rspec"
|
|
|
8
8
|
require 'securerandom'
|
|
9
9
|
|
|
10
10
|
RSpec.configure do |config|
|
|
11
|
-
config.color_enabled = true
|
|
12
|
-
|
|
13
|
-
# Use color not only in STDOUT but also in pagers and files
|
|
14
11
|
config.tty = true
|
|
12
|
+
config.raise_errors_for_deprecations!
|
|
15
13
|
|
|
16
14
|
# Use the specified formatter
|
|
17
15
|
#config.formatter = :documentation # :progress, :html, :textmate
|
data/spec/yakg_spec.rb
CHANGED
|
@@ -7,36 +7,36 @@ describe Yakg do
|
|
|
7
7
|
|
|
8
8
|
it "pre-nukes everything" do
|
|
9
9
|
Yakg.list.each {|x| Yakg.unset x }
|
|
10
|
-
Yakg.list.
|
|
10
|
+
expect(Yakg.list).to eq []
|
|
11
11
|
end
|
|
12
|
-
|
|
12
|
+
|
|
13
13
|
it "confirms nonexistent keys are nil" do
|
|
14
|
-
Yakg.get(pw_name).
|
|
14
|
+
expect(Yakg.get(pw_name)).to be nil
|
|
15
15
|
end
|
|
16
16
|
|
|
17
17
|
it "can create a key" do
|
|
18
|
-
Yakg.set(pw_name, pw_value).
|
|
19
|
-
Yakg.get(pw_name).
|
|
18
|
+
expect(Yakg.set(pw_name, pw_value)).to be true
|
|
19
|
+
expect(Yakg.get(pw_name)).to eq pw_value
|
|
20
20
|
end
|
|
21
21
|
|
|
22
22
|
it "can list keys" do
|
|
23
23
|
Yakg.set(new_pw_name, SecureRandom.hex(4))
|
|
24
|
-
Yakg.list.
|
|
24
|
+
expect(Yakg.list).to eq [pw_name, new_pw_name]
|
|
25
25
|
end
|
|
26
|
-
|
|
26
|
+
|
|
27
27
|
it "can update keys" do
|
|
28
28
|
new_pw_value = SecureRandom.hex 4
|
|
29
|
-
Yakg.set(pw_name, new_pw_value).
|
|
30
|
-
Yakg.get(pw_name).
|
|
29
|
+
expect(Yakg.set(pw_name, new_pw_value)).to be true
|
|
30
|
+
expect(Yakg.get(pw_name)).to eq new_pw_value
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
it "can delete a key" do
|
|
34
|
-
Yakg.unset(pw_name).
|
|
35
|
-
Yakg.get(pw_name).
|
|
34
|
+
expect(Yakg.unset(pw_name)).to be true
|
|
35
|
+
expect(Yakg.get(pw_name)).to be nil
|
|
36
36
|
end
|
|
37
37
|
|
|
38
38
|
it "has unset return nil for nonexistent keys" do
|
|
39
|
-
Yakg.unset(SecureRandom.hex(8)).
|
|
39
|
+
expect(Yakg.unset(SecureRandom.hex(8))).to be nil
|
|
40
40
|
end
|
|
41
|
-
|
|
41
|
+
|
|
42
42
|
end
|
data/vendor/gems/README.md
CHANGED
|
@@ -26,24 +26,30 @@ ffi_c.bundle recompilation notes
|
|
|
26
26
|
================================
|
|
27
27
|
|
|
28
28
|
```
|
|
29
|
-
$
|
|
30
|
-
$
|
|
31
|
-
$
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
$
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
$
|
|
29
|
+
$ brew update; brew uninstall openssl
|
|
30
|
+
$ brew install openssl --universal
|
|
31
|
+
$ cd ~/.rbenv/
|
|
32
|
+
$ mv versions stash_versions
|
|
33
|
+
$ cd ~/src/yakg
|
|
34
|
+
$ for RUBY_VERSION in 2.0.0-p247 2.1.7 2.2.3; do
|
|
35
|
+
> CC="xcrun cc" CPP="xcrun cc -E" \
|
|
36
|
+
RUBY_CONFIGURE_OPTS="--with-arch=x86_64,i386 \
|
|
37
|
+
--with-openssl-dir=/usr/local/opt/openssl" \
|
|
38
|
+
rbenv install $RUBY_VERSION
|
|
39
|
+
> rbenv global $RUBY_VERSION
|
|
40
|
+
> gem install bundler
|
|
41
|
+
> bundle install --path vendor
|
|
42
|
+
> done
|
|
43
|
+
$ cd vendor/gems
|
|
44
|
+
$ for ABI in 2.1.0 2.2.0; do
|
|
45
|
+
> mkdir -p ${ABI}/gems ${ABI}/specifications
|
|
46
|
+
> cp ../ruby/$ABI/specifications/{corefoundation,ffi}-* ${ABI}/specifications
|
|
47
|
+
> rsync -avP ../ruby/${ABI}/gems/{corefoundation,ffi}-* ${ABI}/gems
|
|
48
|
+
> pushd ${ABI}/gems/ffi-*
|
|
49
|
+
> mv ext/ffi_c/ffi_c.bundle lib
|
|
50
|
+
> popd
|
|
51
|
+
> rm -rf ${ABI}/gems/{corefoundation,ffi}-*/{ext,spec}
|
|
52
|
+
> done
|
|
53
|
+
$ mv versions clean_universal_builds
|
|
54
|
+
$ mv stash_versions versions
|
|
49
55
|
```
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
Copyright (c) 2008-2013, Ruby FFI project contributors
|
|
2
|
+
All rights reserved.
|
|
3
|
+
|
|
4
|
+
Redistribution and use in source and binary forms, with or without
|
|
5
|
+
modification, are permitted provided that the following conditions are met:
|
|
6
|
+
* Redistributions of source code must retain the above copyright
|
|
7
|
+
notice, this list of conditions and the following disclaimer.
|
|
8
|
+
* Redistributions in binary form must reproduce the above copyright
|
|
9
|
+
notice, this list of conditions and the following disclaimer in the
|
|
10
|
+
documentation and/or other materials provided with the distribution.
|
|
11
|
+
* Neither the name of the Ruby FFI project nor the
|
|
12
|
+
names of its contributors may be used to endorse or promote products
|
|
13
|
+
derived from this software without specific prior written permission.
|
|
14
|
+
|
|
15
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
16
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
17
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
18
|
+
DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
|
|
19
|
+
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
20
|
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
21
|
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
22
|
+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
23
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
24
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
25
|
+
|
|
26
|
+
libffi, used by this project, is licensed under the MIT license:
|
|
27
|
+
|
|
28
|
+
libffi - Copyright (c) 1996-2011 Anthony Green, Red Hat, Inc and others.
|
|
29
|
+
See source files for details.
|
|
30
|
+
|
|
31
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
32
|
+
a copy of this software and associated documentation files (the
|
|
33
|
+
``Software''), to deal in the Software without restriction, including
|
|
34
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
35
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
36
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
37
|
+
the following conditions:
|
|
38
|
+
|
|
39
|
+
The above copyright notice and this permission notice shall be
|
|
40
|
+
included in all copies or substantial portions of the Software.
|
|
41
|
+
|
|
42
|
+
THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
|
|
43
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
44
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
45
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
46
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
47
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
48
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
49
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
Copyright (c) 2008-2013, Ruby FFI project contributors
|
|
2
|
+
All rights reserved.
|
|
3
|
+
|
|
4
|
+
Redistribution and use in source and binary forms, with or without
|
|
5
|
+
modification, are permitted provided that the following conditions are met:
|
|
6
|
+
* Redistributions of source code must retain the above copyright
|
|
7
|
+
notice, this list of conditions and the following disclaimer.
|
|
8
|
+
* Redistributions in binary form must reproduce the above copyright
|
|
9
|
+
notice, this list of conditions and the following disclaimer in the
|
|
10
|
+
documentation and/or other materials provided with the distribution.
|
|
11
|
+
* Neither the name of the Ruby FFI project nor the
|
|
12
|
+
names of its contributors may be used to endorse or promote products
|
|
13
|
+
derived from this software without specific prior written permission.
|
|
14
|
+
|
|
15
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
16
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
17
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
18
|
+
DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
|
|
19
|
+
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
20
|
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
21
|
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
22
|
+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
23
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
24
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
# ruby-ffi
|
|
1
|
+
# ruby-ffi https://wiki.github.com/ffi/ffi [](https://travis-ci.org/ffi/ffi)
|
|
2
2
|
|
|
3
3
|
## Description
|
|
4
4
|
|
|
5
5
|
Ruby-FFI is a ruby extension for programmatically loading dynamic
|
|
6
6
|
libraries, binding functions within them, and calling those functions
|
|
7
7
|
from Ruby code. Moreover, a Ruby-FFI extension works without changes
|
|
8
|
-
on Ruby and JRuby. Discover why should
|
|
9
|
-
using Ruby-FFI
|
|
8
|
+
on Ruby and JRuby. [Discover why you should write your next extension
|
|
9
|
+
using Ruby-FFI](https://wiki.github.com/ffi/ffi/why-use-ffi).
|
|
10
10
|
|
|
11
11
|
## Features/problems
|
|
12
12
|
|
|
@@ -33,8 +33,8 @@ MyLib.puts 'Hello, World using libc!'
|
|
|
33
33
|
For less minimalistic and more sane examples you may look at:
|
|
34
34
|
|
|
35
35
|
* the samples/ folder
|
|
36
|
-
* the examples on the [wiki](
|
|
37
|
-
* the projects using FFI listed on this page (
|
|
36
|
+
* the examples on the [wiki](https://wiki.github.com/ffi/ffi)
|
|
37
|
+
* the projects using FFI listed on this page (https://wiki.github.com/ffi/ffi/projects-using-ffi)
|
|
38
38
|
|
|
39
39
|
## Requirements
|
|
40
40
|
|
|
@@ -57,13 +57,13 @@ or from the git repository on github:
|
|
|
57
57
|
|
|
58
58
|
## License
|
|
59
59
|
|
|
60
|
-
The ffi library is covered by the
|
|
60
|
+
The ffi library is covered by the BSD license, also see the LICENSE file.
|
|
61
61
|
The specs are shared with Rubyspec and are licensed by the same license
|
|
62
62
|
as Rubyspec, see the LICENSE.SPECS file.
|
|
63
63
|
|
|
64
64
|
## Credits
|
|
65
65
|
|
|
66
|
-
The following people have submitted code, bug reports, or
|
|
66
|
+
The following people have submitted code, bug reports, or otherwise contributed to the success of this project:
|
|
67
67
|
|
|
68
68
|
* Alban Peignier <alban.peignier@free.fr>
|
|
69
69
|
* Aman Gupta <aman@tmm1.net>
|
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
require 'rubygems'
|
|
2
|
-
require 'rubygems/package_task'
|
|
3
1
|
require 'rubygems/tasks'
|
|
4
2
|
require 'rbconfig'
|
|
5
3
|
require 'rake/clean'
|
|
4
|
+
require File.expand_path("./lib/ffi/version")
|
|
6
5
|
|
|
7
6
|
USE_RAKE_COMPILER = (RUBY_PLATFORM =~ /java/) ? false : true
|
|
8
7
|
if USE_RAKE_COMPILER
|
|
9
|
-
gem 'rake-compiler', '>=0.6.0'
|
|
10
8
|
require 'rake/extensiontask'
|
|
11
9
|
end
|
|
12
10
|
|
|
13
11
|
require 'date'
|
|
14
12
|
require 'fileutils'
|
|
15
13
|
require 'rbconfig'
|
|
16
|
-
|
|
14
|
+
require 'rspec/core/rake_task'
|
|
15
|
+
require 'rubygems/package_task'
|
|
17
16
|
|
|
18
17
|
LIBEXT = case RbConfig::CONFIG['host_os'].downcase
|
|
19
18
|
when /darwin/
|
|
@@ -78,39 +77,33 @@ end
|
|
|
78
77
|
|
|
79
78
|
TEST_DEPS = [ LIBTEST ]
|
|
80
79
|
if RUBY_PLATFORM == "java"
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
sh %{#{Gem.ruby} -w -S rspec #{Dir["spec/ffi/*_spec.rb"].join(" ")} -fs --color}
|
|
84
|
-
end
|
|
85
|
-
desc "Run rubinius specs"
|
|
86
|
-
task :rbxspecs => TEST_DEPS do
|
|
87
|
-
sh %{#{Gem.ruby} -w -S rspec #{Dir["spec/ffi/rbx/*_spec.rb"].join(" ")} -fs --color}
|
|
80
|
+
RSpec::Core::RakeTask.new(:spec) do |config|
|
|
81
|
+
config.rspec_opts = YAML.load_file 'spec/spec.opts'
|
|
88
82
|
end
|
|
89
83
|
else
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
task :specs => TEST_DEPS do
|
|
93
|
-
ENV["MRI_FFI"] = "1"
|
|
94
|
-
sh %{#{Gem.ruby} -w -Ilib -I#{BUILD_EXT_DIR} -S rspec #{Dir["spec/ffi/*_spec.rb"].join(" ")} -fs --color}
|
|
95
|
-
end
|
|
96
|
-
desc "Run rubinius specs"
|
|
97
|
-
task :rbxspecs => TEST_DEPS do
|
|
98
|
-
ENV["MRI_FFI"] = "1"
|
|
99
|
-
sh %{#{Gem.ruby} -w -Ilib -I#{BUILD_EXT_DIR} -S rspec #{Dir["spec/ffi/rbx/*_spec.rb"].join(" ")} -fs --color}
|
|
84
|
+
RSpec::Core::RakeTask.new(:spec => :compile) do |config|
|
|
85
|
+
config.rspec_opts = YAML.load_file 'spec/spec.opts'
|
|
100
86
|
end
|
|
87
|
+
|
|
88
|
+
TEST_DEPS.unshift :compile
|
|
101
89
|
end
|
|
102
90
|
|
|
103
91
|
desc "Build all packages"
|
|
104
92
|
task :package => 'gem:package'
|
|
105
93
|
|
|
106
|
-
|
|
107
|
-
CLOBBER.include 'build'
|
|
108
|
-
CLOBBER.include FileList['lib/**/ffi_c.so']
|
|
109
|
-
CLOBBER.include FileList["lib/**/ffi_c.#{RbConfig::CONFIG['DLEXT']}"]
|
|
110
94
|
CLOBBER.include 'lib/ffi/types.conf'
|
|
111
|
-
CLOBBER.include 'conftest.dSYM'
|
|
112
95
|
CLOBBER.include 'pkg'
|
|
113
96
|
|
|
97
|
+
CLEAN.include 'build'
|
|
98
|
+
CLEAN.include 'conftest.dSYM'
|
|
99
|
+
CLEAN.include 'spec/ffi/fixtures/libtest.{dylib,so,dll}'
|
|
100
|
+
CLEAN.include 'spec/ffi/fixtures/*.o'
|
|
101
|
+
CLEAN.include "pkg/ffi-#{FFI::VERSION}-*-mingw32"
|
|
102
|
+
CLEAN.include "pkg/ffi-#{FFI::VERSION}-java"
|
|
103
|
+
CLEAN.include 'lib/1.*'
|
|
104
|
+
CLEAN.include 'lib/2.*'
|
|
105
|
+
CLEAN.include 'bin'
|
|
106
|
+
|
|
114
107
|
task :distclean => :clobber
|
|
115
108
|
|
|
116
109
|
desc "Build the native test lib"
|
|
@@ -123,7 +116,7 @@ desc "Build test helper lib"
|
|
|
123
116
|
task :libtest => "build/libtest.#{LIBEXT}"
|
|
124
117
|
|
|
125
118
|
desc "Test the extension"
|
|
126
|
-
task :test => [ :
|
|
119
|
+
task :test => [ :spec ]
|
|
127
120
|
|
|
128
121
|
|
|
129
122
|
namespace :bench do
|
|
@@ -147,11 +140,6 @@ task 'spec:specdoc' => TEST_DEPS
|
|
|
147
140
|
|
|
148
141
|
task :default => :specs
|
|
149
142
|
|
|
150
|
-
task 'gem:win32' do
|
|
151
|
-
sh("rake cross native gem RUBY_CC_VERSION='1.8.7:1.9.3:2.0.0'") || raise("win32 build failed!")
|
|
152
|
-
end
|
|
153
|
-
|
|
154
|
-
|
|
155
143
|
namespace 'java' do
|
|
156
144
|
|
|
157
145
|
java_gem_spec = Gem::Specification.new do |s|
|
|
@@ -162,7 +150,7 @@ namespace 'java' do
|
|
|
162
150
|
s.homepage = gem_spec.homepage
|
|
163
151
|
s.summary = gem_spec.summary
|
|
164
152
|
s.description = gem_spec.description
|
|
165
|
-
s.files = %w(
|
|
153
|
+
s.files = %w(LICENSE COPYING README.md Rakefile)
|
|
166
154
|
s.has_rdoc = false
|
|
167
155
|
s.license = gem_spec.license
|
|
168
156
|
s.platform = 'java'
|
|
@@ -187,21 +175,23 @@ if USE_RAKE_COMPILER
|
|
|
187
175
|
ext.cross_platform = %w[i386-mingw32 x64-mingw32] # forces the Windows platform instead of the default one
|
|
188
176
|
end
|
|
189
177
|
|
|
178
|
+
ENV['RUBY_CC_VERSION'] ||= '1.8.7:1.9.3:2.0.0:2.1.5:2.2.1'
|
|
179
|
+
|
|
190
180
|
ENV['RUBY_CC_VERSION'].to_s.split(':').each do |ruby_version|
|
|
191
181
|
task "copy:ffi_c:i386-mingw32:#{ruby_version}" do |t|
|
|
192
|
-
|
|
193
|
-
if File.exists?("#{dir}/#{ruby_version[/^\d+\.\d+/]}/ffi_c.so")
|
|
194
|
-
sh "i686-w64-mingw32-strip -S #{dir}/#{ruby_version[/^\d+\.\d+/]}/ffi_c.so"
|
|
195
|
-
end
|
|
196
|
-
end
|
|
182
|
+
sh "i686-w64-mingw32-strip -S #{BUILD_DIR}/i386-mingw32/stage/lib/#{ruby_version[/^\d+\.\d+/]}/ffi_c.so"
|
|
197
183
|
end
|
|
198
184
|
|
|
199
185
|
task "copy:ffi_c:x64-mingw32:#{ruby_version}" do |t|
|
|
200
|
-
|
|
201
|
-
sh "x86_64-w64-mingw32-strip -S #{BUILD_DIR}/x64-mingw32/stage/lib/#{ruby_version[/^\d+\.\d+/]}/ffi_c.so"
|
|
202
|
-
end
|
|
186
|
+
sh "x86_64-w64-mingw32-strip -S #{BUILD_DIR}/x64-mingw32/stage/lib/#{ruby_version[/^\d+\.\d+/]}/ffi_c.so"
|
|
203
187
|
end
|
|
204
188
|
end
|
|
189
|
+
|
|
190
|
+
desc "build a windows gem without all the ceremony."
|
|
191
|
+
task "gem:windows" do
|
|
192
|
+
require "rake_compiler_dock"
|
|
193
|
+
RakeCompilerDock.sh "bundle && rake cross native gem MAKE='nice make -j`nproc`'"
|
|
194
|
+
end
|
|
205
195
|
end
|
|
206
196
|
|
|
207
197
|
Gem::Tasks.new do |t|
|
|
@@ -8,15 +8,16 @@ Gem::Specification.new do |s|
|
|
|
8
8
|
s.homepage = 'http://wiki.github.com/ffi/ffi'
|
|
9
9
|
s.summary = 'Ruby FFI'
|
|
10
10
|
s.description = 'Ruby FFI library'
|
|
11
|
-
s.files = %w(ffi.gemspec
|
|
11
|
+
s.files = %w(ffi.gemspec LICENSE COPYING README.md Rakefile) + Dir.glob("{ext,gen,lib,spec,libtest}/**/*").reject { |f| f =~ /(lib\/[12]\.[089]|\.s?[ao]$|\.bundle|\.dylib$)/ }
|
|
12
12
|
s.extensions << 'ext/ffi_c/extconf.rb'
|
|
13
13
|
s.has_rdoc = false
|
|
14
14
|
s.rdoc_options = %w[--exclude=ext/ffi_c/.*\.o$ --exclude=ffi_c\.(bundle|so)$]
|
|
15
|
-
s.license = '
|
|
15
|
+
s.license = 'BSD'
|
|
16
16
|
s.require_paths << 'ext/ffi_c'
|
|
17
17
|
s.required_ruby_version = '>= 1.8.7'
|
|
18
|
-
s.add_development_dependency 'rake'
|
|
19
|
-
s.add_development_dependency 'rake-compiler', '
|
|
20
|
-
s.add_development_dependency '
|
|
21
|
-
s.add_development_dependency '
|
|
18
|
+
s.add_development_dependency 'rake', '~> 10.1'
|
|
19
|
+
s.add_development_dependency 'rake-compiler', '~> 0.9'
|
|
20
|
+
s.add_development_dependency 'rake-compiler-dock', '~> 0.4.0'
|
|
21
|
+
s.add_development_dependency 'rspec', '~> 2.14.1'
|
|
22
|
+
s.add_development_dependency 'rubygems-tasks', "~> 0.2.4"
|
|
22
23
|
end
|
|
@@ -2,22 +2,32 @@
|
|
|
2
2
|
# Copyright (C) 2008-2010 Wayne Meissner
|
|
3
3
|
# Copyright (C) 2008 Mike Dalessio
|
|
4
4
|
#
|
|
5
|
-
# All rights reserved.
|
|
6
|
-
#
|
|
7
5
|
# This file is part of ruby-ffi.
|
|
8
6
|
#
|
|
9
|
-
#
|
|
10
|
-
# the terms of the GNU Lesser General Public License version 3 only, as
|
|
11
|
-
# published by the Free Software Foundation.
|
|
7
|
+
# All rights reserved.
|
|
12
8
|
#
|
|
13
|
-
#
|
|
14
|
-
#
|
|
15
|
-
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
|
16
|
-
# version 3 for more details.
|
|
9
|
+
# Redistribution and use in source and binary forms, with or without
|
|
10
|
+
# modification, are permitted provided that the following conditions are met:
|
|
17
11
|
#
|
|
18
|
-
#
|
|
19
|
-
#
|
|
12
|
+
# * Redistributions of source code must retain the above copyright notice, this
|
|
13
|
+
# list of conditions and the following disclaimer.
|
|
14
|
+
# * Redistributions in binary form must reproduce the above copyright notice
|
|
15
|
+
# this list of conditions and the following disclaimer in the documentation
|
|
16
|
+
# and/or other materials provided with the distribution.
|
|
17
|
+
# * Neither the name of the Ruby FFI project nor the names of its contributors
|
|
18
|
+
# may be used to endorse or promote products derived from this software
|
|
19
|
+
# without specific prior written permission.
|
|
20
20
|
#
|
|
21
|
+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
22
|
+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
23
|
+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
24
|
+
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
|
25
|
+
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
26
|
+
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
27
|
+
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
28
|
+
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
29
|
+
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
30
|
+
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
21
31
|
|
|
22
32
|
module FFI
|
|
23
33
|
class AutoPointer < Pointer
|
|
@@ -151,9 +161,9 @@ module FFI
|
|
|
151
161
|
# CallableReleaser is a {Releaser} used when an {AutoPointer} is defined with a
|
|
152
162
|
# Proc or a Method.
|
|
153
163
|
class CallableReleaser < Releaser
|
|
164
|
+
# Release +ptr+ by using Proc or Method defined at +ptr+ {AutoPointer#initialize initialization}.
|
|
154
165
|
# @param [Pointer] ptr
|
|
155
166
|
# @return [nil]
|
|
156
|
-
# Release +ptr+ by using Proc or Method defined at +ptr+ {AutoPointer#initialize initialization}.
|
|
157
167
|
def release(ptr)
|
|
158
168
|
@proc.call(ptr)
|
|
159
169
|
end
|
|
@@ -173,8 +183,8 @@ module FFI
|
|
|
173
183
|
#
|
|
174
184
|
# Override {DataConverter#from_native}.
|
|
175
185
|
# @overload self.from_native(ptr, ctx)
|
|
176
|
-
#
|
|
177
|
-
#
|
|
186
|
+
# @param [Pointer] ptr
|
|
187
|
+
# @param ctx not used. Please set +nil+.
|
|
178
188
|
# @return [AutoPointer]
|
|
179
189
|
def self.from_native(val, ctx)
|
|
180
190
|
self.new(val)
|