kintone 0.0.5 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +10 -0
- data/.travis.yml +2 -1
- data/README.md +166 -6
- data/kintone.gemspec +4 -2
- data/lib/kintone.rb +1 -0
- data/lib/kintone/api.rb +30 -3
- data/lib/kintone/api/guest.rb +17 -0
- data/lib/kintone/command/apis.rb +22 -0
- data/lib/kintone/command/app.rb +11 -0
- data/lib/kintone/command/guests.rb +15 -0
- data/lib/kintone/command/record.rb +6 -2
- data/lib/kintone/command/records.rb +9 -5
- data/lib/kintone/command/space_guests.rb +11 -0
- data/lib/kintone/command/space_members.rb +16 -0
- data/lib/kintone/command/space_thread.rb +14 -0
- data/lib/kintone/query.rb +146 -0
- data/lib/kintone/query/extension.rb +23 -0
- data/lib/kintone/type.rb +6 -0
- data/lib/kintone/type/extension/enumerable.rb +5 -0
- data/lib/kintone/type/extension/hash.rb +5 -0
- data/lib/kintone/type/extension/object.rb +5 -0
- data/lib/kintone/type/record.rb +11 -0
- data/lib/kintone/version.rb +1 -1
- data/spec/kintone/api/guest_spec.rb +41 -2
- data/spec/kintone/api_spec.rb +83 -20
- data/spec/kintone/command/apis_spec.rb +113 -0
- data/spec/kintone/command/app_spec.rb +33 -0
- data/spec/kintone/command/guests_spec.rb +65 -0
- data/spec/kintone/command/record_spec.rb +55 -37
- data/spec/kintone/command/records_spec.rb +50 -18
- data/spec/kintone/command/space_guests_spec.rb +34 -0
- data/spec/kintone/command/space_members_spec.rb +80 -0
- data/spec/kintone/command/space_spec.rb +1 -1
- data/spec/kintone/command/space_thread_spec.rb +52 -0
- data/spec/kintone/query_spec.rb +294 -0
- data/spec/kintone/type/record_spec.rb +38 -0
- data/spec/spec_helper.rb +1 -0
- metadata +67 -10
@@ -0,0 +1,38 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'kintone/type/record'
|
3
|
+
|
4
|
+
describe Kintone::Type::Record do
|
5
|
+
let(:target) { Kintone::Type::Record.new }
|
6
|
+
|
7
|
+
describe '#to_kitnone' do
|
8
|
+
subject { target.to_kintone }
|
9
|
+
|
10
|
+
context 'データが登録されているとき' do
|
11
|
+
before(:each) do
|
12
|
+
target[:a] = 1
|
13
|
+
target[:b] = 2
|
14
|
+
end
|
15
|
+
|
16
|
+
it { expect(subject).to match a: { value: 1 }, b: { value: 2 } }
|
17
|
+
end
|
18
|
+
|
19
|
+
context 'データが登録されてないとき' do
|
20
|
+
it { expect(subject).to be_empty }
|
21
|
+
end
|
22
|
+
|
23
|
+
context 'initializeで初期値を指定したとき' do
|
24
|
+
let(:target) { Kintone::Type::Record.new(default) }
|
25
|
+
|
26
|
+
where(:default, :result) do
|
27
|
+
[
|
28
|
+
[{ a: 1, b: 2 }, { a: { value: 1 }, b: { value: 2 } }],
|
29
|
+
[[[:a, 1], [:b, 2]], {}]
|
30
|
+
]
|
31
|
+
end
|
32
|
+
|
33
|
+
with_them do
|
34
|
+
it { expect(subject).to match result }
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kintone
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rikiya Kawakami
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-11-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -70,30 +70,44 @@ dependencies:
|
|
70
70
|
name: rspec
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: 3.0.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
|
-
version:
|
82
|
+
version: 3.0.0
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rubocop
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 0.24.1
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 0.24.1
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: webmock
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
86
100
|
requirements:
|
87
|
-
- - "
|
101
|
+
- - "~>"
|
88
102
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
103
|
+
version: '1.18'
|
90
104
|
type: :development
|
91
105
|
prerelease: false
|
92
106
|
version_requirements: !ruby/object:Gem::Requirement
|
93
107
|
requirements:
|
94
|
-
- - "
|
108
|
+
- - "~>"
|
95
109
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
110
|
+
version: '1.18'
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
112
|
name: guard-rspec
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -122,6 +136,20 @@ dependencies:
|
|
122
136
|
- - ">="
|
123
137
|
- !ruby/object:Gem::Version
|
124
138
|
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: rspec-parameterized
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: 0.1.2
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: 0.1.2
|
125
153
|
description: kintone API client for Ruby.
|
126
154
|
email:
|
127
155
|
- ricky.k.yang@gmail.com
|
@@ -143,27 +171,48 @@ files:
|
|
143
171
|
- lib/kintone/api.rb
|
144
172
|
- lib/kintone/api/guest.rb
|
145
173
|
- lib/kintone/command.rb
|
174
|
+
- lib/kintone/command/apis.rb
|
175
|
+
- lib/kintone/command/app.rb
|
146
176
|
- lib/kintone/command/app_acl.rb
|
147
177
|
- lib/kintone/command/field_acl.rb
|
148
178
|
- lib/kintone/command/form.rb
|
179
|
+
- lib/kintone/command/guests.rb
|
149
180
|
- lib/kintone/command/record.rb
|
150
181
|
- lib/kintone/command/record_acl.rb
|
151
182
|
- lib/kintone/command/records.rb
|
152
183
|
- lib/kintone/command/space.rb
|
153
184
|
- lib/kintone/command/space_body.rb
|
185
|
+
- lib/kintone/command/space_guests.rb
|
186
|
+
- lib/kintone/command/space_members.rb
|
187
|
+
- lib/kintone/command/space_thread.rb
|
154
188
|
- lib/kintone/command/template_space.rb
|
189
|
+
- lib/kintone/query.rb
|
190
|
+
- lib/kintone/query/extension.rb
|
191
|
+
- lib/kintone/type.rb
|
192
|
+
- lib/kintone/type/extension/enumerable.rb
|
193
|
+
- lib/kintone/type/extension/hash.rb
|
194
|
+
- lib/kintone/type/extension/object.rb
|
195
|
+
- lib/kintone/type/record.rb
|
155
196
|
- lib/kintone/version.rb
|
156
197
|
- spec/kintone/api/guest_spec.rb
|
157
198
|
- spec/kintone/api_spec.rb
|
199
|
+
- spec/kintone/command/apis_spec.rb
|
158
200
|
- spec/kintone/command/app_acl_spec.rb
|
201
|
+
- spec/kintone/command/app_spec.rb
|
159
202
|
- spec/kintone/command/field_acl_spec.rb
|
160
203
|
- spec/kintone/command/form_spec.rb
|
204
|
+
- spec/kintone/command/guests_spec.rb
|
161
205
|
- spec/kintone/command/record_acl_spec.rb
|
162
206
|
- spec/kintone/command/record_spec.rb
|
163
207
|
- spec/kintone/command/records_spec.rb
|
164
208
|
- spec/kintone/command/space_body_spec.rb
|
209
|
+
- spec/kintone/command/space_guests_spec.rb
|
210
|
+
- spec/kintone/command/space_members_spec.rb
|
165
211
|
- spec/kintone/command/space_spec.rb
|
212
|
+
- spec/kintone/command/space_thread_spec.rb
|
166
213
|
- spec/kintone/command/template_space_spec.rb
|
214
|
+
- spec/kintone/query_spec.rb
|
215
|
+
- spec/kintone/type/record_spec.rb
|
167
216
|
- spec/spec_helper.rb
|
168
217
|
homepage: https://github.com/jue58/kintone
|
169
218
|
licenses:
|
@@ -192,13 +241,21 @@ summary: kintone API client for Ruby.
|
|
192
241
|
test_files:
|
193
242
|
- spec/kintone/api/guest_spec.rb
|
194
243
|
- spec/kintone/api_spec.rb
|
244
|
+
- spec/kintone/command/apis_spec.rb
|
195
245
|
- spec/kintone/command/app_acl_spec.rb
|
246
|
+
- spec/kintone/command/app_spec.rb
|
196
247
|
- spec/kintone/command/field_acl_spec.rb
|
197
248
|
- spec/kintone/command/form_spec.rb
|
249
|
+
- spec/kintone/command/guests_spec.rb
|
198
250
|
- spec/kintone/command/record_acl_spec.rb
|
199
251
|
- spec/kintone/command/record_spec.rb
|
200
252
|
- spec/kintone/command/records_spec.rb
|
201
253
|
- spec/kintone/command/space_body_spec.rb
|
254
|
+
- spec/kintone/command/space_guests_spec.rb
|
255
|
+
- spec/kintone/command/space_members_spec.rb
|
202
256
|
- spec/kintone/command/space_spec.rb
|
257
|
+
- spec/kintone/command/space_thread_spec.rb
|
203
258
|
- spec/kintone/command/template_space_spec.rb
|
259
|
+
- spec/kintone/query_spec.rb
|
260
|
+
- spec/kintone/type/record_spec.rb
|
204
261
|
- spec/spec_helper.rb
|