ocean-rails 1.18.8 → 1.19.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.rdoc +4 -6
- data/lib/ocean/api.rb +24 -0
- data/lib/ocean/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7b07c48320b0fb3b254c5fb015b1dbc170459c61
|
4
|
+
data.tar.gz: 9523c8b17736174826d5a6e56c5b9fa27ef8f76e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd8728127e2c3ab22ed3ef365b4773a70a8cba8a50847f4b67de195dea89dff948bc471f183627f89f320bca4ed1b8de832a3f4ab382dddf986c2bf2cb210a18
|
7
|
+
data.tar.gz: a707f37e89bf9a56e1efba51b8a50cf33af207026daf4d254906cf9b9dd476f1ac1b33595156c3b1dd052d3f445cb72e90e4418ef8be2f66759d051dc48eee8d
|
data/README.rdoc
CHANGED
@@ -7,8 +7,9 @@ Ocean requires Ruby 2.0 and Ruby on Rails 4.0.0 or later.
|
|
7
7
|
|
8
8
|
{<img src="https://badge.fury.io/rb/ocean-rails.png" alt="Gem Version" />}[http://badge.fury.io/rb/ocean-rails]
|
9
9
|
|
10
|
+
|
10
11
|
=== Documentation
|
11
|
-
* Ocean gem API: http://rdoc.info/github/OceanDev/ocean-rails
|
12
|
+
* Ocean gem API: http://rdoc.info/github/OceanDev/ocean-rails/frames
|
12
13
|
* Ocean gem on Rubygems: https://rubygems.org/gems/ocean-rails
|
13
14
|
* Ocean framework: http://wiki.oceanframework.net
|
14
15
|
* Ocean mailing list: http://groups.google.com/group/oceanframework
|
@@ -33,11 +34,8 @@ same directory for reference. Don't change it: it is under version control. The
|
|
33
34
|
you should change, <code>config/config.yml</code>, isn't, as it will contain site-specific and/or
|
34
35
|
confidential data.
|
35
36
|
|
36
|
-
|
37
|
-
|
38
|
-
rspec
|
39
|
-
|
40
|
-
All tests should pass.
|
37
|
+
There are no specs to run at this point: all functionality provided by the +ocean-rails+
|
38
|
+
gem already is exhaustively tested in the +ocean-rails+ spec suite.
|
41
39
|
|
42
40
|
|
43
41
|
=== Creating an Ocean Resource
|
data/lib/ocean/api.rb
CHANGED
@@ -48,6 +48,30 @@ class Api
|
|
48
48
|
end
|
49
49
|
|
50
50
|
|
51
|
+
#
|
52
|
+
# Adds environment info to the basename, so that testing and execution in various combinations
|
53
|
+
# of the Rails env and the Chef environment can be done without collision.
|
54
|
+
#
|
55
|
+
# The chef_env will always be appended to the basename, since we never want to share queues
|
56
|
+
# between different Chef environments.
|
57
|
+
#
|
58
|
+
# If the chef_env is 'dev' or 'ci', we must separate things as much as
|
59
|
+
# possible: therefore, we add the local IP number and the Rails environment.
|
60
|
+
#
|
61
|
+
# We also add the same information if by any chance the Rails environment isn't 'production'.
|
62
|
+
# This is a precaution; in staging and prod apps should always run in Rails production mode,
|
63
|
+
# but if by mistake they don't, we must prevent the production queues from being touched.
|
64
|
+
#
|
65
|
+
def self.adorn_basename(basename, chef_env: "dev", rails_env: "development")
|
66
|
+
fullname = "#{basename}_#{chef_env}"
|
67
|
+
if rails_env != 'production' || chef_env == 'dev' || chef_env == 'ci'
|
68
|
+
local_ip = UDPSocket.open {|s| s.connect("64.233.187.99", 1); s.addr.last}.gsub('.', '-')
|
69
|
+
fullname += "_#{local_ip}_#{rails_env}"
|
70
|
+
end
|
71
|
+
fullname
|
72
|
+
end
|
73
|
+
|
74
|
+
|
51
75
|
#
|
52
76
|
# Makes a HTTP request to +host_url+ using the HTTP method +method+. The +resource_name+
|
53
77
|
# is used to obtain the latest version string of the resource. The arg +path+ is the
|
data/lib/ocean/version.rb
CHANGED
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: 1.
|
4
|
+
version: 1.19.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: 2013-
|
11
|
+
date: 2013-09-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -150,6 +150,20 @@ dependencies:
|
|
150
150
|
- - '>='
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: webmock
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - '>='
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - '>='
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
153
167
|
- !ruby/object:Gem::Dependency
|
154
168
|
name: simplecov
|
155
169
|
requirement: !ruby/object:Gem::Requirement
|