assistly 0.1 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -31,7 +31,7 @@ eos
31
31
  s.email = ['chris@zencoder.com']
32
32
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
33
33
  s.files = `git ls-files`.split("\n")
34
- s.homepage = 'https://github.com/chriswarren/assistly'
34
+ s.homepage = 'https://github.com/zencoder/assistly'
35
35
  s.name = 'assistly'
36
36
  s.platform = Gem::Platform::RUBY
37
37
  s.require_paths = ['lib']
@@ -46,6 +46,10 @@ module Assistly
46
46
  response = put("cases/#{id}",options)
47
47
  response.case
48
48
  end
49
+
50
+ def case_url(id)
51
+ "https://#{subdomain}.assistly.com/agent/case/#{id}"
52
+ end
49
53
  end
50
54
  end
51
55
  end
@@ -50,7 +50,7 @@ module Assistly
50
50
  DEFAULT_PROXY = nil
51
51
 
52
52
  # By default, don't set a subdomain
53
- DEFAULT_SUBDOMAIN = "zencoder"
53
+ DEFAULT_SUBDOMAIN = "example"
54
54
 
55
55
  # The user agent that will be sent to the API endpoint if none is set
56
56
  DEFAULT_USER_AGENT = "Assistly Ruby Gem #{Assistly::VERSION}".freeze
@@ -1,4 +1,4 @@
1
1
  module Assistly
2
2
  # The version of the gem
3
- VERSION = '0.1'.freeze unless defined?(::Assistly::VERSION)
3
+ VERSION = '0.1.1'.freeze unless defined?(::Assistly::VERSION)
4
4
  end
@@ -83,6 +83,17 @@ describe Assistly::Client do
83
83
 
84
84
  end
85
85
  end
86
+
87
+ describe ".case_url" do
88
+
89
+ context "generating a case url" do
90
+
91
+ it "should make a correct url for the case" do
92
+ @client.case_url(123).should == "https://example.assistly.com/agent/case/123"
93
+ end
94
+
95
+ end
96
+ end
86
97
  end
87
98
  end
88
99
  end
@@ -20,7 +20,7 @@ describe Faraday::Response do
20
20
 
21
21
  before do
22
22
  stub_get('users/1.json').
23
- with(:headers => {'Accept'=>'application/json', 'User-Agent'=>'Assistly Ruby Gem 0.0.1'}).
23
+ with(:headers => {'Accept'=>'application/json', 'User-Agent'=>'Assistly Ruby Gem 0.1'}).
24
24
  to_return(:status => status)
25
25
  end
26
26
 
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: assistly
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- version: "0.1"
9
+ - 1
10
+ version: 0.1.1
10
11
  platform: ruby
11
12
  authors:
12
13
  - Chris Warren
@@ -14,7 +15,7 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2011-04-12 00:00:00 Z
18
+ date: 2011-04-14 00:00:00 Z
18
19
  dependencies:
19
20
  - !ruby/object:Gem::Dependency
20
21
  name: json
@@ -324,7 +325,7 @@ files:
324
325
  - spec/fixtures/user.json
325
326
  - spec/fixtures/users.json
326
327
  - spec/helper.rb
327
- homepage: https://github.com/chriswarren/assistly
328
+ homepage: https://github.com/zencoder/assistly
328
329
  licenses: []
329
330
 
330
331
  post_install_message: |