Skip to content
This repository was archived by the owner on Nov 20, 2020. It is now read-only.
This repository was archived by the owner on Nov 20, 2020. It is now read-only.

compatibility with mongoid5? #49

Description

@imbroglioj

We were updating popHealth to the cypress3 libs and mongoid5. Ran into a problem with lib/generator/execution.rb, which has a reference to Moped::BSON. (mongoid5 uses the Mongo library and not Moped.)
Removing the "Moped::" solves the problem. An alternative, more general, fix would be to use the mongoid/mongoid-compatibility lib. My fix diffs removing the Moped reference.:

diff --git a/lib/generator/execution.rb b/lib/generator/execution.rb
index 7d9bf93..d6feb82 100644
--- a/lib/generator/execution.rb
+++ b/lib/generator/execution.rb
@@ -22,7 +22,7 @@ module HQMF2JS
           var enable_rationale = <%= enable_rationale %>;
           var short_circuit = <%= short_circuit %>;
 
-        <% if (!test_id.nil? && test_id.class==Moped::BSON::ObjectId) %>
+        <% if (!test_id.nil? && test_id.class==BSON::ObjectId) %>
           var test_id = new ObjectId(\"<%= test_id %>\");
         <% else %>
           var test_id = null;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions