telein-client 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --color --format documentation
data/.yardopts ADDED
@@ -0,0 +1,4 @@
1
+ --title "Telein::Client Documentation"
2
+ --protected
3
+ --markup-provider=redcarpet
4
+ --markup=markdown
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source :rubygems
2
+
3
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2013 Thiago Brandão Damasceno
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,62 @@
1
+ # Telein::Client
2
+
3
+ The 'telein-client' gem allows the access for
4
+ the Telein API in Ruby.
5
+
6
+ ## Installation
7
+
8
+ Add this line to your application's Gemfile:
9
+
10
+ gem 'telein-client', :require => 'telein'
11
+
12
+ Or install it yourself as:
13
+
14
+ $ gem install telein-client
15
+
16
+ ## Usage
17
+
18
+ require 'telein'
19
+
20
+ # if you do not set this properly, it's going to return 999 responses
21
+ Telein.api_key = 'your_api_key'
22
+
23
+ client = Telein::Client.new
24
+ client.carrier_code_for('(12) 3434-5656') # => 41
25
+
26
+ ## About Telein
27
+
28
+ [Telein](http://www.telein.com.br/) is a service that
29
+ allows the fetching of carrier codes for Brazilian phones,
30
+ through simple GET requests to its servers.
31
+
32
+ ## Contributing
33
+
34
+ 1. Fork it
35
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
36
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
37
+ 4. Push to the branch (`git push origin my-new-feature`)
38
+ 5. Create new Pull Request
39
+
40
+ ## MIT License
41
+
42
+ Copyright (c) 2013 Thiago Brandão Damasceno
43
+
44
+ Permission is hereby granted, free of charge, to any person obtaining
45
+ a copy of this software and associated documentation files (the
46
+ "Software"), to deal in the Software without restriction, including
47
+ without limitation the rights to use, copy, modify, merge, publish,
48
+ distribute, sublicense, and/or sell copies of the Software, and to
49
+ permit persons to whom the Software is furnished to do so, subject to
50
+ the following conditions:
51
+
52
+ The above copyright notice and this permission notice shall be
53
+ included in all copies or substantial portions of the Software.
54
+
55
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
56
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
57
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
58
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
59
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
60
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
61
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
62
+
data/Rakefile ADDED
@@ -0,0 +1,34 @@
1
+ # encoding: utf-8
2
+
3
+ require 'rubygems'
4
+
5
+ begin
6
+ require 'bundler'
7
+ rescue LoadError => e
8
+ warn e.message
9
+ warn "Run `gem install bundler` to install Bundler."
10
+ exit -1
11
+ end
12
+
13
+ begin
14
+ Bundler.setup(:development)
15
+ rescue Bundler::BundlerError => e
16
+ warn e.message
17
+ warn "Run `bundle install` to install missing gems."
18
+ exit e.status_code
19
+ end
20
+
21
+ require 'rake'
22
+
23
+ require 'rubygems/tasks'
24
+ Gem::Tasks.new
25
+
26
+ require 'rspec/core/rake_task'
27
+ RSpec::Core::RakeTask.new
28
+
29
+ task :test => :spec
30
+ task :default => :spec
31
+
32
+ require 'yard'
33
+ YARD::Rake::YardocTask.new
34
+ task :doc => :yard
@@ -0,0 +1,24 @@
1
+ # encoding: utf-8
2
+ module Telein
3
+ # The mapping of carrier codes and meanings , in pt-BR
4
+ # @todo Maybe provide in en-US format
5
+ CARRIER_CODES = {
6
+ 12 => "CTBC",
7
+ 14 => "Brasil Telecom",
8
+ 20 => "Vivo",
9
+ 21 => "Claro",
10
+ 23 => "Telemig",
11
+ 24 => "Amazonia",
12
+ 31 => "Oi",
13
+ 37 => "Unicel",
14
+ 41 => "TIM",
15
+ 43 => "Sercomercio",
16
+ 77 => "Nextel",
17
+ 98 => "Fixo",
18
+ 99 => "Número não encontrado",
19
+ 100 => "Número inválido",
20
+ 101 => "Erro no servidor",
21
+ 990 => "IP blacklisted",
22
+ 995 => "IP excedeu 6 consultas/hora nas últimas 24 horas",
23
+ 999 => "Chave inválida" }
24
+ end
@@ -0,0 +1,69 @@
1
+ # encoding: utf-8
2
+ require 'curb'
3
+
4
+ module Telein
5
+ # Class used to query Telein servers for carrier codes
6
+ #
7
+ # No API key given
8
+ # ----------------
9
+ # The client doesn't make any request if the {Telein#api_key API key}
10
+ # is missing, returning a 999 code immediately.
11
+ #
12
+ # Invalid phones
13
+ # --------------
14
+ # Telein can tell if a given phone is invalid but each
15
+ # request is a credit spent so the class also encapsulates
16
+ # the code from Telein::Util::Phone to detect invalid ones
17
+ # preemptively.
18
+ #
19
+ # All servers down
20
+ # ----------------
21
+ # If all {Telein#register_server Registered servers} are
22
+ # down, then the client return 101 for carrier_code
23
+ #
24
+ # @example Query servers for the carrier code of a given phone
25
+ # client = Telein::Client.new
26
+ # client.carrier_code_for('(12) 3434-5656') # => '41'
27
+ class Client
28
+
29
+ # Queries the Telein servers for the carrier code of value
30
+ #
31
+ # @param value [String] A string supposedly containing phone information
32
+ # @return [Integer] The carrier code for value
33
+ def carrier_code_for(value)
34
+ return 999 unless Telein.api_key
35
+
36
+ phone = Telein::Util::Phone.new(value)
37
+
38
+ if phone.valid?
39
+ Telein.servers.each do |server|
40
+ begin
41
+ curl = Curl::Easy.new do |easy|
42
+ easy.url = server.query_url_for(phone.to_telein_s)
43
+ end
44
+
45
+ # client request
46
+ curl.http_get
47
+
48
+ # telein response
49
+ response = curl.body_str
50
+
51
+ # response parsing (carrier#number)
52
+ carrier_code, _ = response.split('#')
53
+
54
+ return carrier_code.to_i
55
+ rescue
56
+ next
57
+ end
58
+ end
59
+
60
+ # all servers down
61
+ return 101
62
+ else
63
+ # invalid phone
64
+ return 100
65
+ end
66
+ end
67
+
68
+ end
69
+ end
@@ -0,0 +1,35 @@
1
+ require 'uri'
2
+
3
+ module Telein
4
+ # The class that encapsulates all code that build
5
+ # request queries made to Telein servers by the client
6
+ #
7
+ # @example Instantiate a server and build a query for phone
8
+ # server = Telein::Server.new('consultanumero1.telein.com.br')
9
+ # server.query_url_for('1234345656')
10
+ # => 'http://consultanumero1.telein.com.br/sistema/consulta_numero.php?numero=1234345656&chave=my_api_key'
11
+ class Server
12
+ # Gets/sets the endpoint (an URL) representing
13
+ # a Telein Server
14
+ #
15
+ # @return [String] the endpoint
16
+ attr_accessor :endpoint
17
+
18
+ # @param endpoint [String] The URL of the server
19
+ def initialize(endpoint)
20
+ self.endpoint = endpoint
21
+ end
22
+
23
+ # Builds a request URL to be used by the client to fetch the carrier code
24
+ #
25
+ # @param phone [String] A phone in the {Telein::Util::Phone#to_telein_s Telein format}
26
+ # @return [String] A URL the client will use to fetch the carrier code
27
+ # @see Telein::Client#carrier_code_for
28
+ def query_url_for(phone)
29
+ url = URI::HTTP.build({:host => self.endpoint,
30
+ :path => '/sistema/consulta_numero.php',
31
+ :query => URI::encode_www_form({:numero => phone,:chave => Telein.api_key})})
32
+ url.to_s
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,81 @@
1
+ module Telein
2
+ # Utility classes
3
+ module Util
4
+ # Class that encapsulates phone data logic
5
+ class Phone
6
+
7
+ # The Matching parts of Phone::FORMAT
8
+ #
9
+ # @return [MatchData] A +MatchData+ object containing the matching made against value
10
+ # @see #initialize
11
+ attr_reader :matching
12
+
13
+ # General format of a Brazilian phone.
14
+ # An area_code and a number that may contain and extra 9
15
+ FORMAT = /\A\(?(?<area_code>[1-9][0-9])\)?\s*(?<number>(?<extra_digit>9?)[2-9]\d{3}\-?\d{4})\Z/
16
+
17
+ # @param value [String] a string containing phone information
18
+ def initialize(value)
19
+ @matching = value.match(FORMAT) if value
20
+ end
21
+
22
+ # Returns a string ready to be consumed by Telein API
23
+ # @example Return a formatted phone
24
+ # phone = Telein::Util::Phone.new('(12) 3434-5656')
25
+ # phone.to_telein_s # => '1234345656'
26
+ #
27
+ # @return [String] a string in Telein format
28
+ def to_telein_s
29
+ return nil.to_s unless self.valid?
30
+
31
+ [self.area_code,self.number].join
32
+ end
33
+
34
+ # Returns the area code for phone
35
+ #
36
+ # @return [String] the area code of phone
37
+ def area_code
38
+ self.matching[:area_code] if self.matching
39
+ end
40
+
41
+ # Returns the number part of phone (everything minus area code)
42
+ #
43
+ # @return [String] the number part of phone
44
+ def number
45
+ self.matching[:number].delete('-') if self.matching
46
+ end
47
+
48
+ # Checks if phone has an extra digit
49
+ # The extra digit '9' was introduced only to phones
50
+ # in 11 area code (São Paulo) to account for new phones
51
+ #
52
+ # @return [Boolean] whether phone has an extra 9
53
+ def has_extra_digit?
54
+ return false unless self.matching
55
+ self.matching[:extra_digit] == '9' ? true : false
56
+ end
57
+
58
+ # Checks if phone is valid
59
+ # This is a loosen check, in the sense that it accepts
60
+ # a wide range of probably invalid phones, like
61
+ # (99) 9999-9999 but the specs for area codes in Brazil
62
+ # are also loosen, allowing the existence of such numbers in the future.
63
+ # Also, for phones in the 11 area, the method may return false
64
+ # positives, since only cellphones have that extra digit.
65
+ #
66
+ # @return [Boolean] whether phone is valid or invalid
67
+ def valid?
68
+ if self.area_code && self.number
69
+ if self.has_extra_digit? && self.area_code != '11'
70
+ false
71
+ else
72
+ true
73
+ end
74
+ else
75
+ false
76
+ end
77
+ end
78
+
79
+ end
80
+ end
81
+ end
@@ -0,0 +1,4 @@
1
+ module Telein
2
+ # Telein version
3
+ VERSION = "0.1.0"
4
+ end
data/lib/telein.rb ADDED
@@ -0,0 +1,36 @@
1
+ # Namespace for classes and modules that handle the Telein API
2
+ module Telein
3
+ extend self
4
+
5
+ # Gets/sets api key to access Telein API
6
+ # @return [String]
7
+ attr_accessor :api_key
8
+
9
+ # An array of servers available to be requested
10
+ # by the client. The client will use the response
11
+ # of the first one that responds the request.
12
+ # @see Telein::Client#carrier_code_for
13
+ #
14
+ # @return [Array<Telein::Server>]
15
+ def servers
16
+ @servers ||= []
17
+ end
18
+
19
+ # Syntax sugar for the {Array#<<} method.
20
+ #
21
+ # @return [Array<Telein::Server>]
22
+ def register_server(server)
23
+ self.servers << server
24
+ end
25
+ end
26
+
27
+ require 'telein/version'
28
+ require 'telein/carrier_codes'
29
+ require 'telein/util/phone'
30
+ require 'telein/server'
31
+ require 'telein/client'
32
+
33
+ # @see Telein::Server#initialize
34
+ Telein.register_server(Telein::Server.new('consultanumero1.telein.com.br'))
35
+ Telein.register_server(Telein::Server.new('consultanumero2.telein.com.br'))
36
+ Telein.register_server(Telein::Server.new('consultanumero3.telein.com.br'))
@@ -0,0 +1,7 @@
1
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
2
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
3
+
4
+ require 'telein'
5
+ require 'rspec'
6
+ require 'webmock'
7
+ require 'webmock/rspec'
@@ -0,0 +1,54 @@
1
+ require 'spec_helper'
2
+
3
+ describe Telein::Client do
4
+
5
+ before(:each) do
6
+ Telein.api_key = 'my_api_key'
7
+ end
8
+
9
+ after(:each) do
10
+ WebMock.reset!
11
+ end
12
+
13
+ it 'returns 999 when no api key is provided' do
14
+ Telein.api_key = nil
15
+
16
+ Telein.servers.each do |server|
17
+ stub_request(:get,server.query_url_for('0000000000')).to_return(:body => '99#0000000000')
18
+ stub_request(:get,server.query_url_for('1234345656')).to_return(:body => '98#1234345656')
19
+ stub_request(:get,server.query_url_for('1294345656')).to_return(:body => '41#1294345656')
20
+ end
21
+
22
+ client = described_class.new
23
+ client.carrier_code_for('(00) 0000-0000').should == 999
24
+ client.carrier_code_for('(12) 3434-5656').should == 999
25
+ client.carrier_code_for('(12) 9434-5656').should == 999
26
+ end
27
+
28
+ it 'returns carrier codes' do
29
+ Telein.servers.each do |server|
30
+ stub_request(:get,server.query_url_for('0000000000')).to_return(:body => '99#0000000000')
31
+ stub_request(:get,server.query_url_for('1234345656')).to_return(:body => '98#1234345656')
32
+ stub_request(:get,server.query_url_for('1294345656')).to_return(:body => '41#1294345656')
33
+ end
34
+
35
+ client = described_class.new
36
+ client.carrier_code_for('(00) 0000-0000').should == 100
37
+ client.carrier_code_for('(12) 3434-5656').should == 98
38
+ client.carrier_code_for('(12) 9434-5656').should == 41
39
+ end
40
+
41
+ it 'returns server error code when all endpoints are down' do
42
+ Telein.servers.each do |server|
43
+ stub_request(:get,server.query_url_for('0000000000')).to_timeout
44
+ stub_request(:get,server.query_url_for('1234345656')).to_timeout
45
+ stub_request(:get,server.query_url_for('1294345656')).to_timeout
46
+ end
47
+
48
+ client = described_class.new
49
+ client.carrier_code_for('(00) 0000-0000').should == 100
50
+ client.carrier_code_for('(12) 3434-5656').should == 101
51
+ client.carrier_code_for('(12) 9434-5656').should == 101
52
+ end
53
+
54
+ end
@@ -0,0 +1,16 @@
1
+ require 'spec_helper'
2
+ require 'uri'
3
+
4
+ describe Telein::Server do
5
+
6
+ it 'returns query url for a given phone' do
7
+ Telein.api_key = 'my_api_key'
8
+ endpoint = 'consultanumero1.telein.com.br'
9
+ phone = '1234345656'
10
+
11
+ server = described_class.new(endpoint)
12
+
13
+ server.query_url_for(phone).should == 'http://consultanumero1.telein.com.br/sistema/consulta_numero.php?numero=1234345656&chave=my_api_key'
14
+ end
15
+
16
+ end
@@ -0,0 +1,39 @@
1
+ require 'spec_helper'
2
+
3
+ describe Telein::Util::Phone do
4
+
5
+ it 'rejects invalid phones' do
6
+ phone = described_class.new('anything')
7
+ phone.number.should be_nil
8
+ phone.area_code.should be_nil
9
+ expect(phone.has_extra_digit?).to be_false
10
+ expect(phone.valid?).to be_false
11
+
12
+ phone = described_class.new('(12) 3434-5656')
13
+ phone.number.should == '34345656'
14
+ phone.area_code.should == '12'
15
+ expect(phone.has_extra_digit?).to be_false
16
+ expect(phone.valid?).to be_true
17
+
18
+ phone = described_class.new('(21) 9434-5656')
19
+ phone.number.should == '94345656'
20
+ phone.area_code.should == '21'
21
+ expect(phone.has_extra_digit?).to be_false
22
+ expect(phone.valid?).to be_true
23
+
24
+ phone = described_class.new('(21) 99434-5656')
25
+ phone.number.should == '994345656'
26
+ phone.area_code.should == '21'
27
+ expect(phone.has_extra_digit?).to be_true
28
+ expect(phone.valid?).to be_false
29
+ end
30
+
31
+ it 'returns format for telein purposes' do
32
+ phone = described_class.new('(21) 9434-5656')
33
+ phone.to_telein_s.should == '2194345656'
34
+
35
+ phone = described_class.new('2194345656')
36
+ phone.to_telein_s.should == '2194345656'
37
+ end
38
+
39
+ end
@@ -0,0 +1,31 @@
1
+ # encoding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'telein/version'
5
+
6
+ Gem::Specification.new do |gem|
7
+ gem.name = "telein-client"
8
+ gem.version = Telein::VERSION
9
+ gem.summary = %q{Client to access Telein API in Ruby}
10
+ gem.description = %q{The 'telein-client' gem allows the access for
11
+ the Telein API in Ruby.}
12
+ gem.license = "MIT"
13
+ gem.authors = ["Thiago Brandão Damasceno"]
14
+ gem.email = "thiagobrandam@gmail.com"
15
+ gem.homepage = "https://github.com/thiagobrandam/telein-client#readme"
16
+
17
+ gem.files = `git ls-files`.split($/)
18
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
19
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
20
+ gem.require_paths = ['lib']
21
+
22
+ gem.add_dependency 'curb', '~> 0.8'
23
+
24
+ gem.add_development_dependency 'bundler', '~> 1.0'
25
+ gem.add_development_dependency 'rake', '~> 0.9'
26
+ gem.add_development_dependency 'redcarpet'
27
+ gem.add_development_dependency 'rspec', '~> 2.13.0'
28
+ gem.add_development_dependency 'rubygems-tasks', '~> 0.2'
29
+ gem.add_development_dependency 'webmock', '~> 1.11'
30
+ gem.add_development_dependency 'yard', '~> 0.8'
31
+ end
metadata ADDED
@@ -0,0 +1,203 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: telein-client
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Thiago Brandão Damasceno
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-03-05 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: curb
16
+ prerelease: false
17
+ requirement: !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ~>
21
+ - !ruby/object:Gem::Version
22
+ version: '0.8'
23
+ type: :runtime
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: '0.8'
30
+ - !ruby/object:Gem::Dependency
31
+ name: bundler
32
+ prerelease: false
33
+ requirement: !ruby/object:Gem::Requirement
34
+ none: false
35
+ requirements:
36
+ - - ~>
37
+ - !ruby/object:Gem::Version
38
+ version: '1.0'
39
+ type: :development
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: '1.0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: rake
48
+ prerelease: false
49
+ requirement: !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: '0.9'
55
+ type: :development
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: '0.9'
62
+ - !ruby/object:Gem::Dependency
63
+ name: redcarpet
64
+ prerelease: false
65
+ requirement: !ruby/object:Gem::Requirement
66
+ none: false
67
+ requirements:
68
+ - - ! '>='
69
+ - !ruby/object:Gem::Version
70
+ version: '0'
71
+ type: :development
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ - !ruby/object:Gem::Dependency
79
+ name: rspec
80
+ prerelease: false
81
+ requirement: !ruby/object:Gem::Requirement
82
+ none: false
83
+ requirements:
84
+ - - ~>
85
+ - !ruby/object:Gem::Version
86
+ version: 2.13.0
87
+ type: :development
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ~>
92
+ - !ruby/object:Gem::Version
93
+ version: 2.13.0
94
+ - !ruby/object:Gem::Dependency
95
+ name: rubygems-tasks
96
+ prerelease: false
97
+ requirement: !ruby/object:Gem::Requirement
98
+ none: false
99
+ requirements:
100
+ - - ~>
101
+ - !ruby/object:Gem::Version
102
+ version: '0.2'
103
+ type: :development
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ~>
108
+ - !ruby/object:Gem::Version
109
+ version: '0.2'
110
+ - !ruby/object:Gem::Dependency
111
+ name: webmock
112
+ prerelease: false
113
+ requirement: !ruby/object:Gem::Requirement
114
+ none: false
115
+ requirements:
116
+ - - ~>
117
+ - !ruby/object:Gem::Version
118
+ version: '1.11'
119
+ type: :development
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ~>
124
+ - !ruby/object:Gem::Version
125
+ version: '1.11'
126
+ - !ruby/object:Gem::Dependency
127
+ name: yard
128
+ prerelease: false
129
+ requirement: !ruby/object:Gem::Requirement
130
+ none: false
131
+ requirements:
132
+ - - ~>
133
+ - !ruby/object:Gem::Version
134
+ version: '0.8'
135
+ type: :development
136
+ version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
138
+ requirements:
139
+ - - ~>
140
+ - !ruby/object:Gem::Version
141
+ version: '0.8'
142
+ description: ! 'The ''telein-client'' gem allows the access for
143
+
144
+ the Telein API in Ruby.'
145
+ email: thiagobrandam@gmail.com
146
+ executables: []
147
+ extensions: []
148
+ extra_rdoc_files: []
149
+ files:
150
+ - .gitignore
151
+ - .rspec
152
+ - .yardopts
153
+ - Gemfile
154
+ - LICENSE.txt
155
+ - README.md
156
+ - Rakefile
157
+ - lib/telein.rb
158
+ - lib/telein/carrier_codes.rb
159
+ - lib/telein/client.rb
160
+ - lib/telein/server.rb
161
+ - lib/telein/util/phone.rb
162
+ - lib/telein/version.rb
163
+ - spec/spec_helper.rb
164
+ - spec/telein/client_spec.rb
165
+ - spec/telein/server_spec.rb
166
+ - spec/telein/util/phone_spec.rb
167
+ - telein-client.gemspec
168
+ homepage: https://github.com/thiagobrandam/telein-client#readme
169
+ licenses:
170
+ - MIT
171
+ post_install_message:
172
+ rdoc_options: []
173
+ require_paths:
174
+ - lib
175
+ required_ruby_version: !ruby/object:Gem::Requirement
176
+ none: false
177
+ requirements:
178
+ - - ! '>='
179
+ - !ruby/object:Gem::Version
180
+ segments:
181
+ - 0
182
+ version: '0'
183
+ hash: 3113826130488596795
184
+ required_rubygems_version: !ruby/object:Gem::Requirement
185
+ none: false
186
+ requirements:
187
+ - - ! '>='
188
+ - !ruby/object:Gem::Version
189
+ segments:
190
+ - 0
191
+ version: '0'
192
+ hash: 3113826130488596795
193
+ requirements: []
194
+ rubyforge_project:
195
+ rubygems_version: 1.8.25
196
+ signing_key:
197
+ specification_version: 3
198
+ summary: Client to access Telein API in Ruby
199
+ test_files:
200
+ - spec/spec_helper.rb
201
+ - spec/telein/client_spec.rb
202
+ - spec/telein/server_spec.rb
203
+ - spec/telein/util/phone_spec.rb