Skip to content

Commit 94c3bec

Browse files
committed
No-op gem for JRuby for now
Remove all shipped files and require path on JRuby until we can add JRuby's extension to the gem. Temporary workaround for #48
1 parent ac1642c commit 94c3bec

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

date.gemspec

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,21 @@ Gem::Specification.new do |s|
1010
s.summary = "A subclass of Object includes Comparable module for handling dates."
1111
s.description = "A subclass of Object includes Comparable module for handling dates."
1212

13-
s.require_path = %w{lib}
14-
s.files = [
15-
"README.md",
16-
"lib/date.rb", "ext/date/date_core.c", "ext/date/date_parse.c", "ext/date/date_strftime.c",
17-
"ext/date/date_strptime.c", "ext/date/date_tmx.h", "ext/date/extconf.rb", "ext/date/prereq.mk",
18-
"ext/date/zonetab.h", "ext/date/zonetab.list"
19-
]
20-
s.extensions = "ext/date/extconf.rb"
13+
if Gem::Platform === s.platform and s.platform =~ 'java' or RUBY_ENGINE == 'jruby'
14+
s.platform = 'java'
15+
# No files shipped, no require path, no-op for now on JRuby
16+
else
17+
s.require_path = %w{lib}
18+
19+
s.files = [
20+
"README.md",
21+
"lib/date.rb", "ext/date/date_core.c", "ext/date/date_parse.c", "ext/date/date_strftime.c",
22+
"ext/date/date_strptime.c", "ext/date/date_tmx.h", "ext/date/extconf.rb", "ext/date/prereq.mk",
23+
"ext/date/zonetab.h", "ext/date/zonetab.list"
24+
]
25+
s.extensions = "ext/date/extconf.rb"
26+
end
27+
2128
s.required_ruby_version = ">= 2.4.0"
2229

2330
s.authors = ["Tadayoshi Funaba"]

0 commit comments

Comments
 (0)