smsapi-client 0.1.0 → 0.2.0

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: aa2a44ea645440e177899b0a1de97bffe64d5e35
4
- data.tar.gz: 1752a0ee074d508585c26b132fdd143d37ed2772
3
+ metadata.gz: 3d3b9d0bfa832e3b08c12271a46baa9f3c2111a0
4
+ data.tar.gz: 970f448af0780ee8b96ef7fe0640804c81351962
5
5
  SHA512:
6
- metadata.gz: 64c1c2dfc5e8a4b071b5a9c1abb1463d9a472c09da0ce74d98e28a39178ce6d0bac740923b11e2b00c8dcd0ce41fb5972844bc400dc1351d211929cc4f495eba
7
- data.tar.gz: 629bbc32ed73c0b32164b8b6859f9ac6816a481ef9eedd8119c3cef9392035b212d47288794dd9cc904ecd34d1749f91dc94ab1e9891af7525cc34d518ffb9ea
6
+ metadata.gz: 892fa8a907f6b9f6d3bf0f9aab3931ca3864f2abcde86143ceff4d76631b02be6ac21986c36181186814ad60d1171271614a5823ba68eb1616593032629e1e46
7
+ data.tar.gz: d09630489721bc5338010204b973719e79a3334c109c429bbd5d42277e299cf6b17beb6bc0522ffda329cd0c8cd8ac3bb9bd93f9834cc9ccc3fa3b733fd710ab
data/README.md CHANGED
@@ -1,11 +1,11 @@
1
- # SMSApi::Client
1
+ # Smsapi::Client
2
2
 
3
3
  ## Installation
4
4
 
5
5
  Add this line to your application's Gemfile:
6
6
 
7
7
  ```ruby
8
- gem 'smsapi-client'
8
+ gem 'smsapi-client', '~> 0.2'
9
9
  ```
10
10
 
11
11
  And then execute:
@@ -20,7 +20,7 @@ Or install it yourself as:
20
20
 
21
21
  ```ruby
22
22
  # Create the client
23
- client = SMSApi::Client.new('username', 'password')
23
+ client = Smsapi::Client.new('username', 'password')
24
24
 
25
25
  # Send a single text message
26
26
  sms = client.send_single 500500500, 'Text Message'
@@ -1,6 +1,6 @@
1
- module SMSApi
1
+ module Smsapi
2
2
  class BulkSMS
3
- include SMSApi::Defaults
3
+ include Smsapi::Defaults
4
4
 
5
5
  attr_reader :sent, :to, :message
6
6
  def initialize(to, message, server, options = {})
@@ -1,4 +1,4 @@
1
- module SMSApi
1
+ module Smsapi
2
2
  class Client
3
3
  def initialize(username, password)
4
4
  @server = Server.new(username, password)
@@ -1,4 +1,4 @@
1
- module SMSApi::Defaults
1
+ module Smsapi::Defaults
2
2
  def default_options
3
3
  {
4
4
  from: 'eco',
@@ -1,5 +1,5 @@
1
- module SMSApi
2
- class GroupSms < BulkSMS
1
+ module Smsapi
2
+ class GroupSMS < BulkSMS
3
3
  def send
4
4
  # read_response = server.send_group(server_params)
5
5
  end
@@ -1,4 +1,4 @@
1
- module SMSApi
1
+ module Smsapi
2
2
  class Server
3
3
  def initialize(username, password)
4
4
  @username = username
@@ -7,16 +7,16 @@ module SMSApi
7
7
  end
8
8
 
9
9
  def sms(params = {})
10
- api_response = make_request(SMSApi::API[:sms_path], params)
10
+ api_response = make_request(Smsapi::API[:sms_path], params)
11
11
  api_response.split(';')
12
12
  end
13
13
 
14
14
  private
15
15
 
16
16
  def setup_connection
17
- SMSApi::Server::Connection.new(
18
- SMSApi::API[:uri],
19
- SMSApi::API[:port]
17
+ Smsapi::Server::Connection.new(
18
+ Smsapi::API[:uri],
19
+ Smsapi::API[:port]
20
20
  )
21
21
  end
22
22
 
@@ -1,6 +1,6 @@
1
1
  require 'net/http'
2
2
 
3
- module SMSApi
3
+ module Smsapi
4
4
  class Server
5
5
  class Connection
6
6
  def initialize(uri, port)
@@ -1,6 +1,6 @@
1
- module SMSApi
1
+ module Smsapi
2
2
  class SMS
3
- include SMSApi::Defaults
3
+ include Smsapi::Defaults
4
4
 
5
5
  attr_accessor :to, :message, :id, :points, :status, :error_code, :date
6
6
  def initialize(to, message, server, options = {})
@@ -36,7 +36,7 @@ module SMSApi
36
36
  end
37
37
 
38
38
  def error_message
39
- SMSApi::ERROR_MESSAGES[error_code]
39
+ Smsapi::ERROR_MESSAGES[error_code]
40
40
  end
41
41
 
42
42
  def read_response(response)
@@ -6,11 +6,11 @@ require 'smsapi/sms'
6
6
  require 'smsapi/bulk_sms'
7
7
  require 'smsapi/group_sms'
8
8
 
9
- module SMSApi
9
+ module Smsapi
10
10
  class Error < StandardError; end
11
11
  class ServerError < Error; end
12
12
 
13
- VERSION = "0.1.0"
13
+ VERSION = "0.2.0"
14
14
  API = {
15
15
  uri: 'ssl.smsapi.pl',
16
16
  port: 443,
@@ -5,7 +5,7 @@ require 'smsapi/smsapi'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "smsapi-client"
8
- spec.version = SMSApi::VERSION
8
+ spec.version = Smsapi::VERSION
9
9
  spec.authors = ["Alek Niemczyk", "Marek Machula", "Marcin Drozd", "Michal Musialik"]
10
10
  spec.email = ["info@rubylogic.pl"]
11
11
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smsapi-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alek Niemczyk
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: exe
13
13
  cert_chain: []
14
- date: 2015-08-21 00:00:00.000000000 Z
14
+ date: 2015-10-02 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bundler