Skip to content

Commit 1007401

Browse files
committed
Misc changes
* Primary change is that the api key is on longer required
1 parent 3e0256c commit 1007401

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

Gemfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ source "https://rubygems.org"
22

33
gemspec
44
gem 'rspec'
5-
gem 'curly-lib'
5+
gem 'curly-lib', '~> 0.0.1'

lib/WebService/SwigClient.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def initialize(params)
99
end
1010

1111
def render(path, data)
12-
url = [@service_url, @api_key, path].join("/");
12+
url = (@api_key ? [@service_url, @api_key, path] : [@service_url, path]).join("/");
1313
response = Curly::Request.post(url, headers: { 'Content-type' => 'application/json' }, body: data.to_json)
1414

1515
if ( !response.success? )

webservice-swigclient-ruby.gemspec

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
1-
# coding: utf-8
2-
lib = File.expand_path('../lib', __FILE__)
3-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4-
require 'webservice/swigclient'
5-
61
Gem::Specification.new do |spec|
72
spec.name = "webservice-swigclient"
8-
spec.version = WebServiceSwigClient::VERSION
3+
spec.version = '0.0.1'
94
spec.authors = ["Logan Bell"]
105
spec.email = ["[email protected]"]
116
spec.description = %q{A client for swig.io!}
@@ -18,6 +13,7 @@ Gem::Specification.new do |spec|
1813
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
1914
spec.require_paths = ["lib"]
2015

16+
spec.add_dependency "curly-lib", "~> 0.0.1"
2117
spec.add_development_dependency "bundler", "~> 1.3"
2218
spec.add_development_dependency "rake"
2319
end

0 commit comments

Comments
 (0)