cronofy 0.3.1 → 0.3.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/lib/cronofy/types.rb +3 -0
- data/lib/cronofy/version.rb +1 -1
- data/spec/lib/cronofy/event_spec.rb +55 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c32a02fcae77c417a0f447f8249323e76ada663
|
4
|
+
data.tar.gz: 4fab44893e5c7189e712ee2ec63e8f1215e26b09
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2847a4504e4e17974941c3040749d85d0b477333dd2c0a26cccf1b99e189c57aaa8ce5674a76827bec1090f26bc454ae03545f2ca6de9458fd2eb15d684469e4
|
7
|
+
data.tar.gz: 638ec645d4380a93e1653561dc36b6ef56471c0070e9112aaff663a43431f3e6d7ec6642186c88173a11a076a7d08cf8de470e42e660ff2a287288d2e480e897
|
data/lib/cronofy/types.rb
CHANGED
data/lib/cronofy/version.rb
CHANGED
@@ -0,0 +1,55 @@
|
|
1
|
+
require_relative '../../spec_helper'
|
2
|
+
|
3
|
+
describe Cronofy::Event do
|
4
|
+
let(:json) do
|
5
|
+
'{
|
6
|
+
"calendar_id": "cal_U9uuErStTG@EAAAB_IsAsykA2DBTWqQTf-f0kJw",
|
7
|
+
"event_uid": "evt_external_54008b1a4a41730f8d5c6037",
|
8
|
+
"summary": "Company Retreat",
|
9
|
+
"description": "",
|
10
|
+
"start": "2014-09-06",
|
11
|
+
"end": "2014-09-08",
|
12
|
+
"deleted": false,
|
13
|
+
"location": {
|
14
|
+
"description": "Beach"
|
15
|
+
},
|
16
|
+
"participation_status": "needs_action",
|
17
|
+
"transparency": "opaque",
|
18
|
+
"event_status": "confirmed",
|
19
|
+
"categories": [],
|
20
|
+
"attendees": [
|
21
|
+
{
|
22
|
+
"email": "example@cronofy.com",
|
23
|
+
"display_name": "Example Person",
|
24
|
+
"status": "needs_action"
|
25
|
+
}
|
26
|
+
],
|
27
|
+
"created": "2014-09-01T08:00:01Z",
|
28
|
+
"updated": "2014-09-01T09:24:16Z"
|
29
|
+
}'
|
30
|
+
end
|
31
|
+
|
32
|
+
let(:hash) do
|
33
|
+
JSON.parse(json)
|
34
|
+
end
|
35
|
+
|
36
|
+
subject do
|
37
|
+
Cronofy::Event.new(hash)
|
38
|
+
end
|
39
|
+
|
40
|
+
it "coerces the start date" do
|
41
|
+
expect(subject.start).to eq(Cronofy::DateOrTime.coerce("2014-09-06"))
|
42
|
+
end
|
43
|
+
|
44
|
+
it "coerces the end date" do
|
45
|
+
expect(subject.end).to eq(Cronofy::DateOrTime.coerce("2014-09-08"))
|
46
|
+
end
|
47
|
+
|
48
|
+
it "coerces the created time" do
|
49
|
+
expect(subject.created).to eq(Time.parse("2014-09-01T08:00:01Z"))
|
50
|
+
end
|
51
|
+
|
52
|
+
it "coerces the updated time" do
|
53
|
+
expect(subject.updated).to eq(Time.parse("2014-09-01T09:24:16Z"))
|
54
|
+
end
|
55
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cronofy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sergii Paryzhskyi
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-06-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: oauth2
|
@@ -119,6 +119,7 @@ files:
|
|
119
119
|
- spec/lib/cronofy/client_spec.rb
|
120
120
|
- spec/lib/cronofy/date_or_time_spec.rb
|
121
121
|
- spec/lib/cronofy/errors_spec.rb
|
122
|
+
- spec/lib/cronofy/event_spec.rb
|
122
123
|
- spec/response_parser_spec.rb
|
123
124
|
- spec/spec_helper.rb
|
124
125
|
homepage: https://github.com/cronofy/cronofy-ruby
|
@@ -150,5 +151,6 @@ test_files:
|
|
150
151
|
- spec/lib/cronofy/client_spec.rb
|
151
152
|
- spec/lib/cronofy/date_or_time_spec.rb
|
152
153
|
- spec/lib/cronofy/errors_spec.rb
|
154
|
+
- spec/lib/cronofy/event_spec.rb
|
153
155
|
- spec/response_parser_spec.rb
|
154
156
|
- spec/spec_helper.rb
|