telesms 0.1.0 → 0.1.1

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: 31eff1455cbb782fdda385fbac4490209d9c7f70
4
- data.tar.gz: b23557ae5e60469349d8879daee0d5fbb825a4a3
3
+ metadata.gz: 78e650d634d86360309d987b8feeb0b043141558
4
+ data.tar.gz: a542753404f624f241afb0271c2569be07de0af6
5
5
  SHA512:
6
- metadata.gz: 06a30fabf9c9c40092560ef5ab70290147ce7b6ccd8937fa5f5f717a5faf37082f90ab8cd06e689c6c38479d8837fe0db364914064ea2ead2b4203ea8c192959
7
- data.tar.gz: db24939736b88ab9ab8adbd05e0538cd0cade89aaf69a7bef36b3e2a1a127aa6ad806414a9e610c5ce518f3112472f8b69ebd5bab633fb1918dc7c48541fe1a3
6
+ metadata.gz: ec9de6e88064a65d741173ed04d5f40e3214a74b4ea5ebef9e3e2d42c1aef2299483f9d55d7e90116d1b1d9cbc1a0b8863a0d3347b1e319c5d8ff7cfaf55d6c3
7
+ data.tar.gz: 182fb19db3450b01a4f2292e29f9a7545f54a5049b0f76fbdc26918e2a31b678584ae8eccd899074c16eb3af8e310602e7adaad2b4bd8197adb18b3f64c29b7a
data/LICENSE ADDED
@@ -0,0 +1,23 @@
1
+ LICENSE
2
+
3
+ The MIT License
4
+
5
+ Copyright (c) 2014 Telefio
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ of this software and associated documentation files (the "Software"), to deal
9
+ in the Software without restriction, including without limitation the rights
10
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ copies of the Software, and to permit persons to whom the Software is
12
+ furnished to do so, subject to the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall be included in
15
+ all copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23
+ THE SOFTWARE.
data/README.md CHANGED
@@ -41,27 +41,27 @@ To get a list of available gateways:
41
41
  Telesms::Base.gateways
42
42
  # => { 'AT&T' => { sms: 'att.com', mms: 'mmode.com'}, ... }
43
43
 
44
- ## LICENSE:
44
+ ## Configuration
45
+
46
+ Make sure your Rails application has a mail server configured. TeleSMS will use the default configuration of your application.
47
+
48
+ ## Contributing
45
49
 
46
- (The MIT License)
50
+ To fetch & test the library for development, do:
47
51
 
48
- Copyright (c) 2014 Telefio
52
+ $ git clone https://github.com/kalinchuk/telesms.git
53
+ $ cd telesms
54
+ $ bundle
55
+ $ rake spec
56
+
57
+ If you want to contribute, please:
49
58
 
50
- Permission is hereby granted, free of charge, to any person obtaining
51
- a copy of this software and associated documentation files (the
52
- 'Software'), to deal in the Software without restriction, including
53
- without limitation the rights to use, copy, modify, merge, publish,
54
- distribute, sublicense, and/or sell copies of the Software, and to
55
- permit persons to whom the Software is furnished to do so, subject to
56
- the following conditions:
59
+ * Fork the project.
60
+ * Write tests for the feature or bug fix.
61
+ * Add your feature or bug fix.
62
+ * Please update CHANGELOG.md
63
+ * Send me a pull request on Github.
57
64
 
58
- The above copyright notice and this permission notice shall be
59
- included in all copies or substantial portions of the Software.
65
+ ## LICENSE:
60
66
 
61
- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
62
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
63
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
64
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
65
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
66
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
67
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
67
+ TeleSMS is Copyright © 2014 Telefio. It is free software, and may be redistributed under the terms specified in the MIT-LICENSE file.
data/Rakefile ADDED
@@ -0,0 +1,5 @@
1
+ require 'rspec/core/rake_task'
2
+
3
+ RSpec::Core::RakeTask.new(:spec)
4
+
5
+ task default: :spec
@@ -71,7 +71,7 @@ module Telesms
71
71
  #
72
72
  # @return [String]
73
73
  def formatted_to
74
- "#{to}@#{Base.gateways[@provider][:sms_gateway]}"
74
+ "#{to}@#{Base.gateways[@provider][:sms]}"
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.0'
2
+ VERSION = '0.1.1'
3
3
  end
data/spec/base_spec.rb CHANGED
@@ -5,6 +5,6 @@ describe Telesms::Base do
5
5
  subject { klass.gateways }
6
6
 
7
7
  it { should be_a Hash }
8
- it { should include({ 'Verizon' => { sms: 'vtext.com', mms: 'vswpix.com' }}) }
8
+ it { should include('Verizon' => { sms: 'vtext.com', mms: 'vzwpix.com' }) }
9
9
  end
10
10
  end
@@ -83,7 +83,7 @@ describe Telesms::Incoming do
83
83
  end
84
84
 
85
85
  context "with a matching mms gateway" do
86
- before { params[:from] = '555555555@mmode.com' }
86
+ before { params[:from] = '555555555@mms.att.net' }
87
87
  it { should eq 'AT&T' }
88
88
  end
89
89
 
@@ -39,7 +39,7 @@ describe Telesms::Outgoing do
39
39
 
40
40
  describe "formatted_to" do
41
41
  subject { outgoing_message.formatted_to }
42
- it { should match /#{to}\@(.*)/ }
42
+ it { should match /#{to}\@[a-zA-Z0-9\.\-]+/ }
43
43
  end
44
44
 
45
45
  describe "sanitized_message" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: telesms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Artem Kalinchuk
@@ -135,7 +135,9 @@ files:
135
135
  - CHANGELOG.md
136
136
  - Gemfile
137
137
  - Gemfile.lock
138
+ - LICENSE
138
139
  - README.md
140
+ - Rakefile
139
141
  - config/gateways.yml
140
142
  - lib/telesms.rb
141
143
  - lib/telesms/base.rb