Commit Graph

25 Commits

Author SHA1 Message Date
Piotr Sarnacki
5dc64c4937 Fix findRecord to work without passing a snapshot
We use adapter.findRecord to fetch repo by slug. Using it this way was
broken with one of the ember-data releases. This commit brings back the
old behaviour.
2016-03-07 13:32:49 +01:00
Piotr Sarnacki
0c15a09d54 Update Ember Data to 2.3.0 2016-01-14 11:54:47 +01:00
Piotr Sarnacki
1c33475ff6 [deprecations] Don't use snapshot.get() 2016-01-12 16:55:22 +01:00
Piotr Sarnacki
85b2837c52 [deprecations] Disable fetching records in the background by Ember Data 2016-01-07 11:28:52 +01:00
Piotr Sarnacki
a920ae9cd7 [deprecations] Use modelName instead of typeKey 2016-01-07 11:18:05 +01:00
Piotr Sarnacki
4e3a755908 [deprecations] Use Adapter#findRecord instead of Adapter#find 2016-01-07 11:18:05 +01:00
Piotr Sarnacki
e60b0a0224 Fix jshint errors after conversion to JS 2016-01-04 13:15:15 +01:00
Piotr Sarnacki
fafaf65043 Convert project to JavaScript 2016-01-04 13:15:14 +01:00
Piotr Sarnacki
fdd7b5b91b Properly normalize ssh key 2015-12-17 13:10:07 +01:00
Piotr Sarnacki
2e2d2ae81b Feature flag API V3 2015-12-17 12:39:17 +01:00
Piotr Sarnacki
b2b892238b Fix adding ssh key 2015-12-09 11:58:10 +01:00
Piotr Sarnacki
d4955c1ed0 Fix hooks toggling
New ember-data serializers send data without a model key in the payload
by default, so instead of what API expects:

    {
      "hook": {
        "id": 1,
        "active": true
      }
    }

it would send:

    { "id": 1, "active": true }

Because of that we need to change how hooks are serialized.

Furthermore, API V2 returns just "result: true" after a successful
request to change a hook, so we need to return something meaningful from
the adapter's updateRecord in order to make ember-data happy.
2015-12-08 10:18:08 +01:00
Piotr Sarnacki
b31831d535 Set repo as default serializer only on repo serializer, not v3 2015-12-08 10:18:07 +01:00
Piotr Sarnacki
69dd90b76b Model#typeKey -> Model#modelName 2015-12-08 10:18:06 +01:00
Piotr Sarnacki
c40e413f35 Don't throw error if broadcastArray is undefined 2015-12-08 10:18:03 +01:00
Piotr Sarnacki
47439657a1 Use lastBuild from defaultBranch on repository
One thing that is not standard here is a serializer for branch, which
uses @href as id. At this point branches don't have ids and ember-data
needs one, so using @href is the easiest way.
2015-12-08 10:18:02 +01:00
Piotr Sarnacki
d9cff6e8b4 Create adapters and serializers working with v3 and v2 APIs
This commit adds adapters and serializers for v3, but also a fallback
serializer for v2, which allows to handle v2 and v3 payloads at the same
time. This is needed, because when we use v3 endpoint for one of the
models (in this case repo), we can also get embedded records of other
types (like branch or build).
2015-12-08 10:18:02 +01:00
Piotr Sarnacki
5cf1cbba6b Move ajax and auth into services 2015-12-08 10:18:02 +01:00
Piotr Sarnacki
3827b6b4d8 Add debug info on ajax errors 2015-12-04 11:23:53 +01:00
Piotr Sarnacki
767e49d95a Fix sshkey form 2015-02-10 11:53:14 +01:00
Piotr Sarnacki
bf80fec82f Coalesce find requests 2015-02-10 09:41:16 +01:00
Piotr Sarnacki
ab33383d15 Fix a few issues after ember-cli switch 2015-02-06 12:57:49 +01:00
Piotr Sarnacki
141457c4f9 Change config keys to camel case 2015-02-05 11:35:47 +01:00
Piotr Sarnacki
b0bd24a129 Add ember-cli version of the Ember.js app 2015-02-03 09:48:22 +01:00
Piotr Sarnacki
3a09a0da9a Move assets/scripts/app to root dir 2015-02-03 09:44:34 +01:00