cloopen 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 47ca4b10b13c904f8b63450ded421b2473be1880
4
- data.tar.gz: c7c00248518bfee98a46006a1484db7adeae337d
3
+ metadata.gz: b020f3bca96b0c1d22a3eba48fc956b6880aa423
4
+ data.tar.gz: 31b36a36573fda0161ba06132d9023bc9b20e6d1
5
5
  SHA512:
6
- metadata.gz: b15f0f5adad291e1c0ed144d2f3ef7004ded438a8b897518b9e2be7fea87becfd6775ee8a2abf7e51c54670455be07a7a469a3000ab10e2c13195cce8e4457f4
7
- data.tar.gz: e55b814a0572bc574795b871f9fe1122e59045ae45b76b61e9531ccecd680dbd0b7a6a69297b024e02efc5591b67cd7d72ec2d7db7ff860dea039d14784a18f3
6
+ metadata.gz: d5049e432eb9a1530b93cccd3b41d4383e6a9995f64dfbe84a6d2d0139d5fa413817f85d590f2a3881c6fca53810ae8926aec9783bf673c654c53ac55d06e951
7
+ data.tar.gz: 38c36c3f42d811073803ef7c534574509c7e1b7aa3625eaa4a505f777d5716c4bd7559cbd3ec52046b3c6a70d12b89159b0f6b9d302d30b20b7c7d499ebb3791
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Cloopen
2
2
 
3
- 云通讯发送短信的 Gem.
3
+ 云通讯发送短信的 Gem
4
4
 
5
5
  ## Installation
6
6
 
@@ -44,12 +44,11 @@ Or install it yourself as:
44
44
  ```ruby
45
45
  # config/initialiers/cloopen_setup.rb
46
46
  Cloopen.account_sid = "Your Yuntongxun Account Sid"
47
- Cloopen.auth_token = "Your Yuntongxun Auth token"
48
- Cloopen.app_id = "Your Yuntongxun App id"
49
- Cloopen.env = "production" # 如果是测试环境,填写 "development"
47
+ Cloopen.auth_token = "Your Yuntongxun Auth token"
48
+ Cloopen.app_id = "Your Yuntongxun App id"
49
+ Cloopen.env = "production" # 如果是测试环境,填写 "development"
50
50
  ```
51
51
 
52
-
53
52
  ### 发送短信
54
53
 
55
54
  ```ruby
@@ -57,9 +56,9 @@ Cloopen.env = "production" # 如果是测试环境,填写 "development"
57
56
  ```
58
57
  * 第一个参数是手机号码
59
58
 
60
- * 第二个是模板id。只有模板通过审核后,才可以用这个模板发短信。
59
+ * 第二个是模板id。只能使用已审通过核的模板发短信。
61
60
 
62
- * 第三个是模板中的变量的值。用于替换 `【薄荷网】您的的验证码是{1}` 中的变量。
61
+ * 第三个是模板中的变量的值。用于替换模板中的变量 1 `【薄荷网】您的的验证码是{1}`
63
62
 
64
63
  ## 荣耀归给仨小伙
65
64
 
@@ -20,11 +20,16 @@ module Cloopen
20
20
 
21
21
  sms_url = "#{base_uri}#{Cloopen.account_sid}/SMS/TemplateSMS?sig=#{sig_parameter}"
22
22
 
23
+
24
+ # 不得不说一个很奇葩的问题,java 的强类型弱爆了!
25
+ # 所有的参数必须是 string, integer 会报错 500
26
+ # * 错误的datas: [311233, 112311]
27
+ # * 正确的datas: ["311233", "112311"]
23
28
  payload = {
24
- to: cellphone,
25
- appId: Cloopen.app_id,
26
- templateId: template_id,
27
- datas: contents
29
+ to: cellphone.to_s,
30
+ appId: Cloopen.app_id.to_s,
31
+ templateId: template_id.to_s,
32
+ datas: contents.map(&:to_s)
28
33
  }.to_json
29
34
 
30
35
  header = {
@@ -1,3 +1,3 @@
1
1
  module Cloopen
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloopen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - xiaoronglv
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-22 00:00:00.000000000 Z
11
+ date: 2014-09-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler