autoexpreso 0.0.3 → 0.0.4

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: 194dfc3544cfced9d9e38388cd32ec4203b826ee
4
- data.tar.gz: ea036042dddec7ff852aea1c647f07a5d9507de2
3
+ metadata.gz: 954a85eff4eef04e6485fbabf72e80c49971c6d4
4
+ data.tar.gz: d1068aabf49cf986eda0f8c07a442adebc2c3bd0
5
5
  SHA512:
6
- metadata.gz: 45960727bf2ba17c08e3fca25494c975f82864cbe2144be9072a7711e8571ffa72a025fbf34f1a20f7b49e61d5fd3851731740b20f36a4b75308566cf8e325ef
7
- data.tar.gz: bb4bf6a57b27f9adfa58358d1d7511b65b773df5979f83ab9690a996c99fcd97249ead7e8214ff413b542338b7fd69ae4162402474dc2d1f4b683e37ab12bc68
6
+ metadata.gz: d726ffb68d19d66b68671414bb4812194cc8298b819e41831e747efb8c4ffd9432599821753ac7075572a3a6e5db6a74ff6a0bc70d2786cfa37f90016864ee28
7
+ data.tar.gz: d8d526207506faa7550064b6581634c8093249ac48a709402015773158e7a20bfd854261a7381388d9a92e8739baf2a5c8da95602cf6a9d619b8497cf7ef495f
@@ -1,5 +1,10 @@
1
1
  # AutoExpreso Changelog
2
2
 
3
+ ### 0.0.4
4
+ Released November 4, 2013 ([0.0.4](https://github.com/riveralabs/autoexpreso-cli/tree/v0.0.4)).
5
+
6
+ * Update gemspec's dependency of awesome_print to 1.2.0
7
+
3
8
  ### 0.0.3
4
9
  Released September 11, 2013 ([0.0.3](https://github.com/riveralabs/autoexpreso-cli/tree/v0.0.3)).
5
10
 
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ['lib']
20
20
 
21
- spec.add_dependency 'awesome_print', '~> 1.1.0'
21
+ spec.add_dependency 'awesome_print', '~> 1.2.0'
22
22
  spec.add_dependency 'highline', '~> 1.6.19'
23
23
  spec.add_dependency 'mechanize', '~> 2.7.1'
24
24
 
@@ -1,3 +1,3 @@
1
1
  module AutoExpreso
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autoexpreso
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Axel Rivera
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-09-11 00:00:00.000000000 Z
12
+ date: 2013-11-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: awesome_print
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - ~>
19
19
  - !ruby/object:Gem::Version
20
- version: 1.1.0
20
+ version: 1.2.0
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - ~>
26
26
  - !ruby/object:Gem::Version
27
- version: 1.1.0
27
+ version: 1.2.0
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: highline
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -114,7 +114,6 @@ files:
114
114
  - LICENSE
115
115
  - README.md
116
116
  - Rakefile
117
- - autoexpreso-cli.rb
118
117
  - autoexpreso.gemspec
119
118
  - bin/autoexpreso
120
119
  - lib/autoexpreso.rb
@@ -1,53 +0,0 @@
1
- require 'mechanize'
2
- require 'awesome_print'
3
- require "highline/import"
4
-
5
- AE_URL = 'https://www.autoexpreso.com/Login.aspx'
6
-
7
- username = ask('Username: ')
8
- password = ask('Password: ') { |q| q.echo = "*" }
9
-
10
- login_form_id = 'aspnetForm'
11
- login_form_username_name = 'ctl00$ContentPlaceHolder1$Login1$uxUserNameField'
12
- login_form_password_name = 'ctl00$ContentPlaceHolder1$Login1$uxPasswordField'
13
-
14
- account_name_id = '#ctl00_Content_uxLogonAccountName'
15
- account_balance_id = '#ctl00_Content_uxLogonBalanceAmount'
16
- account_status_id = '#ctl00_Content_uxLogonAccountStatus'
17
- account_last_payment_id = '#ctl00_Content_uxLogonAmountLastPayment'
18
- account_last_payment_date_id = '#ctl00_Content_uxLogonDateLastPayment'
19
- account_transaction_table_id = '#ctl00_Content_uxLast20TransactionsGrid'
20
-
21
- client = Mechanize.new
22
-
23
- account = Hash.new
24
-
25
- client.get(AE_URL) do |page|
26
- account_page = page.form_with(id: login_form_id) do |f|
27
- f[login_form_username_name] = username
28
- f[login_form_password_name] = password
29
- end.click_button
30
-
31
- account[:name] = account_page.search(account_name_id).text.strip
32
- account[:balance] = account_page.search(account_balance_id).text.strip
33
- account[:status] = account_page.search(account_status_id).text.strip
34
- account[:last_payment] = account_page.search(account_last_payment_id).text.strip
35
- account[:last_payment_date] = account_page.search(account_last_payment_date_id).text.strip
36
-
37
- transactions = []
38
- table = account_page.search("#{account_transaction_table_id} tbody tr")
39
- table.each do |tr|
40
- tds = tr.search('td')
41
- next unless tds.count == 4
42
- transactions << {
43
- date: tds[0].text.strip,
44
- location: tds[1].text.strip,
45
- amount: tds[2].text.strip,
46
- tag_number: tds[3].text.strip
47
- }
48
- end
49
-
50
- account[:transactions] = transactions
51
- end
52
-
53
- ap account