Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Modified the way that the platform is configured.

  • Loading branch information...
commit 4bbee601cdc7a6add8d4ef25a898e236b162ec4b 1 parent 433a24f
@bananagi bananagi authored
View
6 lib/opensocial-wap/platform.rb
@@ -1,6 +1,8 @@
module OpensocialWap
- class Platform
- def initialize(config)
+ module Platform
+ extend self
+
+ def configure(config)
@config = config
@session = true
end
View
6 lib/opensocial-wap/platform/gree.rb
@@ -1,7 +1,9 @@
module OpensocialWap
- class Platform
+ module Platform
+ extend self
- def gree(&block)
+ def gree(config, &block)
+ configure(config)
@sandbox = false
instance_eval(&block)
View
6 lib/opensocial-wap/platform/mixi.rb
@@ -1,7 +1,9 @@
module OpensocialWap
- class Platform
+ module Platform
+ extend self
- def mixi(&block)
+ def mixi(config, &block)
+ @config = config
@access_from_pc = false
instance_eval(&block)
View
8 lib/opensocial-wap/platform/mobage.rb
@@ -1,7 +1,9 @@
module OpensocialWap
- class Platform
-
- def mobage(&block)
+ module Platform
+ extend self
+
+ def mobage(config, &block)
+ @config = config
@sandbox = false
instance_eval(&block)
View
4 spec/platform/gree_spec.rb
@@ -5,7 +5,7 @@
describe "gree" do
it "sandbox用に、GREE用の初期化が正しく行えること(セッションOFF)" do
c = Rails::Application::Configuration.new
- OpensocialWap::Platform.new(c).gree do
+ OpensocialWap::Platform.gree(c) do
consumer_key '1234'
consumer_secret 'abcd'
sandbox true
@@ -25,7 +25,7 @@
it "本番用に、GREE用の初期化が正しく行えること(セッションON)" do
c = Rails::Application::Configuration.new
- OpensocialWap::Platform.new(c).gree do
+ OpensocialWap::Platform.gree(c) do
consumer_key '1234'
consumer_secret 'abcd'
sandbox false
View
4 spec/platform/mixi_spec.rb
@@ -5,7 +5,7 @@
describe "mixi" do
it "mixi用の初期化が正しく行えること" do
c = Rails::Application::Configuration.new
- OpensocialWap::Platform.new(c).mixi do
+ OpensocialWap::Platform.mixi(c) do
consumer_key '1234'
consumer_secret 'abcd'
session false
@@ -24,7 +24,7 @@
it "mixi用の初期化が正しく行えること(PCからのテストアクセス用)" do
c = Rails::Application::Configuration.new
- OpensocialWap::Platform.new(c).mixi do
+ OpensocialWap::Platform.mixi(c) do
consumer_key '1234'
consumer_secret 'abcd'
session true
View
4 spec/platform/mobage_spec.rb
@@ -5,7 +5,7 @@
describe "mobage" do
it "sandbox用に、mobage用の初期化が正しく行えること(セッションOFF)" do
c = Rails::Application::Configuration.new
- OpensocialWap::Platform.new(c).mobage do
+ OpensocialWap::Platform.mobage(c) do
consumer_key '1234'
consumer_secret 'abcd'
app_id '9999'
@@ -27,7 +27,7 @@
it "本番用に、mobage用の初期化が正しく行えること(セッションON)" do
c = Rails::Application::Configuration.new
- OpensocialWap::Platform.new(c).mobage do
+ OpensocialWap::Platform.mobage(c) do
consumer_key '1234'
consumer_secret 'abcd'
app_id '9999'
Please sign in to comment.
Something went wrong with that request. Please try again.