KITAITI Makoto
null+****@clear*****
Thu Dec 25 01:34:29 JST 2014
KITAITI Makoto 2014-12-25 01:34:29 +0900 (Thu, 25 Dec 2014) New Revision: a98144ea489c240bb15f2ff46a3ff785c22d150c https://github.com/ranguba/epub-searcher/commit/a98144ea489c240bb15f2ff46a3ff785c22d150c Message: Change namespace of Padrino app: Epub -> EPUBSearcher Reasons are: * `Epub` is too general. It might be used by ActiveRecord model class or so on. * It becomes easy to access to lib classes such like `RemoteDatabase` from Padrino application Modified files: .components app/app.rb app/controllers/main-controller.rb bin/es-register config/apps.rb test/epub-searcher/remote_database_test.rb test/test_config.rb Modified: .components (+1 -1) =================================================================== --- .components 2014-12-25 01:30:21 +0900 (5f6f87a) +++ .components 2014-12-25 01:34:29 +0900 (3dfa172) @@ -5,5 +5,5 @@ :script: none :renderer: haml :stylesheet: scss -:namespace: Epub +:namespace: EPUBSearcher :migration_format: number Modified: app/app.rb (+1 -1) =================================================================== --- app/app.rb 2014-12-25 01:30:21 +0900 (657c1dd) +++ app/app.rb 2014-12-25 01:34:29 +0900 (668cf39) @@ -1,4 +1,4 @@ -module Epub +module EPUBSearcher class App < Padrino::Application register ScssInitializer register Padrino::Rendering Modified: app/controllers/main-controller.rb (+1 -1) =================================================================== --- app/controllers/main-controller.rb 2014-12-25 01:30:21 +0900 (e4476f7) +++ app/controllers/main-controller.rb 2014-12-25 01:34:29 +0900 (ee93d90) @@ -1,6 +1,6 @@ require 'groonga/client' -Epub::App.controllers do +EPUBSearcher::App.controllers do layout :layout get :index do Modified: bin/es-register (+2 -2) =================================================================== --- bin/es-register 2014-12-25 01:30:21 +0900 (102ae49) +++ bin/es-register 2014-12-25 01:34:29 +0900 (2dc0385) @@ -11,8 +11,8 @@ end require_relative '../config/boot' db_options = { - host: Epub::App.settings.droonga_host, - port: Epub::App.settings.droonga_port, + host: EPUBSearcher::App.settings.droonga_host, + port: EPUBSearcher::App.settings.droonga_port, } db = EPUBSearcher::RemoteDatabase.new(db_options) db.setup_database Modified: config/apps.rb (+1 -1) =================================================================== --- config/apps.rb 2014-12-25 01:30:21 +0900 (aa55a1e) +++ config/apps.rb 2014-12-25 01:34:29 +0900 (b17e48d) @@ -35,4 +35,4 @@ Padrino.configure_apps do end # Mounts the core application for this project -Padrino.mount('Epub::App', :app_file => Padrino.root('app/app.rb')).to('/') +Padrino.mount('EPUBSearcher::App', :app_file => Padrino.root('app/app.rb')).to('/') Modified: test/epub-searcher/remote_database_test.rb (+2 -2) =================================================================== --- test/epub-searcher/remote_database_test.rb 2014-12-25 01:30:21 +0900 (df29733) +++ test/epub-searcher/remote_database_test.rb 2014-12-25 01:34:29 +0900 (5c697c0) @@ -3,8 +3,8 @@ require 'epub-searcher/remote-database' class TestRemoteDatabase < Test::Unit::TestCase def setup db_options = { - host: Epub::App.settings.droonga_host, - port: Epub::App.settings.droonga_port + host: EPUBSearcher::App.settings.droonga_host, + port: EPUBSearcher::App.settings.droonga_port } @database = EPUBSearcher::RemoteDatabase.new(db_options) end Modified: test/test_config.rb (+3 -3) =================================================================== --- test/test_config.rb 2014-12-25 01:30:21 +0900 (f401ad7) +++ test/test_config.rb 2014-12-25 01:34:29 +0900 (e881a90) @@ -13,9 +13,9 @@ class Test::Unit::TestCase # You can use this method to custom specify a Rack app # you want rack-test to invoke: # - # app Epub::App - # app Epub::App.tap { |a| } - # app(Epub::App) do + # app EPUBSearcher::App + # app EPUBSearcher::App.tap { |a| } + # app(EPUBSearcher::App) do # set :foo, :bar # end # -------------- next part -------------- HTML����������������������������...Download