From 6701a6fdd736583d033b1ec487e608f105589064 Mon Sep 17 00:00:00 2001 From: Joe Rafaniello Date: Fri, 9 Aug 2013 11:41:00 -0400 Subject: [PATCH 1/2] Add changelog. --- CHANGELOG.md | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..b5fec5e --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,73 @@ +## v0.1.2 + - Bumping version to v0.1.2 + - add fstab module and specs + - add service.restart, return 'self' in service methods + - use custom runtime error subclass for command failures + +## v0.1.1 + - Bumping version to 0.1.1 + - add special distro types (generic/test) + - parse numeric partition sizes from parted output + - tidy up new features, round out specs testing them + - features to round out set + - add system representation + - add logical volume skeleton + - add disk/partition representations & specs + - start adding specs for services + - add service representation + - add distro representation + - Improved test coverage of common + - Add proxy support to subscribe, refactor proxy details into a method. + - Add register command with proxy and satellite options and tests. + - Create an array from the options instead of a hash. + - Requiring all of active_support core_extensions + - ActiveSupport v4 drops support for ruby 1.9.2 + +## v0.1.0 + - Building v0.1.0 + - Made sanitize a private method + - Fixed default options to expect positive case. + - Cleanup of commands + - Refactored sanitizing + - Added active_support for blank? method + - Allow common methods to be called without namespacing. + - Extending Yum to get the latest available version for package(s) + - Add more options to Subscription Manager registration + - Add a common method to sanitize user input for the command line. + - Add common write command for use in writing config files. + - Add parsing of Yum repo files with tests and sample data. + - Add gem to parse files with ini type contents + - Adding Hash store_path + - Extend Yum.update to allow an optional list of packages as arguments. + - Add test and support for using yum's repotrack tool. + - Add test and support for using yum's createrepo tool. + - Added tests and support for RPM. + - Adding dependency for other core extensions. + - Fix issue related to command output filling up the IO pipe. + - Removing JRuby, Rubinius and MRI 1.8 because of Kernel.spawn support. + - Fix misnamed .travis.yml file + - Adding Version Badge + +## v0.0.1 + - Adding Gemnasium support + - Adding Coveralls support + - Adding CodeClimate support + - Adding travis-ci support + - Adding example for Red Hat Subscription Manager hosted + - '.registered?' should return false rather than raise if not available. + - Adding support and tests for SubscriptionManager + - Extending Common.run with option ':return_output' + - Added support to mock command output sourced from a data file for tests + - Adding tests for Yum commands + - Adding tests for linux_admin + - Updating Yum methods to leverage changes in Common module + - Extending common and adding tests + - Cleaner way to get the exitstatus of the shell process. + - Yum commands should return true-false or raise an exception + - Adding high level method to check system registration status + - Adding tests for RHN functionality. + - Adding support for RHN and method to check registeration status + - Adding support for Yum (check and apply updates) + - Adding a module for shared methods. + - Adding rspec for testing. + - Gem Framework added. From 93d5de54934c911fb02a8154d113be46b7171880 Mon Sep 17 00:00:00 2001 From: Joe Rafaniello Date: Fri, 9 Aug 2013 12:13:40 -0400 Subject: [PATCH 2/2] Added update_changelog rake task as a prerequisite to 'rake release.' The normal workflow should be: 1) Make your linux_admin code changes. 2) Test and commit these changes. 3) When ready for a new tag... 4) Run rake release 5) This will invoke the update_changelog rake task, it will ask you to: 6) Update LinuxAdmin::VERSION. 7) Verify that the script correctly added the commits since the last tag to the beginning of the CHANGELOG.md. 8) Add the correct version information before these commits. 9) Commit these changes 10) Hit enter and rake release will be run to create the tag, and push the version to rubygems.org. --- Rakefile | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 1f38e51..9ec4788 100644 --- a/Rakefile +++ b/Rakefile @@ -3,4 +3,35 @@ require "bundler/gem_tasks" require 'rspec/core/rake_task' RSpec::Core::RakeTask.new('spec') task :test => :spec -task :default => :spec \ No newline at end of file +task :default => :spec + +Rake::Task[:release].enhance [:update_changelog] + +task :update_changelog do + change = "CHANGELOG.md" + `git diff --quiet #{change}` + if $?.exitstatus == 1 + warn "There are already changes to #{change}." + exit 1 + end + existing = File.read(change) + + require 'linux_admin/version' + version = LinuxAdmin::VERSION + + new_text = `git log --no-merges --format=" - %s" v#{version}...HEAD` + File.write(change, new_text + "\n" + existing) + + msg = <<-MSG +Updated #{change} with commits since v#{version}. +Now: +1) Update LinuxAdmin::VERSION. +2) Verify the commits added to #{change} since the last tag. +3) Update #{change} with the version for these commits. +4) Commit these changes. +5) Hit enter to continue. +MSG + puts msg + + STDIN.gets +end