Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

最新版のパッケージファイルのリンクを自動で取得するプラグインを作る #3

Open
machu opened this issue May 12, 2016 · 0 comments

Comments

@machu
Copy link
Member

machu commented May 12, 2016

GitHub APIで取得できそう。

https://api.github.com/repos/tdiary/tdiary-core/releases/latest

{
  "url": "https://api.github.com/repos/tdiary/tdiary-core/releases/3191074",
  "assets_url": "https://api.github.com/repos/tdiary/tdiary-core/releases/3191074/assets",
  "upload_url": "https://uploads.github.com/repos/tdiary/tdiary-core/releases/3191074/assets{?name,label}",
  "html_url": "https://github.com/tdiary/tdiary-core/releases/tag/v5.0.0",
  "id": 3191074,
  "tag_name": "v5.0.0",
  "target_commitish": "master",
  "name": "tDiary 5.0.0",
  "draft": false,
  "author": {
    "login": "machu",
    "id": 9981,
    "avatar_url": "https://avatars.githubusercontent.com/u/9981?v=3",
    "gravatar_id": "",
    "url": "https://api.github.com/users/machu",
    "html_url": "https://github.com/machu",
    "followers_url": "https://api.github.com/users/machu/followers",
    "following_url": "https://api.github.com/users/machu/following{/other_user}",
    "gists_url": "https://api.github.com/users/machu/gists{/gist_id}",
    "starred_url": "https://api.github.com/users/machu/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/machu/subscriptions",
    "organizations_url": "https://api.github.com/users/machu/orgs",
    "repos_url": "https://api.github.com/users/machu/repos",
    "events_url": "https://api.github.com/users/machu/events{/privacy}",
    "received_events_url": "https://api.github.com/users/machu/received_events",
    "type": "User",
    "site_admin": false
  },
  "prerelease": false,
  "created_at": "2016-03-29T20:00:46Z",
  "published_at": "2016-05-12T16:34:48Z",
  "assets": [
    {
      "url": "https://api.github.com/repos/tdiary/tdiary-core/releases/assets/1663286",
      "id": 1663286,
      "name": "tdiary-full-v5.0.0.tar.gz",
      "label": null,
      "uploader": {
        "login": "machu",
        "id": 9981,
        "avatar_url": "https://avatars.githubusercontent.com/u/9981?v=3",
        "gravatar_id": "",
        "url": "https://api.github.com/users/machu",
        "html_url": "https://github.com/machu",
        "followers_url": "https://api.github.com/users/machu/followers",
        "following_url": "https://api.github.com/users/machu/following{/other_user}",
        "gists_url": "https://api.github.com/users/machu/gists{/gist_id}",
        "starred_url": "https://api.github.com/users/machu/starred{/owner}{/repo}",
        "subscriptions_url": "https://api.github.com/users/machu/subscriptions",
        "organizations_url": "https://api.github.com/users/machu/orgs",
        "repos_url": "https://api.github.com/users/machu/repos",
        "events_url": "https://api.github.com/users/machu/events{/privacy}",
        "received_events_url": "https://api.github.com/users/machu/received_events",
        "type": "User",
        "site_admin": false
      },
      "content_type": "application/gzip",
      "state": "uploaded",
      "size": 7452617,
      "download_count": 0,
      "created_at": "2016-05-10T07:20:17Z",
      "updated_at": "2016-05-10T07:20:44Z",
      "browser_download_url": "https://github.com/tdiary/tdiary-core/releases/download/v5.0.0/tdiary-full-v5.0.0.tar.gz"
    },
    {
      "url": "https://api.github.com/repos/tdiary/tdiary-core/releases/assets/1663287",
      "id": 1663287,
      "name": "tdiary-theme-v5.0.0.tar.gz",
      "label": null,
      "uploader": {
        "login": "machu",
        "id": 9981,
        "avatar_url": "https://avatars.githubusercontent.com/u/9981?v=3",
        "gravatar_id": "",
        "url": "https://api.github.com/users/machu",
        "html_url": "https://github.com/machu",
        "followers_url": "https://api.github.com/users/machu/followers",
        "following_url": "https://api.github.com/users/machu/following{/other_user}",
        "gists_url": "https://api.github.com/users/machu/gists{/gist_id}",
        "starred_url": "https://api.github.com/users/machu/starred{/owner}{/repo}",
        "subscriptions_url": "https://api.github.com/users/machu/subscriptions",
        "organizations_url": "https://api.github.com/users/machu/orgs",
        "repos_url": "https://api.github.com/users/machu/repos",
        "events_url": "https://api.github.com/users/machu/events{/privacy}",
        "received_events_url": "https://api.github.com/users/machu/received_events",
        "type": "User",
        "site_admin": false
      },
      "content_type": "application/gzip",
      "state": "uploaded",
      "size": 3877423,
      "download_count": 0,
      "created_at": "2016-05-10T07:20:28Z",
      "updated_at": "2016-05-10T07:21:00Z",
      "browser_download_url": "https://github.com/tdiary/tdiary-core/releases/download/v5.0.0/tdiary-theme-v5.0.0.tar.gz"
    },
    {
      "url": "https://api.github.com/repos/tdiary/tdiary-core/releases/assets/1663282",
      "id": 1663282,
      "name": "tdiary-v5.0.0.tar.gz",
      "label": null,
      "uploader": {
        "login": "machu",
        "id": 9981,
        "avatar_url": "https://avatars.githubusercontent.com/u/9981?v=3",
        "gravatar_id": "",
        "url": "https://api.github.com/users/machu",
        "html_url": "https://github.com/machu",
        "followers_url": "https://api.github.com/users/machu/followers",
        "following_url": "https://api.github.com/users/machu/following{/other_user}",
        "gists_url": "https://api.github.com/users/machu/gists{/gist_id}",
        "starred_url": "https://api.github.com/users/machu/starred{/owner}{/repo}",
        "subscriptions_url": "https://api.github.com/users/machu/subscriptions",
        "organizations_url": "https://api.github.com/users/machu/orgs",
        "repos_url": "https://api.github.com/users/machu/repos",
        "events_url": "https://api.github.com/users/machu/events{/privacy}",
        "received_events_url": "https://api.github.com/users/machu/received_events",
        "type": "User",
        "site_admin": false
      },
      "content_type": "application/gzip",
      "state": "uploaded",
      "size": 3575935,
      "download_count": 1,
      "created_at": "2016-05-10T07:19:52Z",
      "updated_at": "2016-05-10T07:20:13Z",
      "browser_download_url": "https://github.com/tdiary/tdiary-core/releases/download/v5.0.0/tdiary-v5.0.0.tar.gz"
    }
  ],
  "tarball_url": "https://api.github.com/repos/tdiary/tdiary-core/tarball/v5.0.0",
  "zipball_url": "https://api.github.com/repos/tdiary/tdiary-core/zipball/v5.0.0",
  "body": "tDiary 5.0.0 をリリースします。Ruby 2.0のサポート終了にともない、比較的影響の大きな非互換が発生したため、メジャーバージョンを5としました。\r\n\r\nその非互換とはセキュアモード(secure mode)の廃止です。ですから、tdiary.confにて「`@secure = true`」としていない日記はこの非互換の対象ではありません。通常通りアップデートしても大丈夫です。セキュアモードを使った日記を運用している場合は、以下の注意を読んで対応して下さい。\r\n\r\nRuby 2.1以降では、tDiaryがセキュアモードを実現するのに使っていた機能がなくなったため、この非互換が発生しています。つまり、Ruby 2.0以前のバージョンを使っている場合には影響を受けません(ただしそのRubyは古くてサポートされていないので急いでアップデートすべきです)。他者に貸し出すため等の目的でセキュアモードで運用している日記を、Ruby 2.1以降のバージョンで動かす場合には、個々の日記がシステムに手出しをできないように、以下のような対策を打つべきでしょう(上から順に簡単な対策になっています):\r\n\r\n* suexecやそれに類した環境でCGIをそれぞれのユーザ権限で動作させる\r\n* jailやそれに類した環境でWebサーバをそれぞれのユーザ権限で動作させる\r\n* Dockerやそれに類した環境でコンテナ自体を分離する\r\n* 日記ごとに別のサーバを用意する\r\n\r\n## 本体(tdiary-core)の変更点\r\n\r\n### 機能追加・変更\r\n * Ruby 2.0のEOFにともなうサポート終了\r\n * セキュアモードの廃止\r\n * HTTPSでの運用が可能になった\r\n * masterブランチを直接Herokuへデプロイ可能になった (herokuブランチは廃止)\r\n * categoryプラグインを軽量版に置き換え。旧版はcategory-legacyプラグインとして存続\r\n * CSSの読み込み順位を変えて表示を高速化\r\n * squeezeプラグインをcontribへ移動\r\n * theme_onlineプラグインで利用するテーマをGitHub上のものに変更\r\n * 出力するHTMLをHTML5に準拠\r\n\r\n### 開発者向け変更点\r\n * jQueryを2.1にアップデート\r\n * jQueryUIを1.11にアップデート\r\n\r\n### バグ修正\r\n * エラー出力に非UTF-8文字列が含まれていても動作するように修正\r\n\r\n## contrib(tdiary-contrib)の変更点\r\n\r\n### 機能追加・変更\r\n * セキュアモードの廃止\r\n * HTTPSでの運用が可能になった\r\n * squeezeプラグインをcoreから移動\r\n * youtubeプラグインをレスポンシブ対応\r\n\r\n### バグ修正\r\n * 小規模な修正がいくつか"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant