LoginSignup
0
0

More than 5 years have passed since last update.

Gemfury | クラウドパッケージリポジトリ Gemfury の登録、疎通確認まで #gemfury

Posted at

Gemfury | クラウドパッケージリポジトリ Gemfury の登録、疎通確認まで

概要

クラウドパッケージリポジトリ Gemfury の登録、疎通確認までについて。

Gemfury => Gem + fury だろうか?
fury => 狂乱、猛威、激怒、激高、憤激、激憤

アイコンが、ドラゴンボールみたいにオーラをまとって飛んでいる Ruby 風なので
滾っている様を表しているのか?

gemfury icon

用途

RubyGems に公開できないが、 geminabox など自前の gem server を構築・運用する手間を省きたい。
そんなケースで クラウドパッケージリポジトリ Gemfury の利用が考えられます。
14日の無料お試し期間付。

お試し以降の価格については、下記参照
gemfury pricing

Gemfury は RubyGems 以外にも、

  • PHP Composer
  • Node.js npm
  • Python PyPI
  • NuGet
  • apt / deb
  • yum / rpm

などにも対応している。
今回は RubyGems の話。

手順

gottani gem を対象とします。

  • pricing の画面から Create a Free Acount のボタンを押下
    gemfury_start1.png

  • アカウント作成画面に Username, Email, Password を登録して Create New Account
    gemfury_start2.png

  • ログインが成功し、 Get Start ページが表示されます

  • gem remote のリポジトリを登録します

$ git remote add fury https://your_account@git.fury.io/your_account/<package-name>.git
$ git push fury master
  • 登録されたことを確認します
    gemfury_start3.png

  • 登録した gem をインストールしてみます

    • Repos メニューでリポジトリのURLを取得できます
    • URLはシークレットトークンを含んでおり、ユーザーごとに異なります
    • ※外部公開するリポジトリの Gemfile などから呼び出す場合はトークン部分を環境変数に設定すること
  • Gemfile

source 'https://your_token@gem.fury.io/your_account/'
# 外部公開する Gemfile の場合はハードコードせずに環境変数経由で設定
# source "https://#{ENV['GEMSPEC_KEY']}@gem.fury.io/your_account/"

gem 'gottani'
  • インストール実行
$ bundle install
  • インストール確認
$ gem list | grep gottani
gottani (0.0.2)
  • gottani を呼び出す rb を作成・実行してみます
require 'gottani_core'

text =<<-EOS
root
    child1
        child1_1
            child1_1_1
            child1_1_2
        child1_2
    child2
        child2_1
    child3
EOS

gottani_core = Gottani::Core.new :space4, text
print gottani_core.to_markdown

出力

# root
## child1
### child1_1
#### child1_1_1
#### child1_1_2
### child1_2
## child2
### child2_1
## child3

参照

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0