From ab0c852cc31c133bfe9a19ec5836b056b0308871 Mon Sep 17 00:00:00 2001 From: Logan Bell Date: Thu, 12 Jun 2014 22:23:31 -0700 Subject: [PATCH 01/13] api_key is now an optional parameter --- lib/WebService/SwigClient.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/WebService/SwigClient.rb b/lib/WebService/SwigClient.rb index 74d7384..4b95e9f 100644 --- a/lib/WebService/SwigClient.rb +++ b/lib/WebService/SwigClient.rb @@ -9,7 +9,7 @@ def initialize(params) end def render(path, data) - url = [@service_url, @api_key, path].join("/"); + url = (@api_key ? [@service_url, @api_key, path] : [@service_url, path]).join("/"); response = Curly::Request.post(url, headers: { 'Content-type' => 'application/json' }, body: data.to_json) if ( !response.success? ) From 1e99f7e5369f76ecd94572bee2e5b3d8c8e20675 Mon Sep 17 00:00:00 2001 From: Logan Bell Date: Sat, 14 Jun 2014 00:43:43 -0700 Subject: [PATCH 02/13] Adding curly to the Gemfile --- Gemfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Gemfile b/Gemfile index 070d22b..4b5c1cf 100644 --- a/Gemfile +++ b/Gemfile @@ -2,4 +2,5 @@ source "https://rubygems.org" gemspec gem 'rspec' +gem 'curly' gem 'curly-lib' From 6fabd85cafa05aa0419fa7938e79188f603131c4 Mon Sep 17 00:00:00 2001 From: Logan Bell Date: Sat, 14 Jun 2014 00:47:44 -0700 Subject: [PATCH 03/13] Modyfing the require to be non relative --- webservice-swigclient-ruby.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webservice-swigclient-ruby.gemspec b/webservice-swigclient-ruby.gemspec index 5e271a3..89a94c1 100644 --- a/webservice-swigclient-ruby.gemspec +++ b/webservice-swigclient-ruby.gemspec @@ -1,7 +1,7 @@ # coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) -require 'webservice/swigclient' +require './lib/webservice/swigclient' Gem::Specification.new do |spec| spec.name = "webservice-swigclient" From 505ba28a93a902f7167f45832649ee60d125f1e0 Mon Sep 17 00:00:00 2001 From: Logan Bell Date: Sun, 15 Jun 2014 13:20:01 -0700 Subject: [PATCH 04/13] Putting require to not be relative --- webservice-swigclient-ruby.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webservice-swigclient-ruby.gemspec b/webservice-swigclient-ruby.gemspec index 89a94c1..1beaf8e 100644 --- a/webservice-swigclient-ruby.gemspec +++ b/webservice-swigclient-ruby.gemspec @@ -1,7 +1,7 @@ # coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) -require './lib/webservice/swigclient' +require './webservice/swigclient' Gem::Specification.new do |spec| spec.name = "webservice-swigclient" From fbcc1d5c8812c31aa872a211edc272eaa52570e3 Mon Sep 17 00:00:00 2001 From: Logan Bell Date: Sun, 15 Jun 2014 13:26:27 -0700 Subject: [PATCH 05/13] Revert "Putting require to not be relative" This reverts commit 505ba28a93a902f7167f45832649ee60d125f1e0. --- webservice-swigclient-ruby.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webservice-swigclient-ruby.gemspec b/webservice-swigclient-ruby.gemspec index 1beaf8e..89a94c1 100644 --- a/webservice-swigclient-ruby.gemspec +++ b/webservice-swigclient-ruby.gemspec @@ -1,7 +1,7 @@ # coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) -require './webservice/swigclient' +require './lib/webservice/swigclient' Gem::Specification.new do |spec| spec.name = "webservice-swigclient" From 3c5de22956ded42fd50de23b4b5956d9841a85c5 Mon Sep 17 00:00:00 2001 From: Logan Bell Date: Sun, 15 Jun 2014 13:28:38 -0700 Subject: [PATCH 06/13] Commenting out curly --- lib/WebService/SwigClient.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/WebService/SwigClient.rb b/lib/WebService/SwigClient.rb index 4b95e9f..1d5738a 100644 --- a/lib/WebService/SwigClient.rb +++ b/lib/WebService/SwigClient.rb @@ -1,6 +1,6 @@ class WebServiceSwigClient VERSION = '0.0.1' - require 'curly' + #require 'curly' def initialize(params) @api_key = params[:api_key] From 085f8f7fa6cb05dc5766ebf53e3617ffd248464d Mon Sep 17 00:00:00 2001 From: Logan Bell Date: Sun, 15 Jun 2014 13:32:39 -0700 Subject: [PATCH 07/13] Putting curly back --- Gemfile | 1 - Gemfile.lock | 4 ++++ lib/WebService/SwigClient.rb | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 4b5c1cf..070d22b 100644 --- a/Gemfile +++ b/Gemfile @@ -2,5 +2,4 @@ source "https://rubygems.org" gemspec gem 'rspec' -gem 'curly' gem 'curly-lib' diff --git a/Gemfile.lock b/Gemfile.lock index 81a94ef..0415d0f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -6,8 +6,11 @@ PATH GEM remote: https://rubygems.org/ specs: + curly (0.1.0) + json curly-lib (0.0.1) diff-lcs (1.2.5) + json (1.8.1) rake (10.1.1) rspec (2.14.1) rspec-core (~> 2.14.0) @@ -23,6 +26,7 @@ PLATFORMS DEPENDENCIES bundler (~> 1.3) + curly curly-lib rake rspec diff --git a/lib/WebService/SwigClient.rb b/lib/WebService/SwigClient.rb index 1d5738a..4b95e9f 100644 --- a/lib/WebService/SwigClient.rb +++ b/lib/WebService/SwigClient.rb @@ -1,6 +1,6 @@ class WebServiceSwigClient VERSION = '0.0.1' - #require 'curly' + require 'curly' def initialize(params) @api_key = params[:api_key] From 895b8440686a8e3f60a558117e216002fd6495f7 Mon Sep 17 00:00:00 2001 From: Logan Bell Date: Sun, 15 Jun 2014 13:33:30 -0700 Subject: [PATCH 08/13] Updated --- Gemfile.lock | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 0415d0f..3d07e60 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -6,27 +6,27 @@ PATH GEM remote: https://rubygems.org/ specs: - curly (0.1.0) - json curly-lib (0.0.1) diff-lcs (1.2.5) - json (1.8.1) - rake (10.1.1) - rspec (2.14.1) - rspec-core (~> 2.14.0) - rspec-expectations (~> 2.14.0) - rspec-mocks (~> 2.14.0) - rspec-core (2.14.8) - rspec-expectations (2.14.5) - diff-lcs (>= 1.1.3, < 2.0) - rspec-mocks (2.14.6) + rake (10.3.2) + rspec (3.0.0) + rspec-core (~> 3.0.0) + rspec-expectations (~> 3.0.0) + rspec-mocks (~> 3.0.0) + rspec-core (3.0.1) + rspec-support (~> 3.0.0) + rspec-expectations (3.0.1) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.0.0) + rspec-mocks (3.0.1) + rspec-support (~> 3.0.0) + rspec-support (3.0.0) PLATFORMS ruby DEPENDENCIES bundler (~> 1.3) - curly curly-lib rake rspec From 9bad36541343cbdf33d276fbd9fff8e747551a3d Mon Sep 17 00:00:00 2001 From: Logan Bell Date: Sun, 15 Jun 2014 13:59:32 -0700 Subject: [PATCH 09/13] Updated to use 0.0.1 of curly --- Gemfile | 2 +- Gemfile.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 070d22b..1d27135 100644 --- a/Gemfile +++ b/Gemfile @@ -2,4 +2,4 @@ source "https://rubygems.org" gemspec gem 'rspec' -gem 'curly-lib' +gem 'curly-lib', '~> 0.0.1' diff --git a/Gemfile.lock b/Gemfile.lock index 3d07e60..c14318f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -27,7 +27,7 @@ PLATFORMS DEPENDENCIES bundler (~> 1.3) - curly-lib + curly-lib (~> 0.0.1) rake rspec webservice-swigclient! From 2291a7e0549b8891617a747656e41b98f21ca66c Mon Sep 17 00:00:00 2001 From: Logan Bell Date: Sun, 15 Jun 2014 14:09:02 -0700 Subject: [PATCH 10/13] Renaming to match gem name --- ...rvice-swigclient-ruby.gemspec => webservice-swigclient.gemspec | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename webservice-swigclient-ruby.gemspec => webservice-swigclient.gemspec (100%) diff --git a/webservice-swigclient-ruby.gemspec b/webservice-swigclient.gemspec similarity index 100% rename from webservice-swigclient-ruby.gemspec rename to webservice-swigclient.gemspec From d286ecd39b46e593ce7eae6459937ffa9ec158e4 Mon Sep 17 00:00:00 2001 From: Logan Bell Date: Sun, 15 Jun 2014 14:10:45 -0700 Subject: [PATCH 11/13] More tweaks --- webservice-swigclient.gemspec | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/webservice-swigclient.gemspec b/webservice-swigclient.gemspec index 89a94c1..904184b 100644 --- a/webservice-swigclient.gemspec +++ b/webservice-swigclient.gemspec @@ -1,11 +1,6 @@ -# coding: utf-8 -lib = File.expand_path('../lib', __FILE__) -$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) -require './lib/webservice/swigclient' - Gem::Specification.new do |spec| spec.name = "webservice-swigclient" - spec.version = WebServiceSwigClient::VERSION + spec.version = '0.0.1' spec.authors = ["Logan Bell"] spec.email = ["lbell@shutterstock.com"] spec.description = %q{A client for swig.io!} From ccf31f928b5931ad1e08c27bc2c14a8498b5a3a4 Mon Sep 17 00:00:00 2001 From: Logan Bell Date: Sun, 15 Jun 2014 14:13:56 -0700 Subject: [PATCH 12/13] Adding curly lib to spec dependency --- webservice-swigclient.gemspec | 1 + 1 file changed, 1 insertion(+) diff --git a/webservice-swigclient.gemspec b/webservice-swigclient.gemspec index 904184b..3446f43 100644 --- a/webservice-swigclient.gemspec +++ b/webservice-swigclient.gemspec @@ -13,6 +13,7 @@ Gem::Specification.new do |spec| spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) spec.require_paths = ["lib"] + spec.add_dependency "curly-lib", "~> 0.0.1" spec.add_development_dependency "bundler", "~> 1.3" spec.add_development_dependency "rake" end From fc3b21391eae84f6752ecb32373a37838d7fcbfe Mon Sep 17 00:00:00 2001 From: Logan Bell Date: Sun, 15 Jun 2014 14:14:41 -0700 Subject: [PATCH 13/13] curly lib --- Gemfile.lock | 1 + 1 file changed, 1 insertion(+) diff --git a/Gemfile.lock b/Gemfile.lock index c14318f..5d1fac7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,6 +2,7 @@ PATH remote: . specs: webservice-swigclient (0.0.1) + curly-lib (~> 0.0.1) GEM remote: https://rubygems.org/