Skip to content

Commit

Permalink
Merge branch 'master' into feature/MSP-10035/mdm-service-text
Browse files Browse the repository at this point in the history
MSP-10035

Conflicts:
	lib/metasploit_data_models/version.rb
  • Loading branch information
limhoff-r7 committed Jul 17, 2014
2 parents 8c2d39e + 1e554c1 commit 5f5cf15
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 1 deletion.
5 changes: 5 additions & 0 deletions config/initializers/arel_helper.rb
@@ -0,0 +1,5 @@
# Including arel-helpers in all active record models.
# https://github.com/camertron/arel-helpers

ActiveRecord::Base.send(:include, ArelHelpers::ArelTable)
ActiveRecord::Base.send(:include, ArelHelpers::JoinAssociation)
5 changes: 5 additions & 0 deletions lib/metasploit_data_models.rb
Expand Up @@ -6,12 +6,17 @@
#
# Gems
#
# gems must load explicitly any gem declared in gemspec
# @see https://github.com/bundler/bundler/issues/2018#issuecomment-6819359
#
#
require 'active_record'
require 'active_support'
require 'active_support/all'
require 'active_support/dependencies'
require 'metasploit/concern'
require 'metasploit/model'
require 'arel-helpers'

#
# Project
Expand Down
12 changes: 12 additions & 0 deletions lib/metasploit_data_models/version.rb
Expand Up @@ -24,8 +24,20 @@ def self.full

version
end

# The full gem version string, including the {MAJOR}, {MINOR}, {PATCH}, and optionally, the {PRERELEASE} in the
# {http://guides.rubygems.org/specification-reference/#version RubyGems versioning} format.
#
# @return [String] '{MAJOR}.{MINOR}.{PATCH}' on master. '{MAJOR}.{MINOR}.{PATCH}.{PRERELEASE}' on any branch
# other than master.
def self.gem
full.gsub('-', '.pre.')
end
end

# @see Version.gem
GEM_VERSION = Version.gem

# @see Version.full
VERSION = Version.full
end
5 changes: 4 additions & 1 deletion metasploit_data_models.gemspec
Expand Up @@ -4,7 +4,7 @@ require 'metasploit_data_models/version'

Gem::Specification.new do |s|
s.name = 'metasploit_data_models'
s.version = MetasploitDataModels::VERSION
s.version = MetasploitDataModels::GEM_VERSION
s.authors = [
'Samuel Huckins',
'Luke Imhoff',
Expand Down Expand Up @@ -41,6 +41,9 @@ Gem::Specification.new do |s|
s.add_runtime_dependency 'metasploit-concern', '~> 0.1.0'
s.add_runtime_dependency 'metasploit-model', '>= 0.25.1', '< 0.26'

# arel-helpers: Useful tools to help construct database queries with ActiveRecord and Arel.
s.add_runtime_dependency 'arel-helpers'

if RUBY_PLATFORM =~ /java/
# markdown formatting for yard
s.add_development_dependency 'kramdown'
Expand Down

0 comments on commit 5f5cf15

Please sign in to comment.