ubcbooker 0.2.1 → 0.2.2
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 +4 -4
- data/README.md +18 -10
- data/lib/ubcbooker/scrapers/cs.rb +2 -2
- data/lib/ubcbooker/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4bc08809f822c73cd88eefdfb8d1b3e7dcdd67c1
|
4
|
+
data.tar.gz: d3b83b3f5966ba048b77c45b9423bf7f900db0af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa3dba7476926f4b89e1902203bccabb1f7dd50b93a4d7583b54db993b365b19334a07239176912b83749a8e29dba0719103a9ebd2381b4e48f9b1618a9c12af
|
7
|
+
data.tar.gz: 6e233736d5d31d8781d76685ead16a69d94ca4e846ca429e58a4558917596611aee97072ed2bc92ee3b7e950bfd8d971c6c7ceaf04ea657e671dbce30083c5e3
|
data/README.md
CHANGED
@@ -21,24 +21,32 @@ And then execute:
|
|
21
21
|
## Usage
|
22
22
|
|
23
23
|
```
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
24
|
+
$ ubcbooker --helj
|
25
|
+
|
26
|
+
Usage: ubcbooker [options]
|
27
|
+
-b, --building BUILDING Specify which department to book rooms from
|
28
|
+
-d, --date DATE Specify date to book rooms for (MM/DD)
|
29
|
+
-h, --help Show this help message
|
30
|
+
-l, --list List supported departments
|
31
|
+
-n, --name NAME Name of the booking
|
32
|
+
-t, --time TIME Specify time to book rooms for (HH:MM-HH:MM)
|
33
|
+
-u, --update Update username and password
|
34
|
+
-v, --version Show version
|
35
|
+
|
36
|
+
ex. Book a room in CS from 11am to 1pm on March 5th with the name 'Study Group'
|
37
|
+
$> ubcbooker -b cs -n 'Study Group' -d 03/05 -t 11:00-13:00
|
28
38
|
```
|
29
39
|
|
30
|
-
|
31
|
-
|
32
|
-
$ ubcbooker -h
|
33
|
-
```
|
40
|
+
Currently this app supports project rooms in cs (Commputer Science).
|
41
|
+
Feel free to send a PR that supports your department's rooms.
|
34
42
|
|
35
43
|
## Development
|
36
44
|
|
37
|
-
After checking out the repo, run `
|
45
|
+
After checking out the repo, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. To install this gem onto your local machine, run `bundle exec rake install`.
|
38
46
|
|
39
47
|
## Contributing
|
40
48
|
|
41
|
-
Bug reports and pull requests are welcome
|
49
|
+
Bug reports and pull requests are welcome. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
42
50
|
|
43
51
|
## License
|
44
52
|
|
@@ -46,8 +46,8 @@ module Ubcbooker
|
|
46
46
|
booking_form["field_date[und][0][value][time]"] = time_to_ampm(book_slot.min)
|
47
47
|
booking_form["field_date[und][0][value2][date]"] = book_date_str
|
48
48
|
booking_form["field_date[und][0][value2][time]"] = time_to_ampm(book_slot.max)
|
49
|
-
spinner.success("Done!")
|
50
49
|
booking_form.submit
|
50
|
+
spinner.success("Done!")
|
51
51
|
end
|
52
52
|
|
53
53
|
# Select the form otpion with right room id
|
@@ -115,7 +115,7 @@ module Ubcbooker
|
|
115
115
|
def is_slot_booked(slot_booked, book_slot)
|
116
116
|
booked = false
|
117
117
|
slot_booked.each do |s|
|
118
|
-
if s.include?(book_slot)
|
118
|
+
if s.include?(book_slot.min) || s.include?(book_slot.max)
|
119
119
|
booked = true
|
120
120
|
end
|
121
121
|
end
|
data/lib/ubcbooker/version.rb
CHANGED