qqpush 0.0.7 → 0.0.8

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 99d162dac56d32d724cb95101b085d973659a975
4
- data.tar.gz: 1ef04859ed235272bcd08a55e96c52ebd3fec258
3
+ metadata.gz: 6e5309c16dd2638331b47ebc07423bf37074e86e
4
+ data.tar.gz: 651cb16c7096a9ad4f6afac75fefdfdc239c9628
5
5
  SHA512:
6
- metadata.gz: f234c8258806e9768fd69f5d6cd3c75d9094ebaff5cd4e2ab0b9954993c2208a0388abd268b3023f055f6ff04b8f6ed54b5b5d55d46518b154efc337b7e68fb3
7
- data.tar.gz: 626508cb87a0639899bba1a6cf69bf4c81ae52d40782c7d9c7732ca2572e719a9c2cfb6312455ec14150dfaf231f5c318351e425ad876ba90757b13df6576fb6
6
+ metadata.gz: e97830159a8576d2cdbfd45cf54a23a14397b1f4fb85e4228c3b374cd27086c773544469be3b3fc7a6e9ff63c106f365b01c28486bb4deec7ce2bd5a3d4009e2
7
+ data.tar.gz: c8914306409fb5beb1fbd37c42199eb1b8a4338c30516305d1ea841caefa461e182c21751b066d808b6a2ea0c631780bc08782303873ac640c949ef8e6df298e
data/README.md CHANGED
@@ -21,8 +21,8 @@ message.push_single_device
21
21
  ## 测试
22
22
 
23
23
  ```bash
24
- $ rake init[your_access_id, your_secret_key]
25
- $ rake test
24
+ $ bundle exec rake init[your_access_id, your_secret_key]
25
+ $ bundle exec rake spec
26
26
  ```
27
27
 
28
28
  ## 参考链接
@@ -5,7 +5,8 @@ module QQpush
5
5
  super
6
6
  @request_params[:message_type] = 1
7
7
  @request_params[:message] =
8
- { title: params[:param_title], content: params[:param_content] }
8
+ { title: params[:param_title], content: params[:param_content],
9
+ custom_content: params[:params_custom] }
9
10
  end
10
11
  end
11
12
  end
@@ -5,7 +5,9 @@ module QQpush
5
5
  super
6
6
  @request_params[:environment] = 2
7
7
  @request_params[:message_type] = 0
8
- @request_params[:message] = { aps: { alert: params[:param_content] } }
8
+ @request_params[:message] =
9
+ { aps: { alert: params[:param_content] } }
10
+ .merge(params[:params_custom])
9
11
  end
10
12
  end
11
13
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'qqpush'
3
- s.version = '0.0.7'
3
+ s.version = '0.0.8'
4
4
  s.date = '2015-08-31'
5
5
  s.summary = 'Tencent XG Push'
6
6
  s.description = 'App push service by Tencent XG'
@@ -18,7 +18,9 @@ describe 'General methods' do
18
18
 
19
19
  it 'can push to single device' do
20
20
  @request.request_params =
21
- { message_type: 1, message: { content: 'content', title: 'title' } }
21
+ { message_type: 1, message: {
22
+ content: 'content', title: 'title',
23
+ custom_content: { key: 'value' } } }
22
24
  response = @request.push_single_device
23
25
  expect(response['ret_code']).to eq(-1)
24
26
  expect(response['err_msg']).to eq('param device_token error!')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qqpush
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chao Li