vworkapp_ruby 0.7.3 → 0.8
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/README.md +9 -4
- data/lib/vworkapp_ruby/base/resource.rb +2 -2
- data/lib/vworkapp_ruby/job.rb +3 -2
- data/lib/vworkapp_ruby/worker.rb +1 -1
- data/vworkapp_ruby.gemspec +3 -3
- metadata +33 -13
data/README.md
CHANGED
@@ -26,13 +26,18 @@ You can create a job in vWorkApp:
|
|
26
26
|
:planned_duration => 10 * MIN,
|
27
27
|
:steps => [
|
28
28
|
{:name => "Start", :location => {:formatted_address => "880 Harrison St, SF, USA", :lat => 37.779536, :lng => -122.401503}},
|
29
|
-
{:name => "End", :location =>
|
29
|
+
{:name => "End", :location => {:formatted_address => "Broadway, San Francisco, CA, USA", :lat => 37.7959169, :lng => -122.4217661}}
|
30
30
|
],
|
31
31
|
:custom_fields => [
|
32
32
|
:name => "Note", :value => "Hi There!"
|
33
33
|
]
|
34
34
|
)
|
35
|
-
job.create
|
35
|
+
new_job = job.create
|
36
|
+
puts "Created job ID: #{new_job.id}"
|
37
|
+
|
38
|
+
Find a job:
|
39
|
+
|
40
|
+
job = VW::Job.show(101) # assuming a job with this ID exists already
|
36
41
|
|
37
42
|
Search for jobs:
|
38
43
|
|
@@ -42,12 +47,12 @@ Search for jobs:
|
|
42
47
|
Update jobs:
|
43
48
|
|
44
49
|
job = VW::Job.find(101) # assuming a job with this ID exists already
|
45
|
-
job.steps.first.location =
|
50
|
+
job.steps.first.location = {:formatted_address => "880 Harrison St, SF, USA", :lat => 37.779536, :lng => -122.401503}
|
46
51
|
job.update
|
47
52
|
|
48
53
|
And delete them:
|
49
54
|
|
50
|
-
job = VW::Job.
|
55
|
+
job = VW::Job.show(101) # assuming a job with this ID exists already
|
51
56
|
job.delete
|
52
57
|
|
53
58
|
Full documentation on the API can be found [here](http://api.vworkapp.com/api/).
|
@@ -7,7 +7,7 @@ module VWorkApp
|
|
7
7
|
end
|
8
8
|
def api_key
|
9
9
|
@api_key
|
10
|
-
end
|
10
|
+
end
|
11
11
|
end
|
12
12
|
|
13
13
|
class Resource < Base
|
@@ -16,7 +16,7 @@ module VWorkApp
|
|
16
16
|
include ActiveModel::Validations
|
17
17
|
include HTTParty
|
18
18
|
|
19
|
-
base_uri
|
19
|
+
base_uri "https://api.vworkapp.com/api/2.0"
|
20
20
|
# http_proxy 'localhost', 8888
|
21
21
|
|
22
22
|
headers({
|
data/lib/vworkapp_ruby/job.rb
CHANGED
@@ -3,7 +3,7 @@ require 'gcoder'
|
|
3
3
|
module VWorkApp
|
4
4
|
class Job < Resource
|
5
5
|
hattr_accessor :id, :customer_name, :template_name, :planned_duration, {:steps => Array(VWorkApp::Step)}, :published_at,
|
6
|
-
{:custom_fields => Array(VWorkApp::CustomField)}, :third_party_id, :worker_id, :planned_start_at, :customer_id
|
6
|
+
{:custom_fields => Array(VWorkApp::CustomField)}, :third_party_id, :worker_id, :planned_start_at, :customer_id, :confirmation
|
7
7
|
|
8
8
|
hattr_reader :actual_start_at, :actual_duration, :progress_state, :state
|
9
9
|
|
@@ -38,13 +38,14 @@ module VWorkApp
|
|
38
38
|
except = options[:except] || []
|
39
39
|
except << "custom_fields" unless custom_fields
|
40
40
|
except << "customer_id" unless customer_id && customer_name.nil?
|
41
|
+
except << "confirmation" unless confirmation
|
41
42
|
|
42
43
|
super(:except => except)
|
43
44
|
end
|
44
45
|
|
45
46
|
def ==(other)
|
46
47
|
attributes_eql?(other, :id, :third_party_id, :customer_name, :template_name, :planned_duration, :planned_start_at,
|
47
|
-
:worker_id, :steps, :custom_fields)
|
48
|
+
:worker_id, :steps, :custom_fields, :confirmation)
|
48
49
|
end
|
49
50
|
|
50
51
|
end
|
data/lib/vworkapp_ruby/worker.rb
CHANGED
data/vworkapp_ruby.gemspec
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "vworkapp_ruby"
|
3
|
-
s.version = "0.
|
3
|
+
s.version = "0.8"
|
4
4
|
s.platform = Gem::Platform::RUBY
|
5
|
-
s.authors = ["vWorkApp Inc.", "
|
5
|
+
s.authors = ["vWorkApp Inc.", "Jonathan Hoskin"]
|
6
6
|
s.email = ["info@vworkapp.com"]
|
7
|
-
s.homepage = "
|
7
|
+
s.homepage = "https://api.vworkapp.com"
|
8
8
|
s.summary = %q{A ruby wrapper for vWorkApp's API}
|
9
9
|
s.description = %q{A ruby wrapper for vWorkApp's API}
|
10
10
|
|
metadata
CHANGED
@@ -1,20 +1,20 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vworkapp_ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: '0.8'
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- vWorkApp Inc.
|
9
|
-
-
|
9
|
+
- Jonathan Hoskin
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-
|
13
|
+
date: 2012-11-09 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activemodel
|
17
|
-
requirement:
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ! '>='
|
@@ -22,10 +22,15 @@ dependencies:
|
|
22
22
|
version: '0'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements:
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
none: false
|
27
|
+
requirements:
|
28
|
+
- - ! '>='
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
version: '0'
|
26
31
|
- !ruby/object:Gem::Dependency
|
27
32
|
name: httparty
|
28
|
-
requirement:
|
33
|
+
requirement: !ruby/object:Gem::Requirement
|
29
34
|
none: false
|
30
35
|
requirements:
|
31
36
|
- - ! '>='
|
@@ -33,10 +38,15 @@ dependencies:
|
|
33
38
|
version: '0'
|
34
39
|
type: :runtime
|
35
40
|
prerelease: false
|
36
|
-
version_requirements:
|
41
|
+
version_requirements: !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
43
|
+
requirements:
|
44
|
+
- - ! '>='
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0'
|
37
47
|
- !ruby/object:Gem::Dependency
|
38
48
|
name: gcoder
|
39
|
-
requirement:
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
40
50
|
none: false
|
41
51
|
requirements:
|
42
52
|
- - ! '>='
|
@@ -44,10 +54,15 @@ dependencies:
|
|
44
54
|
version: '0'
|
45
55
|
type: :runtime
|
46
56
|
prerelease: false
|
47
|
-
version_requirements:
|
57
|
+
version_requirements: !ruby/object:Gem::Requirement
|
58
|
+
none: false
|
59
|
+
requirements:
|
60
|
+
- - ! '>='
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0'
|
48
63
|
- !ruby/object:Gem::Dependency
|
49
64
|
name: rspec
|
50
|
-
requirement:
|
65
|
+
requirement: !ruby/object:Gem::Requirement
|
51
66
|
none: false
|
52
67
|
requirements:
|
53
68
|
- - ! '>='
|
@@ -55,7 +70,12 @@ dependencies:
|
|
55
70
|
version: '0'
|
56
71
|
type: :development
|
57
72
|
prerelease: false
|
58
|
-
version_requirements:
|
73
|
+
version_requirements: !ruby/object:Gem::Requirement
|
74
|
+
none: false
|
75
|
+
requirements:
|
76
|
+
- - ! '>='
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: '0'
|
59
79
|
description: A ruby wrapper for vWorkApp's API
|
60
80
|
email:
|
61
81
|
- info@vworkapp.com
|
@@ -96,7 +116,7 @@ files:
|
|
96
116
|
- spec/support/active_model_lint.rb
|
97
117
|
- spec/worker_spec.rb
|
98
118
|
- vworkapp_ruby.gemspec
|
99
|
-
homepage:
|
119
|
+
homepage: https://api.vworkapp.com
|
100
120
|
licenses: []
|
101
121
|
post_install_message:
|
102
122
|
rdoc_options: []
|
@@ -116,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
116
136
|
version: 1.3.6
|
117
137
|
requirements: []
|
118
138
|
rubyforge_project:
|
119
|
-
rubygems_version: 1.8.
|
139
|
+
rubygems_version: 1.8.23
|
120
140
|
signing_key:
|
121
141
|
specification_version: 3
|
122
142
|
summary: A ruby wrapper for vWorkApp's API
|