telesms 0.1.1 → 0.1.2

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: 78e650d634d86360309d987b8feeb0b043141558
4
- data.tar.gz: a542753404f624f241afb0271c2569be07de0af6
3
+ metadata.gz: eb6af80408db9246193faf4159c808f6f05f08fa
4
+ data.tar.gz: 9e1db03ddcd1fa2f981969cd725c93b2e26a6696
5
5
  SHA512:
6
- metadata.gz: ec9de6e88064a65d741173ed04d5f40e3214a74b4ea5ebef9e3e2d42c1aef2299483f9d55d7e90116d1b1d9cbc1a0b8863a0d3347b1e319c5d8ff7cfaf55d6c3
7
- data.tar.gz: 182fb19db3450b01a4f2292e29f9a7545f54a5049b0f76fbdc26918e2a31b678584ae8eccd899074c16eb3af8e310602e7adaad2b4bd8197adb18b3f64c29b7a
6
+ metadata.gz: 1a4d687e95ca75b3a4979fbd3050110e4177bd8e9ef01571dc3a91ba626fb3fa65bd7d29d6c948ba10d60f77858251cc247470e56257440a057ef62c3f500869
7
+ data.tar.gz: 60c02d90fb4732af5d93b62dc76065838a194a1265d020b840a360dd3eacde280f1e1a5c8cfd12cea1874944f9c9902aa2febf757fdeaee126d94dc99e633d74
data/Gemfile.lock CHANGED
@@ -1,39 +1,41 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- telesms (0.1.0)
4
+ telesms (0.1.2)
5
5
  mail (~> 2.5)
6
6
  rails (> 3.0.0)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- actionmailer (4.0.4)
12
- actionpack (= 4.0.4)
11
+ actionmailer (4.1.0)
12
+ actionpack (= 4.1.0)
13
+ actionview (= 4.1.0)
13
14
  mail (~> 2.5.4)
14
- actionpack (4.0.4)
15
- activesupport (= 4.0.4)
16
- builder (~> 3.1.0)
17
- erubis (~> 2.7.0)
15
+ actionpack (4.1.0)
16
+ actionview (= 4.1.0)
17
+ activesupport (= 4.1.0)
18
18
  rack (~> 1.5.2)
19
19
  rack-test (~> 0.6.2)
20
- activemodel (4.0.4)
21
- activesupport (= 4.0.4)
22
- builder (~> 3.1.0)
23
- activerecord (4.0.4)
24
- activemodel (= 4.0.4)
25
- activerecord-deprecated_finders (~> 1.0.2)
26
- activesupport (= 4.0.4)
27
- arel (~> 4.0.0)
28
- activerecord-deprecated_finders (1.0.3)
29
- activesupport (4.0.4)
20
+ actionview (4.1.0)
21
+ activesupport (= 4.1.0)
22
+ builder (~> 3.1)
23
+ erubis (~> 2.7.0)
24
+ activemodel (4.1.0)
25
+ activesupport (= 4.1.0)
26
+ builder (~> 3.1)
27
+ activerecord (4.1.0)
28
+ activemodel (= 4.1.0)
29
+ activesupport (= 4.1.0)
30
+ arel (~> 5.0.0)
31
+ activesupport (4.1.0)
30
32
  i18n (~> 0.6, >= 0.6.9)
31
- minitest (~> 4.2)
32
- multi_json (~> 1.3)
33
+ json (~> 1.7, >= 1.7.7)
34
+ minitest (~> 5.1)
33
35
  thread_safe (~> 0.1)
34
- tzinfo (~> 0.3.37)
35
- arel (4.0.2)
36
- builder (3.1.4)
36
+ tzinfo (~> 1.1)
37
+ arel (5.0.0)
38
+ builder (3.2.2)
37
39
  diff-lcs (1.2.5)
38
40
  docile (1.1.3)
39
41
  erubis (2.7.0)
@@ -41,27 +43,30 @@ GEM
41
43
  i18n (~> 0.5)
42
44
  hike (1.2.3)
43
45
  i18n (0.6.9)
46
+ json (1.8.1)
44
47
  mail (2.5.4)
45
48
  mime-types (~> 1.16)
46
49
  treetop (~> 1.4.8)
47
50
  mime-types (1.25.1)
48
- minitest (4.7.5)
51
+ minitest (5.3.2)
49
52
  multi_json (1.9.2)
50
53
  polyglot (0.3.4)
51
54
  rack (1.5.2)
52
55
  rack-test (0.6.2)
53
56
  rack (>= 1.0)
54
- rails (4.0.4)
55
- actionmailer (= 4.0.4)
56
- actionpack (= 4.0.4)
57
- activerecord (= 4.0.4)
58
- activesupport (= 4.0.4)
57
+ rails (4.1.0)
58
+ actionmailer (= 4.1.0)
59
+ actionpack (= 4.1.0)
60
+ actionview (= 4.1.0)
61
+ activemodel (= 4.1.0)
62
+ activerecord (= 4.1.0)
63
+ activesupport (= 4.1.0)
59
64
  bundler (>= 1.3.0, < 2.0)
60
- railties (= 4.0.4)
61
- sprockets-rails (~> 2.0.0)
62
- railties (4.0.4)
63
- actionpack (= 4.0.4)
64
- activesupport (= 4.0.4)
65
+ railties (= 4.1.0)
66
+ sprockets-rails (~> 2.0)
67
+ railties (4.1.0)
68
+ actionpack (= 4.1.0)
69
+ activesupport (= 4.1.0)
65
70
  rake (>= 0.8.7)
66
71
  thor (>= 0.18.1, < 2.0)
67
72
  rake (10.2.2)
@@ -97,7 +102,7 @@ GEM
97
102
  multi_json (~> 1.0)
98
103
  rack (~> 1.0)
99
104
  tilt (~> 1.1, != 1.3.0)
100
- sprockets-rails (2.0.1)
105
+ sprockets-rails (2.1.1)
101
106
  actionpack (>= 3.0)
102
107
  activesupport (>= 3.0)
103
108
  sprockets (~> 2.8)
@@ -107,7 +112,8 @@ GEM
107
112
  treetop (1.4.15)
108
113
  polyglot
109
114
  polyglot (>= 0.3.1)
110
- tzinfo (0.3.39)
115
+ tzinfo (1.1.0)
116
+ thread_safe (~> 0.1)
111
117
 
112
118
  PLATFORMS
113
119
  ruby
data/README.md CHANGED
@@ -43,7 +43,11 @@ To get a list of available gateways:
43
43
 
44
44
  ## Configuration
45
45
 
46
- Make sure your Rails application has a mail server configured. TeleSMS will use the default configuration of your application.
46
+ Configure the mail gem to use the correct delivery method:
47
+
48
+ Mail.defaults do
49
+ delivery_method :sendmail # or :smtp, options
50
+ end
47
51
 
48
52
  ## Contributing
49
53
 
@@ -71,7 +71,7 @@ module Telesms
71
71
  #
72
72
  # @return [String]
73
73
  def formatted_to
74
- "#{to}@#{Base.gateways[@provider][:sms]}"
74
+ "#{to}@#{Base.gateways[@provider][:sms]}" rescue raise "Invalid provider"
75
75
  end
76
76
 
77
77
  # This method sanitizes the message body.
@@ -1,3 +1,3 @@
1
1
  module Telesms
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
@@ -39,7 +39,15 @@ describe Telesms::Outgoing do
39
39
 
40
40
  describe "formatted_to" do
41
41
  subject { outgoing_message.formatted_to }
42
- it { should match /#{to}\@[a-zA-Z0-9\.\-]+/ }
42
+
43
+ context "with a valid provider" do
44
+ it { should match /#{to}\@[a-zA-Z0-9\.\-]+/ }
45
+ end
46
+
47
+ context "with an invalid provider" do
48
+ let(:provider) { 'invalid' }
49
+ it { expect { subject }.to raise_error }
50
+ end
43
51
  end
44
52
 
45
53
  describe "sanitized_message" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: telesms
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
  - Artem Kalinchuk
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-09 00:00:00.000000000 Z
11
+ date: 2014-04-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails