Skip to content

Instantly share code, notes, and snippets.

@elliottwilliams
Created August 27, 2016 14:37
Show Gist options
  • Save elliottwilliams/7d221fa445a81975781f66fbd2d6ae99 to your computer and use it in GitHub Desktop.
Save elliottwilliams/7d221fa445a81975781f66fbd2d6ae99 to your computer and use it in GitHub Desktop.
{
"code": null,
"name": "Inner Loop",
"short_name": "19",
"color": null,
"associated_objects": {
"Shark::Station": []
},
"itinerary": null,
"path": null,
"identifier": "routes.19",
"description": "Inner Loop"
}
{
"identifier": "stations.BUS100W",
"associated_objects": {}
}
{
"saturation": 23,
"code": null,
"capacity": 60,
"name": "1708",
"route": "routes.5B",
"associated_objects": {},
"longitude": null,
"heading": 0,
"last_station": "stations.BUS624E",
"latitude": null,
"schedule_delta": null,
"onboard": 14,
"identifier": "vehicles.1708",
"speed": 0,
"next_station": "stations.BUS100E"
}
@elliottwilliams
Copy link
Author

From a local instance, with the lastest commit (a238997), with a fresh crossbar started up right before shark:

{
  "identifier": "routes.14",
  "associated_objects": {
    "Shark::Station": []
  }
}

{
  "identifier": "stations.BUS241",
  "associated_objects": {}
}

{
  "saturation": 3,
  "code": null,
  "capacity": 60,
  "name": "4008",
  "route": "routes.1B",
  "associated_objects": {},
  "longitude": null,
  "heading": 334.3599853515625,
  "last_station": "stations.BUS287",
  "latitude": null,
  "schedule_delta": null,
  "onboard": 2,
  "identifier": "vehicles.4008",
  "speed": 0,
  "next_station": "stations.BUS122"
}

Are you seeing anything like this?

@elliottwilliams
Copy link
Author

btw, I wrote a script to make it easy to query meta.last_event on an identifier

@faultyserver
Copy link

I'm just now starting to write tests for Serializable, which should reveal any issues that are happening here.

If nothing comes out of that, then it is probably a configuration issue, though I can't see anything wrong with the current (a238997) configuration.

@faultyserver
Copy link

1) Shark::Serializable with a default configuration includes all attributes
     Failure/Error: expect(serialized).to include(:name, :list, :hash)

       expected {:identifier => "dummyclasss.Main", :associated_objects => {Shark::DummyClass => ["dummyclasss.Main.1", "dummyclasss.Main.2"]}} to include :name, :list, and :hash
       Diff:
       @@ -1,2 +1,3 @@
       -[:name, :list, :hash]
       +:associated_objects => {Shark::DummyClass=>["dummyclasss.Main.1", "dummyclasss.Main.2"]},
       +:identifier => "dummyclasss.Main",

There is indeed an error. I'm really not sure how this happened, since it was working before, and I don't remember much of anything changing. Regardless, I'll get on fixing this shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment