weichat_rails 0.0.1 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,283 @@
1
+ require 'spec_helper'
2
+
3
+ RSpec.describe WeichatRails::Message do
4
+ let(:request_base) do
5
+ {
6
+ ToUserName: 'toUser',
7
+ FromUserName: 'fromUser',
8
+ CreateTime: '1453434106',
9
+ MsgId: '1234567890123456'
10
+ }
11
+ end
12
+
13
+ let(:text_request) { request_base.merge(MsgType: 'text', Content: 'text message') }
14
+
15
+ let(:response_base) do
16
+ {
17
+ ToUserName: 'sender',
18
+ FromUserName: 'receiver',
19
+ CreateTime: '1_348_831_860',
20
+ MsgId: '1234567890123456'
21
+ }
22
+
23
+ end
24
+
25
+
26
+ describe '.fromHash' do
27
+ it 'will create message' do
28
+ message = WeichatRails::Message.from_hash(text_request)
29
+ expect(message).to be_a(WeichatRails::Message)
30
+ expect(message.message_hash.size).to eq(6)
31
+ end
32
+ end
33
+
34
+ describe '.to' do
35
+ let(:message) { WeichatRails::Message.from_hash(text_request) }
36
+ it 'will create base message' do
37
+ reply = WeichatRails::Message.to('toUser')
38
+ expect(reply).to be_a(WeichatRails::Message)
39
+ expect(reply.message_hash).to include(ToUserName: 'toUser')
40
+ expect(reply.message_hash[:CreateTime]).to be_a(Integer)
41
+ end
42
+ end
43
+
44
+ describe '#reply' do
45
+ let(:message) { WeichatRails::Message.from_hash(text_request) }
46
+ it 'will create base response message and is a new message' do
47
+ reply = message.reply
48
+ expect(reply.object_id).not_to eq(message.object_id)
49
+ expect(reply).to be_a(WeichatRails::Message)
50
+ expect(reply.message_hash).to include(FromUserName: 'toUser', ToUserName: 'fromUser')
51
+ expect(reply.message_hash[:CreateTime]).to be_a(Integer)
52
+ end
53
+ end
54
+
55
+ describe 'parse message using as' do
56
+ let(:image_request) { request_base.merge(MsgType: 'image', MediaId: 'media_id', PicUrl: 'pic_url') }
57
+ let(:voice_request) { request_base.merge(MsgType: 'voice', MediaId: 'media_id', Format: 'format') }
58
+ let(:video_request) { request_base.merge(MsgType: 'video', MediaId: 'media_id', ThumbMediaId: 'thumb_media_id')}
59
+ let(:location_request) { request_base.merge(MsgType: 'location', Location_X: 'location_x', Location_Y: 'location_y', Scale: 'scale', Label: 'label') }
60
+
61
+ it 'will raise error when parse message as an unknow type' do
62
+ message = WeichatRails::Message.from_hash(text_request)
63
+ expect { message.as(:unknow) }.to raise_error(/Don't know how to/)
64
+ end
65
+
66
+ it 'will get text content' do
67
+ message = WeichatRails::Message.from_hash(text_request)
68
+ expect(message.as(:text)).to eq('text message')
69
+ end
70
+
71
+ it 'will get image file' do
72
+ message = WeichatRails::Message.from_hash(image_request)
73
+ expect(WeichatRails.api).to receive(:media).with('media_id')
74
+ message.as(:image)
75
+ end
76
+
77
+ it 'will get voice file' do
78
+ message = WeichatRails::Message.from_hash(voice_request)
79
+ expect(WeichatRails.api).to receive(:media).with('media_id')
80
+ message.as(:voice)
81
+ end
82
+
83
+ it 'will get video file' do
84
+ message = WeichatRails::Message.from_hash(video_request)
85
+ expect(WeichatRails.api).to receive(:media).with('media_id')
86
+ message.as(:video)
87
+ end
88
+
89
+ it 'will get location information' do
90
+ message = WeichatRails::Message.from_hash(location_request)
91
+ expect(message.as(:location)).to eq(location_x: 'location_x', location_y: 'location_y', scale: 'scale', label: 'label')
92
+ end
93
+ end
94
+
95
+ context 'altering message fields' do
96
+ let(:message) { WeichatRails::Message.from_hash(response_base) }
97
+ describe '#to' do
98
+ it 'will update ToUserName field and return self' do
99
+ expect(message.to('a user')).to eq(message)
100
+ expect(message[:ToUserName]).to eq('a user')
101
+ end
102
+ end
103
+
104
+ describe '#text' do
105
+ it 'will update MsgTypoe and Content field and return self' do
106
+ expect(message.text('content')).to eq(message)
107
+ expect(message[:MsgType]).to eq 'text'
108
+ expect(message[:Content]).to eq 'content'
109
+ end
110
+ end
111
+
112
+ describe '#transfer_customer_service' do
113
+ it 'will update MsgType and return self' do
114
+ expect(message.transfer_customer_service).to eq message
115
+ expect(message[:MsgType]).to eq 'transfer_customer_service'
116
+ end
117
+ end
118
+
119
+ describe '#image' do
120
+ it 'will update MsgType and MediaId field and return self' do
121
+ expect(message.image('media_id')).to eq(message)
122
+ expect(message[:MsgType]).to eq('image')
123
+ expect(message[:Image][:MediaId]).to eq('media_id')
124
+ end
125
+ end
126
+
127
+ describe '#voice' do
128
+ it 'will update MsgType and MediaId field and return self' do
129
+ expect(message.voice('media_id')).to eq(message)
130
+ expect(message[:MsgType]).to eq('voice')
131
+ expect(message[:Voice][:MediaId]).to eq('media_id')
132
+ end
133
+ end
134
+
135
+ describe '#video' do
136
+ it 'will update MsgType and MediaId,Title,Description field and return self' do
137
+ expect(message.video('media_id',title: 'title', description: 'description')).to eq(message)
138
+ expect(message[:MsgType]).to eq('video')
139
+ expect(message[:Video][:MediaId]).to eq('media_id')
140
+ expect(message[:Video][:Title]).to eq 'title'
141
+ expect(message[:Video][:Description]).to eq 'description'
142
+ end
143
+ end
144
+
145
+ describe '#music' do
146
+ it 'will update MsgType and ThumbMediaId, Title, Description field and return self' do
147
+ expect(message.music('thumb_media_id', 'music_url', title: 'title', description: 'description', HQ_music_url: 'hg_music_url')).to eq(message)
148
+
149
+ expect(message[:MsgType]).to eq('music')
150
+ expect(message[:Music][:Title]).to eq('title')
151
+ expect(message[:Music][:Description]).to eq('description')
152
+ expect(message[:Music][:MusicUrl]).to eq('music_url')
153
+ expect(message[:Music][:ThumbMediaId]).to eq('thumb_media_id')
154
+ end
155
+ end
156
+
157
+ describe '#news' do
158
+ let(:items) do
159
+ [
160
+ {title: 'title', description: 'description', url: 'url', pic_url: 'pic_url'},
161
+ {title: 'title', description: 'description', url: nil, pic_url: 'pic_url'}
162
+ ]
163
+ end
164
+
165
+ after :each do
166
+ expect(message[:MsgType]).to eq('news')
167
+ expect(message[:ArticleCount]).to eq(2)
168
+ expect(message[:Articles][0][:Title]).to eq("title")
169
+ expect(message[:Articles][0][:Description]).to eq('description')
170
+ expect(message[:Articles][0][:Url]).to eq('url')
171
+ expect(message[:Articles][0][:PicUrl]).to eq('pic_url')
172
+ expect(message[:Articles][1].key?(:Url)).to eq(false)
173
+ end
174
+
175
+ it 'when no block is given, will take the items argument as an array articles hash' do
176
+ message.news(items)
177
+ end
178
+
179
+ it 'will update MessageType, ArticleCount, Articles field and return self' do
180
+ message.news(items){|articles,item| articles.item item}
181
+ end
182
+
183
+ end
184
+
185
+ describe '#to_xml' do
186
+ let(:response) { WeichatRails::Message.from_hash(response_base) }
187
+
188
+ it 'root is xml tag' do
189
+ hash = Hash.from_xml(response.text('text content').to_xml)
190
+ expect(hash.keys).to eq(['xml'])
191
+ end
192
+
193
+ it 'collection key is item' do
194
+ xml = response.news([
195
+ { title: 'title1', description: 'description', url: 'url', pic_url: 'pic_url' },
196
+ { title: 'title2', description: 'description', url: 'url', pic_url: 'pic_url' }
197
+ ]).to_xml
198
+
199
+ hash = Hash.from_xml(xml)
200
+ expect(hash['xml']['Articles']['item']).to be_a Array
201
+ expect(hash['xml']['Articles']['item'].size).to eq(2)
202
+ end
203
+
204
+ end
205
+
206
+ describe '#to_json' do
207
+ it 'can convert text message' do
208
+ request = WeichatRails::Message.to('toUser').text('text content')
209
+ expect(request.to_json).to eq({ touser: 'toUser', msgtype: 'text',text: {content: 'text content'} }.to_json)
210
+ end
211
+
212
+ it 'can convert image message' do
213
+ request = WeichatRails::Message.to('toUser').image('media_id')
214
+ expect(request.to_json).to eq({touser: 'toUser', msgtype: 'image', image: {media_id: 'media_id'}}.to_json)
215
+ end
216
+
217
+ it 'can convert voice message' do
218
+ request = WeichatRails::Message.to('toUser').voice('media_id')
219
+
220
+ expect(request.to_json).to eq({touser: 'toUser', msgtype: 'voice', voice: {media_id: 'media_id'}}.to_json)
221
+ end
222
+
223
+ it 'can convert video message' do
224
+ request = WeichatRails::Message.to('toUser').video('media_id', title: 'title', description: 'description')
225
+
226
+ expect(request.to_json).to eq({touser: 'toUser', msgtype: 'video',
227
+ video: {media_id: 'media_id', title: 'title', description: 'description'}}.to_json)
228
+ end
229
+
230
+
231
+ it 'can convert music message' do
232
+ request = WeichatRails::Message.to('toUser')
233
+ .music('thumb_media_id', 'music_url',
234
+ title: 'title', description: 'description',
235
+ HQ_music_url: 'hq_music_url')
236
+
237
+ expect(request.to_json).to eq({touser: 'toUser', msgtype: 'music',
238
+ music: {title: 'title',
239
+ description: 'description',
240
+ hqmusicurl: 'hq_music_url',
241
+ musicurl: 'music_url',
242
+ thumb_media_id: 'thumb_media_id'}}.to_json)
243
+ end
244
+
245
+ it 'can convert news message' do
246
+ request = WeichatRails::Message.to('toUser')
247
+ .news([{ title: 'title',
248
+ description: 'description',
249
+ url: 'url', pic_url: 'pic_url'}])
250
+
251
+ expect(request.to_json).to eq({touser: 'toUser', msgtype: 'news', news: {articles: [
252
+ {
253
+ title: 'title',
254
+ description: 'description',
255
+ picurl: 'pic_url',
256
+ url: 'url'
257
+ }
258
+ ]}}.to_json)
259
+ end
260
+
261
+ end
262
+
263
+ describe '#save_to!' do
264
+ it 'when given a model class, it will create a new model instance with json_hash and save it.' do
265
+ model_class = double('Model Class')
266
+ model = double('Model Instance')
267
+
268
+ message = WeichatRails::Message.to('toUser')
269
+ expect(model_class).to receive(:new).with(to_user_name: 'toUser',
270
+ msg_type: 'text',
271
+ content: 'text message',
272
+ create_time: message[:CreateTime]).and_return(model)
273
+
274
+ expect(model).to receive(:save!).and_return(true)
275
+
276
+ expect(message.text('text message').save_to!(model_class)).to eq(message)
277
+
278
+ end
279
+ end
280
+
281
+ end
282
+
283
+ end
@@ -0,0 +1,5 @@
1
+ require 'spec_helper'
2
+
3
+ RSpec.describe WeichatRails::Responder do
4
+
5
+ end
@@ -0,0 +1,99 @@
1
+ # This file was generated by the `rspec --init` command. Conventionally, all
2
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
+ # The generated `.rspec` file contains `--require spec_helper` which will cause
4
+ # this file to always be loaded, without a need to explicitly require it in any
5
+ # files.
6
+ #
7
+ # Given that it is always loaded, you are encouraged to keep this file as
8
+ # light-weight as possible. Requiring heavyweight dependencies from this file
9
+ # will add to the boot time of your test suite on EVERY test run, even for an
10
+ # individual file that may not need all of that loaded. Instead, consider making
11
+ # a separate helper file that requires the additional dependencies and performs
12
+ # the additional setup, and require it from the spec files that actually need
13
+ # it.
14
+ #
15
+ # The `.rspec` file also contains a few flags that are not defaults but that
16
+ # users commonly want.
17
+ #
18
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
19
+ require 'weichat_rails'
20
+ RSpec.configure do |config|
21
+ # rspec-expectations config goes here. You can use an alternate
22
+ # assertion/expectation library such as wrong or the stdlib/minitest
23
+ # assertions if you prefer.
24
+ config.expect_with :rspec do |expectations|
25
+ # This option will default to `true` in RSpec 4. It makes the `description`
26
+ # and `failure_message` of custom matchers include text for helper methods
27
+ # defined using `chain`, e.g.:
28
+ # be_bigger_than(2).and_smaller_than(4).description
29
+ # # => "be bigger than 2 and smaller than 4"
30
+ # ...rather than:
31
+ # # => "be bigger than 2"
32
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
33
+ end
34
+
35
+ # rspec-mocks config goes here. You can use an alternate test double
36
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
37
+ config.mock_with :rspec do |mocks|
38
+ # Prevents you from mocking or stubbing a method that does not exist on
39
+ # a real object. This is generally recommended, and will default to
40
+ # `true` in RSpec 4.
41
+ mocks.verify_partial_doubles = true
42
+ end
43
+
44
+ # The settings below are suggested to provide a good initial experience
45
+ # with RSpec, but feel free to customize to your heart's content.
46
+ # These two settings work together to allow you to limit a spec run
47
+ # to individual examples or groups you care about by tagging them with
48
+ # `:focus` metadata. When nothing is tagged with `:focus`, all examples
49
+ # get run.
50
+ #运行标记为 focus=> true 的测试
51
+ config.filter_run :focus
52
+ config.run_all_when_everything_filtered = true
53
+
54
+ #过滤标记灵slow的测试
55
+ #config.filter_run_excluding :slow => true
56
+ # Allows RSpec to persist some state between runs in order to support
57
+ # the `--only-failures` and `--next-failure` CLI options. We recommend
58
+ # you configure your source control system to ignore this file.
59
+ config.example_status_persistence_file_path = "spec/examples.txt"
60
+
61
+ # Limits the available syntax to the non-monkey patched syntax that is
62
+ # recommended. For more details, see:
63
+ # - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
64
+ # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
65
+ # - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
66
+ config.disable_monkey_patching!
67
+
68
+ # This setting enables warnings. It's recommended, but in some cases may
69
+ # be too noisy due to issues in dependencies.
70
+ config.warnings = true
71
+
72
+ # Many RSpec users commonly either run the entire suite or an individual
73
+ # file, and it's useful to allow more verbose output when running an
74
+ # individual spec file.
75
+ if config.files_to_run.one?
76
+ # Use the documentation formatter for detailed output,
77
+ # unless a formatter has already been configured
78
+ # (e.g. via a command-line flag).
79
+ config.default_formatter = 'doc'
80
+ end
81
+
82
+ # Print the 10 slowest examples and example groups at the
83
+ # end of the spec run, to help surface which specs are running
84
+ # particularly slow.
85
+ config.profile_examples = 10
86
+
87
+ # Run specs in random order to surface order dependencies. If you find an
88
+ # order dependency and want to debug it, you can fix the order by providing
89
+ # the seed, which is printed after each run.
90
+ # --seed 1234
91
+ config.order = :random
92
+
93
+ # Seed global randomization in this process using the `--seed` CLI option.
94
+ # Setting this allows you to use `--seed` to deterministically reproduce
95
+ # test failures related to randomization by passing the same `--seed` value
96
+ # as the one that triggered the failure.
97
+ Kernel.srand config.seed
98
+ end
99
+ #RSpec::Expectations.configuration.warn_about_potential_false_positives = false
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
8
8
  spec.version = WeichatRails::VERSION
9
9
  spec.authors = ["javy_liu"]
10
10
  spec.email = ["javy_liu@163.com"]
11
- spec.summary = %q{weichat interface for rails based on weichat-rails}
12
- spec.description = %q{weichat use for more than on public weichat account,base on the mysql,~> rails 3.2.16}
11
+ spec.summary = %q{wechat interface for rails based on weichat-rails}
12
+ spec.description = %q{used for more than one public wechat account,base on the mysql,~> rails 3.2.16}
13
13
  spec.homepage = "https://github.com/javyliu/weichat_rails"
14
14
  spec.license = "MIT"
15
15
 
@@ -18,12 +18,14 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_development_dependency "bundler", "~> 1.5"
22
- spec.add_development_dependency "rake"
23
21
 
24
- spec.add_dependency "rails", "~> 3.2.14"
25
- spec.add_dependency "nokogiri", '>=1.6.0'
26
- spec.add_dependency 'rest-client'
27
- spec.add_dependency 'dalli'
22
+ spec.add_dependency "nokogiri", '~>1.12', '>= 1.12.4'
23
+ spec.add_dependency 'http', '~> 5.0', '>= 5.0.2'
24
+ #spec.add_dependency 'rest-client'
25
+ spec.add_dependency 'dalli','~> 2.7', '>= 2.7.11'
26
+ spec.add_dependency 'activesupport', '~> 6.1.4', '>= 6.1.4.1'
28
27
 
28
+ spec.add_development_dependency "bundler", '~> 2.2', '>= 2.2.3'
29
+ spec.add_development_dependency "rake" , '~> 13.0', '>= 13.0.6'
30
+ spec.add_development_dependency 'rspec', '~> 3.10', '>= 3.10.0'
29
31
  end
metadata CHANGED
@@ -1,101 +1,157 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: weichat_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - javy_liu
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-09 00:00:00.000000000 Z
11
+ date: 2021-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: bundler
14
+ name: nokogiri
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.5'
20
- type: :development
19
+ version: '1.12'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 1.12.4
23
+ type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
27
  - - "~>"
25
28
  - !ruby/object:Gem::Version
26
- version: '1.5'
29
+ version: '1.12'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 1.12.4
27
33
  - !ruby/object:Gem::Dependency
28
- name: rake
34
+ name: http
29
35
  requirement: !ruby/object:Gem::Requirement
30
36
  requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '5.0'
31
40
  - - ">="
32
41
  - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :development
42
+ version: 5.0.2
43
+ type: :runtime
35
44
  prerelease: false
36
45
  version_requirements: !ruby/object:Gem::Requirement
37
46
  requirements:
47
+ - - "~>"
48
+ - !ruby/object:Gem::Version
49
+ version: '5.0'
38
50
  - - ">="
39
51
  - !ruby/object:Gem::Version
40
- version: '0'
52
+ version: 5.0.2
41
53
  - !ruby/object:Gem::Dependency
42
- name: rails
54
+ name: dalli
43
55
  requirement: !ruby/object:Gem::Requirement
44
56
  requirements:
45
57
  - - "~>"
46
58
  - !ruby/object:Gem::Version
47
- version: 3.2.14
59
+ version: '2.7'
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: 2.7.11
48
63
  type: :runtime
49
64
  prerelease: false
50
65
  version_requirements: !ruby/object:Gem::Requirement
51
66
  requirements:
52
67
  - - "~>"
53
68
  - !ruby/object:Gem::Version
54
- version: 3.2.14
69
+ version: '2.7'
70
+ - - ">="
71
+ - !ruby/object:Gem::Version
72
+ version: 2.7.11
55
73
  - !ruby/object:Gem::Dependency
56
- name: nokogiri
74
+ name: activesupport
57
75
  requirement: !ruby/object:Gem::Requirement
58
76
  requirements:
77
+ - - "~>"
78
+ - !ruby/object:Gem::Version
79
+ version: 6.1.4
59
80
  - - ">="
60
81
  - !ruby/object:Gem::Version
61
- version: 1.6.0
82
+ version: 6.1.4.1
62
83
  type: :runtime
63
84
  prerelease: false
64
85
  version_requirements: !ruby/object:Gem::Requirement
65
86
  requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: 6.1.4
66
90
  - - ">="
67
91
  - !ruby/object:Gem::Version
68
- version: 1.6.0
92
+ version: 6.1.4.1
69
93
  - !ruby/object:Gem::Dependency
70
- name: rest-client
94
+ name: bundler
71
95
  requirement: !ruby/object:Gem::Requirement
72
96
  requirements:
97
+ - - "~>"
98
+ - !ruby/object:Gem::Version
99
+ version: '2.2'
73
100
  - - ">="
74
101
  - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :runtime
102
+ version: 2.2.3
103
+ type: :development
77
104
  prerelease: false
78
105
  version_requirements: !ruby/object:Gem::Requirement
79
106
  requirements:
107
+ - - "~>"
108
+ - !ruby/object:Gem::Version
109
+ version: '2.2'
80
110
  - - ">="
81
111
  - !ruby/object:Gem::Version
82
- version: '0'
112
+ version: 2.2.3
83
113
  - !ruby/object:Gem::Dependency
84
- name: dalli
114
+ name: rake
85
115
  requirement: !ruby/object:Gem::Requirement
86
116
  requirements:
117
+ - - "~>"
118
+ - !ruby/object:Gem::Version
119
+ version: '13.0'
87
120
  - - ">="
88
121
  - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :runtime
122
+ version: 13.0.6
123
+ type: :development
91
124
  prerelease: false
92
125
  version_requirements: !ruby/object:Gem::Requirement
93
126
  requirements:
127
+ - - "~>"
128
+ - !ruby/object:Gem::Version
129
+ version: '13.0'
130
+ - - ">="
131
+ - !ruby/object:Gem::Version
132
+ version: 13.0.6
133
+ - !ruby/object:Gem::Dependency
134
+ name: rspec
135
+ requirement: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - "~>"
138
+ - !ruby/object:Gem::Version
139
+ version: '3.10'
140
+ - - ">="
141
+ - !ruby/object:Gem::Version
142
+ version: 3.10.0
143
+ type: :development
144
+ prerelease: false
145
+ version_requirements: !ruby/object:Gem::Requirement
146
+ requirements:
147
+ - - "~>"
148
+ - !ruby/object:Gem::Version
149
+ version: '3.10'
94
150
  - - ">="
95
151
  - !ruby/object:Gem::Version
96
- version: '0'
97
- description: weichat use for more than on public weichat account,base on the mysql,~>
98
- rails 3.2.16
152
+ version: 3.10.0
153
+ description: used for more than one public wechat account,base on the mysql,~> rails
154
+ 3.2.16
99
155
  email:
100
156
  - javy_liu@163.com
101
157
  executables: []
@@ -103,6 +159,9 @@ extensions: []
103
159
  extra_rdoc_files: []
104
160
  files:
105
161
  - ".gitignore"
162
+ - ".rspec"
163
+ - ".ruby-gemset"
164
+ - ".ruby-version"
106
165
  - Gemfile
107
166
  - LICENSE.txt
108
167
  - README.md
@@ -115,12 +174,19 @@ files:
115
174
  - lib/weichat_rails/message.rb
116
175
  - lib/weichat_rails/responder.rb
117
176
  - lib/weichat_rails/version.rb
177
+ - spec/examples.txt
178
+ - spec/lib/weichat_rails/access_token_spec.rb
179
+ - spec/lib/weichat_rails/api_spec.rb
180
+ - spec/lib/weichat_rails/client_spec.rb
181
+ - spec/lib/weichat_rails/message_spec.rb
182
+ - spec/lib/weichat_rails/responder_spec.rb
183
+ - spec/spec_helper.rb
118
184
  - weichat_rails.gemspec
119
185
  homepage: https://github.com/javyliu/weichat_rails
120
186
  licenses:
121
187
  - MIT
122
188
  metadata: {}
123
- post_install_message:
189
+ post_install_message:
124
190
  rdoc_options: []
125
191
  require_paths:
126
192
  - lib
@@ -135,10 +201,15 @@ required_rubygems_version: !ruby/object:Gem::Requirement
135
201
  - !ruby/object:Gem::Version
136
202
  version: '0'
137
203
  requirements: []
138
- rubyforge_project:
139
- rubygems_version: 2.4.6
140
- signing_key:
204
+ rubygems_version: 3.2.3
205
+ signing_key:
141
206
  specification_version: 4
142
- summary: weichat interface for rails based on weichat-rails
143
- test_files: []
144
- has_rdoc:
207
+ summary: wechat interface for rails based on weichat-rails
208
+ test_files:
209
+ - spec/examples.txt
210
+ - spec/lib/weichat_rails/access_token_spec.rb
211
+ - spec/lib/weichat_rails/api_spec.rb
212
+ - spec/lib/weichat_rails/client_spec.rb
213
+ - spec/lib/weichat_rails/message_spec.rb
214
+ - spec/lib/weichat_rails/responder_spec.rb
215
+ - spec/spec_helper.rb