motion_wechat 0.0.1 → 0.0.4

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.
@@ -7,7 +7,7 @@ module MotionWechat
7
7
  end
8
8
 
9
9
  def handle_openURL(url, delegate)
10
- WXApi.handleOpenURL(url, delegate:self)
10
+ WXApi.handleOpenURL(url, delegate:delegate)
11
11
  end
12
12
 
13
13
  end
@@ -1,5 +1,5 @@
1
1
  module MotionWechat
2
- class Delegate
2
+ module Delegate
3
3
 
4
4
  def onReq
5
5
  title = 'onReq'
@@ -1,8 +1,8 @@
1
1
  module MotionWechat
2
- class Interface
2
+ module Interface
3
3
 
4
- def send_image_content(image_path, opts = {})
5
- sendImageContent(image_path, opts = {})
4
+ def send_image_content(image_path = '', image_data = nil, opts = {})
5
+ sendImageContent(image_path, image_data, opts = {})
6
6
  end
7
7
 
8
8
  def send_news_content(page_url, opts = {})
@@ -25,11 +25,12 @@ module MotionWechat
25
25
  sendAppContent(ext_info, url, data, opts = {})
26
26
  end
27
27
 
28
- def sendImageContent(image_path, opts = {})
28
+ def sendImageContent(image_path = '', image_data = nil, opts = {})
29
29
  message = media_message(opts)
30
30
 
31
31
  ext = WXImageObject.object
32
- ext.imageData = NSData.dataWithContentsOfFile(image_path)
32
+ ext.imageData = NSData.dataWithContentsOfFile(image_path) if image_path
33
+ ext.imageData = image_data if image_data
33
34
 
34
35
  message.mediaObject = ext
35
36
 
@@ -1,3 +1,3 @@
1
1
  module MotionWechat
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motion_wechat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-11 00:00:00.000000000 Z
12
+ date: 2012-10-12 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: A rubymotion wrapper for wechat SDK
15
15
  email:
@@ -47,7 +47,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
47
47
  version: '0'
48
48
  segments:
49
49
  - 0
50
- hash: 1516276133035387268
50
+ hash: -476948263588037750
51
51
  required_rubygems_version: !ruby/object:Gem::Requirement
52
52
  none: false
53
53
  requirements:
@@ -56,7 +56,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
56
56
  version: '0'
57
57
  segments:
58
58
  - 0
59
- hash: 1516276133035387268
59
+ hash: -476948263588037750
60
60
  requirements: []
61
61
  rubyforge_project:
62
62
  rubygems_version: 1.8.24