galapagos_mobile 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/Gemfile CHANGED
@@ -1,7 +1,3 @@
1
1
  source "http://rubygems.org"
2
2
 
3
3
  gemspec
4
-
5
- group :development do
6
- gem 'devise', '>= 1.1.5'
7
- end
data/README.md CHANGED
@@ -12,11 +12,6 @@ jpmobileプラグインを使用した場合に発生する不具合を解消す
12
12
 
13
13
  ## install
14
14
 
15
- ### Rails pluginとしてインストール
16
-
17
- $ rails plugin install git://github.com/matsuda/galapagos_mobile.git
18
-
19
-
20
15
  ### gemとしてインストール
21
16
 
22
17
  Gemfileに以下を記述
@@ -27,6 +22,20 @@ bundle
27
22
 
28
23
  $ bundle
29
24
 
25
+ setupメソッドを実行
26
+ 例えば config/initializers/galapagos_mobile.rb を作って
27
+
28
+ GalapagosMobile.setup
29
+
30
+ と記述する
31
+
32
+ ### Rails pluginとしてインストール
33
+
34
+ (setupメソッドは不要)
35
+
36
+ $ rails plugin install git://github.com/matsuda/galapagos_mobile.git
37
+
38
+
30
39
  ## 実装されている機能
31
40
 
32
41
  * Cookie非対応の携帯でログイン処理を可能にする。
@@ -20,5 +20,4 @@ Gem::Specification.new do |s|
20
20
  s.require_paths = ["lib"]
21
21
 
22
22
  s.date = %q{2011-02-17}
23
- s.add_dependency("jpmobile", ">= 0.1.4")
24
23
  end
data/init.rb CHANGED
@@ -1 +1,2 @@
1
1
  require File.expand_path('../lib/galapagos_mobile', __FILE__)
2
+ GalapagosMobile.setup
@@ -0,0 +1,15 @@
1
+ begin
2
+ require 'jpmobile'
3
+ rescue LoadError, NameError => e
4
+ $stderr.puts "You don't have jpmobile installed in your application. " +
5
+ "Please add it to your Gemfile and run bundle install or rails plugin install from github's repository"
6
+ raise e
7
+ end
8
+
9
+ ActiveSupport.on_load(:action_controller) do
10
+ require 'galapagos_mobile/trans_sid'
11
+ end
12
+
13
+ if defined?(Devise)
14
+ require 'galapagos_mobile/devise'
15
+ end
@@ -1,15 +1 @@
1
- begin
2
- require 'jpmobile'
3
- rescue LoadError, NameError => e
4
- $stderr.puts "You don't have jpmobile installed in your application. " +
5
- "Please add it to your Gemfile and run bundle install or rails plugin install from github's repository"
6
- raise e
7
- end
8
-
9
- ActiveSupport.on_load(:action_controller) do
10
- require 'galapagos_mobile/trans_sid'
11
- end
12
-
13
- if defined?(Devise)
14
- require 'galapagos_mobile/devise'
15
- end
1
+ require 'galapagos_mobile/jpmobile'
@@ -1,3 +1,3 @@
1
1
  module GalapagosMobile
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -2,8 +2,15 @@ $:.unshift(File.dirname(__FILE__)) unless $:.include?(File.dirname(__FILE__)) ||
2
2
  $:.include?(File.expand_path(File.dirname(__FILE__)))
3
3
 
4
4
  module GalapagosMobile
5
- end
5
+ class << self
6
+ def add_features_to_rails
7
+ if defined?(Rails)
8
+ require 'galapagos_mobile/rails'
9
+ end
10
+ end
6
11
 
7
- if defined?(Rails)
8
- require 'galapagos_mobile/rails'
12
+ def setup
13
+ add_features_to_rails
14
+ end
15
+ end
9
16
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: galapagos_mobile
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.4
5
+ version: 0.0.5
6
6
  platform: ruby
7
7
  authors:
8
8
  - Kosuke Matsuda
@@ -12,18 +12,8 @@ cert_chain: []
12
12
 
13
13
  date: 2011-02-17 00:00:00 +09:00
14
14
  default_executable:
15
- dependencies:
16
- - !ruby/object:Gem::Dependency
17
- name: jpmobile
18
- prerelease: false
19
- requirement: &id001 !ruby/object:Gem::Requirement
20
- none: false
21
- requirements:
22
- - - ">="
23
- - !ruby/object:Gem::Version
24
- version: 0.1.4
25
- type: :runtime
26
- version_requirements: *id001
15
+ dependencies: []
16
+
27
17
  description: A Ruby on Rails plugin to patch jpmobile
28
18
  email:
29
19
  - hi@matsuda.me
@@ -45,6 +35,7 @@ files:
45
35
  - install.rb
46
36
  - lib/galapagos_mobile.rb
47
37
  - lib/galapagos_mobile/devise.rb
38
+ - lib/galapagos_mobile/jpmobile.rb
48
39
  - lib/galapagos_mobile/rails.rb
49
40
  - lib/galapagos_mobile/trans_sid.rb
50
41
  - lib/galapagos_mobile/version.rb