signatory 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- signatory (0.0.4)
4
+ signatory (0.0.6)
5
5
  activeresource (>= 2.3.9)
6
6
  bundler (>= 1.0.0)
7
7
  oauth (= 0.4.3)
@@ -2,12 +2,7 @@ module Signatory
2
2
  class Document < API::Base
3
3
 
4
4
  def extend_expiration
5
- connection.post(:extend_expiration)
6
- end
7
-
8
- def extend_expiration!
9
- extend_expiration
10
- reload
5
+ connection.post("#{self.class.site}documents/#{id}/extend_expiration")
11
6
  end
12
7
 
13
8
  def expired?
@@ -1,3 +1,3 @@
1
1
  module Signatory
2
- VERSION = '0.0.5'
2
+ VERSION = '0.0.6'
3
3
  end
@@ -42,32 +42,11 @@ describe Signatory::Document do
42
42
  it "should post to the correct action" do
43
43
  stub_document('XXXXX')
44
44
  doc = Signatory::Document.find('XXXXX')
45
- Signatory::Document.connection.should_receive(:post).with(:extend_expiration)
45
+ Signatory::Document.connection.should_receive(:post).with('https://rightsignature.com/api/documents/XXXXX/extend_expiration')
46
46
  doc.extend_expiration
47
47
  end
48
48
  end
49
49
 
50
- describe "#extend_expiration!" do
51
- before :each do
52
- stub_document('XXXXX')
53
- @doc = Signatory::Document.find('XXXXX')
54
- end
55
-
56
- it "should extend the expiration date" do
57
- @doc.stub!(:extend_expiration)
58
- @doc.stub!(:reload)
59
- @doc.should_receive(:extend_expiration)
60
- @doc.extend_expiration!
61
- end
62
-
63
- it "should reload the document" do
64
- @doc.stub!(:extend_expiration)
65
- @doc.stub!(:reload)
66
- @doc.should_receive(:reload)
67
- @doc.extend_expiration!
68
- end
69
- end
70
-
71
50
  describe "#expired?" do
72
51
  it "should return true if the expires_on date is in the past" do
73
52
  stub_document('XXXXX', :expires_on => 7.days.ago)
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 5
9
- version: 0.0.5
8
+ - 6
9
+ version: 0.0.6
10
10
  platform: ruby
11
11
  authors:
12
12
  - Ryan Garver
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-01-25 00:00:00 -08:00
17
+ date: 2011-01-26 00:00:00 -08:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency