Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'sideshowbandana/master'

Conflicts:
	lib/twilio.rb
  • Loading branch information...
commit 393d907dde0a9911d29a4ac13cfe191aa630ab24 2 parents 83a2976 + df98f89
@philm philm authored
View
5 .gitignore
@@ -2,4 +2,7 @@
.DS_Store
coverage
rdoc
-pkg
+*.gem
+.bundle
+Gemfile.lock
+pkg/*
View
9 Gemfile
@@ -0,0 +1,9 @@
+source "http://rubygems.org"
+
+# Specify your gem's dependencies in twilio.gemspec
+gemspec
+
+group :test do
+ gem 'fakeweb'
+ gem 'shoulda'
+end
View
21 Rakefile
@@ -1,19 +1,9 @@
-require 'rake'
-
+require "rubygems"
begin
- require 'jeweler'
- Jeweler::Tasks.new do |gem|
- gem.name = "twilio"
- gem.summary = %Q{Twilio API Client}
- gem.description = %Q{Twilio API wrapper}
- gem.email = "github@webficient.com"
- gem.homepage = "http://github.com/webficient/twilio"
- gem.authors = ["Phil Misiowiec", "Jonathan Rudenberg", "Alex K Wolfe", "Kyle Daigle", "Jeff Wigal", "Yuri Gadow"]
- gem.add_dependency 'builder', '>= 2.1.2'
- gem.add_dependency 'httparty', '>= 0.4.3'
- end
+require 'bundler'
+Bundler::GemHelper.install_tasks
rescue LoadError
- puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
+ puts "bundler not installed"
end
require 'rake/rdoctask'
@@ -44,6 +34,3 @@ rescue LoadError
abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
end
end
-
-
-task :default => :test
View
8 lib/twilio.rb
@@ -25,15 +25,15 @@
require 'builder'
require 'twilio/twilio_object'
require 'twilio/account'
+require 'twilio/available_phone_numbers'
require 'twilio/call'
-require 'twilio/sms'
+require 'twilio/conference'
require 'twilio/connection'
require 'twilio/incoming_phone_number'
require 'twilio/local_phone_number'
require 'twilio/notification'
require 'twilio/outgoing_caller_id'
require 'twilio/recording'
+require 'twilio/sms'
require 'twilio/toll_free_phone_number'
-require 'twilio/conference'
-require 'twilio/verb'
-require 'twilio/available_phone_numbers'
+require 'twilio/verb'
View
6 lib/twilio/connection.rb
@@ -1,13 +1,14 @@
module Twilio
include HTTParty
TWILIO_URL = "https://api.twilio.com/2010-04-01/Accounts"
-
+ SSL_CA_PATH = "/etc/ssl/certs"
# The connect method caches your Twilio account id and authentication token
# Example:
# Twilio.connect('AC309475e5fede1b49e100272a8640f438', '3a2630a909aadbf60266234756fb15a0')
def self.connect(account_sid, auth_token)
self.base_uri "#{TWILIO_URL}/#{account_sid}"
self.basic_auth account_sid, auth_token
+ self.default_options[:ssl_ca_path] ||= SSL_CA_PATH unless self.default_options[:ssl_ca_file]
end
# DEPRECATED - use Twilio.connect
@@ -18,7 +19,8 @@ class Connection
def initialize(account_sid, auth_token)
self.class.base_uri "#{TWILIO_URL}/#{account_sid}"
self.class.basic_auth account_sid, auth_token
+ self.class.default_options[:ssl_ca_path] ||= SSL_CA_PATH unless self.class.default_options[:ssl_ca_file]
end
end
-end
+end
View
3  lib/twilio/version.rb
@@ -0,0 +1,3 @@
+module Twilio
+ VERSION = "2.8.1"
+end
View
2  test/test_helper.rb
@@ -30,4 +30,4 @@ def twilio_url(url=nil) #:nodoc:
def verb_response(verb) #:nodoc:
path = File.join(File.dirname(__FILE__), "fixtures/yml/verb_responses.yml")
YAML.load_file(path)[verb.to_s]['response']
-end
+end
View
113 twilio.gemspec
@@ -1,103 +1,18 @@
-# Generated by jeweler
-# DO NOT EDIT THIS FILE DIRECTLY
-# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
# -*- encoding: utf-8 -*-
+$:.push File.expand_path("../lib", __FILE__)
+require "twilio/version"
Gem::Specification.new do |s|
- s.name = %q{twilio}
- s.version = "2.9.0"
-
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
- s.authors = ["Phil Misiowiec", "Jonathan Rudenberg", "Alex K Wolfe", "Kyle Daigle", "Jeff Wigal", "Yuri Gadow"]
- s.date = %q{2010-10-27}
+ s.name = "twilio"
+ s.version = Twilio::VERSION
+ s.platform = Gem::Platform::RUBY
+ s.authors = ["Phil Misiowiec", "Jonathan Rudenberg", "Alex K Wolfe", "Kyle Daigle", "Jeff Wigal", "Yuri Gadow"]
+ s.email = ["github@webficient.com"]
+ s.homepage = ""
+ s.summary = %q{Twilio API Client}
s.description = %q{Twilio API wrapper}
- s.email = %q{github@webficient.com}
- s.extra_rdoc_files = [
- "LICENSE",
- "README.rdoc"
- ]
- s.files = [
- ".gitignore",
- "LICENSE",
- "README.rdoc",
- "Rakefile",
- "VERSION.yml",
- "lib/twilio.rb",
- "lib/twilio/account.rb",
- "lib/twilio/call.rb",
- "lib/twilio/conference.rb",
- "lib/twilio/connection.rb",
- "lib/twilio/incoming_phone_number.rb",
- "lib/twilio/local_phone_number.rb",
- "lib/twilio/notification.rb",
- "lib/twilio/outgoing_caller_id.rb",
- "lib/twilio/recording.rb",
- "lib/twilio/sms.rb",
- "lib/twilio/toll_free_phone_number.rb",
- "lib/twilio/twilio_object.rb",
- "lib/twilio/verb.rb",
- "test/fixtures/xml/account.xml",
- "test/fixtures/xml/account_renamed.xml",
- "test/fixtures/xml/call.xml",
- "test/fixtures/xml/call_new.xml",
- "test/fixtures/xml/call_redirected.xml",
- "test/fixtures/xml/calls.xml",
- "test/fixtures/xml/conference.xml",
- "test/fixtures/xml/conference_participant.xml",
- "test/fixtures/xml/conference_participant_muted.xml",
- "test/fixtures/xml/conference_participants.xml",
- "test/fixtures/xml/conferences.xml",
- "test/fixtures/xml/incoming_phone_number.xml",
- "test/fixtures/xml/incoming_phone_numbers.xml",
- "test/fixtures/xml/notification.xml",
- "test/fixtures/xml/notifications.xml",
- "test/fixtures/xml/outgoing_caller_id.xml",
- "test/fixtures/xml/outgoing_caller_id_new.xml",
- "test/fixtures/xml/outgoing_caller_ids.xml",
- "test/fixtures/xml/recording.xml",
- "test/fixtures/xml/recordings.xml",
- "test/fixtures/xml/sms.xml",
- "test/fixtures/xml/sms_messages.xml",
- "test/fixtures/xml/sms_new.xml",
- "test/fixtures/xml/sms_new_with_callback.xml",
- "test/fixtures/xml/transcription.xml",
- "test/fixtures/xml/transcriptions.xml",
- "test/fixtures/yml/verb_responses.yml",
- "test/test_helper.rb",
- "test/twilio/account_test.rb",
- "test/twilio/call_test.rb",
- "test/twilio/conference_test.rb",
- "test/twilio/connection_test.rb",
- "test/twilio/incoming_phone_number_test.rb",
- "test/twilio/local_phone_number_test.rb",
- "test/twilio/notification_test.rb",
- "test/twilio/outgoing_caller_id_test.rb",
- "test/twilio/recording_test.rb",
- "test/twilio/sms_test.rb",
- "test/twilio/toll_free_phone_number_test.rb",
- "test/twilio/verb_test.rb",
- "twilio.gemspec"
- ]
- s.homepage = %q{http://github.com/webficient/twilio}
- s.rdoc_options = ["--charset=UTF-8"]
- s.require_paths = ["lib"]
- s.rubygems_version = %q{1.3.7}
- s.summary = %q{Twilio API Client}
- s.test_files = [
- "test/test_helper.rb",
- "test/twilio/account_test.rb",
- "test/twilio/call_test.rb",
- "test/twilio/conference_test.rb",
- "test/twilio/connection_test.rb",
- "test/twilio/incoming_phone_number_test.rb",
- "test/twilio/local_phone_number_test.rb",
- "test/twilio/notification_test.rb",
- "test/twilio/outgoing_caller_id_test.rb",
- "test/twilio/recording_test.rb",
- "test/twilio/sms_test.rb",
- "test/twilio/toll_free_phone_number_test.rb",
- "test/twilio/verb_test.rb"
- ]
+
+ s.rubyforge_project = "twilio"
if s.respond_to? :specification_version then
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
@@ -114,5 +29,9 @@ Gem::Specification.new do |s|
s.add_dependency(%q<builder>, [">= 2.1.2"])
s.add_dependency(%q<httparty>, [">= 0.4.3"])
end
-end
+ s.files = `git ls-files`.split("\n")
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
+ s.require_paths = ["lib"]
+end
Please sign in to comment.
Something went wrong with that request. Please try again.