mirror of
https://github.com/puppetlabs/vmfloaty.git
synced 2026-01-26 13:28:42 -05:00
(rubocop) Fix Style/FrozenStringLiteralComment
This commit is contained in:
parent
02e49e5c4f
commit
e0cbf89b8f
21 changed files with 42 additions and 18 deletions
2
Gemfile
2
Gemfile
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
source 'https://rubygems.org'
|
source 'https://rubygems.org'
|
||||||
|
|
||||||
gemspec
|
gemspec
|
||||||
|
|
|
||||||
2
Rakefile
2
Rakefile
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'rubygems'
|
require 'rubygems'
|
||||||
require 'bundler/setup'
|
require 'bundler/setup'
|
||||||
require 'rspec/core/rake_task'
|
require 'rspec/core/rake_task'
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
$LOAD_PATH.unshift(File.expand_path('../../lib', __FILE__))
|
$LOAD_PATH.unshift(File.expand_path('../../lib', __FILE__))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'rubygems'
|
require 'rubygems'
|
||||||
require 'commander'
|
require 'commander'
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'faraday'
|
require 'faraday'
|
||||||
require 'json'
|
require 'json'
|
||||||
require 'vmfloaty/http'
|
require 'vmfloaty/http'
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'yaml'
|
require 'yaml'
|
||||||
|
|
||||||
class Conf
|
class Conf
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class AuthError < StandardError
|
class AuthError < StandardError
|
||||||
def initialize(msg='Could not authenticate to pooler')
|
def initialize(msg='Could not authenticate to pooler')
|
||||||
super
|
super
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'faraday'
|
require 'faraday'
|
||||||
require 'uri'
|
require 'uri'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'vmfloaty/errors'
|
require 'vmfloaty/errors'
|
||||||
require 'vmfloaty/http'
|
require 'vmfloaty/http'
|
||||||
require 'faraday'
|
require 'faraday'
|
||||||
|
|
@ -24,15 +26,7 @@ class NonstandardPooler
|
||||||
conn = Http.get_conn(verbose, url)
|
conn = Http.get_conn(verbose, url)
|
||||||
conn.headers['X-AUTH-TOKEN'] = token if token
|
conn.headers['X-AUTH-TOKEN'] = token if token
|
||||||
|
|
||||||
os_string = ''
|
os_string = os_type.map { |os, num| Array(os) * num }.flatten.join('+')
|
||||||
os_type.each do |os, num|
|
|
||||||
num.times do |_i|
|
|
||||||
os_string << os + '+'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
os_string = os_string.chomp('+')
|
|
||||||
|
|
||||||
if os_string.empty?
|
if os_string.empty?
|
||||||
raise MissingParamError, 'No operating systems provided to obtain.'
|
raise MissingParamError, 'No operating systems provided to obtain.'
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'faraday'
|
require 'faraday'
|
||||||
require 'vmfloaty/http'
|
require 'vmfloaty/http'
|
||||||
require 'json'
|
require 'json'
|
||||||
|
|
@ -37,15 +39,7 @@ class Pooler
|
||||||
conn.headers['X-AUTH-TOKEN'] = token
|
conn.headers['X-AUTH-TOKEN'] = token
|
||||||
end
|
end
|
||||||
|
|
||||||
os_string = ''
|
os_string = os_type.map { |os, num| Array(os) * num }.flatten.join('+')
|
||||||
os_type.each do |os,num|
|
|
||||||
num.times do |i|
|
|
||||||
os_string << os+'+'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
os_string = os_string.chomp('+')
|
|
||||||
|
|
||||||
if os_string.empty?
|
if os_string.empty?
|
||||||
raise MissingParamError, 'No operating systems provided to obtain.'
|
raise MissingParamError, 'No operating systems provided to obtain.'
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'commander/user_interaction'
|
require 'commander/user_interaction'
|
||||||
require 'commander/command'
|
require 'commander/command'
|
||||||
require 'vmfloaty/utils'
|
require 'vmfloaty/utils'
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class Ssh
|
class Ssh
|
||||||
|
|
||||||
def self.which(cmd)
|
def self.which(cmd)
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'vmfloaty/pooler'
|
require 'vmfloaty/pooler'
|
||||||
require 'vmfloaty/nonstandard_pooler'
|
require 'vmfloaty/nonstandard_pooler'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class Vmfloaty
|
class Vmfloaty
|
||||||
VERSION = '0.8.2'.freeze
|
VERSION = '0.8.2'.freeze
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'vmfloaty'
|
require 'vmfloaty'
|
||||||
require 'webmock/rspec'
|
require 'webmock/rspec'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
require_relative '../../lib/vmfloaty/auth'
|
require_relative '../../lib/vmfloaty/auth'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
require 'vmfloaty/utils'
|
require 'vmfloaty/utils'
|
||||||
require 'vmfloaty/errors'
|
require 'vmfloaty/errors'
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
require_relative '../../lib/vmfloaty/pooler'
|
require_relative '../../lib/vmfloaty/pooler'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require_relative '../../lib/vmfloaty/service'
|
require_relative '../../lib/vmfloaty/service'
|
||||||
|
|
||||||
describe Service do
|
describe Service do
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
require 'json'
|
require 'json'
|
||||||
require 'commander/command'
|
require 'commander/command'
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
$LOAD_PATH.push File.expand_path('../lib', __FILE__)
|
$LOAD_PATH.push File.expand_path('../lib', __FILE__)
|
||||||
require 'vmfloaty/version'
|
require 'vmfloaty/version'
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue