twilio-twimlbin 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -2,3 +2,4 @@
2
2
  .bundle
3
3
  Gemfile.lock
4
4
  pkg/*
5
+ vendor/
@@ -0,0 +1,7 @@
1
+ language: ruby
2
+
3
+ rvm:
4
+ - 2.0.0
5
+ - 1.9.3
6
+ - rbx-19mode
7
+
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- twilio-twimlbin
1
+ twilio-twimlbin [![Build Status](https://travis-ci.org/y-ken/twilio-twimlbin.png?branch=master)](https://travis-ci.org/y-ken/twilio-twimlbin)
2
2
  =====================
3
3
 
4
4
  ## Overview
@@ -26,8 +26,8 @@ class Twimlbin
26
26
  end
27
27
 
28
28
  def publish(xml)
29
- request = Net::HTTP::Post.new("/save_data")
30
- body = {'index' => @token, 'twiml' => xml}
29
+ request = Net::HTTP::Post.new("/#{@token}/update")
30
+ body = {'id' => @token, 'twiml' => xml}
31
31
  request.set_form_data(body)
32
32
  begin
33
33
  return @http.request(request)
@@ -3,16 +3,15 @@ require 'helper'
3
3
  class TwimlbinTest < Test::Unit::TestCase
4
4
 
5
5
  def test_publish
6
+ test_xml = '<?xml version="1.0" encoding="UTF-8"?><Say>twimlbin_ruby_unit_test</Say>'
6
7
  twiml = Twimlbin.new
7
- external_url = twiml.create('twimlbin_ruby_unit_test')
8
+ external_url = twiml.create(test_xml)
8
9
 
9
10
  uri = URI.parse(external_url)
10
11
  req = Net::HTTP::Get.new(external_url)
11
12
  req.add_field('User-Agent', 'TwilioProxy')
12
13
  res = Net::HTTP.start(uri.host, uri.port) {|http| http.request(req) }
13
14
 
14
- assert_equal 'twimlbin_ruby_unit_test', res.body
15
+ assert_equal test_xml, res.body
15
16
  end
16
-
17
17
  end
18
-
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "twilio-twimlbin"
6
- s.version = "0.0.4"
6
+ s.version = "0.0.5"
7
7
  s.authors = ["Kentaro Yoshida"]
8
8
  s.email = ["y.ken.studio@gmail.com"]
9
9
  s.homepage = "https://github.com/y-ken/twimlbin"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twilio-twimlbin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-09-03 00:00:00.000000000 Z
12
+ date: 2015-06-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -35,6 +35,7 @@ extensions: []
35
35
  extra_rdoc_files: []
36
36
  files:
37
37
  - .gitignore
38
+ - .travis.yml
38
39
  - Gemfile
39
40
  - LICENSE.txt
40
41
  - README.md