RubyApp 0.0.51 → 0.0.52

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/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- RubyApp (0.0.51)
4
+ RubyApp (0.0.52)
5
5
  BlueCloth
6
6
  chronic
7
7
  chronic_duration
@@ -31,7 +31,7 @@ GEM
31
31
  rack-test (>= 0.5.4)
32
32
  selenium-webdriver (~> 2.0)
33
33
  xpath (~> 0.1.4)
34
- childprocess (0.2.3)
34
+ childprocess (0.2.4)
35
35
  ffi (~> 1.0.6)
36
36
  chronic (0.6.6)
37
37
  chronic_duration (0.9.6)
@@ -50,7 +50,7 @@ GEM
50
50
  gherkin (2.7.1)
51
51
  json (>= 1.4.6)
52
52
  haml (3.1.4)
53
- json (1.6.3)
53
+ json (1.6.4)
54
54
  launchy (2.0.5)
55
55
  addressable (~> 2.2.6)
56
56
  mime-types (1.17.2)
@@ -58,7 +58,7 @@ GEM
58
58
  nokogiri (1.5.0)
59
59
  numerizer (0.1.1)
60
60
  r18n-core (0.4.13)
61
- rack (1.3.5)
61
+ rack (1.4.0)
62
62
  rack-test (0.6.1)
63
63
  rack (>= 1.0)
64
64
  rake (0.9.2.2)
@@ -74,7 +74,7 @@ GEM
74
74
  ruby-event (1.0.0)
75
75
  ruby-openid (2.1.8)
76
76
  rubyzip (0.9.5)
77
- sass (3.1.11)
77
+ sass (3.1.12)
78
78
  selenium-webdriver (2.15.0)
79
79
  childprocess (>= 0.2.1)
80
80
  ffi (~> 1.0.9)
@@ -43,9 +43,11 @@ module RubyApp
43
43
  _options.translations_paths = [File.join(RubyApp::ROOT, %w[translations])] + ( _options.translations_paths.is_a?(Array) ? _options.translations_paths : [_options.translations_paths] )
44
44
  @@_application = _options.application_class.new(_options)
45
45
  @@_application.start!
46
+ RubyApp::Log.debug("#{self}##{__method__} options=#{_options.inspect}")
46
47
  end
47
48
 
48
49
  def self.destroy!
50
+ RubyApp::Log.debug("#{self}##{__method__}")
49
51
  @@_application.stop!
50
52
  @@_application = nil
51
53
  end
@@ -1,4 +1,4 @@
1
- #\ --warn --port 8008 --pid ./rack.pid
1
+ #\ --warn --port 8008 --pid ./rack.pid --debug true
2
2
  require 'rubygems'
3
3
  require 'bundler/setup'
4
4
 
@@ -13,6 +13,9 @@ use Rack::Session::Pool
13
13
  use Rack::Reloader
14
14
  use Rack::ContentLength
15
15
 
16
+ use RubyApp::Rack::Application
17
+ run RubyApp::Rack::Route.new
18
+
16
19
  map '/favicon.ico' do
17
20
  run Rack::File.new(File.join(RubyApp::ROOT, %w[resources favicon.ico]))
18
21
  end
@@ -20,8 +23,3 @@ end
20
23
  map '/ruby_app/resources' do
21
24
  run Rack::File.new(File.join(RubyApp::ROOT, %w[resources]))
22
25
  end
23
-
24
- map '/' do
25
- use RubyApp::Rack::Application
26
- run RubyApp::Rack::Route.new
27
- end
@@ -2,6 +2,7 @@ require 'yaml'
2
2
 
3
3
  module RubyApp
4
4
  require 'ruby_app/application'
5
+ require 'ruby_app/log'
5
6
  require 'ruby_app/mixins/delegate_mixin'
6
7
  require 'ruby_app/mixins/hash_mixin'
7
8
 
@@ -16,9 +17,11 @@ module RubyApp
16
17
 
17
18
  def self.load!
18
19
  @@_configuration = RubyApp::Configuration.new(RubyApp::Application.options.configuration_paths)
20
+ RubyApp::Log.debug("#{self}##{__method__} paths=#{RubyApp::Application.options.configuration_paths.inspect}")
19
21
  end
20
22
 
21
23
  def self.unload!
24
+ RubyApp::Log.debug("#{self}##{__method__}")
22
25
  @@_configuration = nil
23
26
  end
24
27
 
data/lib/ruby_app/log.rb CHANGED
@@ -30,6 +30,7 @@ module RubyApp
30
30
  end
31
31
 
32
32
  def self.close!
33
+ @@_log.debug("#{self}##{__method__}")
33
34
  @@_log.close if @@_log
34
35
  @@_log = nil
35
36
  end
@@ -20,9 +20,6 @@ module RubyApp
20
20
  extend RubyApp::Mixins::RouteMixin
21
21
 
22
22
  def call(environment)
23
- #RubyApp::Log.debug("#{self.class}##{__method__} sleeping ...")
24
- #sleep(5)
25
- #RubyApp::Log.debug("#{self.class}##{__method__} ... done")
26
23
  self.class.do_route(RubyApp::Request.request_method, RubyApp::Request.path)
27
24
  end
28
25
 
@@ -19,6 +19,14 @@ use Rack::Session::Pool
19
19
  use Rack::Reloader
20
20
  use Rack::ContentLength
21
21
 
22
+ use RubyApp::Rack::Application, :application_class => _APPLICATION_UPCODE_::Application,
23
+ :session_class => _APPLICATION_UPCODE_::Session,
24
+ :log_path => File.join(_APPLICATION_UPCODE_::ROOT, %w[log application.log]),
25
+ :configuration_paths => File.join(_APPLICATION_UPCODE_::ROOT, %w[config.yml]),
26
+ :default_language => :en,
27
+ :translations_paths => File.join(_APPLICATION_UPCODE_::ROOT, %w[translations])
28
+ run RubyApp::Rack::Route.new
29
+
22
30
  map '/favicon.ico' do
23
31
  run Rack::File.new(File.join(RubyApp::ROOT, %w[resources favicon.ico]))
24
32
  end
@@ -30,13 +38,3 @@ end
30
38
  map '/_APPLICATION_DOWNCODE_/resources' do
31
39
  run Rack::File.new(File.join(_APPLICATION_UPCODE_::ROOT, %w[resources]))
32
40
  end
33
-
34
- map '/' do
35
- use RubyApp::Rack::Application, :application_class => _APPLICATION_UPCODE_::Application,
36
- :session_class => _APPLICATION_UPCODE_::Session,
37
- :log_path => File.join(_APPLICATION_UPCODE_::ROOT, %w[log application.log]),
38
- :configuration_paths => File.join(_APPLICATION_UPCODE_::ROOT, %w[config.yml]),
39
- :default_language => :en,
40
- :translations_paths => File.join(_APPLICATION_UPCODE_::ROOT, %w[translations])
41
- run RubyApp::Rack::Route.new
42
- end
@@ -1,4 +1,4 @@
1
1
  module RubyApp
2
- VERSION = "0.0.51"
2
+ VERSION = "0.0.52"
3
3
  ROOT = File.expand_path(File.dirname(__FILE__))
4
4
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: RubyApp
3
3
  version: !ruby/object:Gem::Version
4
- hash: 121
4
+ hash: 119
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 51
10
- version: 0.0.51
9
+ - 52
10
+ version: 0.0.52
11
11
  platform: ruby
12
12
  authors:
13
13
  - Frank G. Ficnar
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-12-27 00:00:00 Z
18
+ date: 2011-12-29 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  prerelease: false