Skip to content
This repository was archived by the owner on Nov 6, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

#-------------------------------------------------------------------------
# # Copyright (c) Microsoft and contributors. All rights reserved.
#
Expand All @@ -13,4 +15,4 @@
# limitations under the License.
#--------------------------------------------------------------------------
source 'https://rubygems.org'
gemspec
gemspec
12 changes: 6 additions & 6 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

#-------------------------------------------------------------------------
# # Copyright (c) Microsoft and contributors. All rights reserved.
#
Expand All @@ -22,27 +24,25 @@ Gem::PackageTask.new(gem_spec) do |pkg|
end

namespace :test do

Rake::TestTask.new :unit do |t|
t.pattern = 'test/unit/**/*_test.rb'
t.verbose = true
t.libs = %w(lib test)
t.libs = %w[lib test]
end

namespace :unit do
def component_task(component)
Rake::TestTask.new component do |t|
t.pattern = "test/unit/#{component}/**/*_test.rb"
t.verbose = true
t.libs = %w(lib test)
t.libs = %w[lib test]
end
end

component_task :core
end

end

task :test => %w(test:unit)
task test: %w[test:unit]

task :default => :test
task default: :test
9 changes: 5 additions & 4 deletions azure-core.gemspec
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

#-------------------------------------------------------------------------
# # Copyright (c) Microsoft and contributors. All rights reserved.
#
Expand All @@ -14,7 +16,7 @@
#--------------------------------------------------------------------------
require 'date'

require File.expand_path('../lib/azure/core/version', __FILE__)
require File.expand_path('lib/azure/core/version', __dir__)

Gem::Specification.new do |s|
s.name = 'azure-core'
Expand All @@ -25,20 +27,19 @@ Gem::Specification.new do |s|
s.summary = 'Core library to be consumed by Ruby SDK gems'
s.homepage = 'http://github.com/Azure/azure-ruby-asm-core'
s.license = 'Apache License, Version 2.0'
s.files = `git ls-files`.split("\n").reject { |f| f.start_with?("test/unit") }
s.files = `git ls-files`.split("\n").reject { |f| f.start_with?('test/unit') }

s.required_ruby_version = '>= 1.9.3'

s.add_runtime_dependency('faraday', '~> 0.9')
s.add_runtime_dependency('faraday_middleware', '~> 0.10')
s.add_runtime_dependency('nokogiri', '~> 1.6')

s.add_development_dependency('bundler', '~> 1.11')
s.add_development_dependency('dotenv', '~> 2.0')
s.add_development_dependency('minitest', '~> 5')
s.add_development_dependency('minitest-reporters', '~> 1')
s.add_development_dependency('mocha', '~> 1.0')
s.add_development_dependency('rake', '~> 10.0')
s.add_development_dependency('timecop', '~> 0.7')
s.add_development_dependency('bundler', '~> 1.11')

end
3 changes: 1 addition & 2 deletions lib/azure/core/auth/signer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ def initialize(access_key)
if access_key.nil?
raise ArgumentError, 'Signing key must be provided'
end

@access_key = Base64.strict_decode64(access_key)
@access_key = Base64.decode64(access_key)
end

# Generate an HMAC signature.
Expand Down