ruby_sms 1.0.1 → 1.0.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: ea160872cb23ddfa9480048f56c90401c1ec78fb
4
- data.tar.gz: 07fb92cc9f35ecb64ec76ee4aa834ceb90213386
3
+ metadata.gz: eedb10387b5cc915537fc10ee7006ba21cd26e38
4
+ data.tar.gz: 057b61931d8bc9938153e877aa4ad0bc248770e1
5
5
  SHA512:
6
- metadata.gz: 737b03479a6b4f9779c265261ca9e3053437160e5dc73450ada6bb1b955429212d0bf34c53a42c86b468a0a150d1837b151469e7e57e03de9c1a02b59ad928a7
7
- data.tar.gz: 7e2af8bec903eab9889c5525e97cc65603b20267bae32b3bd328c63030dba073618a9485256d28c4bcb4f50eb75e99b975b330e022a24ea3a65303afb806946a
6
+ metadata.gz: 2394c4a44f5c96c8959e2feb8f32bb09ae71f20e507d00be6ada4b13962ed3b99094ee30f3f9859c71b119bd96ff621f5bb6535ebcbb26908c37e7717de35a23
7
+ data.tar.gz: 77506e91820040b71b3130eeac439020ddffda7f54f622b97d1bb8c785e9410c81501ea4885c2577e39b7a08aeca3ba9bf4b8a9d51cea397fe6c344682600f9c
data/.gitignore CHANGED
@@ -9,6 +9,7 @@
9
9
  /test/tmp/
10
10
  /test/version_tmp/
11
11
  /tmp/
12
+ /log
12
13
 
13
14
  # Used by dotenv library to load environment variables.
14
15
  # .env
data/README.md CHANGED
@@ -2,6 +2,9 @@
2
2
  simple way to send sms using sms77 or any other short message api provider
3
3
  A Ruby client library for [Sms77][more to come].
4
4
 
5
+ **You will need a valid account with an api key to access the api endpoints**
6
+
7
+
5
8
  ## Getting started
6
9
 
7
10
  To install **ruby_sms**, run the following command:
@@ -21,7 +21,7 @@ module RubySms
21
21
 
22
22
  def send(options)
23
23
  response = Sms77Response.new
24
- (response.add_error(:empty_options) && (return response)) if options.nil?
24
+ (response.add_error(:empty_options) and (return response)) if options.nil?
25
25
  code = post_request(options)
26
26
  return response if code == SUCCESS_CODE
27
27
  response.add_error(code)
@@ -31,10 +31,10 @@ module RubySms
31
31
  # generate a simple random 4 digits pin
32
32
  def send_pin(options)
33
33
  response = Sms77Response.new
34
- (response.add_error(:empty_options) && (return response)) if options.nil?
34
+ (response.add_error(:empty_options) and (return response)) if options.nil?
35
35
  # we may use SecureRandom.hex(size) if you need a more secure pin
36
36
  response.pin = rand.to_s[2..(DEFAULT_PIN_SIZE + 1)]
37
- options[:text].gsub!('%PIN%', response.pin)
37
+ options[:text] = options[:text].gsub('%PIN%', response.pin)
38
38
  code = post_request(options)
39
39
  return response if code == SUCCESS_CODE
40
40
  response.add_error(code)
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'ruby_sms'
3
- s.version = '1.0.1'
3
+ s.version = '1.0.2'
4
4
  s.date = '2017-07-12'
5
5
  s.summary = "A simple Sms client "
6
6
  s.description = "simple way to send sms using sms77 or any other short message api provider"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_sms
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mohamed Elassadi
@@ -23,7 +23,6 @@ files:
23
23
  - lib/gateway/sms77.rb
24
24
  - lib/ruby_sms.rb
25
25
  - ruby_sms.gemspec
26
- - rubysms.gemspec
27
26
  homepage: https://github.com/carnifun/ruby_sms
28
27
  licenses:
29
28
  - MIT
@@ -44,7 +43,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
44
43
  version: '0'
45
44
  requirements: []
46
45
  rubyforge_project:
47
- rubygems_version: 2.6.11
46
+ rubygems_version: 2.6.12
48
47
  signing_key:
49
48
  specification_version: 4
50
49
  summary: A simple Sms client
@@ -1,13 +0,0 @@
1
- Gem::Specification.new do |s|
2
- s.name = 'ruby_sms'
3
- s.version = '1.0.0'
4
- s.date = '2017-07-12'
5
- s.summary = "A simple Sms client "
6
- s.description = "simple way to send sms using sms77 or any other short message api provider"
7
- s.authors = ["Mohamed Elassadi"]
8
- s.email = 'mohamed.elassadi@gmail.com'
9
- s.files = `git ls-files`.split($/)
10
- s.homepage = 'https://github.com/carnifun/ruby_sms'
11
- s.license = 'MIT'
12
-
13
- end