@@ -380,42 +380,54 @@ For more information, please visit [https://developers.phrase.com/api/](https://
380
380
381
381
## Installation
382
382
383
- ### Build a gem
383
+ ### Install from [ rubygems.org ] ( https://rubygems.org/ )
384
384
385
- To build the Ruby code into a gem :
385
+ Install from the command line :
386
386
387
387
``` shell
388
- gem build phrase.gemspec
388
+ $ gem install phrase
389
389
```
390
390
391
- Then either install the gem locally:
391
+ Install via Gemfile:
392
+
393
+ gem "phrase"
394
+
395
+ ### Install from GitHub Packages
396
+
397
+ Install from the command line:
392
398
393
399
``` shell
394
- gem install ./ phrase-1.0.0.gem
400
+ $ gem install phrase-ruby --source " https://rubygems.pkg.github.com/phrase "
395
401
```
396
402
397
- (for development, run ` gem install --dev ./phrase-1.0.0.gem ` to install the development dependencies)
403
+ Install via Gemfile:
398
404
399
- or publish the gem to a gem hosting service, e.g. [ RubyGems] ( https://rubygems.org/ ) .
405
+ source "https://rubygems.pkg.github.com/phrase" do
406
+ gem "phrase-ruby"
407
+ end
400
408
401
- Finally add this to the Gemfile:
409
+ ### Install from Git
402
410
403
- gem 'phrase', '~> 1.0.0'
411
+ Add the following in the Gemfile:
404
412
405
- ### Install from Git
413
+ gem 'phrase', git: 'https://github.com/phrase/phrase-ruby.git'
406
414
407
- If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID , then add the following in the Gemfile:
415
+ ### Build and install a gem on your own
408
416
409
- gem 'phrase', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
417
+ To build the Ruby code into a gem:
410
418
411
- ### Include the Ruby code directly
419
+ ``` shell
420
+ gem build phrase.gemspec
421
+ ```
412
422
413
- Include the Ruby code directly using ` -I ` as follows :
423
+ Then install the gem locally :
414
424
415
425
``` shell
416
- ruby -Ilib script.rb
426
+ gem install ./phrase-1.0.0.gem
417
427
```
418
428
429
+ (for development, run ` gem install --dev ./phrase-1.0.0.gem ` to install the development dependencies)
430
+
419
431
## Getting Started
420
432
421
433
Please follow the [ installation] ( #installation ) procedure and then run the following code:
0 commit comments