Merge pull request #6657 from dmaloney-r7/staging/rails-upgrade
Rails 4.0 Deprecation Warningsbug/bundler_fix
commit
f4e4bb803f
24
.travis.yml
24
.travis.yml
|
@ -1,11 +1,22 @@
|
|||
sudo: false
|
||||
group: stable
|
||||
bundler_args: --without coverage development pcap
|
||||
cache: bundler
|
||||
addons:
|
||||
postgresql: '9.3'
|
||||
apt:
|
||||
packages:
|
||||
- libpcap-dev
|
||||
- graphviz
|
||||
language: ruby
|
||||
rvm:
|
||||
- '2.1.8'
|
||||
|
||||
env:
|
||||
- RAKE_TASKS="cucumber cucumber:boot" CREATE_BINSTUBS=true
|
||||
- RAKE_TASKS=spec SPEC_OPTS="--tag content"
|
||||
- RAKE_TASKS=spec SPEC_OPTS="--tag ~content"
|
||||
|
||||
language: ruby
|
||||
matrix:
|
||||
fast_finish: true
|
||||
before_install:
|
||||
|
@ -23,9 +34,6 @@ before_script:
|
|||
script:
|
||||
# fail build if db/schema.rb update is not committed
|
||||
- git diff --exit-code db/schema.rb && bundle exec rake $RAKE_TASKS
|
||||
sudo: false
|
||||
rvm:
|
||||
- '2.1.8'
|
||||
|
||||
notifications:
|
||||
irc: "irc.freenode.org#msfnotify"
|
||||
|
@ -37,10 +45,4 @@ git:
|
|||
branches:
|
||||
except:
|
||||
- gh-pages
|
||||
- metakitty
|
||||
|
||||
addons:
|
||||
postgresql: '9.3'
|
||||
apt:
|
||||
packages:
|
||||
- libpcap-dev
|
||||
- metakitty
|
1
Gemfile
1
Gemfile
|
@ -18,6 +18,7 @@ group :development do
|
|||
gem 'yard'
|
||||
# for development and testing purposes
|
||||
gem 'pry'
|
||||
# rails-upgrade staging gems
|
||||
end
|
||||
|
||||
group :development, :test do
|
||||
|
|
31
Gemfile.lock
31
Gemfile.lock
|
@ -10,11 +10,11 @@ PATH
|
|||
jsobfu (~> 0.4.1)
|
||||
json
|
||||
metasm (~> 1.0.2)
|
||||
metasploit-concern (= 1.0.0)
|
||||
metasploit-credential (= 1.0.1)
|
||||
metasploit-model (= 1.0.0)
|
||||
metasploit-concern
|
||||
metasploit-credential (= 1.1.0)
|
||||
metasploit-model (= 1.1.0)
|
||||
metasploit-payloads (= 1.1.2)
|
||||
metasploit_data_models (= 1.2.11)
|
||||
metasploit_data_models (= 1.3.0)
|
||||
msgpack
|
||||
network_interface (~> 0.0.1)
|
||||
nokogiri
|
||||
|
@ -64,7 +64,7 @@ GEM
|
|||
childprocess (>= 0.3.6)
|
||||
cucumber (>= 1.1.1)
|
||||
rspec-expectations (>= 2.7.0)
|
||||
bcrypt (3.1.10)
|
||||
bcrypt (3.1.11)
|
||||
builder (3.1.4)
|
||||
capybara (2.4.4)
|
||||
mime-types (>= 1.16)
|
||||
|
@ -108,29 +108,29 @@ GEM
|
|||
mail (2.6.3)
|
||||
mime-types (>= 1.16, < 3)
|
||||
metasm (1.0.2)
|
||||
metasploit-concern (1.0.0)
|
||||
metasploit-concern (1.1.0)
|
||||
activerecord (>= 4.0.9, < 4.1.0)
|
||||
activesupport (>= 4.0.9, < 4.1.0)
|
||||
railties (>= 4.0.9, < 4.1.0)
|
||||
metasploit-credential (1.0.1)
|
||||
metasploit-concern (~> 1.0)
|
||||
metasploit-model (~> 1.0)
|
||||
metasploit_data_models (~> 1.0)
|
||||
metasploit-credential (1.1.0)
|
||||
metasploit-concern (~> 1.1)
|
||||
metasploit-model (~> 1.1)
|
||||
metasploit_data_models (~> 1.3)
|
||||
pg
|
||||
railties
|
||||
rubyntlm
|
||||
rubyzip (~> 1.1)
|
||||
metasploit-model (1.0.0)
|
||||
metasploit-model (1.1.0)
|
||||
activemodel (>= 4.0.9, < 4.1.0)
|
||||
activesupport (>= 4.0.9, < 4.1.0)
|
||||
railties (>= 4.0.9, < 4.1.0)
|
||||
metasploit-payloads (1.1.2)
|
||||
metasploit_data_models (1.2.11)
|
||||
metasploit_data_models (1.3.0)
|
||||
activerecord (>= 4.0.9, < 4.1.0)
|
||||
activesupport (>= 4.0.9, < 4.1.0)
|
||||
arel-helpers
|
||||
metasploit-concern (~> 1.0)
|
||||
metasploit-model (~> 1.0)
|
||||
metasploit-concern (~> 1.1)
|
||||
metasploit-model (~> 1.1)
|
||||
pg
|
||||
postgres_ext
|
||||
railties (>= 4.0.9, < 4.1.0)
|
||||
|
@ -246,6 +246,3 @@ DEPENDENCIES
|
|||
simplecov
|
||||
timecop
|
||||
yard
|
||||
|
||||
BUNDLED WITH
|
||||
1.11.2
|
||||
|
|
|
@ -36,7 +36,7 @@ module Metasploit::Framework::CommonEngine
|
|||
config.paths.add 'data/meterpreter', glob: '**/ext_*'
|
||||
config.paths.add 'modules'
|
||||
|
||||
config.active_support.deprecation = :notify
|
||||
config.active_support.deprecation = :stderr
|
||||
|
||||
#
|
||||
# `initializer`s
|
||||
|
|
|
@ -21,7 +21,7 @@ module Msf
|
|||
allowed_module_paths << Msf::Config.user_module_directory
|
||||
end
|
||||
|
||||
Rails.application.railties.engines.each do |engine|
|
||||
::Rails::Engine.subclasses.map(&:instance).each do |engine|
|
||||
extract_engine_module_paths(engine).each do |path|
|
||||
allowed_module_paths << path
|
||||
end
|
||||
|
|
|
@ -10,7 +10,7 @@ module Msf::DBManager::Migration
|
|||
"the .bundle/config manually and then `bundle install`"
|
||||
end
|
||||
|
||||
Rails.application.railties.engines.each do |engine|
|
||||
::Rails::Engine.subclasses.map(&:instance).each.each do |engine|
|
||||
migrations_paths = engine.paths['db/migrate'].existent_directories
|
||||
|
||||
migrations_paths.each do |migrations_path|
|
||||
|
|
|
@ -201,7 +201,7 @@ module Msf::DBManager::ModuleCache
|
|||
end
|
||||
end
|
||||
|
||||
query = Mdm::Module::Detail.scoped
|
||||
query = Mdm::Module::Detail.all
|
||||
|
||||
ActiveRecord::Base.connection_pool.with_connection do
|
||||
# Although AREL supports taking the union or two queries, the ActiveRecord where syntax only supports
|
||||
|
@ -214,7 +214,7 @@ module Msf::DBManager::ModuleCache
|
|||
when 'author'
|
||||
formatted_values = match_values(value_set)
|
||||
|
||||
query = query.includes(:authors)
|
||||
query = query.includes(:authors).references(:authors)
|
||||
module_authors = Mdm::Module::Author.arel_table
|
||||
union_conditions << module_authors[:email].matches_any(formatted_values)
|
||||
union_conditions << module_authors[:name].matches_any(formatted_values)
|
||||
|
@ -227,10 +227,10 @@ module Msf::DBManager::ModuleCache
|
|||
when 'os', 'platform'
|
||||
formatted_values = match_values(value_set)
|
||||
|
||||
query = query.includes(:platforms)
|
||||
query = query.includes(:platforms).references(:platforms)
|
||||
union_conditions << Mdm::Module::Platform.arel_table[:name].matches_any(formatted_values)
|
||||
|
||||
query = query.includes(:targets)
|
||||
query = query.includes(:targets).references(:targets)
|
||||
union_conditions << Mdm::Module::Target.arel_table[:name].matches_any(formatted_values)
|
||||
when 'text'
|
||||
formatted_values = match_values(value_set)
|
||||
|
@ -240,22 +240,22 @@ module Msf::DBManager::ModuleCache
|
|||
union_conditions << module_details[:fullname].matches_any(formatted_values)
|
||||
union_conditions << module_details[:name].matches_any(formatted_values)
|
||||
|
||||
query = query.includes(:actions)
|
||||
query = query.includes(:actions).references(:actions)
|
||||
union_conditions << Mdm::Module::Action.arel_table[:name].matches_any(formatted_values)
|
||||
|
||||
query = query.includes(:archs)
|
||||
query = query.includes(:archs).references(:archs)
|
||||
union_conditions << Mdm::Module::Arch.arel_table[:name].matches_any(formatted_values)
|
||||
|
||||
query = query.includes(:authors)
|
||||
query = query.includes(:authors).references(:authors)
|
||||
union_conditions << Mdm::Module::Author.arel_table[:name].matches_any(formatted_values)
|
||||
|
||||
query = query.includes(:platforms)
|
||||
query = query.includes(:platforms).references(:platforms)
|
||||
union_conditions << Mdm::Module::Platform.arel_table[:name].matches_any(formatted_values)
|
||||
|
||||
query = query.includes(:refs)
|
||||
query = query.includes(:refs).references(:refs)
|
||||
union_conditions << Mdm::Module::Ref.arel_table[:name].matches_any(formatted_values)
|
||||
|
||||
query = query.includes(:targets)
|
||||
query = query.includes(:targets).references(:targets)
|
||||
union_conditions << Mdm::Module::Target.arel_table[:name].matches_any(formatted_values)
|
||||
when 'type'
|
||||
formatted_values = match_values(value_set)
|
||||
|
@ -275,7 +275,7 @@ module Msf::DBManager::ModuleCache
|
|||
when 'ref'
|
||||
formatted_values = match_values(value_set)
|
||||
|
||||
query = query.includes(:refs)
|
||||
query = query.includes(:refs).references(:refs)
|
||||
union_conditions << Mdm::Module::Ref.arel_table[:name].matches_any(formatted_values)
|
||||
when 'cve', 'bid', 'osvdb', 'edb'
|
||||
formatted_values = value_set.collect { |value|
|
||||
|
@ -284,7 +284,7 @@ module Msf::DBManager::ModuleCache
|
|||
"#{prefix}-%#{value}%"
|
||||
}
|
||||
|
||||
query = query.includes(:refs)
|
||||
query = query.includes(:refs).references(:refs)
|
||||
union_conditions << Mdm::Module::Ref.arel_table[:name].matches_any(formatted_values)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -30,7 +30,7 @@ module Msf::DBManager::Workspace
|
|||
|
||||
def workspaces
|
||||
::ActiveRecord::Base.connection_pool.with_connection {
|
||||
::Mdm::Workspace.order('updated_at asc').all
|
||||
::Mdm::Workspace.order('updated_at asc').load
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1033,7 +1033,7 @@ class Db
|
|||
|
||||
::ActiveRecord::Base.connection_pool.with_connection {
|
||||
query = Metasploit::Credential::Core.where( workspace_id: framework.db.workspace )
|
||||
query = query.includes(:private, :public, :logins)
|
||||
query = query.includes(:private, :public, :logins).references(:private, :public, :logins)
|
||||
query = query.includes(logins: [ :service, { service: :host } ])
|
||||
|
||||
if type.present?
|
||||
|
|
|
@ -61,14 +61,14 @@ Gem::Specification.new do |spec|
|
|||
# Metasm compiler/decompiler/assembler
|
||||
spec.add_runtime_dependency 'metasm', '~> 1.0.2'
|
||||
# Metasploit::Concern hooks
|
||||
spec.add_runtime_dependency 'metasploit-concern', '1.0.0'
|
||||
spec.add_runtime_dependency 'metasploit-concern'
|
||||
# Metasploit::Credential database models
|
||||
spec.add_runtime_dependency 'metasploit-credential', '1.0.1'
|
||||
spec.add_runtime_dependency 'metasploit-credential', '1.1.0'
|
||||
# Database models shared between framework and Pro.
|
||||
spec.add_runtime_dependency 'metasploit_data_models', '1.2.11'
|
||||
spec.add_runtime_dependency 'metasploit_data_models', '1.3.0'
|
||||
# Things that would normally be part of the database model, but which
|
||||
# are needed when there's no database
|
||||
spec.add_runtime_dependency 'metasploit-model', '1.0.0'
|
||||
spec.add_runtime_dependency 'metasploit-model', '1.1.0'
|
||||
# Needed for Meterpreter
|
||||
spec.add_runtime_dependency 'metasploit-payloads', '1.1.2'
|
||||
# Needed by msfgui and other rpc components
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
FactoryGirl.modify do
|
||||
factory :mdm_module_detail do
|
||||
ignore do
|
||||
transient do
|
||||
root {
|
||||
Metasploit::Framework.root
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue