Skip to content

rust/rack-jpmobile

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

= rack-jpmobile
useful middlewares for rack with jpmobile.

== Synopsis
+Rack::Request::Jpmobile+ ( adding mobile method to Rack::Request ).
  require 'rack/jpmobile'
  class YourApp
    def call env
      req = Rack::Request::Jpmobile.new env
      if req.mobile?
        # do mobile
      else
      end
    end
  end

+Rack::Auth::Jpmobile+ ( restrict access with ident_subscriber or career ip address )
  in your_app.ru
    require 'rack/jpmobile'
    use Rack::Auth::Jpmobile::Docomo, :ident => %w( xxxxx )
  
    # with block
    use Rack::Auth::Jpmobile do |req|
      if req.moible?
        # do something ...
      end
    end

+Rack::Jpmobile::CombinedLogger+ ( for debugging mobie app )
  in your_app.ru
    require 'rack/jpmobile'

    class Rack::CommonLogger
      include Rack::Jpmobile::CombinedLogger
    end

    use Rack::CommonLogger, STDERR

== SEE ALSO

jpmobile < http://jpmobile-rails.org/ >

== Description

== Installation

=== Archive Installation

This package depend on edge jpmobile . 
So please checkout from git repos and install it before install.

  git clone git://github.com/darashi/jpmobile.git
  cd jpmobile
  rake package
  sudo gem install pkg/jpmobile-0.0.2.gem
  cd ../
	rake install

=== Gem Installation

	gem install rack-jpmobile

== Features/Problems

== Copyright

Author::    Keiji, Yoshimi <walf443 at gmail.com>
Copyright:: Copyright (c) 2008 Keiji, Yoshimi
License:: you can redistribute it and/or modify it under the same terms as Ruby itself.

About

useful middlewares for rack with jpmobile

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%