ocean-rails 1.18.8 → 1.19.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f723a5789804d1b39bb4397d61b7ec794102b403
4
- data.tar.gz: b12da0d1f18218b212734998cd21b2274b7d55d5
3
+ metadata.gz: 7b07c48320b0fb3b254c5fb015b1dbc170459c61
4
+ data.tar.gz: 9523c8b17736174826d5a6e56c5b9fa27ef8f76e
5
5
  SHA512:
6
- metadata.gz: 142402aad49ef24e397d48ec62873ef430aea063da8a24802e13e6f41107607715c446ccb5f50ac450bcf23d85a51a3aa53858c8525a712321f99f40c5eada8e
7
- data.tar.gz: d15c893f5f6b302c16ef1af3eeeeeab20c361ad5ee639849c39b2804678e77c46d99cc77463e1a5203580cbbcb6f651f112667940849af4e8b31c062db16a273
6
+ metadata.gz: dd8728127e2c3ab22ed3ef365b4773a70a8cba8a50847f4b67de195dea89dff948bc471f183627f89f320bca4ed1b8de832a3f4ab382dddf986c2bf2cb210a18
7
+ data.tar.gz: a707f37e89bf9a56e1efba51b8a50cf33af207026daf4d254906cf9b9dd476f1ac1b33595156c3b1dd052d3f445cb72e90e4418ef8be2f66759d051dc48eee8d
@@ -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
- Verify that your setup is OK by executing
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
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Ocean
2
- VERSION = "1.18.8"
2
+ VERSION = "1.19.0"
3
3
  end
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.18.8
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-08-27 00:00:00.000000000 Z
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