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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OGI4NmEzOGFiOTFlM2JhNDllYTcxNWJiZTRjMzkyYmNhMWMxOGYyOQ==
4
+ OGQ2NWJkNDk1ZWRlZmFkM2M3YzQxNmNhM2Q1NWM2NDY0YmFkNDg0Zg==
5
5
  data.tar.gz: !binary |-
6
- OTM0NTJiZTVjMGMwZTIwZWYyNmQzNGEwMTQ5MTIyOTAyMGQ4ZjAwOQ==
6
+ MjY4YWJiNTg1MmYzZWFlN2U5YzdkOWRkOTQ4Y2MzYzhhNmU3NGJiOQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZDU4NTJlYmQ3YjEyYmJjNWYyYzFjNDA1ZmZiZWM0MmNjM2VhMzJkNmY1ODdm
10
- MjkxZmEzY2M0YmRlOTljZDc3NmRlZWZhMTRhNzA5YjRkNTYwYjAxMDA4M2I0
11
- MDdmZDA0MjQ2Mzc5MTQ1NTU1NDQ1MGE3OWVmNDAxOWE3OGExZDA=
9
+ NTA2MmIyMjQ5MTBkZjU5NDlkMWQyYWU2OTcxMTM2NzYxNTVkYmQ0Yzc1YThk
10
+ NmJjZjI4YWE3MTliZDI4YWQ5NmQwMmRmZjE2ZTkyMDE0ODk4NDVmZmQxNGQy
11
+ YThhNGQyM2E1YzQ5MmM0MzMyZDg5YjQ5Y2I2NDU4NjA5MTNjZjM=
12
12
  data.tar.gz: !binary |-
13
- YjJmYWJjZmMzN2EzMGEwZjVkMjVlODhmOGM0ZWUwOWZjNjY4MjBiYWY5YmE4
14
- NjQ2YzJkM2VkMmUwZGFhOTBhMDU3MGIwMzQ1ZjlhNjRhNWZlMzI1YTI3OWU0
15
- MmY5NzYxOGU5MDYyMjQ2MmExNDIwYjFjNmQzMjNmNzFmOGY5NTA=
13
+ YjAxNmU4NjY2YmY4YmI0Zjc5YmE1ZGY3NTQzNGZjZjc5MDE3M2U5MTdiYTQw
14
+ YjQ0NTAzMjczYWU0YjE4MzYwYjI1MTUwNmNhZTc4OWE5YzcwMGUzZmVmOGRl
15
+ N2Q5ZDAyZjQ5OTBjOWM0ZTFmYzk3ZGY1MDNhMmZkY2EwZmEwZDU=
@@ -11,10 +11,7 @@ require 'active_support/lazy_load_hooks'
11
11
  # Project
12
12
  #
13
13
 
14
- # Only include the Rails engine when using Rails. This is for compatibility with metasploit-framework.
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
- begin
2
- require 'rails'
3
- rescue LoadError => error
4
- warn "rails could not be loaded, so Metasploit::Concern::Engine will not be defined: #{error}"
5
- else
6
- module Metasploit
7
- module Concern
8
- class Engine < ::Rails::Engine
9
- #
10
- # `config`
11
- #
12
-
13
- # @see http://viget.com/extend/rails-engine-testing-with-rspec-capybara-and-factorygirl
14
- config.generators do |g|
15
- g.assets false
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
- # `initializer`s
22
- #
17
+ #
18
+ # `initializer`s
19
+ #
23
20
 
24
- initializer 'metasploit_concern.load_concerns' do
25
- application = Rails.application
26
- engines = application.railties.engines
21
+ initializer 'metasploit_concern.load_concerns' do
22
+ application = Rails.application
23
+ engines = application.railties.engines
27
24
 
28
- # application is an engine
29
- engines = [application, *engines]
25
+ # application is an engine
26
+ engines = [application, *engines]
30
27
 
31
- engines.each do |engine|
32
- concerns_path = engine.paths['app/concerns']
28
+ engines.each do |engine|
29
+ concerns_path = engine.paths['app/concerns']
33
30
 
34
- if concerns_path
35
- concerns_directories = concerns_path.existent_directories
36
- else
37
- # app/concerns is not set, so just derive it from root. Cannot derive from app because it will glob app/models too
38
- concerns_directories = [engine.root.join('app', 'concerns').to_path]
39
- end
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
- concerns_directories.each do |concerns_directory|
42
- concerns_pathname = Pathname.new(concerns_directory)
43
- loader = Metasploit::Concern::Loader.new(root: concerns_pathname)
44
- loader.register
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 = 1
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.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-07-03 00:00:00.000000000 Z
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: '0'
83
+ version: 1.3.1
70
84
  requirements: []
71
85
  rubyforge_project:
72
86
  rubygems_version: 2.2.2