aws_account_utils 0.1.0 → 0.1.2

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: 79a564cff80b5c7490a6c9f586818af44291a017
4
- data.tar.gz: c790580762a7dca94ab5d59bce32d18484bc1851
3
+ metadata.gz: 2cdc1bfeb1376e9bffa076150d73b0962bd9bb69
4
+ data.tar.gz: 5901819531b21ed4a3d5f5bbaa6f9deafbd1c44a
5
5
  SHA512:
6
- metadata.gz: 4e8678b02ed10dd429002d841ca3a3676cb55f24a09543c2786ec11f1eff7363dbbceb931188e4ea7afe6c735449588a05b34abc064086d27af49dc736d93901
7
- data.tar.gz: 8561de0dd6419b28957d01ef5589b1beeece3ca8246bb381fd40175ba450d64e554fd3863da99f1cae4a554067019b9da5ef2442945fc5b5a0d56c52f925a1e0
6
+ metadata.gz: 5bb6b0094d7e5b269c3f541a4c425989bbe695f6908f4fe1d11611f2ae9e72ccd04d7f6ff298f61ecdad80471e68b9f96e458c5a5df8f3b5caa58caf277e63c0
7
+ data.tar.gz: 6939a40b12e209fa685c09accb8bf36ddf87e498616f10852d7842b3b194d3d2d1a974e53a8eb4d2fff173917fc90b47c6a8655365c11461aa4b6964cd6539b9
data/.codeclimate.yml CHANGED
@@ -18,13 +18,13 @@ engines:
18
18
  rubocop:
19
19
  enabled: true
20
20
  golint:
21
- enabled: true
21
+ enabled: false
22
22
  gofmt:
23
- enabled: true
23
+ enabled: false
24
24
  eslint:
25
- enabled: true
25
+ enabled: false
26
26
  csslint:
27
- enabled: true
27
+ enabled: false
28
28
 
29
29
  # Engines can analyze files and report issues on them, but you can separately
30
30
  # decide which files will receive ratings based on those issues. This is
@@ -35,11 +35,11 @@ engines:
35
35
 
36
36
  # Note: If the ratings key is not specified, this will result in a 0.0 GPA on your dashboard.
37
37
 
38
- # ratings:
39
- # paths:
38
+ ratings:
39
+ paths:
40
40
  # - app/**
41
- # - lib/**
42
- # - "**.rb"
41
+ - lib/**
42
+ - "**.rb"
43
43
  # - "**.go"
44
44
 
45
45
  # You can globally exclude files from being analyzed by any engine using the
@@ -47,4 +47,4 @@ engines:
47
47
 
48
48
  #exclude_paths:
49
49
  #- spec/**/*
50
- #- vendor/**/*
50
+ #- vendor/**/*
data/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  A collection of helpers for creating and modifying AWS account details that can not be done using any existing AWS API
4
4
 
5
+ Special Note: the `create_account` operation requires that your IP be white-listed by AWS in order to bypass the CAPTCHA
6
+
5
7
  ## Installation
6
8
 
7
9
  Add this line to your application's Gemfile:
@@ -20,6 +22,24 @@ Or install it yourself as:
20
22
 
21
23
  ## Usage
22
24
 
25
+ Overview
26
+ =================
27
+
28
+ If you are required to go through a proxy, the following should be set prior to execution.
29
+ ```
30
+ export no_proxy=127.0.0.1
31
+ export http_proxy=myproxyhots.com
32
+ ```
33
+
34
+ ```ruby
35
+ aws_utils = AwsAccountUtils::AwsAccountUtils.new(
36
+ browser: (Watir::Browser) - default: Watir Browser object - You can pass in your own Browser object or use the built-in which uses firefox.
37
+ logger: (Logger) - default: Logger object. - You can pass in your own logger or use the built in.
38
+ log_level: (Symbol) - default: :info - Sets the logger level. Only :info and :debug are useful
39
+ screenshots: (String) - default: nil - Enables screenshots by passing the directory to put the screenshots which are taken throughout the different operations.
40
+ )
41
+ ```
42
+
23
43
  Operations
24
44
  =================
25
45
  * [create_account](#create_account)
@@ -39,14 +59,15 @@ Or install it yourself as:
39
59
  create_account
40
60
  ------------
41
61
 
42
- > Creates a new AWS Account and with the miminal amount of information and
62
+ > Creates a new AWS Account and with the minimal amount of information and
43
63
  > returns the account number of the new account.
64
+ > Requires that your IP be white-listed by AWS in order to bypass the CAPTCHA
44
65
 
45
66
  `#create_account(account_name:, account_email, account_password:, account_details:)`
46
67
 
47
68
  **Examples:**
48
69
  ```Ruby
49
- details = { 'fullName' => 'Hermen Munster',
70
+ details = { 'fullName' => 'Herman Munster',
50
71
  'company' => 'The Munsters',
51
72
  'addressLine1' => '1313 Mockingbird Lane',
52
73
  'city' => 'Mockingbird Heights',
@@ -62,7 +83,7 @@ resp = aws_utils.create_account(account_name: 'My Test Account 01',
62
83
  resp #=> String
63
84
  ```
64
85
 
65
- **Paramaters:**
86
+ **Parameters:**
66
87
  ```
67
88
  account_name: (required, String) - The account name to associate with this new account
68
89
  account_email: (required, String) - The email to associate with this new account
@@ -77,18 +98,19 @@ account_details: (required, Hash) - Hash of account deatails
77
98
  change_root_password
78
99
  ------------
79
100
 
80
-
81
101
  > Changes the account password
82
102
 
83
103
  `change_root_password(account_email:, account_password:, new_password:)`
84
104
 
85
105
  **Examples:**
86
106
  ```Ruby
87
-
88
- resp #=> String
107
+ resp = aws_utils.change_root_password(account_email: 'adfefef@gmail.com',
108
+ account_password: 'foobar1212121',
109
+ new_password: 'mynewpassword')
110
+ resp #=> true/false
89
111
  ```
90
112
 
91
- **Paramaters:**
113
+ **Parameters:**
92
114
  ```
93
115
  account_email: (required, String) - The email to associate with this new account
94
116
  account_password: (required, String) - The old password to use with this new account
@@ -110,11 +132,12 @@ check_enterprise_support
110
132
 
111
133
  **Examples:**
112
134
  ```Ruby
113
-
114
- resp #=> String
135
+ resp = aws_utils.check_enterprise_support(account_email: 'adfefef@gmail.com',
136
+ account_password: 'foobar1212121'')
137
+ resp #=> true/false
115
138
  ```
116
139
 
117
- **Paramaters:**
140
+ **Parameters:**
118
141
  ```
119
142
  account_email: (required, String) - The email to associate with this new account
120
143
  account_password: (required, String) - The password to use with this new account
@@ -129,25 +152,29 @@ account_password: (required, String) - The password to use with this new account
129
152
  confirm_consolidated_billing
130
153
  ------------
131
154
 
132
- > Confirms consolidated billing
155
+ > Confirms consolidated billing by taking the link that was emailed to you when you enabled consolidated billing.
133
156
 
134
157
  `confirm_consolidated_billing(account_email:, account_password:, confirmation_link:)`
135
158
 
136
159
  **Examples:**
137
160
  ```Ruby
138
-
139
- resp #=> String
161
+ resp = aws_utils.confirm_consolidated_billing(account_email: 'adfefef@gmail.com',
162
+ account_password: 'foobar1212121',
163
+ confirmation_link: 'amazonaws.com/confirmationlink')
164
+ resp #=> nil
140
165
  ```
141
166
 
142
- **Paramaters:**
167
+ **Parameters:**
143
168
  ```
144
169
  account_email: (required, String) - The email to associate with this new account
145
170
  account_password: (required, String) - The password to use with this new account
171
+ confirmation_link: (required, String) - The unique url that will confirm billing
172
+
146
173
  ```
147
174
 
148
175
  **Returns:**
149
176
 
150
- `#return => Boolean`
177
+ `#return => nil`
151
178
 
152
179
  ---
153
180
 
@@ -157,13 +184,15 @@ create_root_access_keys
157
184
  > Creates access and secret key for root account
158
185
 
159
186
  `create_root_access_keys(account_email:, account_password:)`
187
+
160
188
  **Examples:**
161
189
  ```Ruby
162
-
163
- resp #=> String
190
+ resp = aws_utils.create_root_access_keys(account_email: 'adfefef@gmail.com',
191
+ account_password: 'foobar1212121)
192
+ resp #=> Hash
164
193
  ```
165
194
 
166
- **Paramaters:**
195
+ **Parameters:**
167
196
  ```
168
197
  account_email: (required, String) - The email to associate with this new account
169
198
  account_password: (required, String) - The password to use with this new account
@@ -171,7 +200,7 @@ account_password: (required, String) - The password to use with this new account
171
200
 
172
201
  **Returns:**
173
202
 
174
- `#return => Boolean`
203
+ `#return => Hash {:access_key=>"my_access_key", :secret_key=>"my_secret_key"}`
175
204
 
176
205
  ---
177
206
 
@@ -184,11 +213,12 @@ delete_root_access_keys
184
213
 
185
214
  **Examples:**
186
215
  ```Ruby
187
-
188
- resp #=> String
216
+ resp = aws_utils.delete_root_access_keys(account_email: 'adfefef@gmail.com',
217
+ account_password: 'foobar1212121)
218
+ resp #=> True/False
189
219
  ```
190
220
 
191
- **Paramaters:**
221
+ **Parameters:**
192
222
  ```
193
223
  account_email: (required, String) - The email to associate with this new account
194
224
  account_password: (required, String) - The password to use with this new account
@@ -196,7 +226,7 @@ account_password: (required, String) - The password to use with this new account
196
226
 
197
227
  **Returns:**
198
228
 
199
- `#return => Boolean`
229
+ `#return => true/false`
200
230
 
201
231
  ---
202
232
 
@@ -209,11 +239,12 @@ email_opt_out
209
239
 
210
240
  **Examples:**
211
241
  ```Ruby
212
-
213
- resp #=> String
242
+ resp = aws_utils.email_opt_out(account_email: 'adfefef@gmail.com',
243
+ account_password: 'foobar1212121)
244
+ resp #=> True/False
214
245
  ```
215
246
 
216
- **Paramaters:**
247
+ **Parameters:**
217
248
  ```
218
249
  account_email: (required, String) - The email to associate with this new account
219
250
  account_password: (required, String) - The password to use with this new account
@@ -228,17 +259,18 @@ account_password: (required, String) - The password to use with this new account
228
259
  enable_enterprise_support
229
260
  ------------
230
261
 
231
- > Enables enterprise support
262
+ > Enables enterprise support, this should be done after consolidated billing has been setup
232
263
 
233
264
  `enable_enterprise_support(account_email:, account_password:)`
234
265
 
235
266
  **Examples:**
236
267
  ```Ruby
237
-
238
- resp #=> String
268
+ resp = aws_utils.enable_enterprise_support(account_email: 'adfefef@gmail.com',
269
+ account_password: 'foobar1212121)
270
+ resp #=> True/False
239
271
  ```
240
272
 
241
- **Paramaters:**
273
+ **Parameters:**
242
274
  ```
243
275
  account_email: (required, String) - The email to associate with this new account
244
276
  account_password: (required, String) - The password to use with this new account
@@ -258,11 +290,12 @@ enable_iam_billing
258
290
  `enable_iam_billing(account_email:, account_password:)`
259
291
  **Examples:**
260
292
  ```Ruby
261
-
262
- resp #=> String
293
+ resp = aws_utils.enable_iam_billing(account_email: 'adfefef@gmail.com',
294
+ account_password: 'foobar1212121)
295
+ resp #=> True/False
263
296
  ```
264
297
 
265
- **Paramaters:**
298
+ **Parameters:**
266
299
  ```
267
300
  account_email: (required, String) - The email to associate with this new account
268
301
  account_password: (required, String) - The password to use with this new account
@@ -283,11 +316,12 @@ existing_consolidated_billing
283
316
 
284
317
  **Examples:**
285
318
  ```Ruby
286
-
287
- resp #=> String
319
+ resp = aws_utils.existing_consolidated_billing?(account_email: 'adfefef@gmail.com',
320
+ account_password: 'foobar1212121)
321
+ resp #=> True/False
288
322
  ```
289
323
 
290
- **Paramaters:**
324
+ **Parameters:**
291
325
  ```
292
326
  account_email: (required, String) - The email to associate with this new account
293
327
  account_password: (required, String) - The password to use with this new account
@@ -308,14 +342,12 @@ logout_from_console
308
342
 
309
343
  **Examples:**
310
344
  ```Ruby
311
-
312
- resp #=> String
345
+ resp = aws_utils.logout_from_console
346
+ resp #=> True/False
313
347
  ```
314
348
 
315
- **Paramaters:**
349
+ **Parameters:**
316
350
  ```
317
- account_email: (required, String) - The email to associate with this new account
318
- account_password: (required, String) - The password to use with this new account
319
351
  ```
320
352
 
321
353
  **Returns:**
@@ -334,14 +366,17 @@ request_consolidated_billing
334
366
 
335
367
  **Examples:**
336
368
  ```Ruby
337
-
338
- resp #=> String
369
+ resp = aws_utils.request_consolidated_billing(master_account_email: 'my_master_acccount@gmail.com',
370
+ master_account_password: 'master_acct_password,
371
+ account_email: 'my_new_account_email@gmail.com')
372
+ resp #=> True/False
339
373
  ```
340
374
 
341
- **Paramaters:**
375
+ **Parameters:**
342
376
  ```
343
- account_email: (required, String) - The email to associate with this new account
344
- account_password: (required, String) - The password to use with this new account
377
+ master_account_email: (required, String) - The email for your master billing aws account
378
+ master_account_password: (required, String) - The password for your master billing aws account
379
+ account_email: (required, String) - The email for the account you want to add to consolidated billing under the master account
345
380
  ```
346
381
 
347
382
  **Returns:**
@@ -360,13 +395,27 @@ set_alternate_contacts
360
395
  **Examples:**
361
396
  ```Ruby
362
397
 
363
- resp #=> String
398
+ contacts = {'operations' => {'name' => 'Operations Name',
399
+ 'title' => 'Operations Title',
400
+ 'email' => 'operations@test.com',
401
+ 'phoneNumber' => '888-888-1212'},
402
+ 'security' => {'name' => 'Security Name',
403
+ 'title' => 'Security Title',
404
+ 'email' => 'Security@test.com',
405
+ 'phoneNumber' => '888-888-1212'}}
406
+
407
+ resp = aws_utils.set_alternate_contacts(account_email: 'adfefef@gmail.com',
408
+ account_password: 'foobar1212121,
409
+ contact_info: contacts)
410
+ resp #=> True/False
364
411
  ```
365
412
 
366
- **Paramaters:**
413
+ **Parameters:**
367
414
  ```
368
415
  account_email: (required, String) - The email to associate with this new account
369
416
  account_password: (required, String) - The password to use with this new account
417
+ contact_info: (required, Hash) - A Hash of Hash of contacts, operations, security, etc.
418
+
370
419
  ```
371
420
 
372
421
  **Returns:**
@@ -384,19 +433,28 @@ set_challenge_questions
384
433
 
385
434
  **Examples:**
386
435
  ```Ruby
387
-
388
- resp #=> String
436
+ my_answers = {1 => 'answer1',
437
+ 2 => 'answer2',
438
+ 3 => 'answer3'}
439
+
440
+ resp = aws_utils.set_challenge_questions(account_email: 'adfefef@gmail.com',
441
+ account_password: 'foobar1212121,
442
+ answers: my_answers)
443
+
444
+ resp #=> {1 => 'answer1', 2 => 'answer2', 3 => 'answer3'}
389
445
  ```
390
446
 
391
- **Paramaters:**
447
+ **Parameters:**
392
448
  ```
393
449
  account_email: (required, String) - The email to associate with this new account
394
450
  account_password: (required, String) - The password to use with this new account
451
+ answers: (optional, Hash) - A hash of answers to fill in for the security questions. If you dont pass your own, Random word will generate for you.
452
+
395
453
  ```
396
454
 
397
455
  **Returns:**
398
456
 
399
- `#return => Boolean`
457
+ `#return => Hash`
400
458
 
401
459
  ---
402
460
 
@@ -16,11 +16,12 @@ require 'aws_account_utils/logout'
16
16
 
17
17
  module AwsAccountUtils
18
18
  class AwsAccountUtils
19
- attr_reader :options, :logger, :browser, :screenshots
19
+ attr_reader :log_level, :logger, :browser, :screenshots
20
20
 
21
- def initialize(logger: nil, browser: nil, screenshots: nil)
22
- @browser = browser
21
+ def initialize(log_level: :info, logger: nil, browser: nil, screenshots: nil)
22
+ @log_level = log_level
23
23
  @logger = logger
24
+ @browser = browser
24
25
  @screenshots = screenshots
25
26
 
26
27
  Settings.set_screenshot_dir screenshots if screenshots
@@ -182,7 +183,7 @@ module AwsAccountUtils
182
183
  end
183
184
 
184
185
  def logger
185
- @logger ||= AccountLogger.new(options[:log_level])
186
+ @logger ||= AccountLogger.new(log_level)
186
187
  end
187
188
 
188
189
  def password
@@ -6,7 +6,7 @@ module AwsAccountUtils
6
6
  extend Forwardable
7
7
  def_delegators :@logger, :fatal, :debug, :error, :info, :warn, :debug?
8
8
 
9
- def initialize(log_level = 'info')
9
+ def initialize(log_level)
10
10
  @log_level = log_level
11
11
  @logger = new_logger
12
12
  end
@@ -19,7 +19,7 @@ module AwsAccountUtils
19
19
  l.formatter = proc do |severity, datetime, progname, msg|
20
20
  "#{datetime} #{severity} : #{msg}\n"
21
21
  end
22
- l.level = Logger.const_get @log_level.upcase
22
+ l.level = Logger.const_get @log_level.to_s.upcase
23
23
  end
24
24
  end
25
25
  end
@@ -1,4 +1,5 @@
1
1
  require 'aws_account_utils/base'
2
+ require 'aws_account_utils/login'
2
3
 
3
4
  module AwsAccountUtils
4
5
  class AccountRegistration < Base
@@ -1,4 +1,5 @@
1
1
  require 'aws_account_utils/base'
2
+ require 'aws_account_utils/login'
2
3
 
3
4
  module AwsAccountUtils
4
5
  class AlternateContacts < Base
@@ -1,4 +1,5 @@
1
1
  require 'aws_account_utils/base'
2
+ require 'aws_account_utils/login'
2
3
  require 'random-word'
3
4
 
4
5
  module AwsAccountUtils
@@ -11,7 +12,7 @@ module AwsAccountUtils
11
12
  end
12
13
 
13
14
  def create(account_email, account_password, challenge_words = {})
14
- logger.debug "Entering customer details."
15
+ logger.debug "Setting security challenge answers."
15
16
  Login.new(logger, browser).execute url,
16
17
  account_email,
17
18
  account_password
@@ -1,4 +1,5 @@
1
1
  require 'aws_account_utils/base'
2
+ require 'aws_account_utils/login'
2
3
 
3
4
  module AwsAccountUtils
4
5
  class ConsolidatedBilling < Base
@@ -1,4 +1,5 @@
1
1
  require 'aws_account_utils/base'
2
+ require 'aws_account_utils/login'
2
3
 
3
4
  module AwsAccountUtils
4
5
  class CustomerInformation < Base
@@ -14,8 +15,9 @@ module AwsAccountUtils
14
15
  Login.new(logger, browser).execute url,
15
16
  account_email,
16
17
  account_password
17
- browser.link(:text => /AWS Customer Agreement/).wait_until_present
18
- browser.select_list(:class =>'control-select ng-pristine ng-valid').when_present.select 'United States'
18
+
19
+ browser.wait_until{ browser.text.include? 'AWS Customer Agreement'}
20
+ browser.select_list(:ng_model =>'address.countryCode').when_present.select 'United States'
19
21
  customer_details.each do |k,v|
20
22
  browser.text_field(:name => k).when_present.set v
21
23
  end
@@ -30,10 +32,15 @@ module AwsAccountUtils
30
32
  browser.input(:id => "accountId").value
31
33
  rescue StandardError
32
34
  screenshot(browser, 'error')
33
- raise StandardError, 'Steps: AwsCustomerInformation Aws returned error on page.'
35
+ raise StandardError, 'Aws returned error on the page when submitting customer information.'
34
36
  rescue Watir::Wait::TimeoutError, Net::ReadTimeout => e
35
37
  screenshot(browser, "error")
36
38
  raise StandardError, "#{self.class.name} - #{e}"
37
39
  end
40
+
41
+ private
42
+ def url
43
+ 'https://portal.aws.amazon.com/billing/signup#/account'
44
+ end
38
45
  end
39
46
  end
@@ -1,4 +1,5 @@
1
1
  require 'aws_account_utils/base'
2
+ require 'aws_account_utils/login'
2
3
 
3
4
  module AwsAccountUtils
4
5
  class CustomizeUrl < Base
@@ -14,7 +15,7 @@ module AwsAccountUtils
14
15
  Login.new(logger, browser).execute url,
15
16
  account_email,
16
17
  account_password
17
- browser.goto url
18
+
18
19
  browser.h2(:text => /Welcome to Identity and Access Management/).wait_until_present
19
20
  browser.button(:text => /Customize/).when_present.click
20
21
  browser.input(:id => 'alias_input').when_present.to_subtype.set url_alias
@@ -1,4 +1,5 @@
1
1
  require 'aws_account_utils/base'
2
+ require 'aws_account_utils/login'
2
3
 
3
4
  module AwsAccountUtils
4
5
  class EmailPreferences < Base
@@ -10,6 +11,8 @@ module AwsAccountUtils
10
11
  end
11
12
 
12
13
  def opt_out(account_email, account_password)
14
+ logger.debug "Setting email preferences."
15
+
13
16
  Login.new(logger, browser).execute url,
14
17
  account_email,
15
18
  account_password
@@ -1,4 +1,5 @@
1
1
  require 'aws_account_utils/base'
2
+ require 'aws_account_utils/login'
2
3
 
3
4
  module AwsAccountUtils
4
5
  class EnterpriseSupport < Base
@@ -9,7 +10,7 @@ module AwsAccountUtils
9
10
  @browser = browser
10
11
  end
11
12
 
12
- def enable(account_email,account_password)
13
+ def enable(account_email, account_password)
13
14
  logger.debug 'Enabling enterprise support.'
14
15
  Login.new(logger, browser).execute support_registration_url,
15
16
  account_email,
@@ -1,4 +1,5 @@
1
1
  require 'aws_account_utils/base'
2
+ require 'aws_account_utils/login'
2
3
 
3
4
  module AwsAccountUtils
4
5
  class IamBilling < Base
@@ -23,6 +23,7 @@ module AwsAccountUtils
23
23
  raise StandardError, "#{self.class.name} - #{e}"
24
24
  end
25
25
 
26
+ private
26
27
  def login_page?
27
28
  browser.url.include? 'ap/signin?'
28
29
  end
@@ -13,7 +13,6 @@ module AwsAccountUtils
13
13
  logger.debug "Logging out of AWS."
14
14
  browser.goto url
15
15
  screenshot(browser, "1")
16
- #Watir::Wait.until{browser.url == 'https://aws.amazon.com/'}
17
16
  browser.wait_until{ browser.url.include? 'https://aws.amazon.com/'}
18
17
  browser.text.include?('Sign In to the Console') || browser.text.include?('Create a Free Account')
19
18
  rescue Watir::Wait::TimeoutError, Net::ReadTimeout => e
@@ -1,4 +1,5 @@
1
1
  require 'aws_account_utils/base'
2
+ require 'aws_account_utils/login'
2
3
 
3
4
  module AwsAccountUtils
4
5
  class Password < Base
@@ -27,11 +28,10 @@ module AwsAccountUtils
27
28
  browser.h6(:text => /Success/).exist?
28
29
  rescue StandardError => e
29
30
  screenshot(browser, "error")
30
- logger.debug "Standard error in #{self.class.name} - #{e}"
31
31
  error_header = browser.div(:id => /message_(error|warning)/).h6.text
32
32
  error_body = browser.div(:id => /message_(error|warning)/).p.text
33
- logger.debug "AWS Password Change Error: \"#{error_header}: #{error_body}\""
34
- false
33
+ raise StandardError, "AWS Password Change Error: \"#{error_header}: #{error_body}\""
34
+
35
35
  rescue Watir::Wait::TimeoutError, Net::ReadTimeout => e
36
36
  screenshot(browser, "error")
37
37
  raise StandardError, "#{self.class.name} - #{e}"
@@ -1,4 +1,5 @@
1
1
  require 'aws_account_utils/base'
2
+ require 'aws_account_utils/login'
2
3
 
3
4
  module AwsAccountUtils
4
5
  class RootAccessKeys < Base
@@ -65,8 +66,7 @@ module AwsAccountUtils
65
66
  end
66
67
 
67
68
  def keys_to_delete?
68
- a = browser.a(:class => 'Delete').exist?
69
- a
69
+ browser.a(:class => 'Delete').exist?
70
70
  end
71
71
 
72
72
  def clear_warning
@@ -83,4 +83,4 @@ module AwsAccountUtils
83
83
  secret_key: text.split("\n")[-2] }
84
84
  end
85
85
  end
86
- end
86
+ end
@@ -1,3 +1,3 @@
1
1
  module AwsAccountUtils
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -1,5 +1,6 @@
1
1
  require 'aws_account_utils/base'
2
2
  require 'watir-webdriver'
3
+ Watir::HTMLElement.attributes << :ng_model
3
4
 
4
5
  module AwsAccountUtils
5
6
  class WatirBrowser
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws_account_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - keviny22
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-09-30 00:00:00.000000000 Z
11
+ date: 2015-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler