dns_guru 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. data/Rakefile +1 -1
  2. data/init.rb +1 -41
  3. data/rails/init.rb +1 -1
  4. metadata +1 -1
data/Rakefile CHANGED
@@ -23,7 +23,7 @@ PKG_FILES = FileList[
23
23
 
24
24
  spec = Gem::Specification.new do |s|
25
25
  s.name = "dns_guru"
26
- s.version = "0.1.1"
26
+ s.version = "0.1.2"
27
27
  s.author = "Dns Guru"
28
28
  s.email = "ken.miller@gmail.com"
29
29
  s.homepage = "http://github.com/kemiller/dns_guru"
data/init.rb CHANGED
@@ -1,42 +1,2 @@
1
1
 
2
- $: << File.join(File.dirname(__FILE__), "lib")
3
- require 'dns_guru'
4
- require 'rack'
5
- require 'action_controller/test_process'
6
-
7
- begin
8
- config_files = [
9
- File.join(File.dirname(__FILE__), "..","..","..","config","hosts.rb"),
10
- File.join(File.dirname(__FILE__), "..","..","..","..","config","hosts.rb")
11
- ]
12
- if const_defined?(:Rails)
13
- config_files << File.join(Rails.root, "config","hosts.rb")
14
- end
15
- config_files.detect do |config_file|
16
- if File.exists?(config_file)
17
- DnsGuru.init(config_file)
18
- true
19
- end
20
- end
21
- rescue Exception => e
22
- puts "Could not load dns_guru config file (hosts.rb): #{e}"
23
- end
24
-
25
- class Rack::Request
26
- include DnsGuru::RequestMixin
27
- end
28
-
29
- class ActionController::Request
30
- include DnsGuru::RequestMixin
31
- end
32
-
33
- class ActionController::TestRequest
34
- include DnsGuru::RequestMixin
35
- end
36
-
37
- class ActionController::Base
38
- include DnsGuru::ControllerMixin
39
-
40
- helper_method :host_name
41
- helper_method :host_name_params
42
- end
2
+ require File.join(File.dirname(__FILE__), "lib", "init.rb")
data/rails/init.rb CHANGED
@@ -9,7 +9,7 @@ begin
9
9
  File.join(File.dirname(__FILE__), "..","..","..","config","hosts.rb"),
10
10
  File.join(File.dirname(__FILE__), "..","..","..","..","config","hosts.rb")
11
11
  ]
12
- if const_defined?(:Rails)
12
+ if Object.const_defined?(:Rails)
13
13
  config_files << File.join(Rails.root, "config","hosts.rb")
14
14
  end
15
15
  config_files.detect do |config_file|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dns_guru
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dns Guru