rightscaler 0.1.2 → 0.2.0
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.
- data/Rakefile +1 -1
- data/VERSION.yml +1 -1
- data/lib/rightscaler.rb +23 -11
- data/rightscaler.gemspec +4 -4
- metadata +5 -6
data/Rakefile
CHANGED
|
@@ -9,7 +9,7 @@ begin
|
|
|
9
9
|
gem.email = "joshuabates@gmail.com"
|
|
10
10
|
gem.homepage = "http://github.com/joshuabates/rightscaler"
|
|
11
11
|
gem.authors = ["Joshua Bates"]
|
|
12
|
-
gem.add_dependency(%q<activeresource>, ["
|
|
12
|
+
gem.add_dependency(%q<activeresource>, ["~> 3.0"])
|
|
13
13
|
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
|
14
14
|
end
|
|
15
15
|
rescue LoadError
|
data/VERSION.yml
CHANGED
data/lib/rightscaler.rb
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
require '
|
|
2
|
-
require '
|
|
1
|
+
require 'active_support'
|
|
2
|
+
require 'active_resource'
|
|
3
3
|
require "logger"
|
|
4
4
|
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
|
5
5
|
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
|
6
6
|
module Rightscaler
|
|
7
|
-
VERSION = "0.
|
|
7
|
+
VERSION = "0.2.0" # updated to match ../VERSION.yml
|
|
8
8
|
end
|
|
9
9
|
|
|
10
10
|
require 'rightscaler/resource'
|
|
@@ -16,14 +16,26 @@ require 'rightscaler/manage/deployment'
|
|
|
16
16
|
require 'rightscaler/manage/server'
|
|
17
17
|
require 'rightscaler/manage/status'
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
|
|
20
|
+
# At some point in the past, ActiveResource couldn't manage to do a head
|
|
21
|
+
# request right; this fixes it.
|
|
20
22
|
# https://rails.lighthouseapp.com/projects/8994/tickets/1223-activeresource-head-request-sends-headers-with-a-nil-key#ticket-1223-6
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
# and https://rails.lighthouseapp.com/projects/8994/tickets/3020-activeresourceexists-does-not-work-at-all
|
|
24
|
+
#
|
|
25
|
+
# ActiveResource 3.0.0 fixes this problem (it may have been fixed earlier) and
|
|
26
|
+
# also has a build_request_headers with arity of 3, so the fix below isn't
|
|
27
|
+
# needed and doesn't work.
|
|
28
|
+
|
|
29
|
+
require 'active_resource/version'
|
|
30
|
+
|
|
31
|
+
unless ActiveResource::VERSION::MAJOR >= 3
|
|
32
|
+
module ActiveResource
|
|
33
|
+
class Connection
|
|
34
|
+
HTTP_FORMAT_HEADER_NAMES[:head] = 'Content-Type'
|
|
35
|
+
|
|
36
|
+
def head(path, headers = {})
|
|
37
|
+
request(:head, path, build_request_headers(headers, :head))
|
|
38
|
+
end
|
|
27
39
|
end
|
|
28
40
|
end
|
|
29
|
-
end
|
|
41
|
+
end
|
data/rightscaler.gemspec
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = %q{rightscaler}
|
|
8
|
-
s.version = "0.
|
|
8
|
+
s.version = "0.2.0"
|
|
9
9
|
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
11
11
|
s.authors = ["Joshua Bates"]
|
|
@@ -53,12 +53,12 @@ Gem::Specification.new do |s|
|
|
|
53
53
|
s.specification_version = 3
|
|
54
54
|
|
|
55
55
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
|
56
|
-
s.add_runtime_dependency(%q<activeresource>, ["~>
|
|
56
|
+
s.add_runtime_dependency(%q<activeresource>, ["~> 3.0"])
|
|
57
57
|
else
|
|
58
|
-
s.add_dependency(%q<activeresource>, ["~>
|
|
58
|
+
s.add_dependency(%q<activeresource>, ["~> 3.0"])
|
|
59
59
|
end
|
|
60
60
|
else
|
|
61
|
-
s.add_dependency(%q<activeresource>, ["~>
|
|
61
|
+
s.add_dependency(%q<activeresource>, ["~> 3.0"])
|
|
62
62
|
end
|
|
63
63
|
end
|
|
64
64
|
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rightscaler
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 23
|
|
5
5
|
prerelease:
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
|
-
- 1
|
|
9
8
|
- 2
|
|
10
|
-
|
|
9
|
+
- 0
|
|
10
|
+
version: 0.2.0
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Joshua Bates
|
|
@@ -26,12 +26,11 @@ dependencies:
|
|
|
26
26
|
requirements:
|
|
27
27
|
- - ~>
|
|
28
28
|
- !ruby/object:Gem::Version
|
|
29
|
-
hash:
|
|
29
|
+
hash: 7
|
|
30
30
|
segments:
|
|
31
|
-
- 2
|
|
32
31
|
- 3
|
|
33
32
|
- 0
|
|
34
|
-
version:
|
|
33
|
+
version: "3.0"
|
|
35
34
|
type: :runtime
|
|
36
35
|
version_requirements: *id001
|
|
37
36
|
description:
|