identifier 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/ext/identifier.c ADDED
@@ -0,0 +1,21 @@
1
+ #include "ruby.h"
2
+
3
+ #include <uuid/uuid.h>
4
+
5
+ VALUE method_generate(VALUE self);
6
+
7
+ void Init_identifier() {
8
+ Identifier = rb_define_module("Identifier");
9
+ rb_define_method(Identifier, "generate", method_generate, 0);
10
+ }
11
+
12
+ VALUE method_generate(VALUE self)
13
+ {
14
+ uuid_t uuid;
15
+ char result[38];
16
+
17
+ uuid_generate(uuid);
18
+ uuid_unparse(uuid, result);
19
+
20
+ return StringValue(result);
21
+ }
@@ -1,3 +1,3 @@
1
1
  module Identifier
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 0
8
- - 2
9
- version: 1.0.2
8
+ - 3
9
+ version: 1.0.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Kevin Sylvestre
@@ -29,6 +29,7 @@ extra_rdoc_files: []
29
29
 
30
30
  files:
31
31
  - lib/identifier/version.rb
32
+ - ext/identifier.c
32
33
  - README.rdoc
33
34
  - LICENSE
34
35
  - Gemfile