cetacean 1.0.0 → 1.1.0

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: 0e46de21051edb9c941f19ed926b5a124396a3b0
4
- data.tar.gz: 60a0c1b28bea7eb5ffcd9e42bf9aa8bfff4fe41b
3
+ metadata.gz: 61ec651f1f3c764aba07a231315006d2722dda24
4
+ data.tar.gz: 903874b37d0036643a0d58d30c29e1c158584036
5
5
  SHA512:
6
- metadata.gz: 6e8313db79a64e6ff05d0d97ada62b92ebe745de37827344b57207b38d0e8cda0c74358d9980e0abe6f3308e5ff7fbd26aa09aa02eb256612eaf41197f9fc3f7
7
- data.tar.gz: e7e39696b01a9d848a330ddc5d20bf8763001377580843bc689d7b2fa471c86a244f9bdb6be37fe79f9f55e6ea8af16a14357f712aac6f8ac1c50f0ceaaeef3a
6
+ metadata.gz: a6d8b01a4a88f7df1c98f7b981ff0894f9dd241b9b89a60566c8fee75ec28cf9eded5e95d4250f19eaea64edc9169130e567b6a8cf07538f894fbb9c3bd08aca
7
+ data.tar.gz: f20a4b52c89b93bd9412361ff02ff2db4b12d0e1a9058efd013f27f0734cb48bfe212dc07c3581e3c8364132191cc662538bb0696cbea9835fb28681b0d68206
data/CHANGES.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changes
2
2
 
3
+ ## 1.1.0
4
+
5
+ * Allow index access to `EmbeddedResourceCollection`s. - Ben Hamill
6
+
3
7
  ## 1.0.0
4
8
 
5
9
  * The first glimmers of functionality. - Ben Hamill
data/README.md CHANGED
@@ -1,4 +1,5 @@
1
- > Everything the system does *for* you, it also does *to* you.
1
+ > Everything the system does *for* you, the system also does *to* you.
2
+ > <br>—Don Leaver
2
3
 
3
4
  # Cetacean [![Build Status](https://travis-ci.org/benhamill/cetacean.png)](https://travis-ci.org/benhamill/cetacean) [![Code Climate](https://codeclimate.com/github/benhamill/cetacean.png)](https://codeclimate.com/github/benhamill/cetacean)
4
5
 
@@ -11,6 +11,10 @@ class Cetacean::EmbeddedResourceCollection
11
11
  end
12
12
  end
13
13
 
14
+ def [](index)
15
+ Cetacean::EmbeddedResource.new(document_array[index])
16
+ end
17
+
14
18
  private
15
19
 
16
20
  attr_reader :document_array
@@ -1,5 +1,5 @@
1
1
  module Cetacean
2
- VERSION = "1.0.0"
2
+ VERSION = "1.1.0"
3
3
 
4
4
  def self.version
5
5
  VERSION
@@ -83,6 +83,10 @@ describe Cetacean do
83
83
  expect(plur.get_uri(:self)).to eq("/plural/#{index + 1}")
84
84
  end
85
85
  end
86
+
87
+ it "allows index access on plural embeds" do
88
+ expect(subject.embedded(:plural)[0].get_uri(:self).to_s).to eq("/plural/1")
89
+ end
86
90
  end
87
91
 
88
92
  context "when fed invalid HAL" do
metadata CHANGED
@@ -1,139 +1,139 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cetacean
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Hamill
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-12 00:00:00.000000000 Z
11
+ date: 2014-08-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0.8'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0.8'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: uri_template
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0.6'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0.6'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: activesupport
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '4.0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '4.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: '1.3'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1.3'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rake
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rspec
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - '>='
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - '>='
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: webmock
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - '>='
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - '>='
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: pry
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - '>='
115
+ - - ">="
116
116
  - !ruby/object:Gem::Version
117
117
  version: '0'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - '>='
122
+ - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: sinatra
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - '>='
129
+ - - ">="
130
130
  - !ruby/object:Gem::Version
131
131
  version: '0'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - '>='
136
+ - - ">="
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
139
  description: The HAL client that does almost nothing for/to you.
@@ -143,9 +143,9 @@ executables: []
143
143
  extensions: []
144
144
  extra_rdoc_files: []
145
145
  files:
146
- - .gitignore
147
- - .rspec
148
- - .travis.yml
146
+ - ".gitignore"
147
+ - ".rspec"
148
+ - ".travis.yml"
149
149
  - CHANGES.md
150
150
  - Gemfile
151
151
  - LICENSE.txt
@@ -171,17 +171,17 @@ require_paths:
171
171
  - lib
172
172
  required_ruby_version: !ruby/object:Gem::Requirement
173
173
  requirements:
174
- - - '>='
174
+ - - ">="
175
175
  - !ruby/object:Gem::Version
176
176
  version: '0'
177
177
  required_rubygems_version: !ruby/object:Gem::Requirement
178
178
  requirements:
179
- - - '>='
179
+ - - ">="
180
180
  - !ruby/object:Gem::Version
181
181
  version: '0'
182
182
  requirements: []
183
183
  rubyforge_project:
184
- rubygems_version: 2.0.3
184
+ rubygems_version: 2.2.2
185
185
  signing_key:
186
186
  specification_version: 4
187
187
  summary: The HAL client that does almost nothing for/to you.