vws 1.2.0 → 1.2.4
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.
- checksums.yaml +4 -4
- data/.gitignore +18 -18
- data/Gemfile +4 -4
- data/LICENSE.txt +22 -22
- data/README.md +153 -140
- data/Rakefile +2 -2
- data/lib/vws.rb +258 -257
- data/lib/vws/helpers.rb +2 -0
- data/lib/vws/version.rb +3 -3
- data/spec/vws_spec.rb +74 -96
- data/vws.gemspec +31 -31
- metadata +7 -6
- data/.travis.yml +0 -1
data/lib/vws/helpers.rb
ADDED
data/lib/vws/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
module Vws
|
2
|
-
VERSION = "1.2.
|
3
|
-
end
|
1
|
+
module Vws
|
2
|
+
VERSION = "1.2.4"
|
3
|
+
end
|
data/spec/vws_spec.rb
CHANGED
@@ -1,96 +1,74 @@
|
|
1
|
-
require_relative '../lib/vws.rb'
|
2
|
-
|
3
|
-
describe Vws do
|
4
|
-
|
5
|
-
VWS_ACCESSKEY = "
|
6
|
-
VWS_SECRETKEY = "
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
=
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
puts "
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
puts "
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
end
|
76
|
-
|
77
|
-
puts "\n"
|
78
|
-
|
79
|
-
describe "set active to false" do
|
80
|
-
conn = Vws::Api.new(VWS_ACCESSKEY, VWS_SECRETKEY)
|
81
|
-
puts "Set target to false for targetid = your_test_target_id \n"
|
82
|
-
response = conn.set_active_flag("your_test_target_id", false)
|
83
|
-
puts JSON.pretty_generate(JSON.parse(response))
|
84
|
-
end
|
85
|
-
|
86
|
-
puts "\n"
|
87
|
-
|
88
|
-
describe "should connect to webservice, upload Pitt picture and fail if the file name is the same" do
|
89
|
-
conn = Vws::Api.new(VWS_ACCESSKEY, VWS_SECRETKEY)
|
90
|
-
puts "Add Brat Pitt Picture: \n"
|
91
|
-
response = conn.add_target("pitt", "spec/pitt.jpg", 210, true)
|
92
|
-
puts JSON.pretty_generate(JSON.parse(response))
|
93
|
-
end
|
94
|
-
|
95
|
-
end
|
96
|
-
|
1
|
+
require_relative '../lib/vws.rb'
|
2
|
+
|
3
|
+
describe Vws do
|
4
|
+
|
5
|
+
VWS_ACCESSKEY = "your_access_key"
|
6
|
+
VWS_SECRETKEY = "your_secret_key"
|
7
|
+
|
8
|
+
TARGET_ID_TO_DELETE = "a_target_id_to_delete"
|
9
|
+
TARGET_ID_TO_GET_INFO_ON = "a_target_to_get_info_on"
|
10
|
+
TARGET_ID_TO_SET_TO_FALSE = "a_target_id_to_set_to_false"
|
11
|
+
|
12
|
+
describe "should connect to webservice and show summary of the cloud database" do
|
13
|
+
conn = Vws::Api.new(VWS_ACCESSKEY, VWS_SECRETKEY)
|
14
|
+
puts "Summary of the target database: \n"
|
15
|
+
response = conn.summary
|
16
|
+
puts JSON.pretty_generate(JSON.parse(response))
|
17
|
+
end
|
18
|
+
|
19
|
+
puts "\n"
|
20
|
+
|
21
|
+
describe "should connect to webservice and list all targets" do
|
22
|
+
conn = Vws::Api.new(VWS_ACCESSKEY, VWS_SECRETKEY)
|
23
|
+
puts "Targets in remote database: \n"
|
24
|
+
response = conn.list_targets
|
25
|
+
puts JSON.pretty_generate(JSON.parse(response))
|
26
|
+
end
|
27
|
+
|
28
|
+
puts "\n"
|
29
|
+
|
30
|
+
describe "should connect to webservice, upload file and fail if the file name is the same" do
|
31
|
+
conn = Vws::Api.new(VWS_ACCESSKEY, VWS_SECRETKEY)
|
32
|
+
puts "Response after trying to add a file: \n"
|
33
|
+
response = conn.add_target("newtargetname", "spec/RGB_24bits.jpg", 150, true,nil)
|
34
|
+
puts JSON.pretty_generate(JSON.parse(response))
|
35
|
+
end
|
36
|
+
|
37
|
+
puts "\n"
|
38
|
+
|
39
|
+
describe "should retrieve a single target info" do
|
40
|
+
conn = Vws::Api.new(VWS_ACCESSKEY, VWS_SECRETKEY)
|
41
|
+
puts "Retrieve Info for targetid = #{TARGET_ID_TO_GET_INFO_ON}"
|
42
|
+
response = conn.retrieve_target("test")
|
43
|
+
puts JSON.pretty_generate(JSON.parse(response))
|
44
|
+
end
|
45
|
+
|
46
|
+
puts "\n"
|
47
|
+
|
48
|
+
describe "delete target" do
|
49
|
+
conn = Vws::Api.new(VWS_ACCESSKEY, VWS_SECRETKEY)
|
50
|
+
puts "Deleting target id #{TARGET_ID_TO_DELETE}"
|
51
|
+
response = conn.delete_target(TARGET_ID_TO_DELETE)
|
52
|
+
puts JSON.pretty_generate(JSON.parse(response))
|
53
|
+
end
|
54
|
+
|
55
|
+
puts "\n"
|
56
|
+
|
57
|
+
describe "set active to false" do
|
58
|
+
conn = Vws::Api.new(VWS_ACCESSKEY, VWS_SECRETKEY)
|
59
|
+
puts "Set target to false for targetid #{TARGET_ID_TO_SET_TO_FALSE}"
|
60
|
+
response = conn.set_active_flag(TARGET_ID_TO_SET_TO_FALSE, false)
|
61
|
+
puts JSON.pretty_generate(JSON.parse(response))
|
62
|
+
end
|
63
|
+
|
64
|
+
puts "\n"
|
65
|
+
|
66
|
+
describe "should connect to webservice, upload Pitt picture and fail if the file name is the same" do
|
67
|
+
conn = Vws::Api.new(VWS_ACCESSKEY, VWS_SECRETKEY)
|
68
|
+
puts "Add Brat Pitt Picture: \n"
|
69
|
+
response = conn.add_target("pitt", "spec/pitt.jpg", 210, true, nil)
|
70
|
+
puts JSON.pretty_generate(JSON.parse(response))
|
71
|
+
end
|
72
|
+
|
73
|
+
end
|
74
|
+
|
data/vws.gemspec
CHANGED
@@ -1,31 +1,31 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require 'vws/version'
|
5
|
-
|
6
|
-
Gem::Specification.new do |spec|
|
7
|
-
spec.name = "vws"
|
8
|
-
spec.version = Vws::VERSION
|
9
|
-
spec.authors = ["Nick Kokkos"]
|
10
|
-
spec.email = ["nkokkos@gmail.com"]
|
11
|
-
spec.description = %q{Vuforia web services api gem}
|
12
|
-
spec.summary = %q{This is a ruby gem that interacts with Vuforia Web service API for Cloud database management. It uses the rest-client gem to handle the http/rest requests needed}
|
13
|
-
spec.homepage = "http://github.com/nkokkos/vws"
|
14
|
-
spec.license = "MIT"
|
15
|
-
|
16
|
-
spec.files = `git ls-files`.split($/)
|
17
|
-
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
-
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
-
spec.require_paths = ["lib"]
|
20
|
-
|
21
|
-
|
22
|
-
#development depedencies
|
23
|
-
spec.add_development_dependency "bundler", "~> 1.
|
24
|
-
spec.add_development_dependency "rake", "~> 10.4.2"
|
25
|
-
spec.add_development_dependency "rspec","~> 3.2.0"
|
26
|
-
#spec.add_development_dependency "json","~> 1.8"
|
27
|
-
|
28
|
-
#runtime dependencies
|
29
|
-
spec.add_runtime_dependency "rest-client", "~> 1.7.3"
|
30
|
-
spec.add_runtime_dependency "json", "~> 1.8"
|
31
|
-
end
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'vws/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "vws"
|
8
|
+
spec.version = Vws::VERSION
|
9
|
+
spec.authors = ["Nick Kokkos"]
|
10
|
+
spec.email = ["nkokkos@gmail.com"]
|
11
|
+
spec.description = %q{Vuforia web services api gem}
|
12
|
+
spec.summary = %q{This is a ruby gem that interacts with Vuforia Web service API for Cloud database management. It uses the rest-client gem to handle the http/rest requests needed}
|
13
|
+
spec.homepage = "http://github.com/nkokkos/vws"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
|
22
|
+
#development depedencies
|
23
|
+
spec.add_development_dependency "bundler", "~> 1.9.1"
|
24
|
+
spec.add_development_dependency "rake", "~> 10.4.2"
|
25
|
+
spec.add_development_dependency "rspec","~> 3.2.0"
|
26
|
+
#spec.add_development_dependency "json","~> 1.8"
|
27
|
+
|
28
|
+
#runtime dependencies
|
29
|
+
spec.add_runtime_dependency "rest-client", "~> 1.7.3"
|
30
|
+
spec.add_runtime_dependency "json", "~> 1.8"
|
31
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vws
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Kokkos
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
19
|
+
version: 1.9.1
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.
|
26
|
+
version: 1.9.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -88,12 +88,12 @@ extensions: []
|
|
88
88
|
extra_rdoc_files: []
|
89
89
|
files:
|
90
90
|
- ".gitignore"
|
91
|
-
- ".travis.yml"
|
92
91
|
- Gemfile
|
93
92
|
- LICENSE.txt
|
94
93
|
- README.md
|
95
94
|
- Rakefile
|
96
95
|
- lib/vws.rb
|
96
|
+
- lib/vws/helpers.rb
|
97
97
|
- lib/vws/version.rb
|
98
98
|
- spec/Grayscale_8bits.png
|
99
99
|
- spec/RGB_24bits.jpg
|
@@ -121,7 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
121
121
|
version: '0'
|
122
122
|
requirements: []
|
123
123
|
rubyforge_project:
|
124
|
-
rubygems_version: 2.
|
124
|
+
rubygems_version: 2.5.1
|
125
125
|
signing_key:
|
126
126
|
specification_version: 4
|
127
127
|
summary: This is a ruby gem that interacts with Vuforia Web service API for Cloud
|
@@ -133,3 +133,4 @@ test_files:
|
|
133
133
|
- spec/cumbria_woodland02859.jpg
|
134
134
|
- spec/pitt.jpg
|
135
135
|
- spec/vws_spec.rb
|
136
|
+
has_rdoc:
|
data/.travis.yml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
.
|