Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
Choose a Base Repository
Choose a base branch
Nothing to show
...
Choose a Head Repository
Choose a head branch
Nothing to show
  • 4 commits
  • 4 files changed
  • 0 commit comments
  • 1 contributor
Showing with 31 additions and 0 deletions.
  1. +2 −0 .gitignore
  2. +1 −0 README.md
  3. +6 −0 extconf.rb
  4. +22 −0 keepass.c
View
@@ -1,2 +1,4 @@
Makefile
mkmf.log
+*.o
+*.so
View
@@ -0,0 +1 @@
+# ruby-keepass - libkpass binding for Ruby
View
@@ -0,0 +1,6 @@
+require 'mkmf'
+
+return unless have_library 'kpass', 'kpass_init_db'
+return unless have_header 'kpass.h'
+
+create_makefile 'keepass'
View
@@ -0,0 +1,22 @@
+#include <ruby.h>
+
+#define MODULE_NAME "Keepass"
+#define DATABASE_CLASS_NAME "Database"
+#define GROUP_CLASS_NAME "Group"
+#define ENTRY_CLASS_NAME "Entry"
+
+void
+Init_keepass(void)
+{
+ VALUE mKeepass;
+ VALUE cDatabase;
+ VALUE cGroup;
+ VALUE cEntry;
+
+ /* Module Initialization */
+ mKeepass = rb_define_module(MODULE_NAME);
+ cDatabase = rb_define_class_under(mKeepass, DATABASE_CLASS_NAME,
+ rb_cObject);
+ cGroup = rb_define_class_under(mKeepass, GROUP_CLASS_NAME, rb_cObject);
+ cEntry = rb_define_class_under(mKeepass, ENTRY_CLASS_NAME, rb_cObject);
+}

No commit comments for this range