From 2f0e8a429f1c4e702fa41fc0fc440ba09d45cdbf Mon Sep 17 00:00:00 2001 From: Luke Imhoff Date: Thu, 16 Apr 2015 09:56:34 -0500 Subject: [PATCH 1/4] Update version for branch MSP-11074 --- lib/metasploit/erd/version.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/metasploit/erd/version.rb b/lib/metasploit/erd/version.rb index b7d8ef9..03d82c0 100644 --- a/lib/metasploit/erd/version.rb +++ b/lib/metasploit/erd/version.rb @@ -6,8 +6,10 @@ module Version MAJOR = 0 # The minor version number, scoped to the {MAJOR} version number. MINOR = 0 - # The patch number, scoped to the {MINOR} version number. - PATCH = 1 + # The patch number, scoped to the {MAJOR} and {MINOR} version numbers. + PATCH = 2 + # The prerelease version, scoped to the {MAJOR}, {MINOR}, and {PATCH} version numbers. + PRERELEASE = 'metasploit-yard' # The full version string, including the {MAJOR}, {MINOR}, {PATCH}, and optionally, the `PRERELEASE` in the # {http://semver.org/spec/v2.0.0.html semantic versioning v2.0.0} format. From e07fc04647f3006518eb2c9310b1d85439a0f837 Mon Sep 17 00:00:00 2001 From: Luke Imhoff Date: Thu, 16 Apr 2015 10:00:04 -0500 Subject: [PATCH 2/4] Remove own yard task MSP-11074 lib/tasks defined tasks are inherited by all downstream Rails projects, so it leads to multiple actions for the `yard` tasks. --- Rakefile | 3 --- lib/tasks/yard.rake | 32 -------------------------------- 2 files changed, 35 deletions(-) delete mode 100644 lib/tasks/yard.rake diff --git a/Rakefile b/Rakefile index 60cefa4..b7e9ed5 100644 --- a/Rakefile +++ b/Rakefile @@ -1,9 +1,6 @@ require "bundler/gem_tasks" require "rspec/core/rake_task" -require 'yard' -load 'tasks/yard.rake' - RSpec::Core::RakeTask.new(:spec) task :default => :spec diff --git a/lib/tasks/yard.rake b/lib/tasks/yard.rake deleted file mode 100644 index 8407573..0000000 --- a/lib/tasks/yard.rake +++ /dev/null @@ -1,32 +0,0 @@ -# @note All options not specific to any given rake task should go in the .yardopts file so they are available to both -# the below rake tasks and when invoking `yard` from the command line - -if defined? YARD - namespace :yard do - YARD::Rake::YardocTask.new(:doc) do |t| - # --no-stats here as 'stats' task called after will print fuller stats - t.options = ['--no-stats'] - - t.after = Proc.new { - Rake::Task['yard:stats'].execute - } - end - - task :doc - - desc "Shows stats for YARD Documentation including listing undocumented modules, classes, constants, and methods" - task :stats do - stats = YARD::CLI::Stats.new - stats.run('--compact', '--list-undoc') - end - end - - # @todo Figure out how to just clone description from yard:doc - desc "Generate YARD documentation" - # allow calling namespace to as a task that goes to default task for namespace - task :yard => ['yard:doc'] - - task :default => :yard -else - puts 'YARD not defined, so yard tasks cannot be setup.' -end \ No newline at end of file From 7005e85ec63f3aebd1e842052fc085f5283e7d3f Mon Sep 17 00:00:00 2001 From: Luke Imhoff Date: Thu, 16 Apr 2015 10:29:25 -0500 Subject: [PATCH 3/4] Use metasploit-yard MSP-11074 To prevent duplicate yard actions. --- Rakefile | 7 +++++++ metasploit-erd.gemspec | 1 + 2 files changed, 8 insertions(+) diff --git a/Rakefile b/Rakefile index b7e9ed5..c907920 100644 --- a/Rakefile +++ b/Rakefile @@ -4,3 +4,10 @@ require "rspec/core/rake_task" RSpec::Core::RakeTask.new(:spec) task :default => :spec + +# Use find_all_by_name instead of find_by_name as find_all_by_name will return pre-release versions +gem_specification = Gem::Specification.find_all_by_name('metasploit-yard').first + +Dir[File.join(gem_specification.gem_dir, 'lib', 'tasks', '**', '*.rake')].each do |rake| + load rake +end diff --git a/metasploit-erd.gemspec b/metasploit-erd.gemspec index aece348..7569f27 100644 --- a/metasploit-erd.gemspec +++ b/metasploit-erd.gemspec @@ -20,6 +20,7 @@ Gem::Specification.new do |spec| spec.require_paths = ['lib'] spec.add_development_dependency 'bundler', '~> 1.5' + spec.add_development_dependency 'metasploit-yard', '~> 1.0' spec.add_development_dependency 'rake', '~> 10.3' spec.add_development_dependency 'rspec', '~> 2.14' From 9229b674edef94f2837ff244bb96b7a416c9cb6d Mon Sep 17 00:00:00 2001 From: Luke Imhoff Date: Thu, 16 Apr 2015 10:38:43 -0500 Subject: [PATCH 4/4] Add yard to travis-ci rake tasks MSP-11074 --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 40eac59..2bcae87 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,3 +5,4 @@ before_install: language: ruby rvm: - 2.1 +script: bundle exec rake spec yard