Skip to content

Commit

Permalink
Merge pull request #25 from config-files-api/Backport_cfa1
Browse files Browse the repository at this point in the history
Backport cfa1
  • Loading branch information
jreidinger committed Jul 18, 2019
2 parents cb57a5b + 31ca25b commit 5a2c2f0
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 10 deletions.
13 changes: 11 additions & 2 deletions CHANGELOG
@@ -1,10 +1,19 @@
-------------------------------------------------------------------------
-------------------------------------------------------------------
Thu Jul 18 10:40:32 UTC 2019 - Josef Reidinger <jreidinger@suse.com>

- BACKPORT: Dropped the changes_only argument of
Default,DeviceMap#save following the same change in
BaseModel#save in cfa-1.0.0
because the merging was not working anyway (bsc#1137948)
- 0.6.6

-------------------------------------------------------------------
Thu Nov 30 14:35:47 UTC 2017 - jreidinger@suse.com

- fix reading GRUB_TERMINAL (caused by fix for bsc#1068578)
- 0.6.5

-------------------------------------------------------------
-------------------------------------------------------------------
Thu Nov 30 07:45:45 UTC 2017 - jreidinger@suse.com

- avoid crash if config file uses trailing comment (bsc#1068578)
Expand Down
5 changes: 3 additions & 2 deletions Gemfile
@@ -1,13 +1,14 @@
source "https://rubygems.org"

# 0.5.X contain new minimal changes, that needs modification
gem "cfa", "~> 0.5"
gem "cfa", "~> 1.0"

group :development, :test do
gem "coveralls"
gem "rspec"
end

group :development do
gem "rubocop"
gem "rubocop", "0.41.2"
gem "rake"
end
4 changes: 2 additions & 2 deletions cfa_grub2.gemspec
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = "cfa_grub2"
s.version = "0.6.5"
s.version = "0.6.6"
s.platform = Gem::Platform::RUBY
s.authors = ["Josef Reidinger"]
s.email = ["jreidinger@suse.cz"]
Expand All @@ -12,7 +12,7 @@ Gem::Specification.new do |s|

s.required_rubygems_version = ">= 1.3.6"

s.add_dependency "cfa", "~> 0.5"
s.add_dependency "cfa", "~> 1.0"

s.files = Dir["{lib}/**/*.rb"]
s.require_path = "lib"
Expand Down
2 changes: 1 addition & 1 deletion lib/cfa/grub2/default.rb
Expand Up @@ -31,7 +31,7 @@ def initialize(file_handler: nil)
file_handler: file_handler)
end

def save(changes_only: false)
def save
# serialize kernel params object before save
kernels = [@kernel_params, @xen_hypervisor_params, @xen_kernel_params,
@recovery_params]
Expand Down
2 changes: 1 addition & 1 deletion lib/cfa/grub2/device_map.rb
Expand Up @@ -23,7 +23,7 @@ def initialize(file_handler: nil)
file_handler: file_handler)
end

def save(changes_only: false)
def save
raise "Too many grub devices. Limit is 8." if grub_devices.size > 8

super
Expand Down
4 changes: 2 additions & 2 deletions spec/grub2_default_spec.rb
Expand Up @@ -187,8 +187,8 @@
config.generic_set("GRUB_ENABLE_CRYPTODISK", "true")
config.save

# TODO: check why augeas sometimes espace and sometimes not
expect(memory_file.content).to eq("GRUB_ENABLE_CRYPTODISK=\"true\"\n")
expect(memory_file.content.strip)
.to eq("GRUB_ENABLE_CRYPTODISK=\"true\"")
end
end
end
Expand Down

0 comments on commit 5a2c2f0

Please sign in to comment.