school_declare 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 47caee8491f7c247ecc3e54591506453714bedbaac022fa939a648499ca42848
4
+ data.tar.gz: 6ef581d6a8bb8d98eb4443894b84a7f620b96882d7f6a1ec9806a10ff82abe20
5
+ SHA512:
6
+ metadata.gz: 25d6abb2bde7eec3a4cb46641eb8f5234c0caacafb7d5d7ac3a15c5c99bda638cb91dff00bfc471176297af3f5d6f07314b13ad3079ca69a25e2a52ec95fc94a
7
+ data.tar.gz: 65b970525673174a180d0275c4e37372fb171e6390add635d082180dbec25445af1401a183f519b32993e9ce6b6a1c1391b09df9d9094ca8a4d2f4fb999b93fe
@@ -0,0 +1,8 @@
1
+ Copyright 2020 Ben Greenberg
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8
+
@@ -0,0 +1,39 @@
1
+ # School Health Declaration Automation Script
2
+
3
+ This is an automation script that will fill out the school's daily health declaration requirement for each child in the parent portal dashboard.
4
+
5
+ It can be run manually or can be connected to a scheduler to run once a day.
6
+
7
+ ## How To Use
8
+
9
+ To use the automation script locally on your machine:
10
+
11
+ * Clone the repository
12
+ * Run `bundle install`
13
+ * Update the values in `.env.sample` and rename it to `.env`. (See (Environment Variables)[#environment-variables] for a description of the values)
14
+ * Run `bundle exec ruby declare.rb`
15
+ * The script will output `Sent from successfully` or report what went wrong at the conclusion of its execution
16
+
17
+ ### Environment Variables
18
+
19
+ You need to provide three environment variables for the automation script:
20
+
21
+ * `USERNAME`: Your username you obtained from the Ministry of Education
22
+ * `PASSWORD`: Your password you obtained from the Ministry of Education
23
+ * `URL`: The unique school website entry point provided by tik-tak, i.e. (`https://my_school.tik-tak.net/enter_tofes_briut`)
24
+
25
+ ### Headless Browsing
26
+
27
+ 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:
28
+
29
+ ```ruby
30
+ browser = Watir::Browser.new :chrome, headless: false
31
+ ```
32
+
33
+ ## Contributing
34
+
35
+ 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.
36
+
37
+ ## License
38
+
39
+ This script is under the [MIT License](LICENSE.txt).
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ $LOAD_PATH.unshift File.expand_path('..', __FILE__)
4
+
5
+ require_relative '../declare'
6
+
7
+ Declare.call
@@ -0,0 +1,3 @@
1
+ module Declare
2
+ VERSION = '0.1.0'.freeze
3
+ end
metadata ADDED
@@ -0,0 +1,53 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: school_declare
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Ben Greenberg
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2020-11-15 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: A gem to help send the daily health forms for Israeli schools using the
14
+ tik-tak platform.
15
+ email:
16
+ - ben.greenberg@hey.com
17
+ executables:
18
+ - declare
19
+ extensions: []
20
+ extra_rdoc_files: []
21
+ files:
22
+ - LICENSE.txt
23
+ - README.md
24
+ - bin/declare
25
+ - lib/declare/version.rb
26
+ homepage: https://github.com/bencgreenberg/school-health-declaration-automation
27
+ licenses:
28
+ - MIT
29
+ metadata:
30
+ homepage: https://github.com/bencgreenberg/school-health-declaration-automation
31
+ source_code_uri: https://github.com/bencgreenberg/school-health-declaration-automation
32
+ bug_tracker_uri: https://github.com/bencgreenberg/school-health-declaration-automation/issues
33
+ post_install_message:
34
+ rdoc_options: []
35
+ require_paths:
36
+ - lib
37
+ required_ruby_version: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
42
+ required_rubygems_version: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ requirements: []
48
+ rubyforge_project:
49
+ rubygems_version: 2.7.8
50
+ signing_key:
51
+ specification_version: 4
52
+ summary: Automate the sending of health declaration forms for Israeli schools.
53
+ test_files: []