6 次代码提交 85f63b3495 ... c866af97ed

作者 SHA1 备注 提交日期
  René Maya c866af97ed Merge branch 'hotfix-pre-release' 5 年之前
  René Maya 55031609da Fix prep release package 5 年之前
  René Maya 387d61f7fb Update installation and update instructions 5 年之前
  René Maya c87bd03b6a Update bundler 5 年之前
  René Maya f6091c0d5d Increase version 5 年之前
  René Maya 3248fd4d18 Add brief documentation on gem metadata 5 年之前
共有 6 个文件被更改,包括 36 次插入13 次删除
  1. 28 7
      ReadMe.md
  2. 1 2
      Security.md
  3. 3 1
      dev/tasks/prep_release.rb
  4. 1 0
      lib/lorca/manifest.rb
  5. 2 2
      lib/lorca/version.rb
  6. 1 1
      lorca.gemspec

+ 28 - 7
ReadMe.md

@@ -43,18 +43,31 @@ $ lorca
 ## System Requirements
 
 - *nix OS.
+- xsel or xclip (linux)
 - Ruby 2.4+
 
 
 ## Installation
 
+### CLI
+
 To use Lorca as a command line interface:
 
-```bash
-$ gem install lorca
+```terminal
+$ gem fetch lorca -v <version>
+$ ruby -rdigest/sha2 -e "puts Digest::SHA512.new.hexdigest(File.read('lorca-<version>.gem'))"
+```
+
+Compare it with the hash in `checksum/lorca-<version>.gem.sha512` to
+verify the integrity of the fetched gem. If the checksum matches
+
+```terminal
+$ gem install lorca -v <version>
 ```
 
-If you want to use Lorca as a gem add it to the project's Gemfile:
+### Gem
+
+To use Lorca as a gem add it to the project's Gemfile:
 
 ```ruby
 gem "lorca"
@@ -63,7 +76,7 @@ gem "lorca"
 And then run
 
 ```bash
-$ bundle
+$ bundle install
 ```
 
 For details on the API check out the [online documentation](https://_rem.gitlab.io/lorca).
@@ -76,20 +89,28 @@ Whenever there's a new release available read the
 [ChangeLog.md](https://_rem.gitlab.io/lorca/files/ChangeLog_md.html)
 for details on what changed since the last release.
 
-When you are ready to update, depending on the installation method, do:
+#### CLI
+
+Fetch and verify gem, as above,
+
+```terminal
+$ gem fetch lorca -v <version>
+$ ruby -rdigest/sha2 -e "puts Digest::SHA512.new.hexdigest(File.read('lorca-<version>.gem'))"
+```
+
+then
 
 ```bash
 $ gem update lorca
 $ gem cleanup lorca
 ```
 
-or, as a gem
+#### Gem
 
 ```bash
 $ bundle update lorca
 ```
 
-
 ## License
 
 Copyright (c) 2018-2019, René Maya. Licensed ISC. Read attached

+ 1 - 2
Security.md

@@ -53,8 +53,7 @@ $ ruby -rdigest/sha2 -e "puts Digest::SHA512.new.hexdigest(File.read('lorca-<ver
 ```
 
 Compare it with the hash in `checksum/lorca-<version>.gem.sha512` to
-verify that, the code you are about to install, hasn't change since it
-was released. If the checksum matches
+verify the integrity of the fetched gem. If the checksum matches
 
 ```terminal
 $ gem install lorca -v <version>

+ 3 - 1
dev/tasks/prep_release.rb

@@ -10,7 +10,9 @@ module LorcaPrepRelease
   def self.package
     # Unless many tasks require cleaning stuff don't require "rake/clean"
     # More tasks make `rake -T` less readable.
-    old_gem = "./#{gem_name}-*.gem"
+
+    # system calls not unit-tested
+    old_gem = Dir["#{gem_name}-*.gem"].first
 
     File.delete(old_gem) if File.exist? old_gem
     system "gem", "build", "#{gem_name}"

+ 1 - 0
lib/lorca/manifest.rb

@@ -34,6 +34,7 @@ class Lorca
       "ISC"
     end
 
+    # Online resources.
     def self.metadata
       {
         "source_code_uri"   => repo,

+ 2 - 2
lib/lorca/version.rb

@@ -6,10 +6,10 @@ class Lorca
   LorcaMajorVersion = 0
 
   # Minor version. Updated for new feature releases.
-  LorcaMinorVersion = 3
+  LorcaMinorVersion = 5
 
   # Patch version. Updated only for bug fixes from the last feature release.
-  LorcaPatchVersion = 3
+  LorcaPatchVersion = 0
 
   # Full version as a string.
   LorcaVersion = "#{LorcaMajorVersion}.#{LorcaMinorVersion}.#{LorcaPatchVersion}"

+ 1 - 1
lorca.gemspec

@@ -33,7 +33,7 @@ Gem::Specification.new do |g|
 
   g.add_runtime_dependency "clipboard", "~> 1.3", ">= 1.3.3"
 
-  g.add_development_dependency "bundler", "~> 1.16", ">= 1.16.1"
+  g.add_development_dependency "bundler", "~> 2.0", ">= 2.0.1"
   g.add_development_dependency "rake", "~> 12.3", ">= 12.3.2"
   g.add_development_dependency "hanna-nouveau", "~> 1.0", ">= 1.0.3"
   g.add_development_dependency "minitest", "~> 5.11", ">= 5.11.3"