forked from fog/fog-powerdns
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Drop Dependencies version constraint
- Loading branch information
1 parent
5650fda
commit b9937ef
Showing
33 changed files
with
217 additions
and
154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
Style/Documentation: | ||
Enabled: false | ||
|
||
Metrics/MethodLength: | ||
Enabled: false | ||
|
||
Metrics/AbcSize: | ||
Enabled: false | ||
|
||
Metrics/LineLength: | ||
Max: 120 | ||
|
||
Metrics/BlockLength: | ||
Enabled: false | ||
|
||
Layout/ExtraSpacing: | ||
AllowForAlignment: false | ||
ForceEqualSignAlignment: false | ||
|
||
Style/ExpandPathArguments: | ||
Enabled: false | ||
|
||
Metrics/CyclomaticComplexity: | ||
Enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
fog-powerdns |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
2.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
require "bundler/gem_tasks" | ||
# frozen_string_literal: true | ||
|
||
def name | ||
@name ||= Dir['*.gemspec'].first.split('.').first | ||
require 'bundler/gem_tasks' | ||
require 'rake/testtask' | ||
|
||
Rake::TestTask.new do |t| | ||
t.libs.push %w[spec] | ||
t.test_files = FileList['spec/**/*_spec.rb'] | ||
t.verbose = true | ||
end | ||
|
||
desc "Open an irb session preloaded with this library" | ||
task :console do | ||
puts "#{name}" | ||
sh "irb -rubygems -r ./lib/fog/powerdns.rb" | ||
end | ||
desc 'Default Task' | ||
task default: [:test] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,30 @@ | ||
# coding: utf-8 | ||
# frozen_string_literal: true | ||
|
||
lib = File.expand_path('../lib', __FILE__) | ||
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) | ||
require 'fog/powerdns/version' | ||
|
||
Gem::Specification.new do |spec| | ||
spec.name = "fog-powerdns" | ||
spec.version = Fog::PowerDNS::VERSION | ||
spec.authors = ["Chris Luo"] | ||
spec.email = ["[email protected]"] | ||
spec.name = 'fog-powerdns' | ||
spec.version = Fog::PowerDNS::VERSION | ||
spec.authors = ['Chris Luo'] | ||
spec.email = ['[email protected]'] | ||
|
||
spec.summary = %q{Module for the 'fog' gem to support PowerDNS DNS services.} | ||
spec.description = %q{This library can be used as a module for 'fog' or as a standalone provider to use PowerDNS DNS services in applications.} | ||
spec.homepage = "http://github.com/cluobah/fog-powerdns" | ||
spec.license = "MIT" | ||
spec.summary = "Module for the 'fog' gem to support PowerDNS DNS services." | ||
spec.description = "This library can be used as a module for 'fog' or as a standalone provider to use PowerDNS DNS services in applications." | ||
spec.homepage = 'http://github.com/cluobah/fog-powerdns' | ||
spec.license = 'MIT' | ||
|
||
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } | ||
spec.bindir = "exe" | ||
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } | ||
spec.require_paths = ["lib"] | ||
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } | ||
spec.bindir = 'exe' | ||
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } | ||
spec.require_paths = ['lib'] | ||
|
||
spec.add_development_dependency "bundler", "~> 1.8" | ||
spec.add_development_dependency "rake", "~> 10.0" | ||
spec.add_development_dependency 'bundler' | ||
spec.add_development_dependency 'rake' | ||
spec.add_development_dependency 'rubocop' | ||
|
||
spec.add_dependency 'fog-core', '~> 1.27' | ||
spec.add_dependency 'fog-json', '~>1.0' | ||
spec.add_dependency 'fog-xml', '~>0.1' | ||
spec.add_dependency 'fog-core' | ||
spec.add_dependency 'fog-json' | ||
spec.add_dependency 'fog-xml' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,32 @@ | ||
# frozen_string_literal: true | ||
|
||
class PowerDNS < Fog::Bin | ||
class << self | ||
def class_for(key) | ||
case key | ||
|
||
when :dns | ||
Fog::DNS::PowerDNS | ||
else | ||
raise ArgumentError, "Unsupported #{self} service: #{key}" | ||
when :dns | ||
Fog::DNS::PowerDNS | ||
else | ||
raise ArgumentError, "Unsupported #{self} service: #{key}" | ||
end | ||
end | ||
|
||
def [](service) | ||
@@connections ||= Hash.new do |hash, key| | ||
hash[key] = case key | ||
when :dns | ||
Fog::Logger.warning("PowerDNS[:dns] is not recommended, use DNS[:powerdns] for portability") | ||
Fog::DNS.new(:provider => :powerdns) | ||
else | ||
raise ArgumentError, "Unrecognized service: #{key.inspect}" | ||
when :dns | ||
Fog::Logger.warning('PowerDNS[:dns] is not recommended, use DNS[:powerdns] for portability') | ||
Fog::DNS.new(provider: :powerdns) | ||
else | ||
raise ArgumentError, "Unrecognized service: #{key.inspect}" | ||
end | ||
end | ||
@@connections[service] | ||
end | ||
|
||
def services | ||
Fog::PowerDNS.services | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.