Skip to content

Commit 30df941

Browse files
committed
Merge pull request #100 from kerrizor/fix-for-font-detection-under-jruby
Fix for font detection under JRuby
2 parents 2cd607a + 6e71178 commit 30df941

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

CHANGES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
1.2.1
2+
-----
3+
4+
* Fixes a bug in OS detection for JRuby (and newer MRI Rubies, too)
5+
16
1.2.0
27
-----
38

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
rails-erd (1.2.0)
4+
rails-erd (1.2.1)
55
activerecord (~> 3.2)
66
activesupport (~> 3.2)
77
choice (~> 0.1.6)

lib/rails_erd/config.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,13 @@ def normalize_value(key, value)
7777

7878
def self.use_os_x_fonts?
7979
host = RbConfig::CONFIG['host_os']
80+
return true if host == "darwin"
8081

8182
if host.include? "darwin"
8283
darwin_version_array = host.split("darwin").last.split(".").map(&:to_i)
8384

84-
if darwin_version_array[0] == 12 and darwin_version_array[1] >= 5
85-
return true
86-
end
85+
return true if darwin_version_array[0] >= 13
86+
return true if darwin_version_array[0] == 12 && darwin_version_array[1] >= 5
8787
end
8888

8989
false

lib/rails_erd/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
module RailsERD
2-
VERSION = "1.2.0"
2+
VERSION = "1.2.1"
33
BANNER = "RailsERD #{VERSION}"
44
end

0 commit comments

Comments
 (0)