ocean-rails 3.0.3 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a170339405adf8999a6b68776fb5f04cb25b311c
4
- data.tar.gz: 3e4b6946ed0dca6411f08c29d863dc4da371f7c3
3
+ metadata.gz: 8b43f4ba84984a518c763a6f6617afb5bbe60c5c
4
+ data.tar.gz: 7d4407aebaa0e24ba645980c6481deebd93e2b86
5
5
  SHA512:
6
- metadata.gz: 3adb28b80a6c3e9e6838a515e3a3b1a9def505e03cbc4371fb4f821f85b47c4af82e41090213fb90bfe8295df0ba6540b9c61466960d80dbfb5c4b5d88788de1
7
- data.tar.gz: 57e19ef5543201846577fabe69ae53934245656897b706a5aadda3d078ef2e68fcfdfa337d5a552dea164809f2c63e78a1eabdfcd1722d928f01d42a86068eb2
6
+ metadata.gz: 4d6296a69023769b3a80d548d50a6ae3eed1ad63a29922f43f22868a349a440ebd90daef77699525929d1de85435ff4743e36954c2446420275b875d8b0d2fc1
7
+ data.tar.gz: b47bfae2f6afb2345f8a530dc8794cbd4e70ed18787fee9dd8a67a1d05f4ed30e193c74e277244f4a6f19ad2c52f7464583a4bfaeb79d5255caeeda60a6a53ab
data/lib/ocean/api.rb CHANGED
@@ -4,6 +4,17 @@ require 'typhoeus'
4
4
  # This class encapsulates all logic for calling other API services.
5
5
  #
6
6
  class Api
7
+
8
+ #
9
+ # Convert an external Ocean URI to an internal one. This is mainly useful
10
+ # in master and staging, as the https URIs aren't available for CronJobs,
11
+ # etc.
12
+ #
13
+ def self.internalize_uri(uri, chef_env=CHEF_ENV)
14
+ return uri if chef_env == 'prod'
15
+ uri.sub(OCEAN_API_URL, INTERNAL_OCEAN_API_URL)
16
+ end
17
+
7
18
 
8
19
  #
9
20
  # When given a symbol or string naming a resource, returns a string
data/lib/ocean/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ocean
2
- VERSION = "3.0.3"
2
+ VERSION = "3.1.0"
3
3
  end
@@ -1,4 +1,3 @@
1
- data[:token] = Thread.current[:x_api_token] if Thread.current[:x_api_token].present?
2
1
  require 'socket'
3
2
 
4
3
  #
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ocean-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.3
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Bengtson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-16 00:00:00.000000000 Z
11
+ date: 2014-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus