Add Ruby 2.5 support (#648)
* Fix os version detection not to include newline * Add ruby 2.4 and 2.5 to CI
This commit is contained in:
1 parent
066195ba9c
commit
3bffde39e2
4 files changed
+39
-6
No files matched your search
@@ -36,6 +36,11 @@ RSpec.describe Google::Apis::Core::BaseService do
|
||||
expect(agent).to match /^test\/1.0/
|
||||
end
|
||||
|
||||
it 'should include os version in user agent' do
|
||||
agent = service.send(:user_agent)
|
||||
expect(agent).to match /#{Google::Apis::OS_VERSION}/
|
||||
end
|
||||
|
||||
it 'should inherit authorization' do
|
||||
Google::Apis::RequestOptions.default.authorization = 'a token'
|
||||
expect(service.authorization).to eql 'a token'
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
# Copyright 2015 Google Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
require 'spec_helper'
|
||||
require 'google/apis/version'
|
||||
|
||||
RSpec.describe Google::Apis::VERSION do
|
||||
it { is_expected.to be_a(String) }
|
||||
|
||||
describe Google::Apis::OS_VERSION do
|
||||
it { is_expected.to be_a(String) }
|
||||
it { is_expected.not_to match /\n/ }
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user