unm 0.0.1 → 0.0.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: a516932cc85765ba6afa807228eadbef1dd93930
4
- data.tar.gz: e1e7dc9d7dd4c0046b8de76174b52f95730f8d3c
3
+ metadata.gz: 1358818c12a21bec594b54da85badbe831d6eb00
4
+ data.tar.gz: 80ae13d1d2766beb3cecdece509dbec2aae1ace2
5
5
  SHA512:
6
- metadata.gz: e8cf6f1d0a6dafaed674fd817d597c10739043d7826882ea0b39d66a74f54019405aa7ee6808adb5d5dc33cbbd6672c80fcb11168f27144b0de946528a012ee1
7
- data.tar.gz: 2762e82a960902a4196be6e25e96ea68f1e8936371ead7b429c812215dc11b5eca2ed97bc9cb8255c5c7dfaa137af02b91933e2229576a88bd7462b7a663a5bd
6
+ metadata.gz: ca05336726869a01918f81cb94be6c9267c4b4969d8fc03a77f08219d7bff6b46b1d5bcfac50b6dd66777111f180467f4418276007cb34415b6234832c14c8d0
7
+ data.tar.gz: f6ccf93c230f13b0f7761cce4d3c66ddd256d653aeb152cb8f11cc1e322fb6be9205b7b4acb6c6d398759b44aa4e0fd2a32bd7e2de4fac58487c3c9061feb0be
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # Unm
2
2
 
3
- TODO: Write a gem description
3
+ This gem interacts with UNM interfaces. Currently it only works with the events
4
+ calendar.
4
5
 
5
6
  ## Installation
6
7
 
@@ -20,7 +21,21 @@ Or install it yourself as:
20
21
 
21
22
  ## Usage
22
23
 
23
- TODO: Write usage instructions here
24
+ To use the gem, first create a new `Unm::Calendar` object by passing it a start
25
+ and end date, and a format (defaults to CSV, other options are ICAL and XML):
26
+
27
+ ```ruby
28
+ calendar = Unm::Calendar.new(Date.today, Date.today + 365, "ICAL")
29
+ ```
30
+
31
+ Then perform the request (returns HTTParty request, use `body` method to
32
+ retrieve raw string):
33
+
34
+ ```ruby
35
+ request = calendar.get
36
+ puts calendar.body
37
+ # Probably outputs some super long iCalendar string
38
+ ```
24
39
 
25
40
  ## Contributing
26
41
 
data/lib/unm/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Unm
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/lib/unm.rb CHANGED
@@ -13,7 +13,7 @@ module Unm
13
13
 
14
14
  def get
15
15
  build_params
16
- @calendar ||= HTTParty.get @url
16
+ @calendar ||= HTTParty.get(@url).body
17
17
  end
18
18
 
19
19
  private
data/unm-0.0.1.gem ADDED
File without changes
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ricardo Piro-Rael
@@ -66,6 +66,7 @@ files:
66
66
  - Rakefile
67
67
  - lib/unm.rb
68
68
  - lib/unm/version.rb
69
+ - unm-0.0.1.gem
69
70
  - unm.gemspec
70
71
  homepage: ''
71
72
  licenses: