guid 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +3 -0
- data/Rakefile +1 -1
- data/lib/guid.rb +10 -2
- data/spec/osx_spec.rb +13 -0
- data/spec/spec_helper.rb +11 -0
- data/spec/spec_suite.rb +4 -0
- metadata +10 -7
data/CHANGES
CHANGED
data/Rakefile
CHANGED
data/lib/guid.rb
CHANGED
@@ -7,7 +7,15 @@
|
|
7
7
|
# under the same terms as Ruby itself.
|
8
8
|
#
|
9
9
|
|
10
|
-
|
10
|
+
class Guid
|
11
|
+
class << self
|
12
|
+
def win32?
|
13
|
+
RUBY_PLATFORM =~ /[^r]win/i
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
if Guid.win32?
|
11
19
|
module Guid_Win32_
|
12
20
|
require 'Win32API'
|
13
21
|
|
@@ -73,7 +81,7 @@ module Guid_Unix_
|
|
73
81
|
end
|
74
82
|
|
75
83
|
class Guid
|
76
|
-
if
|
84
|
+
if Guid.win32?
|
77
85
|
include Guid_Win32_
|
78
86
|
else
|
79
87
|
include Guid_Unix_
|
data/spec/osx_spec.rb
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
require File.expand_path("#{File.dirname(__FILE__)}/spec_helper")
|
2
|
+
|
3
|
+
describe Guid do
|
4
|
+
it "does not load windows specific code on the Darwin platform" do
|
5
|
+
script = <<-RUBY
|
6
|
+
Object.send(:remove_const, :RUBY_PLATFORM)
|
7
|
+
Object.const_set(:RUBY_PLATFORM, "darwin")
|
8
|
+
require "guid"
|
9
|
+
RUBY
|
10
|
+
dir = File.dirname(__FILE__)
|
11
|
+
system("cd #{dir}/../lib; ruby -e '#{script}'").should be_true
|
12
|
+
end
|
13
|
+
end
|
data/spec/spec_helper.rb
ADDED
data/spec/spec_suite.rb
ADDED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: guid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Takita, Ross Hale, & David Garamond
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-04-
|
12
|
+
date: 2008-04-24 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -23,12 +23,15 @@ extra_rdoc_files:
|
|
23
23
|
- README
|
24
24
|
- CHANGES
|
25
25
|
files:
|
26
|
-
- FAQ
|
27
|
-
- CHANGES
|
28
26
|
- Rakefile
|
27
|
+
- CHANGES
|
28
|
+
- FAQ
|
29
29
|
- README
|
30
30
|
- install.rb
|
31
31
|
- lib/guid.rb
|
32
|
+
- spec/spec_suite.rb
|
33
|
+
- spec/spec_helper.rb
|
34
|
+
- spec/osx_spec.rb
|
32
35
|
has_rdoc: true
|
33
36
|
homepage: http://pivotallabs.com
|
34
37
|
post_install_message:
|
@@ -54,9 +57,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
54
57
|
requirements: []
|
55
58
|
|
56
59
|
rubyforge_project: pivotalrb
|
57
|
-
rubygems_version: 1.0
|
60
|
+
rubygems_version: 1.1.0
|
58
61
|
signing_key:
|
59
62
|
specification_version: 2
|
60
63
|
summary: Guid is a Ruby library for portable GUID/UUID generation. At the moment it can be used on Windows (except first release of Win95 and older) and on Unix. This is a fork of David Garamond's ruby-uuid library.
|
61
|
-
test_files:
|
62
|
-
|
64
|
+
test_files:
|
65
|
+
- spec/osx_spec.rb
|