Remove 2.3.0 ABI test fixture plugins

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
This commit is contained in:
Clinton Wolfe 2019-04-23 23:39:31 -04:00
parent 3ec3607544
commit cf1d4f9994
18 changed files with 0 additions and 476 deletions

View file

@ -1,27 +0,0 @@
lib = File.expand_path("../lib", __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require "inspec-test-fixture/version"
Gem::Specification.new do |spec|
spec.name = "inspec-test-fixture"
spec.version = '0.1.0'
spec.authors = ["InSpec Engineering Team"]
spec.email = ["hello@chef.io"]
spec.summary = %q{A simple test plugin gem for InSpec}
spec.description = %q{This gem is used to test the gem search and install capabilities of InSpec's plugin V2 system. It is not a good example or starting point for plugin development.}
spec.homepage = "https://github.com/inspec/inspec"
spec.files = [
'inspec-test-fixture.gemspec',
'lib/inspec-test-fixture.rb',
'lib/inspec-test-fixture/plugin.rb',
'lib/inspec-test-fixture/mock_plugin.rb',
'lib/inspec-test-fixture/version.rb',
]
spec.executables = []
spec.require_paths = ["lib"]
spec.add_development_dependency "rake", "~> 10.0"
end

View file

@ -1,5 +0,0 @@
lib = File.expand_path("../../lib", __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'inspec-test-fixture/version'
require 'inspec-test-fixture/plugin'

View file

@ -1,13 +0,0 @@
require 'inspec-test-fixture/version'
if InspecPlugins::TestFixture::VERSION == Gem::Version.new('0.2.0')
require "ordinal_array"
end
module InspecPlugins::TextFixture
class MockPlugin < Inspec.plugin(2, :mock_plugin_type)
def execute(opts = {})
# Check to see if Array responds to 'third'
Array.respond_to?(:third)
end
end
end

View file

@ -1,13 +0,0 @@
module InspecPlugins
module TestFixture
class Plugin < Inspec.plugin(2)
plugin_name :'inspec-test-fixture'
mock_plugin_type :'inspec-test-fixture' do
require 'mock_plugin'
InspecPlugins::TestFixture
end
end
end
end

View file

@ -1,5 +0,0 @@
module InspecPlugins
module TestFixture
VERSION = "0.1.0"
end
end

View file

@ -1,31 +0,0 @@
# -*- encoding: utf-8 -*-
# stub: inspec-test-fixture 0.1.0 ruby lib
Gem::Specification.new do |s|
s.name = "inspec-test-fixture"
s.version = "0.1.0"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.require_paths = ["lib"]
s.authors = ["InSpec Engineering Team"]
s.date = "2018-08-17"
s.description = "This gem is used to test the gem search and install capabilities of InSpec's plugin V2 system. It is not a good example or starting point for plugin development."
s.email = ["hello@chef.io"]
s.homepage = "https://github.com/inspec/inspec"
s.rubygems_version = "2.5.1"
s.summary = "A simple test plugin gem for InSpec"
s.installed_by_version = "2.5.1" if s.respond_to? :installed_by_version
if s.respond_to? :specification_version then
s.specification_version = 4
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
s.add_development_dependency(%q<rake>, ["~> 10.0"])
else
s.add_dependency(%q<rake>, ["~> 10.0"])
end
else
s.add_dependency(%q<rake>, ["~> 10.0"])
end
end

View file

@ -1,28 +0,0 @@
lib = File.expand_path("../lib", __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require "inspec-test-fixture/version"
Gem::Specification.new do |spec|
spec.name = "inspec-test-fixture"
spec.version = '0.2.0'
spec.authors = ["InSpec Engineering Team"]
spec.email = ["hello@chef.io"]
spec.summary = %q{A simple test plugin gem for InSpec}
spec.description = %q{This gem is used to test the gem search and install capabilities of InSpec's plugin V2 system. It is not a good example or starting point for plugin development.}
spec.homepage = "https://github.com/inspec/inspec"
spec.files = [
'inspec-test-fixture.gemspec',
'lib/inspec-test-fixture.rb',
'lib/inspec-test-fixture/plugin.rb',
'lib/inspec-test-fixture/mock_plugin.rb',
'lib/inspec-test-fixture/version.rb',
]
spec.executables = []
spec.require_paths = ["lib"]
spec.add_development_dependency "rake", "~> 10.0"
spec.add_dependency "ordinal_array", "~> 0.2.0"
end

View file

@ -1,2 +0,0 @@
require 'inspec-test-fixture/version'
require 'inspec-test-fixture/plugin'

View file

@ -1,13 +0,0 @@
require 'inspec-test-fixture/version'
if InspecPlugins::TestFixture::VERSION == Gem::Version.new('0.2.0')
require "ordinal_array"
end
module InspecPlugins::TextFixture
class MockPlugin < Inspec.plugin(2, :mock_plugin_type)
def execute(opts = {})
# Check to see if Array responds to 'third'
Array.respond_to?(:third)
end
end
end

View file

@ -1,13 +0,0 @@
module InspecPlugins
module TestFixture
class Plugin < Inspec.plugin(2)
plugin_name :'inspec-test-fixture'
mock_plugin_type :'inspec-test-fixture' do
require 'mock_plugin'
InspecPlugins::TestFixture
end
end
end
end

View file

@ -1,5 +0,0 @@
module InspecPlugins
module TestFixture
VERSION = "0.2.0"
end
end

View file

@ -1,29 +0,0 @@
= Ordinal array
Ordinal array is a Gem which allows you to access to a value of an array by an ordinal value. You can access to the first element of an array by the "first" method. Now you can access to the second element by "second", the third by "third" and that until the 999th elements.
Works with Ruby 1.9
Improve ordinal array speed for multiple calls on the same method on the same array: (Benchmark results: https://gist.github.com/2337544)
Exemple:
my_array = ["value1", "value2", "value3"]
puts my_array.third # print: value 3
puts my_array.third # print: value 3 (But... much faster!)
= How to use
Just add gem "ordinal_array" in your gemfile.
It provides you some methods on the basic array class
Exemple of use:
my_array = ["value1", "value2", "value3"]
puts my_array.third # print: value 3
my_array[41] = "it works fine"
puts my_array.fourty_second # print: it works fine
= Contributors
*Kevin Disneur

View file

@ -1,65 +0,0 @@
require_relative './ordinal_array/ordinal'
require_relative './ordinal_array/ordinal_constants'
class Array
include OrdinalArray::Constant
include OrdinalArray
def self.respond_to?(method_sym, include_private=false)
return true if Array.number_in_letter? method_sym
super
end
def method_missing(name, *params)
if Array.number_in_letter? name
index = index_by_number_in_letter(name, params)
self.class.send(:define_method, name) do
self[index]
end
self.send(name)
else
super
end
end
private
def self.number_in_letter?(name)
ordinal_figure = false
possible_followers = [:hundred, :decade, :ordinal]
letter_numbers = name.to_s.split('_').drop_while do |letter_number|
return false if ordinal_figure
figure = Numbers_in_letter.element_by_name(letter_number)
return false unless figure
return false unless possible_followers.include? figure.to_sym
possible_followers = figure.can_be_followed_by
ordinal_figure = !figure.kind_of?(ComposedOrdinal)
true
end
letter_numbers.empty? && ordinal_figure
end
def index_by_number_in_letter(name, *params)
partial_sum = 1
sum = name.to_s.split('_').inject(0) do |sum, letter_number|
number = Numbers_in_letter.element_by_name(letter_number).number
if partial_sum < number
partial_sum = partial_sum * number
else
sum = sum + partial_sum
partial_sum = number
end
sum
end
sum = sum + partial_sum
index = sum - 1
index > 0 ? index : nil
end
end

View file

@ -1,71 +0,0 @@
module OrdinalArray
class Ordinal
attr_accessor :number_in_letter, :number, :can_be_followed_by
def initialize(number_in_letter, number)
@number_in_letter = number_in_letter
@can_be_followed_by = nil
@number = number
end
def to_sym
:ordinal
end
end
class ComposedOrdinal < Ordinal
def initialize(number_in_letter, number)
super(number_in_letter, number)
@can_be_followed_by = [:hundred]
end
def to_sym
:ordinal
end
end
class DecadeOrdinal < Ordinal
def initialize(number_in_letter, number)
super(number_in_letter, number)
@can_be_followed_by = nil
end
def to_sym
:decade
end
end
class ComposedDecadeOrdinal < ComposedOrdinal
def initialize(number_in_letter, number)
super(number_in_letter, number)
@can_be_followed_by = [:ordinal]
end
def to_sym
:decade
end
end
class HundredOrdinal < Ordinal
def initialize(number_in_letter, number)
super(number_in_letter, number)
@can_be_followed_by = nil
end
def to_sym
:hundred
end
end
class ComposedHundredOrdinal < ComposedDecadeOrdinal
def initialize(number_in_letter, number)
super(number_in_letter, number)
@can_be_followed_by = [:decade, :ordinal]
end
def to_sym
:hundred
end
end
end

View file

@ -1,84 +0,0 @@
require_relative './ordinal'
module OrdinalArray
module Constant
First = Ordinal.new("first", 1)
One = ComposedOrdinal.new("one", 1)
Second = Ordinal.new("second", 2)
Two = ComposedOrdinal.new("two", 2)
Third = Ordinal.new("third", 3)
Three = ComposedOrdinal.new("three", 3)
Fourth = Ordinal.new("fourth", 4)
Four = ComposedOrdinal.new("four", 4)
Fifth = Ordinal.new("fifth", 5)
Five = ComposedOrdinal.new("five", 5)
Sixth = Ordinal.new("sixth", 6)
Six = ComposedOrdinal.new("six", 6)
Seventh = Ordinal.new("seventh", 7)
Seven = ComposedOrdinal.new("seven", 7)
Eighth = Ordinal.new("eighth", 8)
Eight = ComposedOrdinal.new("eight", 8)
Ninth = Ordinal.new("ninth", 9)
Nine = ComposedOrdinal.new("nine", 9)
Tenth = DecadeOrdinal.new("tenth", 10)
Ten = ComposedDecadeOrdinal.new("ten", 10)
Eleventh = DecadeOrdinal.new("eleventh", 11)
Eleven = ComposedDecadeOrdinal.new("eleven", 11)
Twelfth = DecadeOrdinal.new("twelfth", 12)
Twelve = ComposedDecadeOrdinal.new("twelve", 12)
Thirteenth = DecadeOrdinal.new("thirteenth", 13)
Thirteen = ComposedDecadeOrdinal.new("thirteen", 13)
Fourteenth = DecadeOrdinal.new("fourteenth", 14)
Fourteen = ComposedDecadeOrdinal.new("fourteen", 14)
Fifteenth = DecadeOrdinal.new("fifteenth", 15)
Fifteen = ComposedDecadeOrdinal.new("fifteen", 15)
Sixteenth = DecadeOrdinal.new("sixteenth", 16)
Sixteen = ComposedDecadeOrdinal.new("sixteen", 16)
Seventeenth = DecadeOrdinal.new("seventeenth", 17)
Seventeen = ComposedDecadeOrdinal.new("seventeen", 17)
Eighteenth = DecadeOrdinal.new("eighteenth", 18)
Eighteen = ComposedDecadeOrdinal.new("eighteen", 18)
Nineteenth = DecadeOrdinal.new("nineteenth", 19)
Nineteen = ComposedDecadeOrdinal.new("nineteen", 19)
Twentieth = DecadeOrdinal.new("twentieth", 20)
Twenty = ComposedDecadeOrdinal.new("twenty", 20)
Thirtieth = DecadeOrdinal.new("thirtieth", 30)
Thirty = ComposedDecadeOrdinal.new("thirty", 30)
Fortieth = DecadeOrdinal.new("fortieth", 40)
Fourty = ComposedDecadeOrdinal.new("fourty", 40)
Fiftieth = DecadeOrdinal.new("fiftieth", 50)
Fifty = ComposedDecadeOrdinal.new("fifty", 50)
Sixtieth = DecadeOrdinal.new("sixtieth", 60)
Sixty = ComposedDecadeOrdinal.new("sixty", 60)
Seventieth = DecadeOrdinal.new("seventieth", 70)
Seventy = ComposedDecadeOrdinal.new("seventy", 70)
Eightieth = DecadeOrdinal.new("eightieth", 80)
Eighty = ComposedDecadeOrdinal.new("eighty", 80)
Ninetieth = DecadeOrdinal.new("ninetieth", 90)
Ninety = ComposedDecadeOrdinal.new("ninety", 90)
Hundredth = HundredOrdinal.new("hundredth", 100)
Hundred = ComposedHundredOrdinal.new("hundred", 100)
Numbers_in_letter = [
One, Two, Three, Four, Five, Six, Seven, Eight, Nine,
Ten, Eleven, Twelve, Thirteen, Fourteen, Fifteen, Sixteen, Seventeen, Eighteen, Nineteen,
Twenty, Thirty, Fourty, Fifty, Sixty, Seventy, Eighty, Ninety,
Hundred,
First, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth, Ninth,
Tenth, Eleventh, Twelfth, Thirteenth, Fourteenth, Fifteenth, Sixteenth, Seventeenth, Eighteenth, Nineteenth,
Twentieth, Thirtieth, Fortieth, Fiftieth, Sixtieth, Seventieth, Eightieth, Ninetieth,
Hundredth
]
class << Numbers_in_letter
def element_by_name(name)
index = self.index {|n| n.number_in_letter == name }
return nil unless index
self.[](index)
end
end
end
end

View file

@ -1,19 +0,0 @@
# -*- encoding: utf-8 -*-
# stub: ordinal_array 0.2.0 ruby lib
Gem::Specification.new do |s|
s.name = "ordinal_array"
s.version = "0.2.0"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.require_paths = ["lib"]
s.authors = ["Kevin Disneur"]
s.date = "2012-04-08"
s.description = "You can access to the first element of an array by the 'first' method. Now you can access to the second element by 'second' and that until the 999th elements"
s.email = ["kevin.disneur@gmail.com"]
s.homepage = "https://github.com/kdisneur/ordinal_array"
s.rubygems_version = "2.5.1"
s.summary = "You can access to the first element of an array by the 'first' method. Now you can access to the second element by 'second' and that until the 999th elements"
s.installed_by_version = "2.5.1" if s.respond_to? :installed_by_version
end

View file

@ -1,34 +0,0 @@
# -*- encoding: utf-8 -*-
# stub: inspec-test-fixture 0.2.0 ruby lib
Gem::Specification.new do |s|
s.name = "inspec-test-fixture"
s.version = "0.2.0"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.require_paths = ["lib"]
s.authors = ["InSpec Engineering Team"]
s.date = "2018-08-17"
s.description = "This gem is used to test the gem search and install capabilities of InSpec's plugin V2 system. It is not a good example or starting point for plugin development."
s.email = ["hello@chef.io"]
s.homepage = "https://github.com/inspec/inspec"
s.rubygems_version = "2.5.1"
s.summary = "A simple test plugin gem for InSpec"
s.installed_by_version = "2.5.1" if s.respond_to? :installed_by_version
if s.respond_to? :specification_version then
s.specification_version = 4
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
s.add_development_dependency(%q<rake>, ["~> 10.0"])
s.add_runtime_dependency(%q<ordinal_array>, ["~> 0.2.0"])
else
s.add_dependency(%q<rake>, ["~> 10.0"])
s.add_dependency(%q<ordinal_array>, ["~> 0.2.0"])
end
else
s.add_dependency(%q<rake>, ["~> 10.0"])
s.add_dependency(%q<ordinal_array>, ["~> 0.2.0"])
end
end

View file

@ -1,19 +0,0 @@
# -*- encoding: utf-8 -*-
# stub: ordinal_array 0.2.0 ruby lib
Gem::Specification.new do |s|
s.name = "ordinal_array"
s.version = "0.2.0"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.require_paths = ["lib"]
s.authors = ["Kevin Disneur"]
s.date = "2012-04-08"
s.description = "You can access to the first element of an array by the 'first' method. Now you can access to the second element by 'second' and that until the 999th elements"
s.email = ["kevin.disneur@gmail.com"]
s.homepage = "https://github.com/kdisneur/ordinal_array"
s.rubygems_version = "2.5.1"
s.summary = "You can access to the first element of an array by the 'first' method. Now you can access to the second element by 'second' and that until the 999th elements"
s.installed_by_version = "2.5.1" if s.respond_to? :installed_by_version
end