whv_nz 0.1.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: d38e01c23bb69357cca8d950d724175b6e0dbc5a
4
+ data.tar.gz: 65e589d129bf96d2901378e84fc6b8de58dc1a71
5
+ SHA512:
6
+ metadata.gz: 639bffa64996e0f426c10935b6495310f2f5231ce7f977a9f830e937893b368e0b421bb04f2628eb3c78aa67173c06e8561f4dbf4c7e7d988b1be8c3ea218d41
7
+ data.tar.gz: d3aaeefe65bbb0eeac276c083a27c9dc4a41fd3d89f9bcc443c3004b297ac5395e16cc095a7ad228a5e84d9775716f2816238db65a6d19162efc31a7207fb875
data/.gitignore ADDED
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+
11
+ /log/*
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ ruby-2.3.0
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,107 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ whv_nz (0.1.0)
5
+ activesupport
6
+ faraday (~> 0.11.0)
7
+ faraday_middleware (~> 0.10.0)
8
+ mailgun-ruby (~> 1.1)
9
+ nokogiri (~> 1.6, >= 1.6.8)
10
+ rollbar
11
+ selenium-webdriver (~> 3.1)
12
+ slop
13
+ sucker_punch (~> 1.6)
14
+
15
+ GEM
16
+ remote: https://rubygems.org/
17
+ specs:
18
+ activesupport (5.0.1)
19
+ concurrent-ruby (~> 1.0, >= 1.0.2)
20
+ i18n (~> 0.7)
21
+ minitest (~> 5.1)
22
+ tzinfo (~> 1.1)
23
+ celluloid (0.17.3)
24
+ celluloid-essentials
25
+ celluloid-extras
26
+ celluloid-fsm
27
+ celluloid-pool
28
+ celluloid-supervision
29
+ timers (>= 4.1.1)
30
+ celluloid-essentials (0.20.5)
31
+ timers (>= 4.1.1)
32
+ celluloid-extras (0.20.5)
33
+ timers (>= 4.1.1)
34
+ celluloid-fsm (0.20.5)
35
+ timers (>= 4.1.1)
36
+ celluloid-pool (0.20.5)
37
+ timers (>= 4.1.1)
38
+ celluloid-supervision (0.20.6)
39
+ timers (>= 4.1.1)
40
+ childprocess (0.6.1)
41
+ ffi (~> 1.0, >= 1.0.11)
42
+ coderay (1.1.1)
43
+ concurrent-ruby (1.0.4)
44
+ domain_name (0.5.20170223)
45
+ unf (>= 0.0.5, < 1.0.0)
46
+ faraday (0.11.0)
47
+ multipart-post (>= 1.2, < 3)
48
+ faraday_middleware (0.10.1)
49
+ faraday (>= 0.7.4, < 1.0)
50
+ ffi (1.9.17)
51
+ hitimes (1.2.4)
52
+ http-cookie (1.0.3)
53
+ domain_name (~> 0.5)
54
+ i18n (0.8.1)
55
+ mailgun-ruby (1.1.4)
56
+ rest-client (~> 2.0)
57
+ method_source (0.8.2)
58
+ mime-types (3.1)
59
+ mime-types-data (~> 3.2015)
60
+ mime-types-data (3.2016.0521)
61
+ mini_portile2 (2.1.0)
62
+ minitest (5.10.1)
63
+ multi_json (1.12.1)
64
+ multipart-post (2.0.0)
65
+ netrc (0.11.0)
66
+ nokogiri (1.7.0.1)
67
+ mini_portile2 (~> 2.1.0)
68
+ pry (0.10.4)
69
+ coderay (~> 1.1.0)
70
+ method_source (~> 0.8.1)
71
+ slop (~> 3.4)
72
+ rake (10.5.0)
73
+ rest-client (2.0.1)
74
+ http-cookie (>= 1.0.2, < 2.0)
75
+ mime-types (>= 1.16, < 4.0)
76
+ netrc (~> 0.8)
77
+ rollbar (2.14.0)
78
+ multi_json
79
+ rubyzip (1.2.1)
80
+ selenium-webdriver (3.2.0)
81
+ childprocess (~> 0.5)
82
+ rubyzip (~> 1.0)
83
+ websocket (~> 1.0)
84
+ slop (3.6.0)
85
+ sucker_punch (1.6.0)
86
+ celluloid (~> 0.17.2)
87
+ thread_safe (0.3.6)
88
+ timers (4.1.2)
89
+ hitimes
90
+ tzinfo (1.2.2)
91
+ thread_safe (~> 0.1)
92
+ unf (0.1.4)
93
+ unf_ext
94
+ unf_ext (0.0.7.2)
95
+ websocket (1.2.4)
96
+
97
+ PLATFORMS
98
+ ruby
99
+
100
+ DEPENDENCIES
101
+ bundler (~> 1.14)
102
+ pry
103
+ rake (~> 10.0)
104
+ whv_nz!
105
+
106
+ BUNDLED WITH
107
+ 1.14.6
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+
2
+ The MIT License (MIT)
3
+
4
+ Copyright (c) 2015 Dongdong Wang
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,37 @@
1
+ ##Description
2
+ Ruby script to apply for [Working Holiday Visa](https://www.immigration.govt.nz/new-zealand-visas/options/work/thinking-about-coming-to-new-zealand-to-work/working-holiday-visa) from New Zeanland.
3
+
4
+ ##Installation
5
+
6
+ ```sh
7
+ $ gem install whv_nz
8
+ ```
9
+
10
+ ##Usage
11
+
12
+ ```sh
13
+ $ whv_nz
14
+
15
+ Usage: main [options]
16
+ -n, --new Generate config file
17
+ -c, --config Config file path
18
+ -p, --production Use real account
19
+ -d, --daemon In background
20
+ -h, --help Show help info
21
+ ```
22
+
23
+ #Config
24
+ * title: 1(Mr), 2(Mrs), 3(Ms), 4(Miss), 5(Dr), 6(Other)
25
+ * gender: M(Male), F(Female)
26
+ * been_before: No/Yes
27
+
28
+ ##Dependency
29
+ * [Chrome](https://www.google.com/chrome/)
30
+ * [Xvfb](http://elementalselenium.com/tips/38-headless)
31
+ * [ChromeDriver](https://sites.google.com/a/chromium.org/chromedriver/downloads)
32
+ * (Optional)[Supervisor](http://supervisord.org/)
33
+ * (Optional)Config [Mailgun](https://www.mailgun.com/) for email notification
34
+ * (Optional)Config [Rollbar](https://rollbar.com/) for error tracking
35
+
36
+ ##Reference
37
+ * [Setup a Faraday Proxy](https://evancarmi.com/writing/faraday-proxy/)
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+ task :default => :spec
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "whv_nz"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
data/bin/whv_nz ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+ require "whv_nz"
3
+
4
+ $whv = Whv.new
5
+ $whv.start
@@ -0,0 +1,95 @@
1
+ ---
2
+ default: &DEFAULT
3
+ forms:
4
+ - personal1
5
+ - personal2
6
+ - medical1
7
+ - character
8
+ - working_holiday_specific
9
+ mailgun:
10
+ key: ""
11
+ from: ""
12
+ to: ""
13
+ rollbar_token: ""
14
+
15
+ development:
16
+ <<: *DEFAULT
17
+ name: xx
18
+ password: xx
19
+ country_id: 106
20
+ credit_card:
21
+ cardnumber: 0
22
+ cardverificationcode: 0
23
+ expirymonth: 0
24
+ expiryyear: 0
25
+ cardholder: xx
26
+ personal1:
27
+ family_name: xx
28
+ given_name: xx
29
+ title: 1
30
+ gender:
31
+ day: 1
32
+ month: 1
33
+ year: 1991
34
+ street: xx
35
+ suburb: xx
36
+ city: xx
37
+ country_id: 46
38
+ email: xx@xx.com
39
+ personal2:
40
+ passport: xx
41
+ expiry_day: 1
42
+ expiry_month: 1
43
+ expiry_year: 2020
44
+ issue_day: 15
45
+ issue_month: 12
46
+ issue_year: 2007
47
+ working_holiday_specific:
48
+ travel_day: 1
49
+ travel_month: 8
50
+ travel_year: 2017
51
+ been_before: "No"
52
+ been_day: 1
53
+ been_month: 1
54
+ been_year: 2017
55
+
56
+ production:
57
+ <<: *DEFAULT
58
+ name:
59
+ password:
60
+ country_id: 46
61
+ credit_card:
62
+ cardnumber:
63
+ cardverificationcode:
64
+ expirymonth:
65
+ expiryyear:
66
+ cardholder:
67
+ personal1:
68
+ family_name:
69
+ given_name:
70
+ title:
71
+ gender:
72
+ day:
73
+ month:
74
+ year:
75
+ street:
76
+ suburb:
77
+ city:
78
+ country_id:
79
+ email:
80
+ personal2:
81
+ passport:
82
+ expiry_day:
83
+ expiry_month:
84
+ expiry_year:
85
+ issue_day:
86
+ issue_month:
87
+ issue_year:
88
+ working_holiday_specific:
89
+ travel_day:
90
+ travel_month:
91
+ travel_year:
92
+ been_before: "No"
93
+ been_day:
94
+ been_month:
95
+ been_year: