offshore 0.0.4 → 0.0.5

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.
data/lib/offshore.rb CHANGED
@@ -15,6 +15,10 @@ module Offshore
15
15
 
16
16
  def enable!
17
17
  @enabled = true
18
+ if defined?(Rails)
19
+ file = Rails.root.join("config", "environments", "offshore.rb")
20
+ require file if File.exists?(file)
21
+ end
18
22
  end
19
23
 
20
24
  def enabled?
@@ -8,26 +8,10 @@ module Offshore
8
8
  Offshore::Database.init # has its own singleton code
9
9
  end
10
10
 
11
- def init_thread
12
- return if @init_thread
13
- @init_thread = true
14
-
15
- # TODO: move this to a config block
16
- if defined?(Rails)
17
- begin
18
- require Rails.root.join("spec","spec_helper")
19
- rescue
20
- raise
21
- end
22
- end
23
- end
24
-
25
11
  def init
26
- init_thread
27
12
  init_server
28
13
  end
29
14
 
30
-
31
15
  def call(env)
32
16
  if offshore_request?(env)
33
17
  offshore_call(env)
@@ -1,3 +1,3 @@
1
1
  module Offshore
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: offshore
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-27 00:00:00.000000000 Z
12
+ date: 2013-03-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: multi_json