Skip to content

Commit

Permalink
Merge pull request #1 from lukehinds/main
Browse files Browse the repository at this point in the history
Initial skeketon of rubygems plugin
  • Loading branch information
lukehinds committed Mar 18, 2021
2 parents b520667 + 6d247fb commit 7772fd6
Show file tree
Hide file tree
Showing 8 changed files with 91 additions and 10 deletions.
Empty file added CHANGELOG
Empty file.
4 changes: 3 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ source "https://rubygems.org"

# Specify your gem's dependencies in ruby-sigstore.gemspec
gemspec

gem "oa-openid"
gem 'omniauth-openid'
gem 'ruby-openid-apps-discovery'
gem "rake", "~> 12.0"
gem "rspec", "~> 3.0"
59 changes: 59 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
PATH
remote: .
specs:
ruby-sigstore (0.1.0)

GEM
remote: https://rubygems.org/
specs:
diff-lcs (1.4.4)
hashie (4.1.0)
oa-core (0.0.5)
rack (~> 1.1)
oa-openid (0.0.2)
oa-core (~> 0.0.0)
rack-openid
omniauth (2.0.3)
hashie (>= 3.4.6)
rack (>= 1.6.2, < 3)
rack-protection
omniauth-openid (2.0.1)
omniauth (>= 1.0, < 3.0)
rack-openid (~> 1.4.0)
rack (1.6.13)
rack-openid (1.4.2)
rack (>= 1.1.0)
ruby-openid (>= 2.1.8)
rack-protection (2.1.0)
rack
rake (12.3.3)
rspec (3.10.0)
rspec-core (~> 3.10.0)
rspec-expectations (~> 3.10.0)
rspec-mocks (~> 3.10.0)
rspec-core (3.10.1)
rspec-support (~> 3.10.0)
rspec-expectations (3.10.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
rspec-mocks (3.10.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
rspec-support (3.10.2)
ruby-openid (2.9.2)
ruby-openid-apps-discovery (1.2.0)
ruby-openid (>= 2.1.7)

PLATFORMS
x86_64-linux

DEPENDENCIES
oa-openid
omniauth-openid
rake (~> 12.0)
rspec (~> 3.0)
ruby-openid-apps-discovery
ruby-sigstore!

BUNDLED WITH
2.2.3
8 changes: 0 additions & 8 deletions lib/ruby/sigstore.rb

This file was deleted.

12 changes: 12 additions & 0 deletions lib/rubygems/commands/sign_command.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
class Gem::Commands::SignCommand < Gem::Command
def initialize
super 'sign', 'Sign'
add_option('--fulcio-host HOST', 'Fulcio host') do |value, options|
options[:host] = value
end
end

def execute
puts "sign"
end
end
12 changes: 12 additions & 0 deletions lib/rubygems/commands/verify_command.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
class Gem::Commands::VerifyCommand < Gem::Command
def initialize
super 'verify', "Opens the gem's documentation"
add_option('--fulcio-host HOST', 'Fulcio host') do |value, options|
options[:host] = value
end
end

def execute
puts "verify"
end
end
4 changes: 4 additions & 0 deletions lib/rubygems_plugin.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
require 'rubygems/command_manager'

Gem::CommandManager.instance.register_command :sign
Gem::CommandManager.instance.register_command :verify
2 changes: 1 addition & 1 deletion ruby-sigstore.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
spec.email = ["lhinds@redhat.com"]

spec.summary = %q{Sigstore signing client.}
spec.description = %q{TODO: Write a longer description or delete this line.}
spec.description = %q{Sigstore}
spec.homepage = "https://github.com/sigstore/ruby-sigstore"
spec.license = "MIT"
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
Expand Down

0 comments on commit 7772fd6

Please sign in to comment.