elasticity 4.0.4 → 4.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/.ruby-version +2 -1
- data/.travis.yml +3 -4
- data/HISTORY.md +11 -0
- data/README.md +4 -4
- data/lib/elasticity/custom_jar_step.rb +1 -1
- data/lib/elasticity/job_flow.rb +2 -0
- data/lib/elasticity/version.rb +1 -1
- data/spec/lib/elasticity/job_flow_spec.rb +35 -6
- data/spec/spec_helper.rb +0 -2
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
ODE2ZDdmNWZkZWI5MDM0NjRiZGMxM2RmYWMyMTA0Mjk5NjkzYWVhMQ==
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 4c42ab2ad995aa5ff7f21a3d35a280022e11efdf
|
4
|
+
data.tar.gz: 1d6fa511f56d8bda40c56dd3a84ba856400835c0
|
7
5
|
SHA512:
|
8
|
-
metadata.gz:
|
9
|
-
|
10
|
-
MTkzOTlkZGJhZmJhNzJhNzM5NzM0YmJmN2YzZTE0YjZmYWIzNTYzNzE1YWYx
|
11
|
-
ZTExMDQ1NTk3YzkwM2RiMzMwNTY5NmJjZjA0MGY4MDkyYjI3ZDM=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
YTM2Nzk3NGFkMjA2YzU5M2Y3NTU1NWM4ZmQ1ZmY3ZWY2NWVkN2IzMjE1YzVj
|
14
|
-
MTU0NTlkMWMzYjlhMjJmYTk5ZThmM2ZiM2U3YjM4MjdhY2EwNzUzM2I2ODAx
|
15
|
-
ZGZiNzEzN2JkODRjOGEzNGM3MjVkMTJlNzBhZmEyZTdiNzVlYTU=
|
6
|
+
metadata.gz: d6984f4255ac2b9c5436e51ef70c64559cb5e8ff6fdbf7dbfc7f6a913d279042620d5ecbff2662d5a3134ae791f37e808c34b623005bdee881e72ee1b2645bbf
|
7
|
+
data.tar.gz: 9f505e99006bf579353ef44482ee2558f636d6797368cee482e8da1841fc3609a1acd1d60c66de0e74b3d2a5d962704aae8a9f43718867776ff9d35d839b3f77
|
data/.ruby-version
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
|
1
|
+
2.0.0-p598
|
2
|
+
|
data/.travis.yml
CHANGED
data/HISTORY.md
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
## 5.0 - March 28, 2015
|
2
|
+
|
3
|
+
- Major version bump as there are language support implications.
|
4
|
+
- Now supporting only the latest version of the 2.x minors (e.g. 2.0.x, 2.1.x, etc.) versus specific minor-minor releases. This was an oversight on my part in how I both configured Travis and communicated support for the 2.x line.
|
5
|
+
- Removed support for Ruby 1.9.3 as it has been [unsupported since 2/23/2015](https://www.ruby-lang.org/en/news/2014/01/10/ruby-1-9-3-will-end-on-2015/).
|
6
|
+
- Removed "support" for JRuby. It was in poor form that I originally claimed to support JRuby as I do not have the time to dedicate to such an endeavor. Compatibility is merely coincidental and it would not be responsible for me to continue communicating ongoing support when that is not my intention. Apologies to those this may inconvenience.
|
7
|
+
|
8
|
+
## 4.0.5 - April 9, 2015
|
9
|
+
|
10
|
+
- Thanks to @alexanderdean, pull request [#82](https://github.com/rslifka/elasticity/pull/82) adds support for profile roles.
|
11
|
+
|
1
12
|
## 4.0.4 - November 20, 2014
|
2
13
|
|
3
14
|
- Thanks to @jshafton, pull request [#79](https://github.com/rslifka/elasticity/pull/79) adds support for job flow roles.
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Elasticity provides programmatic access to Amazon's Elastic Map Reduce service. The aim is to conveniently abstract away the complex EMR REST API and make working with job flows more productive and more enjoyable.
|
4
4
|
|
5
|
-
[![Build Status](https://secure.travis-ci.org/rslifka/elasticity.png)](http://travis-ci.org/rslifka/elasticity)
|
5
|
+
[![Build Status](https://secure.travis-ci.org/rslifka/elasticity.png)](http://travis-ci.org/rslifka/elasticity) 2.0.x, 2.1.x, 2.2.x
|
6
6
|
|
7
7
|
Elasticity provides two ways to access EMR:
|
8
8
|
|
@@ -18,7 +18,7 @@ gem install elasticity
|
|
18
18
|
or in your Gemfile
|
19
19
|
|
20
20
|
```
|
21
|
-
gem 'elasticity', '~>
|
21
|
+
gem 'elasticity', '~> 5.0'
|
22
22
|
```
|
23
23
|
|
24
24
|
This will ensure that you protect yourself from API changes, which will only be made in major revisions.
|
@@ -403,14 +403,14 @@ Unfortunately, the documentation is sometimes incorrect and sometimes missing.
|
|
403
403
|
|
404
404
|
# Thanks!
|
405
405
|
|
406
|
+
* [Alexander Dean](https://github.com/alexanderdean) has been a constant source of excellent suggestions. He's also working on [Unified Log Processing](http://www.manning.com/dean/), which you should of course purchase several copies of, post haste :)
|
406
407
|
* AWS signing was used from [RightScale's](http://www.rightscale.com/) amazing [right_aws gem](https://github.com/rightscale/right_aws) which works extraordinarily well! If you need access to any AWS service (EC2, S3, etc.), have a look.
|
407
408
|
* <code>camelize</code> was used from ActiveSupport to assist in converting parmeters to AWS request format.
|
408
|
-
* Thanks to [Ryan Weald](https://github.com/rweald) and [Alexander Dean](https://github.com/alexanderdean) for their constant barrage of excellent suggestions :)
|
409
409
|
|
410
410
|
# License
|
411
411
|
|
412
412
|
```
|
413
|
-
Copyright 2011-
|
413
|
+
Copyright 2011-2015 Robert Slifka
|
414
414
|
|
415
415
|
Licensed under the Apache License, Version 2.0 (the "License");
|
416
416
|
you may not use this file except in compliance with the License.
|
data/lib/elasticity/job_flow.rb
CHANGED
@@ -23,6 +23,7 @@ module Elasticity
|
|
23
23
|
attr_accessor :visible_to_all_users
|
24
24
|
attr_accessor :enable_debugging
|
25
25
|
attr_accessor :job_flow_role
|
26
|
+
attr_accessor :service_role
|
26
27
|
|
27
28
|
attr_reader :access_key
|
28
29
|
attr_reader :secret_key
|
@@ -187,6 +188,7 @@ module Elasticity
|
|
187
188
|
config[:steps] = steps
|
188
189
|
config[:log_uri] = @log_uri if @log_uri
|
189
190
|
config[:job_flow_role] = @job_flow_role if @job_flow_role
|
191
|
+
config[:service_role] = @service_role if @service_role
|
190
192
|
config[:bootstrap_actions] = @bootstrap_actions.map{|a| a.to_aws_bootstrap_action} unless @bootstrap_actions.empty?
|
191
193
|
config
|
192
194
|
end
|
data/lib/elasticity/version.rb
CHANGED
@@ -4,22 +4,25 @@ describe Elasticity::JobFlow do
|
|
4
4
|
Elasticity::JobFlow.new('access', 'secret')
|
5
5
|
end
|
6
6
|
|
7
|
-
its(:access_key) { should == 'access' }
|
8
|
-
its(:secret_key) { should == 'secret' }
|
9
7
|
its(:action_on_failure) { should == 'TERMINATE_JOB_FLOW' }
|
10
8
|
its(:ec2_key_name) { should == nil }
|
11
|
-
its(:
|
9
|
+
its(:name) { should == 'Elasticity Job Flow' }
|
12
10
|
its(:instance_count) { should == 2 }
|
13
11
|
its(:log_uri) { should == nil }
|
14
12
|
its(:master_instance_type) { should == 'm1.small' }
|
15
|
-
its(:name) { should == 'Elasticity Job Flow' }
|
16
13
|
its(:slave_instance_type) { should == 'm1.small' }
|
17
14
|
its(:ami_version) { should == 'latest' }
|
18
15
|
its(:keep_job_flow_alive_when_no_steps) { should == false }
|
16
|
+
its(:ec2_subnet_id) { should == nil }
|
19
17
|
its(:placement) { should == 'us-east-1a' }
|
18
|
+
its(:region) { should == 'us-east-1' }
|
20
19
|
its(:visible_to_all_users) { should == false }
|
21
20
|
its(:enable_debugging) { should == false }
|
22
|
-
its(:
|
21
|
+
its(:job_flow_role) { should == nil }
|
22
|
+
its(:service_role) { should == nil }
|
23
|
+
|
24
|
+
its(:access_key) { should == 'access' }
|
25
|
+
its(:secret_key) { should == 'secret' }
|
23
26
|
|
24
27
|
describe '.initialize' do
|
25
28
|
it 'should set the access and secret keys to nil by default' do
|
@@ -357,7 +360,7 @@ describe Elasticity::JobFlow do
|
|
357
360
|
end
|
358
361
|
end
|
359
362
|
|
360
|
-
context 'when a
|
363
|
+
context 'when a job flow role is not specified' do
|
361
364
|
let(:jobflow_with_no_job_flow_role) do
|
362
365
|
Elasticity::JobFlow.new('_', '_').tap do |jf|
|
363
366
|
jf.job_flow_role = nil
|
@@ -370,6 +373,32 @@ describe Elasticity::JobFlow do
|
|
370
373
|
|
371
374
|
end
|
372
375
|
|
376
|
+
describe 'service role' do
|
377
|
+
|
378
|
+
context 'when a service role is specified' do
|
379
|
+
let(:jobflow_with_service_role) do
|
380
|
+
Elasticity::JobFlow.new('_', '_').tap do |jf|
|
381
|
+
jf.service_role = 'SERVICE_ROLE'
|
382
|
+
end
|
383
|
+
end
|
384
|
+
it 'should incorporate it into the jobflow config' do
|
385
|
+
jobflow_with_service_role.send(:jobflow_config).should be_a_hash_including({:service_role => 'SERVICE_ROLE'})
|
386
|
+
end
|
387
|
+
end
|
388
|
+
|
389
|
+
context 'when a service role is not specified' do
|
390
|
+
let(:jobflow_with_no_service_role) do
|
391
|
+
Elasticity::JobFlow.new('_', '_').tap do |jf|
|
392
|
+
jf.service_role = nil
|
393
|
+
end
|
394
|
+
end
|
395
|
+
it 'should not make space for it in the jobflow config' do
|
396
|
+
jobflow_with_no_service_role.send(:jobflow_config).should_not have_key(:service_role)
|
397
|
+
end
|
398
|
+
end
|
399
|
+
|
400
|
+
end
|
401
|
+
|
373
402
|
describe 'bootstrap actions' do
|
374
403
|
|
375
404
|
context 'when bootstrap actions are specified' do
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elasticity
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Slifka
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-04-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -195,17 +195,17 @@ require_paths:
|
|
195
195
|
- lib
|
196
196
|
required_ruby_version: !ruby/object:Gem::Requirement
|
197
197
|
requirements:
|
198
|
-
- -
|
198
|
+
- - '>='
|
199
199
|
- !ruby/object:Gem::Version
|
200
200
|
version: '0'
|
201
201
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
202
202
|
requirements:
|
203
|
-
- -
|
203
|
+
- - '>='
|
204
204
|
- !ruby/object:Gem::Version
|
205
205
|
version: '0'
|
206
206
|
requirements: []
|
207
207
|
rubyforge_project:
|
208
|
-
rubygems_version: 2.
|
208
|
+
rubygems_version: 2.4.6
|
209
209
|
signing_key:
|
210
210
|
specification_version: 4
|
211
211
|
summary: Streamlined, programmatic access to Amazon's Elastic Map Reduce service.
|