kave 0.1.1 → 0.1.2

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: cd88a92b8e8b247cd62f88bf3303682cffa21d76
4
- data.tar.gz: da656f0c33338c719a4e549c69e02285b2d9aac5
3
+ metadata.gz: 5c852d15b45cd0b99fdc090e74ce51ba5c206fd1
4
+ data.tar.gz: f8ac8e9d8001000d7a259e6d979435791d6655c4
5
5
  SHA512:
6
- metadata.gz: 4998d1532065d4f8bec6e6989b6eab911c280f953b6b52f383ffc70f74e3fe17564720b8bb35be18584536bc4c69966fdb941ee176d78cb7e31fc93a0708dd03
7
- data.tar.gz: 2665503cbb30a60ff7e104202d9793c599297564aedbcdc5b54e98a4ad37dbae1c2b39cde33d452241735db6545a6f1de6ed8fdcff05a0f5d8e9d7a791e963dc
6
+ metadata.gz: 17c6267b0f504ccd05ebf8517caf5a72235d33929a0f5bc4945b93d7ef783aa3a80ba0fd852b1bdd5dfcecb8530eb9e9e93b19437629955dd9732bc59b7f2397
7
+ data.tar.gz: 53372cf887a5481faf115325a3e91d0d4a19e8423dbbac3676e9a767a829e574aa3e90346c22f449cae1214f08579f333628fcf61c033d4779317d63a2f509b6
data/.gitignore CHANGED
@@ -1,6 +1,5 @@
1
1
  /.bundle/
2
2
  /.yardoc
3
-
4
3
  /.idea/
5
4
  /Gemfile.lock
6
5
  /_yardoc/
data/README.md CHANGED
@@ -25,16 +25,16 @@ Kave.configure do |config|
25
25
  config.wsdl ='http://api.kavenegar.com/soap/v1.asmx?WSDL'
26
26
  config.sender = 'number'
27
27
 
28
- # You can user api key or username and password for authinticate
28
+ # You can use api key or username and password for authinticate
29
29
  config.api_key = 'api key'
30
30
  # OR
31
31
  config.username = 'kave username'
32
32
  config.password = 'kave password'
33
33
  end
34
34
  ```
35
- [kavenegar.com](http://kavenegar.com/) for receiver api key !
35
+ [kavenegar.com](http://kavenegar.com/) for receive api key !
36
36
  ## Usage
37
- alright ;) , now you can call kave function for send simply sms by loginfo or api key
37
+ alright ;) now you can call kave function for send simply sms by loginfo or api key
38
38
 
39
39
  ```ruby
40
40
  class HomeController < ApplicationController
@@ -59,6 +59,7 @@ end
59
59
 
60
60
  for report issues contact me on twitter [@mm580486](https://twitter.com/mm580486)
61
61
 
62
+
62
63
  ## persian tutorials
63
64
 
64
65
  1-[youtube send simply sms by kave gem](https://twitter.com/mm580486)
Binary file
@@ -9,8 +9,8 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["mohammad mahmoudi"]
10
10
  spec.email = ["mm580486@gmail.com"]
11
11
 
12
- spec.summary = %q{Send SMS}
13
- spec.description = %q{Send SMS by kavenegar services}
12
+ spec.summary = %q{Send SMS in iran}
13
+ spec.description = %q{Send SMS by kavenegar services in iran}
14
14
  spec.homepage = "https://github.com/mm580486/kave"
15
15
  spec.license = "mohammad mahmoudi"
16
16
 
@@ -15,7 +15,6 @@ module Kave
15
15
  private
16
16
  def perform_validation
17
17
  raise ArgumentError, 'not a valid response' if @response.nil?
18
-
19
18
  body = if @send_simple_by==:send_simple_by_apikey
20
19
  @response[:send_simple_by_apikey_response]
21
20
  else
@@ -32,20 +31,25 @@ module Kave
32
31
  end
33
32
  end
34
33
 
35
-
36
34
  class ResponseLatestOutBox
37
35
 
38
36
  attr_reader :response, :select
39
- def validate(response = nil,send_latest_by)
37
+ def validate(response = nil,send_simple_by)
40
38
  @response = response
41
- @send_simple_by=send_latest_by
39
+ @send_simple_by=send_simple_by
42
40
  perform_validation
43
41
  return self
44
42
  end
45
43
  private
46
44
  def perform_validation
47
45
  raise ArgumentError, 'not a valid response' if @response.nil?
48
- body =@response[:selectlatest_by_apikey_response]
46
+
47
+ body = if @send_simple_by==:send_simple_by_apikey
48
+ @response[:selectlatest_by_apikey_response]
49
+ else
50
+ @response[:selectlatest_by_login_info_response]
51
+ end
52
+ # body =@response[:selectlatest_by_apikey_response]
49
53
  @select = body[:selectlatest_by_apikey_result][:api_select]
50
54
  end
51
55
 
@@ -57,7 +57,7 @@ module Kave
57
57
  else
58
58
  :selectlatest_by_login_info
59
59
  end
60
- @pagesize=if @pagesize < 2;2;else;@pagesize;end
60
+ @pagesize=if @pagesize < 2;2;else;@pagesize;end
61
61
  response = @wsdl.call :selectlatest_by_apikey, message: {
62
62
  'apikey' =>Kave.configuration.api_key,
63
63
  'pagesize'=>@pagesize.to_i,
@@ -1,3 +1,3 @@
1
1
  module Kave
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kave
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - mohammad mahmoudi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-05-02 00:00:00.000000000 Z
11
+ date: 2016-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: savon
@@ -52,7 +52,7 @@ dependencies:
52
52
  version: '10.0'
53
53
  prerelease: false
54
54
  type: :development
55
- description: Send SMS by kavenegar services
55
+ description: Send SMS by kavenegar services in iran
56
56
  email:
57
57
  - mm580486@gmail.com
58
58
  executables: []
@@ -60,13 +60,6 @@ extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
62
  - .gitignore
63
- - .idea/.name
64
- - .idea/.rakeTasks
65
- - .idea/kave.iml
66
- - .idea/misc.xml
67
- - .idea/modules.xml
68
- - .idea/vcs.xml
69
- - .idea/workspace.xml
70
63
  - .travis.yml
71
64
  - CODE_OF_CONDUCT.md
72
65
  - Gemfile
@@ -75,6 +68,7 @@ files:
75
68
  - Rakefile
76
69
  - bin/console
77
70
  - bin/setup
71
+ - kave-0.1.1.gem
78
72
  - kave.gemspec
79
73
  - lib/kave.rb
80
74
  - lib/kave/response.rb
@@ -103,5 +97,5 @@ rubyforge_project:
103
97
  rubygems_version: 2.4.5
104
98
  signing_key:
105
99
  specification_version: 4
106
- summary: Send SMS
100
+ summary: Send SMS in iran
107
101
  test_files: []