chiketto 0.4.5 → 0.4.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c1333dcfb76dd5b29b16b7057acbb2e979eb64fb
4
- data.tar.gz: 85e9dbe1c981a0ce3687fe748adf9604e2c5afb8
3
+ metadata.gz: fb292f89caf8ed73a2243fb2cdc35898fbde4dea
4
+ data.tar.gz: 319b27db4b751daf9c1421a74dcddb251a65ef44
5
5
  SHA512:
6
- metadata.gz: dad65e715230460a06d521823c55903254c1cf13fa5339ac1aa18f39aad8102dcc3a3b41a66bdba8028639809fd6c6765ce052769fd223023cd329a6baae6166
7
- data.tar.gz: c22c2482e592dbeda74df0871554455157845d9510eda875bc7bd218d7506220f85cf43ff93d443bf7dee846bc97928e4333082fcf27866498649094d9f1165a
6
+ metadata.gz: 88550de3fb39bcadbc0c193eae7c2ca75c3ee4354a4b4999280dd28ee69b326e42ca30cfcd0634bd8feef3c87a5954bc852d5f969608067f7bc11dbf2c4685d1
7
+ data.tar.gz: 073ba811c4a4f630e2e50c7cbc72c716917863fad46d5e8d5ae26a35db6f59ad8bfb066761811cf22299caed73f2aa00513e6df558c2d91655c1bde08a34b7d3
@@ -3,7 +3,6 @@ module Chiketto
3
3
  attr_reader :resource_uri,
4
4
  :url,
5
5
  :capacity,
6
- :categories,
7
6
  :status,
8
7
  :logo,
9
8
  :logo_url
@@ -39,6 +38,10 @@ module Chiketto
39
38
  attendees.map { |att| Attendee.new att }
40
39
  end
41
40
 
41
+ def category
42
+ Category.new @category.to_h
43
+ end
44
+
42
45
  def listed?
43
46
  !!@listed
44
47
  end
@@ -47,6 +50,10 @@ module Chiketto
47
50
  Organizer.new @organizer.to_h
48
51
  end
49
52
 
53
+ def subcategory
54
+ Category.new @subcategory.to_h
55
+ end
56
+
50
57
  def ticket_classes
51
58
  @ticket_classes.map do |t_class|
52
59
  TicketClass.new t_class.to_h
@@ -1,3 +1,3 @@
1
1
  module Chiketto
2
- VERSION = "0.4.5"
2
+ VERSION = "0.4.6"
3
3
  end
data/test/event_test.rb CHANGED
@@ -36,7 +36,8 @@ class EventTest < MiniTest::Test
36
36
  assert_respond_to @event, :created
37
37
  assert_respond_to @event, :changed
38
38
  assert_respond_to @event, :capacity
39
- assert_respond_to @event, :categories
39
+ assert_respond_to @event, :category
40
+ assert_respond_to @event, :subcategory
40
41
  assert_respond_to @event, :status
41
42
  assert_respond_to @event, :listed?
42
43
  assert_respond_to @event, :logo
@@ -57,6 +58,11 @@ class EventTest < MiniTest::Test
57
58
  assert_respond_to @event.description, :text
58
59
  end
59
60
 
61
+ def test_categories_are_objects
62
+ find_event
63
+ assert_kind_of Chiketto::Category, @event.category
64
+ assert_kind_of Chiketto::Category, @event.subcategory
65
+ end
60
66
  def test_organizer_is_object
61
67
  find_event
62
68
  assert_kind_of Chiketto::Organizer, @event.organizer
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chiketto
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.5
4
+ version: 0.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Radford
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-03 00:00:00.000000000 Z
11
+ date: 2015-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler