emay_sms 0.0.1
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 +7 -0
- data/.gitignore +34 -0
- data/.rspec +2 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +135 -0
- data/Guardfile +23 -0
- data/LICENSE +21 -0
- data/LICENSE.txt +22 -0
- data/README.md +36 -0
- data/Rakefile +2 -0
- data/emay_sms.gemspec +30 -0
- data/lib/emay_sms.rb +71 -0
- data/lib/emay_sms/configuration.rb +43 -0
- data/lib/emay_sms/models/log.rb +17 -0
- data/lib/emay_sms/version.rb +3 -0
- data/spec/lib/emay_sms/service_spec.rb +13 -0
- data/spec/spec_helper.rb +20 -0
- metadata +174 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: b0762ae891474c09f2729788f6551d63072ce147
|
4
|
+
data.tar.gz: ff7c4ba5497ddb6738ae09e7d9054b6143ed1a6b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 126b91524d03cd3e5df3dd86965b9c6d23a7efda009c5ab1ad287113bdd169cde97247f627b0fe9f44f01fce42bdac65f756c45d7dbe89e0fd72a71875b4d612
|
7
|
+
data.tar.gz: 2d4fc7e885cc553892086c1dc8776f51937a58a9c6e14bf6012bf82daf6999d7bd2009f56b7b4ff361256dbcdf1a9f870d570ecfba55d6be675d41b8c221fa44
|
data/.gitignore
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
/.config
|
4
|
+
/coverage/
|
5
|
+
/InstalledFiles
|
6
|
+
/pkg/
|
7
|
+
/spec/reports/
|
8
|
+
/test/tmp/
|
9
|
+
/test/version_tmp/
|
10
|
+
/tmp/
|
11
|
+
|
12
|
+
## Specific to RubyMotion:
|
13
|
+
.dat*
|
14
|
+
.repl_history
|
15
|
+
build/
|
16
|
+
|
17
|
+
## Documentation cache and generated files:
|
18
|
+
/.yardoc/
|
19
|
+
/_yardoc/
|
20
|
+
/doc/
|
21
|
+
/rdoc/
|
22
|
+
|
23
|
+
## Environment normalisation:
|
24
|
+
/.bundle/
|
25
|
+
/lib/bundler/man/
|
26
|
+
|
27
|
+
# for a library or gem, you might want to ignore these files since the code is
|
28
|
+
# intended to run in multiple environments; otherwise, check them in:
|
29
|
+
# Gemfile.lock
|
30
|
+
# .ruby-version
|
31
|
+
# .ruby-gemset
|
32
|
+
|
33
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
34
|
+
.rvmrc
|
data/.rspec
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,135 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
emay_sms (0.0.1)
|
5
|
+
mongoid (~> 4.0.0)
|
6
|
+
savon (~> 2.6.0)
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
activemodel (4.1.4)
|
12
|
+
activesupport (= 4.1.4)
|
13
|
+
builder (~> 3.1)
|
14
|
+
activesupport (4.1.4)
|
15
|
+
i18n (~> 0.6, >= 0.6.9)
|
16
|
+
json (~> 1.7, >= 1.7.7)
|
17
|
+
minitest (~> 5.1)
|
18
|
+
thread_safe (~> 0.1)
|
19
|
+
tzinfo (~> 1.1)
|
20
|
+
akami (1.2.2)
|
21
|
+
gyoku (>= 0.4.0)
|
22
|
+
nokogiri
|
23
|
+
bson (2.3.0)
|
24
|
+
builder (3.2.2)
|
25
|
+
celluloid (0.15.2)
|
26
|
+
timers (~> 1.1.0)
|
27
|
+
codeclimate-test-reporter (0.4.0)
|
28
|
+
simplecov (>= 0.7.1, < 1.0.0)
|
29
|
+
coderay (1.1.0)
|
30
|
+
connection_pool (2.0.0)
|
31
|
+
diff-lcs (1.2.5)
|
32
|
+
docile (1.1.5)
|
33
|
+
ffi (1.9.3)
|
34
|
+
formatador (0.2.5)
|
35
|
+
guard (2.6.1)
|
36
|
+
formatador (>= 0.2.4)
|
37
|
+
listen (~> 2.7)
|
38
|
+
lumberjack (~> 1.0)
|
39
|
+
pry (>= 0.9.12)
|
40
|
+
thor (>= 0.18.1)
|
41
|
+
guard-rspec (4.3.1)
|
42
|
+
guard (~> 2.1)
|
43
|
+
rspec (>= 2.14, < 4.0)
|
44
|
+
gyoku (1.1.1)
|
45
|
+
builder (>= 2.1.2)
|
46
|
+
httpi (2.2.5)
|
47
|
+
rack
|
48
|
+
i18n (0.6.11)
|
49
|
+
json (1.8.1)
|
50
|
+
listen (2.7.9)
|
51
|
+
celluloid (>= 0.15.2)
|
52
|
+
rb-fsevent (>= 0.9.3)
|
53
|
+
rb-inotify (>= 0.9)
|
54
|
+
lumberjack (1.0.9)
|
55
|
+
macaddr (1.7.1)
|
56
|
+
systemu (~> 2.6.2)
|
57
|
+
method_source (0.8.2)
|
58
|
+
mime-types (1.25.1)
|
59
|
+
mini_portile (0.6.0)
|
60
|
+
minitest (5.4.0)
|
61
|
+
mongoid (4.0.0)
|
62
|
+
activemodel (~> 4.0)
|
63
|
+
moped (~> 2.0.0)
|
64
|
+
origin (~> 2.1)
|
65
|
+
tzinfo (>= 0.3.37)
|
66
|
+
moped (2.0.0)
|
67
|
+
bson (~> 2.2)
|
68
|
+
connection_pool (~> 2.0)
|
69
|
+
optionable (~> 0.2.0)
|
70
|
+
multi_json (1.10.1)
|
71
|
+
nokogiri (1.6.3.1)
|
72
|
+
mini_portile (= 0.6.0)
|
73
|
+
nori (2.4.0)
|
74
|
+
optionable (0.2.0)
|
75
|
+
origin (2.1.1)
|
76
|
+
pry (0.10.1)
|
77
|
+
coderay (~> 1.1.0)
|
78
|
+
method_source (~> 0.8.1)
|
79
|
+
slop (~> 3.4)
|
80
|
+
rack (1.5.2)
|
81
|
+
rake (10.3.2)
|
82
|
+
rb-fsevent (0.9.4)
|
83
|
+
rb-inotify (0.9.5)
|
84
|
+
ffi (>= 0.5.0)
|
85
|
+
rspec (3.0.0)
|
86
|
+
rspec-core (~> 3.0.0)
|
87
|
+
rspec-expectations (~> 3.0.0)
|
88
|
+
rspec-mocks (~> 3.0.0)
|
89
|
+
rspec-core (3.0.4)
|
90
|
+
rspec-support (~> 3.0.0)
|
91
|
+
rspec-expectations (3.0.4)
|
92
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
93
|
+
rspec-support (~> 3.0.0)
|
94
|
+
rspec-mocks (3.0.4)
|
95
|
+
rspec-support (~> 3.0.0)
|
96
|
+
rspec-support (3.0.4)
|
97
|
+
savon (2.6.0)
|
98
|
+
akami (~> 1.2.0)
|
99
|
+
builder (>= 2.1.2)
|
100
|
+
gyoku (~> 1.1.0)
|
101
|
+
httpi (~> 2.2.3)
|
102
|
+
nokogiri (>= 1.4.0)
|
103
|
+
nori (~> 2.4.0)
|
104
|
+
uuid (~> 2.3.7)
|
105
|
+
wasabi (~> 3.3.0)
|
106
|
+
simplecov (0.9.0)
|
107
|
+
docile (~> 1.1.0)
|
108
|
+
multi_json
|
109
|
+
simplecov-html (~> 0.8.0)
|
110
|
+
simplecov-html (0.8.0)
|
111
|
+
slop (3.6.0)
|
112
|
+
systemu (2.6.4)
|
113
|
+
thor (0.19.1)
|
114
|
+
thread_safe (0.3.4)
|
115
|
+
timers (1.1.0)
|
116
|
+
tzinfo (1.2.2)
|
117
|
+
thread_safe (~> 0.1)
|
118
|
+
uuid (2.3.7)
|
119
|
+
macaddr (~> 1.0)
|
120
|
+
wasabi (3.3.0)
|
121
|
+
httpi (~> 2.0)
|
122
|
+
mime-types (< 2.0.0)
|
123
|
+
nokogiri (>= 1.4.0)
|
124
|
+
|
125
|
+
PLATFORMS
|
126
|
+
ruby
|
127
|
+
|
128
|
+
DEPENDENCIES
|
129
|
+
bundler (~> 1.6)
|
130
|
+
codeclimate-test-reporter
|
131
|
+
emay_sms!
|
132
|
+
guard
|
133
|
+
guard-rspec
|
134
|
+
rake
|
135
|
+
rspec
|
data/Guardfile
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# A sample Guardfile
|
2
|
+
# More info at https://github.com/guard/guard#readme
|
3
|
+
|
4
|
+
guard :rspec do
|
5
|
+
watch(%r{^spec/.+_spec\.rb$})
|
6
|
+
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
|
7
|
+
watch('spec/spec_helper.rb') { "spec" }
|
8
|
+
|
9
|
+
# Rails example
|
10
|
+
watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
|
11
|
+
watch(%r{^app/(.*)(\.erb|\.haml|\.slim)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
|
12
|
+
watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
|
13
|
+
watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
|
14
|
+
watch('config/routes.rb') { "spec/routing" }
|
15
|
+
watch('app/controllers/application_controller.rb') { "spec/controllers" }
|
16
|
+
|
17
|
+
# Capybara features specs
|
18
|
+
watch(%r{^app/views/(.+)/.*\.(erb|haml|slim)$}) { |m| "spec/features/#{m[1]}_spec.rb" }
|
19
|
+
|
20
|
+
# Turnip features and steps
|
21
|
+
watch(%r{^spec/acceptance/(.+)\.feature$})
|
22
|
+
watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/acceptance' }
|
23
|
+
end
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2014 刘泽磊
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 liuzelei
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
<<<<<<< HEAD
|
2
|
+
# EmaySms
|
3
|
+
|
4
|
+
TODO: Write a gem description
|
5
|
+
|
6
|
+
## Installation
|
7
|
+
|
8
|
+
Add this line to your application's Gemfile:
|
9
|
+
|
10
|
+
gem 'emay_sms'
|
11
|
+
|
12
|
+
And then execute:
|
13
|
+
|
14
|
+
$ bundle
|
15
|
+
|
16
|
+
Or install it yourself as:
|
17
|
+
|
18
|
+
$ gem install emay_sms
|
19
|
+
|
20
|
+
## Usage
|
21
|
+
|
22
|
+
TODO: Write usage instructions here
|
23
|
+
|
24
|
+
## Contributing
|
25
|
+
|
26
|
+
1. Fork it ( https://github.com/[my-github-username]/emay_sms/fork )
|
27
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
28
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
29
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
30
|
+
5. Create a new Pull Request
|
31
|
+
=======
|
32
|
+
emay_sms
|
33
|
+
========
|
34
|
+
|
35
|
+
亿美软通短信接口
|
36
|
+
>>>>>>> c7dfe596eb2180ee8474746591f9f6491550c3d0
|
data/Rakefile
ADDED
data/emay_sms.gemspec
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'emay_sms/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "emay_sms"
|
8
|
+
spec.version = EmaySms::VERSION
|
9
|
+
spec.authors = ["liuzelei"]
|
10
|
+
spec.email = ["liuzelei@gmail.com"]
|
11
|
+
spec.summary = "易美短信接口"
|
12
|
+
spec.description = "就是那个易美啦"
|
13
|
+
spec.homepage = ""
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.6"
|
22
|
+
spec.add_development_dependency "rake"
|
23
|
+
spec.add_development_dependency "rspec"
|
24
|
+
spec.add_development_dependency "guard"
|
25
|
+
spec.add_development_dependency "guard-rspec"
|
26
|
+
spec.add_development_dependency "codeclimate-test-reporter"
|
27
|
+
|
28
|
+
spec.add_dependency "savon", "~> 2.6.0"
|
29
|
+
spec.add_dependency "mongoid", "~> 4.0.0"
|
30
|
+
end
|
data/lib/emay_sms.rb
ADDED
@@ -0,0 +1,71 @@
|
|
1
|
+
require "emay_sms/version"
|
2
|
+
require "emay_sms/configuration"
|
3
|
+
require "savon"
|
4
|
+
require "logger"
|
5
|
+
|
6
|
+
module EmaySms
|
7
|
+
class << self
|
8
|
+
def setup
|
9
|
+
yield config
|
10
|
+
end
|
11
|
+
|
12
|
+
def config
|
13
|
+
@config ||= Configuration.new
|
14
|
+
end
|
15
|
+
|
16
|
+
def logger
|
17
|
+
@logger ||= Logger.new(STDOUT)
|
18
|
+
end
|
19
|
+
|
20
|
+
def client
|
21
|
+
@client ||= Savon.client(wsdl: EmaySms.config.server,
|
22
|
+
log: true,
|
23
|
+
log_level: :debug,
|
24
|
+
pretty_print_xml: true)
|
25
|
+
end
|
26
|
+
|
27
|
+
def sign_message(message)
|
28
|
+
"#{EmaySms.config.sign}#{message}"
|
29
|
+
end
|
30
|
+
|
31
|
+
def register
|
32
|
+
# @client.call(:regist_ex, message: { softwareSerialNo: EmaySms.config.account,
|
33
|
+
# key: EmaySms.config.secrect,
|
34
|
+
# serialpass: EmaySms.config.password })
|
35
|
+
response = client.call(:regist_ex, message: { arg0: EmaySms.config.account,
|
36
|
+
arg1: EmaySms.config.secrect,
|
37
|
+
arg2: EmaySms.config.password })
|
38
|
+
if response.body[:regist_ex_response].nil? || response.body[:regist_ex_response][:return] != "0"
|
39
|
+
return false
|
40
|
+
else
|
41
|
+
return true
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
def send(message, mobiles = [])
|
46
|
+
# response = @client.call(:send_sms, message: { softwareSerialNo: EmaySms.config.account,
|
47
|
+
# key: EmaySms.config.secrect,
|
48
|
+
# sendTime: "",
|
49
|
+
# mobiles: mobiles,
|
50
|
+
# smsContent: message,
|
51
|
+
# addSerial: "",
|
52
|
+
# srcCharset: "UTF-8",
|
53
|
+
# smsPriority: 1,
|
54
|
+
# smsID: 0 })
|
55
|
+
response = client.call(:send_sms, message: { arg0: EmaySms.config.account,
|
56
|
+
arg1: EmaySms.config.secrect,
|
57
|
+
arg2: "",
|
58
|
+
arg3: mobiles,
|
59
|
+
arg4: EmaySms.sign_message(message),
|
60
|
+
arg5: "",
|
61
|
+
arg6: "UTF-8",
|
62
|
+
arg7: 1,
|
63
|
+
arg8: 0 })
|
64
|
+
if response.body[:send_sms_response].nil? || response.body[:send_sms_response][:return] != "0"
|
65
|
+
return false
|
66
|
+
else
|
67
|
+
return true
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
module EmaySms
|
2
|
+
class Configuration
|
3
|
+
def server
|
4
|
+
@server ||= "http://sdk4report.eucp.b2m.cn:8080/sdk/SDKService?wsdl"
|
5
|
+
end
|
6
|
+
|
7
|
+
def server=(server)
|
8
|
+
@server = server
|
9
|
+
end
|
10
|
+
|
11
|
+
def account
|
12
|
+
@account ||= "account"
|
13
|
+
end
|
14
|
+
|
15
|
+
def account=(account)
|
16
|
+
@account = account
|
17
|
+
end
|
18
|
+
|
19
|
+
def password
|
20
|
+
@password ||= "password"
|
21
|
+
end
|
22
|
+
|
23
|
+
def password=(password)
|
24
|
+
@password = password
|
25
|
+
end
|
26
|
+
|
27
|
+
def secrect
|
28
|
+
@secrect ||= SecureRandom.hex(10)
|
29
|
+
end
|
30
|
+
|
31
|
+
def secrect=(secrect)
|
32
|
+
@secrect = secrect
|
33
|
+
end
|
34
|
+
|
35
|
+
def sign
|
36
|
+
@sign ||= "【未知来源】"
|
37
|
+
end
|
38
|
+
|
39
|
+
def sign=(sign)
|
40
|
+
@sign = "【#{sign}】"
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require "mongoid"
|
2
|
+
|
3
|
+
module EmaySms
|
4
|
+
module Models
|
5
|
+
class Log
|
6
|
+
include Mongoid::Document
|
7
|
+
field :method, type: String
|
8
|
+
field :params, type: Hash
|
9
|
+
field :response, type: Hash
|
10
|
+
field :logged_at, type: DateTime
|
11
|
+
|
12
|
+
before_create do
|
13
|
+
self.logged_at = Time.now
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe "Service" do
|
4
|
+
it "should register new key" do
|
5
|
+
service = EmaySms.register
|
6
|
+
expect(EmaySms.config.secrect).not_to be_nil
|
7
|
+
end
|
8
|
+
|
9
|
+
it "should send message" do
|
10
|
+
response = EmaySms.send("测试 #{Time.now.to_i}", "18101801755")
|
11
|
+
expect(response).not_to be false
|
12
|
+
end
|
13
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
require "codeclimate-test-reporter"
|
2
|
+
CodeClimate::TestReporter.start
|
3
|
+
|
4
|
+
require 'bundler/setup'
|
5
|
+
require 'emay_sms'
|
6
|
+
|
7
|
+
Bundler.setup
|
8
|
+
|
9
|
+
EmaySms.setup do |config|
|
10
|
+
config.server = "http://sdk4report.eucp.b2m.cn:8080/sdk/SDKService?wsdl"
|
11
|
+
config.account = "0SDK-EAA-6688-JETNS"
|
12
|
+
config.password = "123123"
|
13
|
+
config.secrect = "123123"
|
14
|
+
config.sign = "就诊通"
|
15
|
+
end
|
16
|
+
|
17
|
+
RSpec.configure do |config|
|
18
|
+
config.before(:each) do
|
19
|
+
end
|
20
|
+
end
|
metadata
ADDED
@@ -0,0 +1,174 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: emay_sms
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- liuzelei
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-09-15 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.6'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.6'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: guard
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: guard-rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: codeclimate-test-reporter
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: savon
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 2.6.0
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 2.6.0
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: mongoid
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 4.0.0
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: 4.0.0
|
125
|
+
description: "就是那个易美啦"
|
126
|
+
email:
|
127
|
+
- liuzelei@gmail.com
|
128
|
+
executables: []
|
129
|
+
extensions: []
|
130
|
+
extra_rdoc_files: []
|
131
|
+
files:
|
132
|
+
- ".gitignore"
|
133
|
+
- ".rspec"
|
134
|
+
- Gemfile
|
135
|
+
- Gemfile.lock
|
136
|
+
- Guardfile
|
137
|
+
- LICENSE
|
138
|
+
- LICENSE.txt
|
139
|
+
- README.md
|
140
|
+
- Rakefile
|
141
|
+
- emay_sms.gemspec
|
142
|
+
- lib/emay_sms.rb
|
143
|
+
- lib/emay_sms/configuration.rb
|
144
|
+
- lib/emay_sms/models/log.rb
|
145
|
+
- lib/emay_sms/version.rb
|
146
|
+
- spec/lib/emay_sms/service_spec.rb
|
147
|
+
- spec/spec_helper.rb
|
148
|
+
homepage: ''
|
149
|
+
licenses:
|
150
|
+
- MIT
|
151
|
+
metadata: {}
|
152
|
+
post_install_message:
|
153
|
+
rdoc_options: []
|
154
|
+
require_paths:
|
155
|
+
- lib
|
156
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
157
|
+
requirements:
|
158
|
+
- - ">="
|
159
|
+
- !ruby/object:Gem::Version
|
160
|
+
version: '0'
|
161
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
162
|
+
requirements:
|
163
|
+
- - ">="
|
164
|
+
- !ruby/object:Gem::Version
|
165
|
+
version: '0'
|
166
|
+
requirements: []
|
167
|
+
rubyforge_project:
|
168
|
+
rubygems_version: 2.2.2
|
169
|
+
signing_key:
|
170
|
+
specification_version: 4
|
171
|
+
summary: "易美短信接口"
|
172
|
+
test_files:
|
173
|
+
- spec/lib/emay_sms/service_spec.rb
|
174
|
+
- spec/spec_helper.rb
|