wakoopa-elasticity 1.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. data/.autotest +2 -0
  2. data/.gitignore +5 -0
  3. data/.rspec +2 -0
  4. data/.rvmrc +1 -0
  5. data/Gemfile +4 -0
  6. data/HISTORY.mediawiki +30 -0
  7. data/LICENSE +202 -0
  8. data/README.mediawiki +332 -0
  9. data/Rakefile +11 -0
  10. data/elasticity.gemspec +29 -0
  11. data/lib/elasticity.rb +16 -0
  12. data/lib/elasticity/aws_request.rb +52 -0
  13. data/lib/elasticity/emr.rb +282 -0
  14. data/lib/elasticity/hive_job.rb +71 -0
  15. data/lib/elasticity/job_flow.rb +53 -0
  16. data/lib/elasticity/job_flow_step.rb +36 -0
  17. data/lib/elasticity/pig_job.rb +112 -0
  18. data/lib/elasticity/simple_job.rb +50 -0
  19. data/lib/elasticity/version.rb +3 -0
  20. data/spec/fixtures/vcr_cassettes/add_instance_groups/one_group_successful.yml +38 -0
  21. data/spec/fixtures/vcr_cassettes/add_instance_groups/one_group_unsuccessful.yml +35 -0
  22. data/spec/fixtures/vcr_cassettes/add_jobflow_steps/add_multiple_steps.yml +252 -0
  23. data/spec/fixtures/vcr_cassettes/describe_jobflows/all_jobflows.yml +69 -0
  24. data/spec/fixtures/vcr_cassettes/direct/terminate_jobflow.yml +32 -0
  25. data/spec/fixtures/vcr_cassettes/hive_job/hive_ads.yml +35 -0
  26. data/spec/fixtures/vcr_cassettes/modify_instance_groups/set_instances_to_3.yml +32 -0
  27. data/spec/fixtures/vcr_cassettes/pig_job/apache_log_reports.yml +35 -0
  28. data/spec/fixtures/vcr_cassettes/pig_job/apache_log_reports_with_bootstrap.yml +35 -0
  29. data/spec/fixtures/vcr_cassettes/run_jobflow/word_count.yml +35 -0
  30. data/spec/fixtures/vcr_cassettes/set_termination_protection/nonexistent_job_flows.yml +35 -0
  31. data/spec/fixtures/vcr_cassettes/set_termination_protection/protect_multiple_job_flows.yml +32 -0
  32. data/spec/fixtures/vcr_cassettes/terminate_jobflows/one_jobflow.yml +32 -0
  33. data/spec/lib/elasticity/aws_request_spec.rb +62 -0
  34. data/spec/lib/elasticity/emr_spec.rb +794 -0
  35. data/spec/lib/elasticity/hive_job_spec.rb +96 -0
  36. data/spec/lib/elasticity/job_flow_spec.rb +139 -0
  37. data/spec/lib/elasticity/job_flow_step_spec.rb +76 -0
  38. data/spec/lib/elasticity/pig_job_spec.rb +211 -0
  39. data/spec/spec_helper.rb +43 -0
  40. metadata +253 -0
@@ -0,0 +1,43 @@
1
+ if !ENV["AWS_ACCESS_KEY_ID"] || !ENV["AWS_SECRET_KEY"]
2
+ puts "\n\n\e[32m**********************************************************************************************"
3
+ puts "Please set \e[0;1mAWS_ACCESS_KEY_ID\e[32m and \e[0;1mAWS_SECRET_KEY\e[32m in your environment to run the tests."
4
+ puts ""
5
+ puts "These keys can be found on your AWS Account > Security Credentials page, at the following URL:"
6
+ puts ""
7
+ puts " \e[0;1mhttps://aws-portal.amazon.com/gp/aws/developer/account/index.html?ie=UTF8&action=access-key"
8
+ puts ""
9
+ bourne = !ENV['SHELL'].nil? && ENV['SHELL'] =~ /(bash|ksh|zsh)/
10
+ puts "\e[0mbash, zsh, ksh: #{"\e[35;1mThis is you!\e[0m" if bourne}"
11
+ puts " export AWS_ACCESS_KEY_ID=01234"
12
+ puts " export AWS_SECRET_KEY=56789"
13
+ puts ""
14
+ puts "\e[0mcsh, tcsh: #{"\e[35;1mThis is you!\e[0m" unless bourne}"
15
+ puts " setenv AWS_ACCESS_KEY_ID 01234"
16
+ puts " setenv AWS_SECRET_KEY 56789"
17
+ puts ""
18
+ puts "\e[32m**********************************************************************************************\n\n\n"
19
+ exit
20
+ end
21
+
22
+ AWS_ACCESS_KEY_ID = ENV["AWS_ACCESS_KEY_ID"]
23
+ AWS_SECRET_KEY = ENV["AWS_SECRET_KEY"]
24
+
25
+ require 'rubygems'
26
+ require 'bundler/setup'
27
+
28
+ require 'vcr'
29
+
30
+ require 'elasticity'
31
+
32
+ ENV["RAILS_ENV"] ||= 'test'
33
+
34
+ $:.unshift File.dirname(__FILE__)
35
+
36
+ VCR.config do |c|
37
+ c.cassette_library_dir = 'spec/fixtures/vcr_cassettes'
38
+ c.stub_with :webmock
39
+ end
40
+
41
+ RSpec.configure do |c|
42
+ c.extend VCR::RSpec::Macros
43
+ end
metadata ADDED
@@ -0,0 +1,253 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: wakoopa-elasticity
3
+ version: !ruby/object:Gem::Version
4
+ hash: 25
5
+ prerelease:
6
+ segments:
7
+ - 1
8
+ - 2
9
+ - 3
10
+ version: 1.2.3
11
+ platform: ruby
12
+ authors:
13
+ - Robert Slifka
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2011-10-07 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: rest-client
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ hash: 3
29
+ segments:
30
+ - 0
31
+ version: "0"
32
+ type: :runtime
33
+ version_requirements: *id001
34
+ - !ruby/object:Gem::Dependency
35
+ name: nokogiri
36
+ prerelease: false
37
+ requirement: &id002 !ruby/object:Gem::Requirement
38
+ none: false
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ hash: 3
43
+ segments:
44
+ - 0
45
+ version: "0"
46
+ type: :runtime
47
+ version_requirements: *id002
48
+ - !ruby/object:Gem::Dependency
49
+ name: autotest-fsevent
50
+ prerelease: false
51
+ requirement: &id003 !ruby/object:Gem::Requirement
52
+ none: false
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ hash: 3
57
+ segments:
58
+ - 0
59
+ version: "0"
60
+ type: :development
61
+ version_requirements: *id003
62
+ - !ruby/object:Gem::Dependency
63
+ name: autotest-growl
64
+ prerelease: false
65
+ requirement: &id004 !ruby/object:Gem::Requirement
66
+ none: false
67
+ requirements:
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ hash: 3
71
+ segments:
72
+ - 0
73
+ version: "0"
74
+ type: :development
75
+ version_requirements: *id004
76
+ - !ruby/object:Gem::Dependency
77
+ name: rake
78
+ prerelease: false
79
+ requirement: &id005 !ruby/object:Gem::Requirement
80
+ none: false
81
+ requirements:
82
+ - - ">="
83
+ - !ruby/object:Gem::Version
84
+ hash: 3
85
+ segments:
86
+ - 0
87
+ version: "0"
88
+ type: :development
89
+ version_requirements: *id005
90
+ - !ruby/object:Gem::Dependency
91
+ name: rspec
92
+ prerelease: false
93
+ requirement: &id006 !ruby/object:Gem::Requirement
94
+ none: false
95
+ requirements:
96
+ - - ">="
97
+ - !ruby/object:Gem::Version
98
+ hash: 27
99
+ segments:
100
+ - 2
101
+ - 5
102
+ - 0
103
+ version: 2.5.0
104
+ type: :development
105
+ version_requirements: *id006
106
+ - !ruby/object:Gem::Dependency
107
+ name: vcr
108
+ prerelease: false
109
+ requirement: &id007 !ruby/object:Gem::Requirement
110
+ none: false
111
+ requirements:
112
+ - - ">="
113
+ - !ruby/object:Gem::Version
114
+ hash: 1
115
+ segments:
116
+ - 1
117
+ - 5
118
+ - 1
119
+ version: 1.5.1
120
+ type: :development
121
+ version_requirements: *id007
122
+ - !ruby/object:Gem::Dependency
123
+ name: webmock
124
+ prerelease: false
125
+ requirement: &id008 !ruby/object:Gem::Requirement
126
+ none: false
127
+ requirements:
128
+ - - ">="
129
+ - !ruby/object:Gem::Version
130
+ hash: 11
131
+ segments:
132
+ - 1
133
+ - 6
134
+ - 2
135
+ version: 1.6.2
136
+ type: :development
137
+ version_requirements: *id008
138
+ - !ruby/object:Gem::Dependency
139
+ name: ZenTest
140
+ prerelease: false
141
+ requirement: &id009 !ruby/object:Gem::Requirement
142
+ none: false
143
+ requirements:
144
+ - - ">="
145
+ - !ruby/object:Gem::Version
146
+ hash: 3
147
+ segments:
148
+ - 0
149
+ version: "0"
150
+ type: :development
151
+ version_requirements: *id009
152
+ description: Programmatic access to Amazon's Elastic Map Reduce service.
153
+ email:
154
+ executables: []
155
+
156
+ extensions: []
157
+
158
+ extra_rdoc_files: []
159
+
160
+ files:
161
+ - .autotest
162
+ - .gitignore
163
+ - .rspec
164
+ - .rvmrc
165
+ - Gemfile
166
+ - HISTORY.mediawiki
167
+ - LICENSE
168
+ - README.mediawiki
169
+ - Rakefile
170
+ - elasticity.gemspec
171
+ - lib/elasticity.rb
172
+ - lib/elasticity/aws_request.rb
173
+ - lib/elasticity/emr.rb
174
+ - lib/elasticity/hive_job.rb
175
+ - lib/elasticity/job_flow.rb
176
+ - lib/elasticity/job_flow_step.rb
177
+ - lib/elasticity/pig_job.rb
178
+ - lib/elasticity/simple_job.rb
179
+ - lib/elasticity/version.rb
180
+ - spec/fixtures/vcr_cassettes/add_instance_groups/one_group_successful.yml
181
+ - spec/fixtures/vcr_cassettes/add_instance_groups/one_group_unsuccessful.yml
182
+ - spec/fixtures/vcr_cassettes/add_jobflow_steps/add_multiple_steps.yml
183
+ - spec/fixtures/vcr_cassettes/describe_jobflows/all_jobflows.yml
184
+ - spec/fixtures/vcr_cassettes/direct/terminate_jobflow.yml
185
+ - spec/fixtures/vcr_cassettes/hive_job/hive_ads.yml
186
+ - spec/fixtures/vcr_cassettes/modify_instance_groups/set_instances_to_3.yml
187
+ - spec/fixtures/vcr_cassettes/pig_job/apache_log_reports.yml
188
+ - spec/fixtures/vcr_cassettes/pig_job/apache_log_reports_with_bootstrap.yml
189
+ - spec/fixtures/vcr_cassettes/run_jobflow/word_count.yml
190
+ - spec/fixtures/vcr_cassettes/set_termination_protection/nonexistent_job_flows.yml
191
+ - spec/fixtures/vcr_cassettes/set_termination_protection/protect_multiple_job_flows.yml
192
+ - spec/fixtures/vcr_cassettes/terminate_jobflows/one_jobflow.yml
193
+ - spec/lib/elasticity/aws_request_spec.rb
194
+ - spec/lib/elasticity/emr_spec.rb
195
+ - spec/lib/elasticity/hive_job_spec.rb
196
+ - spec/lib/elasticity/job_flow_spec.rb
197
+ - spec/lib/elasticity/job_flow_step_spec.rb
198
+ - spec/lib/elasticity/pig_job_spec.rb
199
+ - spec/spec_helper.rb
200
+ homepage: http://www.github.com/rslifka/elasticity
201
+ licenses: []
202
+
203
+ post_install_message:
204
+ rdoc_options: []
205
+
206
+ require_paths:
207
+ - lib
208
+ required_ruby_version: !ruby/object:Gem::Requirement
209
+ none: false
210
+ requirements:
211
+ - - ">="
212
+ - !ruby/object:Gem::Version
213
+ hash: 3
214
+ segments:
215
+ - 0
216
+ version: "0"
217
+ required_rubygems_version: !ruby/object:Gem::Requirement
218
+ none: false
219
+ requirements:
220
+ - - ">="
221
+ - !ruby/object:Gem::Version
222
+ hash: 3
223
+ segments:
224
+ - 0
225
+ version: "0"
226
+ requirements: []
227
+
228
+ rubyforge_project:
229
+ rubygems_version: 1.8.11
230
+ signing_key:
231
+ specification_version: 3
232
+ summary: Programmatic access to Amazon's Elastic Map Reduce service.
233
+ test_files:
234
+ - spec/fixtures/vcr_cassettes/add_instance_groups/one_group_successful.yml
235
+ - spec/fixtures/vcr_cassettes/add_instance_groups/one_group_unsuccessful.yml
236
+ - spec/fixtures/vcr_cassettes/add_jobflow_steps/add_multiple_steps.yml
237
+ - spec/fixtures/vcr_cassettes/describe_jobflows/all_jobflows.yml
238
+ - spec/fixtures/vcr_cassettes/direct/terminate_jobflow.yml
239
+ - spec/fixtures/vcr_cassettes/hive_job/hive_ads.yml
240
+ - spec/fixtures/vcr_cassettes/modify_instance_groups/set_instances_to_3.yml
241
+ - spec/fixtures/vcr_cassettes/pig_job/apache_log_reports.yml
242
+ - spec/fixtures/vcr_cassettes/pig_job/apache_log_reports_with_bootstrap.yml
243
+ - spec/fixtures/vcr_cassettes/run_jobflow/word_count.yml
244
+ - spec/fixtures/vcr_cassettes/set_termination_protection/nonexistent_job_flows.yml
245
+ - spec/fixtures/vcr_cassettes/set_termination_protection/protect_multiple_job_flows.yml
246
+ - spec/fixtures/vcr_cassettes/terminate_jobflows/one_jobflow.yml
247
+ - spec/lib/elasticity/aws_request_spec.rb
248
+ - spec/lib/elasticity/emr_spec.rb
249
+ - spec/lib/elasticity/hive_job_spec.rb
250
+ - spec/lib/elasticity/job_flow_spec.rb
251
+ - spec/lib/elasticity/job_flow_step_spec.rb
252
+ - spec/lib/elasticity/pig_job_spec.rb
253
+ - spec/spec_helper.rb