signet 0.14.1 → 0.16.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +11 -0
- data/CHANGELOG.md +26 -2
- data/CODE_OF_CONDUCT.md +43 -0
- data/README.md +10 -7
- data/SECURITY.md +7 -0
- data/lib/signet/oauth_1/client.rb +51 -72
- data/lib/signet/oauth_1/credential.rb +3 -11
- data/lib/signet/oauth_1/server.rb +7 -29
- data/lib/signet/oauth_1/signature_methods/hmac_sha1.rb +1 -1
- data/lib/signet/oauth_1/signature_methods/plaintext.rb +1 -1
- data/lib/signet/oauth_1/signature_methods/rsa_sha1.rb +2 -2
- data/lib/signet/oauth_1.rb +11 -21
- data/lib/signet/oauth_2/client.rb +36 -58
- data/lib/signet/oauth_2.rb +10 -14
- data/lib/signet/version.rb +1 -1
- data/lib/signet.rb +5 -8
- metadata +32 -32
- data/Gemfile +0 -8
- data/Rakefile +0 -112
- data/signet.gemspec +0 -44
- data/spec/signet/oauth_1/client_spec.rb +0 -810
- data/spec/signet/oauth_1/credential_spec.rb +0 -169
- data/spec/signet/oauth_1/server_spec.rb +0 -839
- data/spec/signet/oauth_1/signature_methods/hmac_sha1_spec.rb +0 -61
- data/spec/signet/oauth_1/signature_methods/plaintext_spec.rb +0 -61
- data/spec/signet/oauth_1/signature_methods/rsa_sha1_spec.rb +0 -126
- data/spec/signet/oauth_1_spec.rb +0 -1036
- data/spec/signet/oauth_2/client_spec.rb +0 -1254
- data/spec/signet/oauth_2_spec.rb +0 -194
- data/spec/signet_spec.rb +0 -78
- data/spec/spec.opts +0 -2
- data/spec/spec_helper.rb +0 -10
- data/spec/spec_helper_spec.rb +0 -17
- data/website/index.html +0 -95
data/Rakefile
DELETED
@@ -1,112 +0,0 @@
|
|
1
|
-
require "rubygems"
|
2
|
-
require "json"
|
3
|
-
require "rake"
|
4
|
-
require "bundler/gem_tasks"
|
5
|
-
|
6
|
-
task :release_gem, :tag do |_t, args|
|
7
|
-
tag = args[:tag]
|
8
|
-
raise "You must provide a tag to release." if tag.nil?
|
9
|
-
|
10
|
-
# Verify the tag format "vVERSION"
|
11
|
-
m = tag.match /v(?<version>\S*)/
|
12
|
-
raise "Tag #{tag} does not match the expected format." if m.nil?
|
13
|
-
|
14
|
-
version = m[:version]
|
15
|
-
raise "You must provide a version." if version.nil?
|
16
|
-
|
17
|
-
api_token = ENV["RUBYGEMS_API_TOKEN"]
|
18
|
-
|
19
|
-
require "gems"
|
20
|
-
if api_token
|
21
|
-
::Gems.configure do |config|
|
22
|
-
config.key = api_token
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
Bundler.with_clean_env do
|
27
|
-
sh "rm -rf pkg"
|
28
|
-
sh "bundle update"
|
29
|
-
sh "bundle exec rake build"
|
30
|
-
end
|
31
|
-
|
32
|
-
path_to_be_pushed = "pkg/signet-#{version}.gem"
|
33
|
-
gem_was_published = nil
|
34
|
-
if File.file? path_to_be_pushed
|
35
|
-
begin
|
36
|
-
response = ::Gems.push File.new(path_to_be_pushed)
|
37
|
-
puts response
|
38
|
-
raise unless response.include? "Successfully registered gem:"
|
39
|
-
gem_was_published = true
|
40
|
-
puts "Successfully built and pushed signet for version #{version}"
|
41
|
-
rescue StandardError => e
|
42
|
-
gem_was_published = false
|
43
|
-
puts "Error while releasing signet version #{version}: #{e.message}"
|
44
|
-
end
|
45
|
-
else
|
46
|
-
raise "Cannot build signet for version #{version}"
|
47
|
-
end
|
48
|
-
|
49
|
-
Rake::Task["kokoro:publish_docs"].invoke if gem_was_published
|
50
|
-
end
|
51
|
-
|
52
|
-
task :ci do
|
53
|
-
header "Using Ruby - #{RUBY_VERSION}"
|
54
|
-
sh "bundle exec rubocop"
|
55
|
-
sh "bundle exec rspec"
|
56
|
-
end
|
57
|
-
|
58
|
-
namespace :kokoro do
|
59
|
-
task :load_env_vars do
|
60
|
-
service_account = "#{ENV['KOKORO_GFILE_DIR']}/service-account.json"
|
61
|
-
ENV["GOOGLE_APPLICATION_CREDENTIALS"] = service_account
|
62
|
-
filename = "#{ENV['KOKORO_GFILE_DIR']}/env_vars.json"
|
63
|
-
env_vars = JSON.parse File.read(filename)
|
64
|
-
env_vars.each { |k, v| ENV[k] = v }
|
65
|
-
end
|
66
|
-
|
67
|
-
task :presubmit do
|
68
|
-
Rake::Task["ci"].invoke
|
69
|
-
end
|
70
|
-
|
71
|
-
task :continuous do
|
72
|
-
Rake::Task["ci"].invoke
|
73
|
-
end
|
74
|
-
|
75
|
-
task :nightly do
|
76
|
-
Rake::Task["ci"].invoke
|
77
|
-
end
|
78
|
-
|
79
|
-
task :release do
|
80
|
-
version = "0.1.0"
|
81
|
-
Bundler.with_clean_env do
|
82
|
-
version = `bundle exec gem list`
|
83
|
-
.split("\n").select { |line| line.include? "signet" }
|
84
|
-
.first.split("(").last.split(")").first || "0.1.0"
|
85
|
-
end
|
86
|
-
Rake::Task["kokoro:load_env_vars"].invoke
|
87
|
-
Rake::Task["release_gem"].invoke "v#{version}"
|
88
|
-
end
|
89
|
-
|
90
|
-
task :post do
|
91
|
-
require_relative "rakelib/link_checker.rb"
|
92
|
-
|
93
|
-
link_checker = LinkChecker.new
|
94
|
-
link_checker.run
|
95
|
-
exit link_checker.exit_status
|
96
|
-
end
|
97
|
-
|
98
|
-
task :publish_docs do
|
99
|
-
require_relative "rakelib/devsite_builder.rb"
|
100
|
-
|
101
|
-
DevsiteBuilder.new(__dir__).publish
|
102
|
-
end
|
103
|
-
end
|
104
|
-
|
105
|
-
def header str, token = "#"
|
106
|
-
line_length = str.length + 8
|
107
|
-
puts ""
|
108
|
-
puts token * line_length
|
109
|
-
puts "#{token * 3} #{str} #{token * 3}"
|
110
|
-
puts token * line_length
|
111
|
-
puts ""
|
112
|
-
end
|
data/signet.gemspec
DELETED
@@ -1,44 +0,0 @@
|
|
1
|
-
$LOAD_PATH.push File.expand_path("lib", __dir__)
|
2
|
-
require "signet/version"
|
3
|
-
|
4
|
-
Gem::Specification.new do |gem|
|
5
|
-
gem.name = "signet"
|
6
|
-
gem.version = Signet::VERSION
|
7
|
-
|
8
|
-
gem.required_rubygems_version = ">= 1.3.5"
|
9
|
-
gem.require_paths = ["lib"]
|
10
|
-
gem.authors = ["Bob Aman", "Steven Bazyl"]
|
11
|
-
gem.license = "Apache-2.0"
|
12
|
-
gem.description = "Signet is an OAuth 1.0 / OAuth 2.0 implementation.\n"
|
13
|
-
gem.email = "sbazyl@google.com"
|
14
|
-
gem.extra_rdoc_files = ["README.md"]
|
15
|
-
gem.files = ["signet.gemspec", "Rakefile", "LICENSE", "CHANGELOG.md", "README.md", "Gemfile"]
|
16
|
-
gem.files += Dir.glob "lib/**/*.rb"
|
17
|
-
gem.files += Dir.glob "spec/**/*.{rb,opts}"
|
18
|
-
gem.files += Dir.glob "vendor/**/*.rb"
|
19
|
-
gem.files += Dir.glob "tasks/**/*"
|
20
|
-
gem.files += Dir.glob "website/**/*"
|
21
|
-
gem.homepage = "https://github.com/googleapis/signet"
|
22
|
-
gem.rdoc_options = ["--main", "README.md"]
|
23
|
-
gem.summary = "Signet is an OAuth 1.0 / OAuth 2.0 implementation."
|
24
|
-
gem.required_ruby_version = ">= 2.4.0"
|
25
|
-
|
26
|
-
gem.add_runtime_dependency "addressable", "~> 2.3"
|
27
|
-
gem.add_runtime_dependency "faraday", ">= 0.17.3", "< 2.0"
|
28
|
-
gem.add_runtime_dependency "jwt", ">= 1.5", "< 3.0"
|
29
|
-
gem.add_runtime_dependency "multi_json", "~> 1.10"
|
30
|
-
|
31
|
-
gem.add_development_dependency "google-style", "~> 0.3"
|
32
|
-
gem.add_development_dependency "kramdown", "~> 1.5"
|
33
|
-
gem.add_development_dependency "launchy", "~> 2.4"
|
34
|
-
gem.add_development_dependency "rake", "~> 12.0"
|
35
|
-
gem.add_development_dependency "rspec", "~> 3.1"
|
36
|
-
gem.add_development_dependency "simplecov", "~> 0.9"
|
37
|
-
gem.add_development_dependency "yard", "~> 0.9", ">= 0.9.12"
|
38
|
-
|
39
|
-
if gem.respond_to? :metadata
|
40
|
-
gem.metadata["changelog_uri"] = "https://github.com/googleapis/signet/blob/master/CHANGELOG.md"
|
41
|
-
gem.metadata["source_code_uri"] = "https://github.com/googleapis/signet"
|
42
|
-
gem.metadata["bug_tracker_uri"] = "https://github.com/googleapis/signet/issues"
|
43
|
-
end
|
44
|
-
end
|