locasms 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -1
- data/README.md +1 -1
- data/lib/locasms/client.rb +4 -2
- data/lib/locasms/version.rb +1 -1
- data/spec/lib/locasms/client_spec.rb +21 -5
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9fcc47dc9d81331e507553c2bec302c2fd41ea5e
|
4
|
+
data.tar.gz: 875d43f697d0a428cd93e1ec8b9d06cc0cdbdb0f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7ac7758b75ec458c061b5bad63612a7c2ae131bd363c86f14c04e51ee436788b3674db4cd2402b85baf6efa884a18ca469d383a7ad7eef4da611f453a471549
|
7
|
+
data.tar.gz: e371973b0a48b2708ec2e9bae5e03964b1b7e155e18494e8e5c9d1b676ef498c725bbad2cd0ecb7d38341ac15818675df635f6ff4e13fe252955be8397dd0e7f
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# locasms
|
2
2
|
[![Gem Version](https://badge.fury.io/rb/locasms.svg)](http://badge.fury.io/rb/locasms) [![Build Status](https://travis-ci.org/mcorp/locasms.png?branch=master)](https://travis-ci.org/mcorp/locasms) [![Dependency Status](https://gemnasium.com/mcorp/locasms.png)](https://gemnasium.com/mcorp/locasms) [![Code Climate](https://codeclimate.com/github/mcorp/locasms.png)](https://codeclimate.com/github/mcorp/locasms) [![Inline docs](http://inch-ci.org/github/mcorp/locasms.svg?branch=master)](http://inch-ci.org/github/mcorp/locasms)
|
3
3
|
|
4
|
-
> :warning: After `
|
4
|
+
> :warning: After `March 29, 2016` the base IP of the service will change as noticed on this [issue](https://github.com/mcorp/locasms/issues/6). If you don't upgrade to version `0.1.7` your app will stop delivering SMS
|
5
5
|
|
6
6
|
Client to consume [LocaSMS api's][0].
|
7
7
|
|
data/lib/locasms/client.rb
CHANGED
@@ -3,7 +3,9 @@ module LocaSMS
|
|
3
3
|
# Client to interact with LocaSMS API
|
4
4
|
class Client
|
5
5
|
# Default API address
|
6
|
-
ENDPOINT = if Time.now >= Time.parse('
|
6
|
+
ENDPOINT = if Time.now >= Time.parse('2016-03-29T00:00:00-0300')
|
7
|
+
'http://54.173.24.177/painel/api.ashx'
|
8
|
+
elsif Time.now >= Time.parse('2015-06-01T00:00:00-0300')
|
7
9
|
'http://209.133.196.250/painel/api.ashx'
|
8
10
|
else
|
9
11
|
'http://173.44.33.18/painel/api.ashx'
|
@@ -118,4 +120,4 @@ module LocaSMS
|
|
118
120
|
|
119
121
|
end
|
120
122
|
|
121
|
-
end
|
123
|
+
end
|
data/lib/locasms/version.rb
CHANGED
@@ -13,7 +13,7 @@ describe LocaSMS::Client do
|
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
16
|
-
it 'prior to Jun 1st 2015' do
|
16
|
+
it 'prior to Jun 1st, 2015' do
|
17
17
|
test_when('2015-05-31T23:59:59-0300') do
|
18
18
|
expect(LocaSMS::Client::ENDPOINT).to(
|
19
19
|
eq('http://173.44.33.18/painel/api.ashx')
|
@@ -21,7 +21,7 @@ describe LocaSMS::Client do
|
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
|
-
it 'is Jun 1st 2015' do
|
24
|
+
it 'is Jun 1st, 2015' do
|
25
25
|
test_when('2015-06-01T00:00:00-0300') do
|
26
26
|
expect(LocaSMS::Client::ENDPOINT).to(
|
27
27
|
eq('http://209.133.196.250/painel/api.ashx')
|
@@ -29,13 +29,29 @@ describe LocaSMS::Client do
|
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
32
|
-
it 'after Jun 1st 2015' do
|
33
|
-
test_when('2016-
|
32
|
+
it 'after Jun 1st, 2015 and prior to March 29, 2016' do
|
33
|
+
test_when('2016-03-28T00:00:00-0300') do
|
34
34
|
expect(LocaSMS::Client::ENDPOINT).to(
|
35
35
|
eq('http://209.133.196.250/painel/api.ashx')
|
36
36
|
)
|
37
37
|
end
|
38
38
|
end
|
39
|
+
|
40
|
+
it 'is March 29, 2016' do
|
41
|
+
test_when('2016-03-29T00:00:00-0300') do
|
42
|
+
expect(LocaSMS::Client::ENDPOINT).to(
|
43
|
+
eq('http://54.173.24.177/painel/api.ashx')
|
44
|
+
)
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
it 'after March 29, 2016' do
|
49
|
+
test_when('2017-01-01T00:00:00-0300') do
|
50
|
+
expect(LocaSMS::Client::ENDPOINT).to(
|
51
|
+
eq('http://54.173.24.177/painel/api.ashx')
|
52
|
+
)
|
53
|
+
end
|
54
|
+
end
|
39
55
|
end
|
40
56
|
|
41
57
|
describe '.initialize' do
|
@@ -141,4 +157,4 @@ describe LocaSMS::Client do
|
|
141
157
|
it 'Should have tests to cover campaign_status csv result'
|
142
158
|
end
|
143
159
|
|
144
|
-
end
|
160
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: locasms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adilson Carvalho
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2016-03-29 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|
@@ -233,7 +233,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
233
233
|
version: '0'
|
234
234
|
requirements: []
|
235
235
|
rubyforge_project:
|
236
|
-
rubygems_version: 2.
|
236
|
+
rubygems_version: 2.5.2
|
237
237
|
signing_key:
|
238
238
|
specification_version: 4
|
239
239
|
summary: Cliente para o serviço de disparo de SMS da LocaSMS
|