Skip to content

Commit

Permalink
Merge pull request #506 from clintoncwolfe/cw/rhel-7-search
Browse files Browse the repository at this point in the history
Prefer non-Beta RHEL AMIs in search; remove encoding comments
  • Loading branch information
tas50 authored Aug 14, 2020
2 parents 7a0fcf1 + db0fcd5 commit a36eabc
Show file tree
Hide file tree
Showing 12 changed files with 7 additions and 12 deletions.
2 changes: 0 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- encoding: utf-8 -*-

require "bundler/gem_tasks"
require "rspec/core/rake_task"
RSpec::Core::RakeTask.new(:test)
Expand Down
1 change: 0 additions & 1 deletion kitchen-ec2.gemspec
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- encoding: utf-8 -*-
lib = File.expand_path("../lib", __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require "kitchen/driver/ec2_version.rb"
Expand Down
1 change: 0 additions & 1 deletion lib/kitchen/driver/aws/client.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- encoding: utf-8 -*-
#
# Author:: Tyler Ball (<[email protected]>)
#
Expand Down
1 change: 0 additions & 1 deletion lib/kitchen/driver/aws/instance_generator.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- encoding: utf-8 -*-
#
# Author:: Tyler Ball (<[email protected]>)
#
Expand Down
7 changes: 7 additions & 0 deletions lib/kitchen/driver/aws/standard_platform/rhel.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ def self.from_image(driver, image)
new(driver, "rhel", (Regexp.last_match || [])[1], image.architecture)
end
end

def sort_by_version(images)
# First do a normal version sort
super(images)
# Now sort again, shunning Beta releases.
prefer(images) { |image| !image.name.match(/_Beta-/i) }
end
end
end
end
Expand Down
1 change: 0 additions & 1 deletion lib/kitchen/driver/ec2.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- encoding: utf-8 -*-
#
# Author:: Fletcher Nichol (<[email protected]>)
#
Expand Down
1 change: 0 additions & 1 deletion lib/kitchen/driver/ec2_version.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- encoding: utf-8 -*-
#
# Author:: Fletcher Nichol (<[email protected]>)
#
Expand Down
1 change: 0 additions & 1 deletion spec/kitchen/driver/aws/client_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- encoding: utf-8 -*-
#
# Author:: Tyler Ball (<[email protected]>)
#
Expand Down
1 change: 0 additions & 1 deletion spec/kitchen/driver/aws/instance_generator_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- encoding: utf-8 -*-
#
# Author:: Tyler Ball (<[email protected]>)
#
Expand Down
1 change: 0 additions & 1 deletion spec/kitchen/driver/aws/standard_platform_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- encoding: utf-8 -*-
#
# Author:: Tyler Ball (<[email protected]>)
#
Expand Down
1 change: 0 additions & 1 deletion spec/kitchen/driver/ec2_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- encoding: utf-8 -*-
#
# Author:: Tyler Ball (<[email protected]>)
#
Expand Down
1 change: 0 additions & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- encoding: utf-8 -*-
#
# Author:: Fletcher Nichol (<[email protected]>)
#
Expand Down

0 comments on commit a36eabc

Please sign in to comment.