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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: feb2fd80cc7567a4cfd673c7245ac5bd4251fa8b
4
- data.tar.gz: f1f96fc070d9e8f66d955f103fa3c3c950597a74
3
+ metadata.gz: 4bc08809f822c73cd88eefdfb8d1b3e7dcdd67c1
4
+ data.tar.gz: d3b83b3f5966ba048b77c45b9423bf7f900db0af
5
5
  SHA512:
6
- metadata.gz: 702723bae1f951c48ceddbf121100b9858fc25e32aa48d00b9fd0cd26c5029cc34fdb2b6173e4bcee2077dc37114310fa4f3950cb6a35cd214822ce480107e6e
7
- data.tar.gz: 9dd869bad331752435f49821fc93d1a345dcefbf99ff3a77f7a7ccafea3b25350f074404e7a0929eb4007e9aab49f3f59d22abc37270a5dd4a8b8580d7df0046
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
- # Book Computer Science project rooms
25
- $ ubcbooker cs
26
- # Book Sauder project rooms
27
- $ ubcbooker sauder
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
- # Call help
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 `bin/setup` to install dependencies. Then, 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`.
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 on GitHub at https://github.com/jumbosushi/ubcbooker. 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.
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
@@ -1,3 +1,3 @@
1
1
  module Ubcbooker
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ubcbooker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Atsushi Yamamoto