Skip to content

Commit

Permalink
Add stats JSON rows to the output of add_distribution().
Browse files Browse the repository at this point in the history
  • Loading branch information
theory committed Apr 7, 2011
1 parent aba8c32 commit 36b4da2
Show file tree
Hide file tree
Showing 8 changed files with 258 additions and 26 deletions.
3 changes: 3 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ Revision history for Perl extension PGXN::Manager
* `user_stats_json()`
* `extension_stats_json()`
* `dist_stats_json()`
- Added more rows to the output of `add_distribution()`. The new rows
contain stats JSON, to be saved to the location specified by the new
"stats" URI template.

0.10.4 2011-03-28T02:01:11
- Renamed the "dist" URI template to "download".
Expand Down
1 change: 1 addition & 0 deletions conf/dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"extension": "/extension/{extension}.json",
"user": "/user/{user}.json",
"tag": "/tag/{tag}.json",
"stats": "/stats/{stats}.json",
"mirrors": "/meta/mirrors.json"
},
"twitter": {
Expand Down
1 change: 1 addition & 0 deletions conf/local.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"extension": "/extension/{extension}.json",
"user": "/user/{user}.json",
"tag": "/tag/{tag}.json",
"stats": "/stats/{stats}.json",
"mirrors": "/meta/mirrors.json"
},
"twitter": {
Expand Down
1 change: 1 addition & 0 deletions conf/proxied.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"extension": "/extension/{extension}.json",
"user": "/user/{user}.json",
"tag": "/tag/{tag}.json",
"stats": "/stats/{stats}.json",
"mirrors": "/meta/mirrors.json"
},
"twitter": {
Expand Down
1 change: 1 addition & 0 deletions conf/test.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"extension": "/extension/{extension}.json",
"user": "/user/{user}.json",
"tag": "/tag/{tag}.json",
"stats": "/stats/{stats}.json",
"mirrors": "/meta/mirrors.json"
},
"twitter": {
Expand Down
8 changes: 8 additions & 0 deletions sql/11-add_distribution.sql
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,14 @@ BEGIN
SELECT 'user', LOWER(nick), user_json(nick)
UNION
SELECT 'tag', * FROM tag_json(distmeta.name, distmeta.version)
UNION
SELECT 'stats', 'dist', * FROM dist_stats_json()
UNION
SELECT 'stats', 'extension', * FROM extension_stats_json()
UNION
SELECT 'stats', 'user', * FROM user_stats_json()
UNION
SELECT 'stats', 'tag', * FROM tag_stats_json()
;
END;
$$;
Loading

0 comments on commit 36b4da2

Please sign in to comment.