Add javascript tracker and give Blocmetrics the capability to receive and record events from the js tracker.

Got it to return 404; also added a spec to ensure that blocmetrics doesn't
save an event when a record is not found.


On Thu, Jul 24, 2014 at 4:29 AM, Oliver Azevedo Barnes <
notifications@github.com> wrote:

> In spec/controllers/api_controller_spec.rb:
>
> >
> > +    it 'only processes events from registered apps' do
> > +      expect {post :create, nonexistentapp_params, { 'CONTENT_TYPE' => 'application/json', 'ACCEPT' => 'application/json' } }.to raise_error(ActiveRecord::RecordNotFound)
>
> An API shouldn't barf when there's a record not found, but return a 404
> status and an error message. Google a bit on patterns that do this
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/wasafiri/blocmetrics/pull/7/files#r15341319>.
>