odesk-api 0.2.6 → 0.2.7

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/.docgen ADDED
@@ -0,0 +1 @@
1
+ rdoc
@@ -59,7 +59,37 @@ module Odesk
59
59
  $LOG.i "running " + __method__.to_s
60
60
  @client.delete '/team/v1/snapshots/' + company + '/' + username + '/' + ts
61
61
  end
62
+
63
+ # Get snapshot info by specific contract
64
+ #
65
+ # Arguments:
66
+ # contract: (String)
67
+ # ts: (String)
68
+ def get_by_contract(contract, ts)
69
+ $LOG.i "running " + __method__.to_s
70
+ @client.get '/team/v2/snapshots/contracts/' + contract + '/' + ts
71
+ end
72
+
73
+ # Update snapshot by specific contract
74
+ #
75
+ # Arguments:
76
+ # contract: (String)
77
+ # ts: (String)
78
+ # params: (Hash)
79
+ def update_by_contract(contract, ts, params)
80
+ $LOG.i "running " + __method__.to_s
81
+ @client.put '/team/v2/snapshots/contracts/' + contract + '/' + ts, params
82
+ end
83
+
84
+ # Delete snapshot by specific contract
85
+ # Arguments:
86
+ # contract: (String)
87
+ # ts: (String)
88
+ def delete_by_contract(contract, username, ts)
89
+ $LOG.i "running " + __method__.to_s
90
+ @client.delete '/team/v2/snapshots/contracts/' + contract + '/' + ts
91
+ end
62
92
  end
63
93
  end
64
94
  end
65
- end
95
+ end
@@ -13,6 +13,6 @@
13
13
 
14
14
  module Odesk # :nodoc:
15
15
  module Api
16
- VERSION = "0.2.6"
16
+ VERSION = "0.2.7"
17
17
  end
18
18
  end
@@ -23,4 +23,19 @@ class SnapshotTest < Test::Unit::TestCase
23
23
  api = Odesk::Api::Routers::Snapshot.new(get_client_mock)
24
24
  assert api.delete('company', 'username', '20140101')
25
25
  end
26
- end
26
+
27
+ def test_get_by_contract
28
+ api = Odesk::Api::Routers::Snapshot.new(get_client_mock)
29
+ assert api.get_by_contract('contract', '20140101')
30
+ end
31
+
32
+ def test_update_by_contract
33
+ api = Odesk::Api::Routers::Snapshot.new(get_client_mock)
34
+ assert api.update_by_contract('contract', '20140101', {})
35
+ end
36
+
37
+ def test_delete_by_contract
38
+ api = Odesk::Api::Routers::Snapshot.new(get_client_mock)
39
+ assert api.delete_by_contract('contract', '20140101')
40
+ end
41
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: odesk-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
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: 2015-03-05 00:00:00.000000000 Z
12
+ date: 2015-03-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: oauth
@@ -99,6 +99,7 @@ executables: []
99
99
  extensions: []
100
100
  extra_rdoc_files: []
101
101
  files:
102
+ - .docgen
102
103
  - .gitignore
103
104
  - .travis.yml
104
105
  - Gemfile