adamhjk/metarepo — pull request #2 by fujin (2012-11-13 04:36:56+00:00)
Title: Feature/prefix ambiguous type method for package repo and upstream

I *believe* this is related to Object#type in Ruby 1.8.7 behaving differently to 1.9.x (?)

Anyway, the intention here was to stop using the ambiguous #type method and rather have sensible, prefixed methods reflecting their actual usage.

I've tested this and Metarepo actually works now :+1:

```
2012-11-13_04:27:19.11492 [2012-11-13 15:27:19] INFO WEBrick::HTTPServer#start: pid=22127 port=6667
2012-11-13_04:27:48.76635 localhost - - [13/Nov/2012:15:27:48 EST] "PUT /upstream/test HTTP/1.1" 201 148
2012-11-13_04:27:48.76677 - -> /upstream/test
2012-11-13_04:27:48.77167 localhost - - [13/Nov/2012:15:27:48 EST] "GET /job/Metarepo::Job::UpstreamSyncPackages/694a9642b166a80637f76635f9e9ae7be985cdf9 HTTP/1.1" 200 202
2012-11-13_04:27:48.77205 - -> /job/Metarepo::Job::UpstreamSyncPackages/694a9642b166a80637f76635f9e9ae7be985cdf9
2012-11-13_04:27:50.77813 localhost - - [13/Nov/2012:15:27:50 EST] "GET /job/Metarepo::Job::UpstreamSyncPackages/694a9642b166a80637f76635f9e9ae7be985cdf9 HTTP/1.1" 200 255
2012-11-13_04:27:50.77841 - -> /job/Metarepo::Job::UpstreamSyncPackages/694a9642b166a80637f76635f9e9ae7be985cdf9
```

```
metarepo@ubuntu:~/embedded$ bundle exec bin/metarepo upstream create -n test -p test -t apt
{
"enqueued_at": "Tue Nov 13 04:27:48 UTC 2012",
"job_class": "Metarepo::Job::UpstreamSyncPackages",
"job_id": "694a9642b166a80637f76635f9e9ae7be985cdf9"
}
* Querying job data every 2 seconds *
{
"enqueued_at": "Tue Nov 13 04:27:48 UTC 2012",
"job_class": "Metarepo::Job::UpstreamSyncPackages",
"finished_at": null,
"job_id": "694a9642b166a80637f76635f9e9ae7be985cdf9",
"succeeded": null,
"started_at": null
}
{
"enqueued_at": "Tue Nov 13 04:27:48 UTC 2012",
"job_class": "Metarepo::Job::UpstreamSyncPackages",
"finished_at": "Tue Nov 13 04:27:49 UTC 2012",
"job_id": "694a9642b166a80637f76635f9e9ae7be985cdf9",
"succeeded": false,
"started_at": "Tue Nov 13 04:27:49 UTC 2012"
}
```

Cheers man, much :heart: