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.
@@ -0,0 +1,2 @@
1
+ module Helpers
2
+ end
@@ -1,3 +1,3 @@
1
- module Vws
2
- VERSION = "1.2.0"
3
- end
1
+ module Vws
2
+ VERSION = "1.2.4"
3
+ end
@@ -1,96 +1,74 @@
1
- require_relative '../lib/vws.rb'
2
-
3
- describe Vws do
4
-
5
- VWS_ACCESSKEY = "your_vws_server_database_access_key"
6
- VWS_SECRETKEY = "your_vws_server_database_secret_key"
7
-
8
-
9
- #code below between begin and end was an attempt to read env variables from file
10
- =begin
11
- describe "should connect to webservice and fail otherwise" do
12
- YAML.load(File.open('spec/local_env.yml')).each do |key, value|
13
- ENV[key.to_s] = value
14
- end if File.exists?('spec/local_env.yml')
15
- if defined?(ENV['VWS_ACCESSKEY']) && defined?(ENV['VWS_SECRETKEY'])
16
- conn = Vws::Api.new(ENV['VWS_ACCESSKEY'], ENV['VWS_SECRETKEY'])
17
- conn.inspect
18
- #puts conn.list_targets
19
- else
20
- puts "ENV['VWS_ACCESSKEY'] && ENV['VWS_SECRETKEY' not defined"
21
- end
22
- end
23
- =end
24
-
25
- describe "should connect to webservice and show summary of the cloud database" do
26
- conn = Vws::Api.new(VWS_ACCESSKEY, VWS_SECRETKEY)
27
- puts "Summary of the target database: \n"
28
- response = conn.summary
29
- puts JSON.pretty_generate(JSON.parse(response))
30
- end
31
-
32
- puts "\n"
33
-
34
- describe "should connect to webservice and list all targets" do
35
- conn = Vws::Api.new(VWS_ACCESSKEY, VWS_SECRETKEY)
36
- puts "Targets in remote database: \n"
37
- response = conn.list_targets
38
- puts JSON.pretty_generate(JSON.parse(response))
39
- end
40
-
41
- puts "\n"
42
-
43
- describe "should connect to webservice, upload file and fail if the file name is the same" do
44
- conn = Vws::Api.new(VWS_ACCESSKEY, VWS_SECRETKEY)
45
- puts "Response after trying to add a file: \n"
46
- response = conn.add_target("newtargetname", "spec/RGB_24bits.jpg", 150, true)
47
- puts JSON.pretty_generate(JSON.parse(response))
48
- end
49
-
50
- puts "\n"
51
-
52
- describe "should retrieve a single target info" do
53
- conn = Vws::Api.new(VWS_ACCESSKEY, VWS_SECRETKEY)
54
- puts "Info for targetid = your_test_target_id \n"
55
- response = conn.retrieve_target("your_test_target_id")
56
- puts JSON.pretty_generate(JSON.parse(response))
57
- end
58
-
59
- puts "\n"
60
-
61
- describe "should retrieve a summary report of a single target" do
62
- conn = Vws::Api.new(VWS_ACCESSKEY, VWS_SECRETKEY)
63
- puts "Summary report targetid = your_test_target_id \n"
64
- response = conn.target_summary("your_test_target_id")
65
- puts JSON.pretty_generate(JSON.parse(response))
66
- end
67
-
68
- puts '/n'
69
-
70
- describe "delete target" do
71
- conn = Vws::Api.new(VWS_ACCESSKEY, VWS_SECRETKEY)
72
- puts "What happens if try to delete a file with targetid = your_test_target_id ?: \n"
73
- response = conn.delete_target("your_test_target_id")
74
- puts JSON.pretty_generate(JSON.parse(response))
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
+
@@ -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.8.5"
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.0
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: 2015-03-23 00:00:00.000000000 Z
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.8.5
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.8.5
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.4.6
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:
@@ -1 +0,0 @@
1
- .