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 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>, [">= 0"])
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
@@ -1,5 +1,5 @@
1
1
  ---
2
- :minor: 1
2
+ :minor: 2
3
3
  :patch: 0
4
4
  :major: 0
5
5
  :build:
data/lib/rightscaler.rb CHANGED
@@ -1,10 +1,10 @@
1
- require 'activesupport'
2
- require 'activeresource'
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.1"
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
- # ActiveResource can't manage to do a head request right, this fixes it
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
- module ActiveResource
22
- class Connection
23
- HTTP_FORMAT_HEADER_NAMES[:head] = 'Content-Type'
24
-
25
- def head(path, headers = {})
26
- request(:head, path, build_request_headers(headers, :head))
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.1.2"
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>, ["~> 2.3.0"])
56
+ s.add_runtime_dependency(%q<activeresource>, ["~> 3.0"])
57
57
  else
58
- s.add_dependency(%q<activeresource>, ["~> 2.3.0"])
58
+ s.add_dependency(%q<activeresource>, ["~> 3.0"])
59
59
  end
60
60
  else
61
- s.add_dependency(%q<activeresource>, ["~> 2.3.0"])
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: 31
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 1
9
8
  - 2
10
- version: 0.1.2
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: 3
29
+ hash: 7
30
30
  segments:
31
- - 2
32
31
  - 3
33
32
  - 0
34
- version: 2.3.0
33
+ version: "3.0"
35
34
  type: :runtime
36
35
  version_requirements: *id001
37
36
  description: