Skip to content

Commit

Permalink
Add initializer for time object compatibility until we can patch
Browse files Browse the repository at this point in the history
  • Loading branch information
d-m-u committed Aug 15, 2019
1 parent fa9ba1a commit f01c59c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ gem "sqlite3", "~>1.3.0", :require => false
gem "sys-filesystem", "~>1.2.0"
gem "terminal", :require => false


# temporary inclusion till we can get ConvertTimeToEoTime patch into upstream
gem "et-orbi"

# Modified gems (forked on Github)
gem "ruport", "=1.7.0", :git => "https://github.com/ManageIQ/ruport.git", :tag => "v1.7.0-3"

Expand Down
12 changes: 12 additions & 0 deletions config/initializers/convert_time_to_eo.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# temporary hack for when/if we can get patch accepted upscream
# see note at https://github.com/ManageIQ/manageiq/pull/19153#issuecomment-521719495

module ConvertTimeToEoTime
def ==(*args)
o = EtOrbi.make_time(o) if o.kind_of?(Time)
super(o)
end
end

require 'et-orbi'
EtOrbi::EoTime.prepend(ConvertTimeToEoTime)

0 comments on commit f01c59c

Please sign in to comment.