Skip to content

Commit f4e9b30

Browse files
Merge pull request #9 from SLsthompson/gemspec_changes
Move gem spec into an external file. Cleaned up rspec setup
2 parents 38a0889 + e9da70e commit f4e9b30

6 files changed

Lines changed: 68 additions & 24 deletions

File tree

CHANGELOG.textile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
*1.0.7*
2+
* Calls to the @getObject@ method of any service should not take parameters. The gem now warns if you make this type of call and ignores the parameters. This prevents @SoftLayer_Virtual_Guest::getObject@ from accidentally creating (billable) CCI instances.
3+
4+
*1.0.6*
5+
* Make all API calls with either a @GET@ or a @POST@ as the HTTP verb.
6+
7+
*1.0.5*
8+
* Fixed a bug where empty hashes and empty arrays would not generate meaningful object masks
9+
10+
*1.0.4*
11+
* Fixed a bug where the @result_limit@ and @result_offset@ object filters were just not working.
12+
13+
*1.0.3*
14+
* Added a request filter to add result limits to request. Submitted by JN. Thanks!
15+
16+
*1.0.2*
17+
* We have some API routines that start with 'get' but expect arguments anyway. The code now uses HTTP POST to send requests for which the user has provided arguments regardless of the name of the routine.
18+
19+
*1.0*, *1.0.1*
20+
* Initial release of the gem

rakefile

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -23,34 +23,16 @@
2323
$LOAD_PATH << File.expand_path(File.join(File.dirname(__FILE__)))
2424

2525
require 'rubygems'
26-
require 'rubygems/package_task'
27-
require 'lib/softlayer/base'
26+
require 'bundler/gem_tasks'
2827
require 'rspec/core/rake_task'
2928

30-
softlayer_api_gem = Gem::Specification.new do |s|
31-
s.platform = Gem::Platform::RUBY
32-
s.name = %q{softlayer_api}
33-
s.version = SoftLayer::VERSION
34-
s.author = "SoftLayer Development Team"
35-
s.email = %q{sldn@softlayer.com}
36-
s.homepage = %q{http://sldn.softlayer.com/}
37-
s.summary = %q{Library for accessing the SoftLayer portal API}
38-
s.description = %q{The softlayer_api gem offers a convenient mechanism for invoking the services of the SoftLayer API from Ruby.}
39-
s.files = FileList["README.textile", "LICENSE.textile", "lib/**/*.rb", "test/**/*.rb", "examples/**/*.rb"]
40-
s.require_path = "lib"
41-
s.has_rdoc = true
42-
s.add_runtime_dependency 'json', '~> 1.8', '>= 1.8.1'
43-
s.license = %q{MIT}
44-
end
45-
46-
Gem::PackageTask.new(softlayer_api_gem) do |pkg|
47-
end
48-
49-
RSpec::Core::RakeTask.new do |tester|
29+
RSpec::Core::RakeTask.new(:spec) do |t|
5030
$DEBUG = 1
51-
tester.pattern = 'test/*.rb'
52-
tester.rspec_opts = ["-c", "-f nested"]
31+
t.rspec_opts = ["-c"]
5332
end
5433

34+
task :gem => :build
35+
5536
task :default => [:spec] do
5637
end
38+

softlayer_api.gemspec

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#
2+
# Copyright (c) 2014 SoftLayer Technologies, Inc. All rights reserved.
3+
#
4+
# Permission is hereby granted, free of charge, to any person obtaining a copy
5+
# of this software and associated documentation files (the "Software"), to deal
6+
# in the Software without restriction, including without limitation the rights
7+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
# copies of the Software, and to permit persons to whom the Software is
9+
# furnished to do so, subject to the following conditions:
10+
#
11+
# The above copyright notice and this permission notice shall be included in
12+
# all copies or substantial portions of the Software.
13+
#
14+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20+
# THE SOFTWARE.
21+
#
22+
23+
$LOAD_PATH << File.expand_path(File.join(File.dirname(__FILE__)))
24+
require 'lib/softlayer/base'
25+
26+
Gem::Specification.new do |s|
27+
s.name = %q{softlayer_api}
28+
s.version = SoftLayer::VERSION
29+
s.author = "SoftLayer Development Team"
30+
s.email = %q{sldn@softlayer.com}
31+
s.description = %q{The softlayer_api gem offers a convenient mechanism for invoking the services of the SoftLayer API from Ruby.}
32+
s.summary = %q{Library for accessing the SoftLayer portal API}
33+
s.homepage = %q{http://sldn.softlayer.com/}
34+
s.license = %q{MIT}
35+
36+
s.files = Dir["README.textile", "LICENSE.textile", "lib/**/*.rb", "test/**/*.rb", "examples/**/*.rb"]
37+
s.require_paths = ["lib"]
38+
39+
s.has_rdoc = true
40+
s.add_runtime_dependency 'json', '~> 1.8', '>= 1.8.1'
41+
s.add_development_dependency 'rake'
42+
end

0 commit comments

Comments
 (0)