Socket
Book a DemoInstallSign in
Socket

fast_packager

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fast_packager

0.0.1
bundlerRubygems
Version published
Maintainers
1
Created
Source

FastPackagerTest

Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file lib/fast_packager_test. To experiment with that code, run bin/console for an interactive prompt.

TODO: Delete this and the text above, and describe your gem

Installation

Install the gem and add to the application's Gemfile by executing:

$ bundle add fast_packager_test

If bundler is not being used to manage dependencies, install the gem by executing:

$ gem install fast_packager_test

Usage

TODO: Write usage instructions here

Development

After checking out the repo, run bin/setup to install dependencies. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and the created tag, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/fast_packager_test.

第一阶段(制作并上传gem)

  • 生成初始化project

      $bundle gem project_name
    
  • 修改文件

      修改project_name.gemspec文件
    
      修改
          spec.summary = 'desc1' (这里任意为空或任意其他字符串)
          spec.description = "desc2" (这里任意为空或任意其他字符串)
      注释
          spec.metadata["allowed_push_host"]
          spec.metadata["homepage_uri"]
          spec.metadata["source_code_uri"]
          spec.metadata["changelog_uri"]
    
  • 制作gem

      $gem build project_name.gemspec
      
      得到一个project_name.gemspec文件中{spec.name相同名称}-{spec.version}.gem的文件
    
  • 上传gem

      gem官网注册账号,注册完成执行 
      $gem sin signin (输入邮箱及密码)
    
      API Key name (回车)
      index_rubygems: y
      push_rubygem: y
      yank_rubygem: y
      add_owner: y
      remove_owner: y
      access_webhooks: y
      show_dashboard: n
    
      凭证存放在$HOME/.local/share/gem/credentials (之后登录依靠此凭证,如果想重新输入账号密码把这个文件删除即可)
    
      $gem push {spec.name}-{spec.version}.gem
      提示:
      Pushing gem to https://rubygems.org...
      Successfully registered gem: spec.name (spec.version)
    
  • 下载安装测试

      查看本地已安装gem包列表
      $gem list | grep {spec.name}-{spec.version}.gem
      结果: 无
    
      本地安装gem包
      $gem install ./{spec.name}-{spec.version}.gem
    
      检查本地已安装gem包列表
      $gem list | grep {spec.name}-{spec.version}.gem
      结果: {spec.name} ({spec.version})
    
      删除本地安装的gem包后安装公共public repo gem
      $gem uninstall fast_packager_test
      结果: Successfully uninstalled {spec.name}-{spec.version}
      检查本地已安装gem包列表
      $gem list | grep {spec.name}-{spec.version}.gem
      结果: 无
      下载public repo gem
      $gem install fast_packager_test
      检查本地已安装gem包列表
      $gem list | grep {spec.name}-{spec.version}.gem
      结果: {spec.name} ({spec.version})
    

一些文件的生成

  • Gemfile.lock

      本地运行调试即生成
      $irb (ruby的命令行交互模式)
    

FAQs

Package last updated on 07 Aug 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.