metasploit-concern 0.1.1 → 0.2.1.pre.dep.pre.railties
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/metasploit/concern.rb +1 -4
- data/lib/metasploit/concern/engine.rb +38 -41
- data/lib/metasploit/concern/version.rb +14 -1
- metadata +18 -4
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OGQ2NWJkNDk1ZWRlZmFkM2M3YzQxNmNhM2Q1NWM2NDY0YmFkNDg0Zg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MjY4YWJiNTg1MmYzZWFlN2U5YzdkOWRkOTQ4Y2MzYzhhNmU3NGJiOQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NTA2MmIyMjQ5MTBkZjU5NDlkMWQyYWU2OTcxMTM2NzYxNTVkYmQ0Yzc1YThk
|
10
|
+
NmJjZjI4YWE3MTliZDI4YWQ5NmQwMmRmZjE2ZTkyMDE0ODk4NDVmZmQxNGQy
|
11
|
+
YThhNGQyM2E1YzQ5MmM0MzMyZDg5YjQ5Y2I2NDU4NjA5MTNjZjM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YjAxNmU4NjY2YmY4YmI0Zjc5YmE1ZGY3NTQzNGZjZjc5MDE3M2U5MTdiYTQw
|
14
|
+
YjQ0NTAzMjczYWU0YjE4MzYwYjI1MTUwNmNhZTc4OWE5YzcwMGUzZmVmOGRl
|
15
|
+
N2Q5ZDAyZjQ5OTBjOWM0ZTFmYzk3ZGY1MDNhMmZkY2EwZmEwZDU=
|
data/lib/metasploit/concern.rb
CHANGED
@@ -11,10 +11,7 @@ require 'active_support/lazy_load_hooks'
|
|
11
11
|
# Project
|
12
12
|
#
|
13
13
|
|
14
|
-
|
15
|
-
if defined? Rails
|
16
|
-
require 'metasploit/concern/engine'
|
17
|
-
end
|
14
|
+
require 'metasploit/concern/engine'
|
18
15
|
|
19
16
|
require 'metasploit/concern/version'
|
20
17
|
|
@@ -1,53 +1,50 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
g.helper false
|
17
|
-
g.test_framework :rspec, fixture: false
|
18
|
-
end
|
1
|
+
require 'rails'
|
2
|
+
module Metasploit
|
3
|
+
module Concern
|
4
|
+
|
5
|
+
class Engine < ::Rails::Engine
|
6
|
+
#
|
7
|
+
# `config`
|
8
|
+
#
|
9
|
+
|
10
|
+
# @see http://viget.com/extend/rails-engine-testing-with-rspec-capybara-and-factorygirl
|
11
|
+
config.generators do |g|
|
12
|
+
g.assets false
|
13
|
+
g.helper false
|
14
|
+
g.test_framework :rspec, fixture: false
|
15
|
+
end
|
19
16
|
|
20
|
-
|
21
|
-
|
22
|
-
|
17
|
+
#
|
18
|
+
# `initializer`s
|
19
|
+
#
|
23
20
|
|
24
|
-
|
25
|
-
|
26
|
-
|
21
|
+
initializer 'metasploit_concern.load_concerns' do
|
22
|
+
application = Rails.application
|
23
|
+
engines = application.railties.engines
|
27
24
|
|
28
|
-
|
29
|
-
|
25
|
+
# application is an engine
|
26
|
+
engines = [application, *engines]
|
30
27
|
|
31
|
-
|
32
|
-
|
28
|
+
engines.each do |engine|
|
29
|
+
concerns_path = engine.paths['app/concerns']
|
33
30
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
31
|
+
if concerns_path
|
32
|
+
concerns_directories = concerns_path.existent_directories
|
33
|
+
else
|
34
|
+
# app/concerns is not set, so just derive it from root. Cannot
|
35
|
+
# derive from app because it will glob app/models too
|
36
|
+
concerns_directories = [engine.root.join('app', 'concerns').to_path]
|
37
|
+
end
|
40
38
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
end
|
39
|
+
concerns_directories.each do |concerns_directory|
|
40
|
+
concerns_pathname = Pathname.new(concerns_directory)
|
41
|
+
loader = Metasploit::Concern::Loader.new(root: concerns_pathname)
|
42
|
+
loader.register
|
46
43
|
end
|
47
44
|
end
|
48
|
-
|
49
|
-
isolate_namespace Metasploit::Concern
|
50
45
|
end
|
46
|
+
|
47
|
+
isolate_namespace Metasploit::Concern
|
51
48
|
end
|
52
49
|
end
|
53
50
|
end
|
@@ -5,9 +5,10 @@ module Metasploit
|
|
5
5
|
# The major version number.
|
6
6
|
MAJOR = 0
|
7
7
|
# The minor version number, scoped to the {MAJOR} version number.
|
8
|
-
MINOR =
|
8
|
+
MINOR = 2
|
9
9
|
# The patch number, scoped to the {MINOR} version number.
|
10
10
|
PATCH = 1
|
11
|
+
PRERELEASE = 'dep-railties'
|
11
12
|
|
12
13
|
# The full version string, including the {MAJOR}, {MINOR}, {PATCH}, and optionally, the `PRERELEASE` in the
|
13
14
|
# {http://semver.org/spec/v2.0.0.html semantic versioning v2.0.0} format.
|
@@ -23,8 +24,20 @@ module Metasploit
|
|
23
24
|
|
24
25
|
version
|
25
26
|
end
|
27
|
+
|
28
|
+
# The full gem version string, including the {MAJOR}, {MINOR}, {PATCH}, and optionally, the {PRERELEASE} in the
|
29
|
+
# {http://guides.rubygems.org/specification-reference/#version RubyGems versioning} format.
|
30
|
+
#
|
31
|
+
# @return [String] '{MAJOR}.{MINOR}.{PATCH}' on master. '{MAJOR}.{MINOR}.{PATCH}.{PRERELEASE}' on any branch
|
32
|
+
# other than master.
|
33
|
+
def self.gem
|
34
|
+
full.gsub('-', '.pre.')
|
35
|
+
end
|
26
36
|
end
|
27
37
|
|
38
|
+
# @see Version.gem
|
39
|
+
GEM_VERSION = Version.gem
|
40
|
+
|
28
41
|
# @see Version.full
|
29
42
|
VERSION = Version.full
|
30
43
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metasploit-concern
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.2.1.pre.dep.pre.railties
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luke Imhoff
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-09-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -30,6 +30,20 @@ dependencies:
|
|
30
30
|
- - ! '>='
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 3.0.0
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: railties
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - <
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: 4.0.0
|
40
|
+
type: :runtime
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - <
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 4.0.0
|
33
47
|
description: Automatically includes Modules from app/concerns/<module_with_concerns>/<concern>.rb
|
34
48
|
into <module_with_concerns> to ease monkey-patching associations and validations
|
35
49
|
on ActiveRecord::Base descendents from other gems when layering schemas.
|
@@ -64,9 +78,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
64
78
|
version: '0'
|
65
79
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
66
80
|
requirements:
|
67
|
-
- - ! '
|
81
|
+
- - ! '>'
|
68
82
|
- !ruby/object:Gem::Version
|
69
|
-
version:
|
83
|
+
version: 1.3.1
|
70
84
|
requirements: []
|
71
85
|
rubyforge_project:
|
72
86
|
rubygems_version: 2.2.2
|