school_declare 0.3.0 → 0.4.0

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
  SHA256:
3
- metadata.gz: 104e7889e04cc9acf5119a87ec108954f87985a81d73ed1b98e53e18e91ad695
4
- data.tar.gz: cdfb245a582b197873b397e370b8dd5faaefb289eff5a0efd8fe4979da377c83
3
+ metadata.gz: 23d60b5ba3b6804e88ccc444a84d5e514d076eb41cddcefc9a445622eafefb4f
4
+ data.tar.gz: b647916f94846115a0bdd8595c2bcfc21acc76a94ce4b8e9e1c99ba44a505674
5
5
  SHA512:
6
- metadata.gz: 426f093b31f1cb17a52fc8ac7bf5581bc2f37e03ad1b580ca74fb67a5de74380da2ff6c17c53626273e5d4168681a96eb6fadc206ac7373e88088eaf27f4011c
7
- data.tar.gz: 0d1672e29a7fa27c5f547a544c2922209341fbf2409ceb55271406c82baa414171a634d3c53b6e417a28ca7b5daedd1644fcc2bb43bdcdd11a2705b7a25a0ca8
6
+ metadata.gz: e19b5075351c3d237f7530b5f20d2374094347b9ba062aa368d4e2e98673dc5653a852f31eea3b95a0929911624b93a874e36b96be81dd07d189cfad85f331cd
7
+ data.tar.gz: bfc03611d5dce75694fe5f485e56671634aa3b9a56161b7f8ceb855dfecac9a904ec3bbc3cad0cbb456f52ae814ce38f2c67ca48750595cf0e4d6976723f7e57
data/README.md CHANGED
@@ -18,40 +18,63 @@ In your `Gemfile`:
18
18
 
19
19
  ### Using The Code
20
20
 
21
+ You can use this script to either send:
22
+
23
+ * Daily health declaration (*No longer required*)
24
+ * Twice weekly antigen test declaration
25
+
26
+ #### Daily health declaration automation
27
+
21
28
  To use the automation script locally on your machine:
22
29
 
23
30
  * Clone the repository
24
31
  * Run `bundle install`
25
- * Update the values in `.env.sample` and rename it to `.env`. (See (Environment Variables)[#environment-variables] for a description of the values)
32
+ * Update the following values in `.env.sample` and rename it to `.env`. (See (Environment Variables)[#environment-variables] for a description of the values)
33
+ * USERNAME
34
+ * PASSWORD
35
+ * URL
26
36
  * Run `bundle exec ruby bin/declare`
27
37
  * The script will output `Sent from successfully` or report what went wrong at the conclusion of its execution
28
38
 
39
+ #### Twice weekly antigen test declaration
40
+
41
+ To use the antigen test declaration automation script locally on your machine:
42
+
43
+ * Clone the repository
44
+ * Run `bundle install`
45
+ * Update the following values in `.env.sample` and rename it to `.env`. (See (Environment Variables)[#environment-variables] for a description of the values)
46
+ * URL
47
+ * PARENT_TZ
48
+ * PARENT_NAME
49
+ * CHILDRENS_TZ
50
+ * CHILDRENS_NAMES
51
+ * Run `bundle exec ruby bin/declare_antigen`
52
+ * The script will output `Sent from successfully` or report what went wrong at the conclusion of its execution
53
+
29
54
  ### Environment Variables
30
55
 
31
- You need to provide three environment variables for the automation script:
56
+ You need to provide three environment variables for the daily automation script:
32
57
 
33
58
  * `USERNAME`: Your username you obtained from the Ministry of Education
34
59
  * `PASSWORD`: Your password you obtained from the Ministry of Education
35
60
  * `URL`: The unique school website entry point provided by tik-tak, i.e. (`https://my_school.tik-tak.net/enter_tofes_briut`)
36
61
 
62
+ You need to provide the following environment variables for the twice weekly antigen test declaration form script:
63
+
64
+ * `URL`: The URL for the antigen test declaration, i.e. (`https://apps.education.gov.il/NmmNetAnt/Antigen`)
65
+ * `PARENT_TZ`: A parent's teudat zehut number
66
+ * `PARENT_NAME`: A parent's name **in Hebrew**
67
+ * `CHILDRENS_TZ`: The teudat zehut number or numbers of the child/children. **If more than one child, separate with a single "," and NO SPACE.**
68
+ * `CHILDRENS_NAMES`: The name of names of the child/children. **If more than one child, separate with a cingle "," and NO SPACE.**
69
+
37
70
  ### Headless Browsing
38
71
 
39
- The script is set to run in `headless` mode as it navigates to the school website and fills out the form, which means you won't see it complete the process. If you wish, you can set `headless` to `false` and watch it from your computer as it happens instead. To do so open up `declare.rb` and on line 14 change the code to:
72
+ The script is set to run in `headless` mode as it navigates to the school website and fills out the form, which means you won't see it complete the process. If you wish, you can set `headless` to `false` and watch it from your computer as it happens instead. To do so open up `declare.rb` and on line 14 or `declare_antigen.rb` on line 45 and change the code to:
40
73
 
41
74
  ```ruby
42
75
  browser = Watir::Browser.new :chrome, headless: false
43
76
  ```
44
77
 
45
- ### Send SMS Update
46
-
47
- This script also provides the ability to send an SMS update after completion. To enable this feature you will need to have a [Vonage Account](https://dashboard.nexmo.com) and provide the following additional values in your `.env` file:
48
-
49
- * `SEND_SMS=true`: A boolean set to true to enable the SMS feature
50
- * `VONAGE_API_KEY`: Set this to your Vonage API key
51
- * `VONAGE_API_SECRET`: Set this to your Vonage API secret
52
- * `VONAGE_NUMBER`: Set this to the phone number you provisioned from Vonage for SMS delivery
53
- * `TO_NUMBER`: Set this to the receipient number for the SMS to be delivered to
54
-
55
78
  ## Contributing
56
79
 
57
80
  Contributions to the code are always welcome. You can either raise an issue to be discussed or submit a pull request directly. We try to follow the [GitHub Flow](https://guides.github.com/introduction/flow/) when proposing new features.
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ $LOAD_PATH.unshift File.expand_path('..', __FILE__)
4
+
5
+ require_relative '../declare_antigen'
6
+
7
+ DeclareAntigen.call
@@ -1,3 +1,3 @@
1
1
  module Declare
2
- VERSION = '0.3.0'.freeze
2
+ VERSION = '0.4.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,17 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: school_declare
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Greenberg
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-02 00:00:00.000000000 Z
11
+ date: 2022-02-13 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description: A gem to help send the daily health forms for Israeli schools using the
14
- tik-tak platform.
13
+ description: A gem to help send the daily health forms for Israeli schools.
15
14
  email:
16
15
  - ben.greenberg@hey.com
17
16
  executables:
@@ -22,6 +21,7 @@ files:
22
21
  - LICENSE.txt
23
22
  - README.md
24
23
  - bin/declare
24
+ - bin/declare_antigen
25
25
  - lib/declare/version.rb
26
26
  homepage: https://github.com/bencgreenberg/school-health-declaration-automation
27
27
  licenses:
@@ -30,7 +30,7 @@ metadata:
30
30
  homepage: https://github.com/bencgreenberg/school-health-declaration-automation
31
31
  source_code_uri: https://github.com/bencgreenberg/school-health-declaration-automation
32
32
  bug_tracker_uri: https://github.com/bencgreenberg/school-health-declaration-automation/issues
33
- post_install_message:
33
+ post_install_message:
34
34
  rdoc_options: []
35
35
  require_paths:
36
36
  - lib
@@ -45,8 +45,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
45
45
  - !ruby/object:Gem::Version
46
46
  version: '0'
47
47
  requirements: []
48
- rubygems_version: 3.1.4
49
- signing_key:
48
+ rubygems_version: 3.3.3
49
+ signing_key:
50
50
  specification_version: 4
51
51
  summary: Automate the sending of health declaration forms for Israeli schools.
52
52
  test_files: []