mainsms_api 0.0.5 → 0.0.6

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: 107e6e204266c7d2b933ba332fe41234dd3a17f0
4
- data.tar.gz: b30caf730f047ec4a022a19c08d6977eed948010
3
+ metadata.gz: 40ed1df82bfe8eb9ede84e9b235a771fe9cf5acd
4
+ data.tar.gz: b7a62c9bd65ad8673af79f6e9e1400d26e67872e
5
5
  SHA512:
6
- metadata.gz: 79f699e8de4c201651ed56142dd816714f4712f10db512a5cf1fae3bcb94ea05d8fc540ef3ef5d5bd62f09e6429d921c4a7ca39d63c206c64fce513dd5b90569
7
- data.tar.gz: a9f4b39a6486a6d74084f1e005f3600e34d740b5f86d03c934417256fbc3ed7a48c55901af3dc5bff67b878c0d1834246f5147d04e855a8d6cb8646db4d3292d
6
+ metadata.gz: 88a7aa80e63b83d45b03f550f28f9c53fac47276c8b0fccb322f8c78352860d9d7f8058f022018adb34e6fd70ba6b886f1d400c9460560f2adccdd9fa9618023
7
+ data.tar.gz: 1af8989d119c4ccca86736bc995b004fda73ea058ec89542a152c855608c1f5e97b3cff610ac089980eb33719af67efbaf7b71be59e3b7cd54398f794981a4c8
data/README.md CHANGED
@@ -1,4 +1,7 @@
1
- ## Использование
1
+ [![Gem Version](https://badge.fury.io/rb/mainsms_api.svg)](http://badge.fury.io/rb/mainsms_api) [![Build Status](https://travis-ci.org/evserykh/mainsms_api.svg?branch=master)](https://travis-ci.org/evserykh/mainsms_api) [![Dependency Status](https://gemnasium.com/evserykh/mainsms_api.svg)](https://gemnasium.com/evserykh/mainsms_api)
2
+ ***
3
+
4
+ ## Использование
2
5
 
3
6
  Добавить в Gemfile:
4
7
  ```ruby
@@ -1,3 +1,5 @@
1
+ require 'signed_parameters'
2
+
1
3
  module MainsmsApi
2
4
  module Common
3
5
  def response
@@ -14,22 +16,8 @@ module MainsmsApi
14
16
  MainsmsApi::Configuration.api_key
15
17
  end
16
18
 
17
- def used_params
18
- params.select { |k, v| v.present? }
19
- end
20
-
21
- def sorted_params
22
- used_params.values.map(&:to_s).sort
23
- end
24
-
25
- def sign
26
- sha1 = Digest::SHA1.hexdigest((sorted_params + [api_key]).join(';'))
27
-
28
- md5 = Digest::MD5.hexdigest(sha1)
29
- end
30
-
31
19
  def query
32
- used_params.merge(sign: sign).to_query
20
+ SignedParameters.to_query(params, api_key)
33
21
  end
34
22
 
35
23
  def protocol
@@ -1,3 +1,3 @@
1
1
  module MainsmsApi
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,89 +1,117 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mainsms_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evgeniy Serykh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-26 00:00:00.000000000 Z
11
+ date: 2014-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_attr
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0.7'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0.7'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activesupport
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '3'
34
- - - <
34
+ - - "<"
35
35
  - !ruby/object:Gem::Version
36
36
  version: '5'
37
37
  type: :runtime
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
40
40
  requirements:
41
- - - '>='
41
+ - - ">="
42
42
  - !ruby/object:Gem::Version
43
43
  version: '3'
44
- - - <
44
+ - - "<"
45
45
  - !ruby/object:Gem::Version
46
46
  version: '5'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: hashie
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
- - - ~>
51
+ - - "~>"
52
52
  - !ruby/object:Gem::Version
53
53
  version: '2.0'
54
54
  type: :runtime
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
- - - ~>
58
+ - - "~>"
59
59
  - !ruby/object:Gem::Version
60
60
  version: '2.0'
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: httparty
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
- - - ~>
65
+ - - "~>"
66
66
  - !ruby/object:Gem::Version
67
67
  version: '0.10'
68
68
  type: :runtime
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
- - - ~>
72
+ - - "~>"
73
73
  - !ruby/object:Gem::Version
74
74
  version: '0.10'
75
+ - !ruby/object:Gem::Dependency
76
+ name: signed_parameters
77
+ requirement: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ version: '0'
82
+ type: :runtime
83
+ prerelease: false
84
+ version_requirements: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ - !ruby/object:Gem::Dependency
90
+ name: rake
91
+ requirement: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - ">="
94
+ - !ruby/object:Gem::Version
95
+ version: '0'
96
+ type: :development
97
+ prerelease: false
98
+ version_requirements: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ version: '0'
75
103
  - !ruby/object:Gem::Dependency
76
104
  name: rspec
77
105
  requirement: !ruby/object:Gem::Requirement
78
106
  requirements:
79
- - - '>='
107
+ - - ">="
80
108
  - !ruby/object:Gem::Version
81
109
  version: '0'
82
110
  type: :development
83
111
  prerelease: false
84
112
  version_requirements: !ruby/object:Gem::Requirement
85
113
  requirements:
86
- - - '>='
114
+ - - ">="
87
115
  - !ruby/object:Gem::Version
88
116
  version: '0'
89
117
  description: mainsms.ru API
@@ -93,9 +121,13 @@ executables: []
93
121
  extensions: []
94
122
  extra_rdoc_files: []
95
123
  files:
124
+ - MIT-LICENSE
125
+ - README.md
126
+ - Rakefile
96
127
  - lib/generators/mainsms_api/install/install_generator.rb
97
128
  - lib/generators/mainsms_api/install/templates/mainsms.yml
98
129
  - lib/generators/mainsms_api/install/templates/mainsms_api.rb
130
+ - lib/mainsms_api.rb
99
131
  - lib/mainsms_api/balance.rb
100
132
  - lib/mainsms_api/common.rb
101
133
  - lib/mainsms_api/configuration.rb
@@ -104,11 +136,7 @@ files:
104
136
  - lib/mainsms_api/price.rb
105
137
  - lib/mainsms_api/status.rb
106
138
  - lib/mainsms_api/version.rb
107
- - lib/mainsms_api.rb
108
139
  - lib/tasks/mainsms_api_tasks.rake
109
- - MIT-LICENSE
110
- - Rakefile
111
- - README.md
112
140
  homepage: https://github.com/evserykh/mainsms_api
113
141
  licenses:
114
142
  - MIT
@@ -119,17 +147,17 @@ require_paths:
119
147
  - lib
120
148
  required_ruby_version: !ruby/object:Gem::Requirement
121
149
  requirements:
122
- - - '>='
150
+ - - ">="
123
151
  - !ruby/object:Gem::Version
124
152
  version: '0'
125
153
  required_rubygems_version: !ruby/object:Gem::Requirement
126
154
  requirements:
127
- - - '>='
155
+ - - ">="
128
156
  - !ruby/object:Gem::Version
129
157
  version: '0'
130
158
  requirements: []
131
159
  rubyforge_project:
132
- rubygems_version: 2.1.11
160
+ rubygems_version: 2.2.2
133
161
  signing_key:
134
162
  specification_version: 4
135
163
  summary: mainsms.ru API