roqua-core-api 0.0.30 → 0.0.31

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: a2762926c89271ebf2621c18b6e70751d5a1bf12
4
- data.tar.gz: 99fdc324bb06fa148994b54cdd5df39a8c4bbc48
3
+ metadata.gz: 8774c6db4624c45bcc0328d7958f5cce9e11005c
4
+ data.tar.gz: 30db19c6a18e37384170790f72132578c29a31e7
5
5
  SHA512:
6
- metadata.gz: 294370405ee1b0dd66096a9b58d9345e29619d29712680e8d3dc0d3cd39e2301344247e63192969a6af9ca4228970672d78c61058c206313e91cb46f2b4032c6
7
- data.tar.gz: daa1d7cb0070459f4950743147a7d9084604b730fcbe7ee8d9b5b584af61cd317a3b5b3e918e075a2380719e13c1b4a9fb598474b5e6df789225dab9e16eea84
6
+ metadata.gz: 9558aa3d2f877a00d0713d0b9b510b9fb87f62ed43660dc74a1a13534bbde96aa59ecf41c032935e90becd13c7530279d7f4320b07acf671c1559c5914d7b81b
7
+ data.tar.gz: 8d28ee3eaf5fc0c43e3565b70510b643a6ed3d3a93558a1b40dc4a4b120a18de47916d0bd90238e35b11b50c0f346964c0dca36148fb22d3bd67153a47f3270b
data/ChangeLog.md CHANGED
@@ -1,3 +1,7 @@
1
+ ### 0.0.31 / 2014-05-14
2
+
3
+ * Added translations files for errors we return
4
+
1
5
  ### 0.0.30 / 2014-05-07
2
6
 
3
7
  * Added ListDossierGroupRights and DeleteDossierGroupRight
@@ -0,0 +1,58 @@
1
+ nl:
2
+ errors: &errors
3
+ format: ! '%{attribute} %{message}'
4
+ messages:
5
+ accepted: moet worden geaccepteerd
6
+ blank: moet opgegeven zijn
7
+ confirmation: komt niet met de bevestiging overeen
8
+ empty: moet opgegeven zijn
9
+ equal_to: moet gelijk zijn aan %{count}
10
+ even: moet even zijn
11
+ exclusion: is niet beschikbaar
12
+ greater_than: moet groter zijn dan %{count}
13
+ greater_than_or_equal_to: moet groter dan of gelijk zijn aan %{count}
14
+ inclusion: is niet in de lijst opgenomen
15
+ invalid: is ongeldig
16
+ less_than: moet minder zijn dan %{count}
17
+ less_than_or_equal_to: moet minder dan of gelijk zijn aan %{count}
18
+ not_a_number: is geen getal
19
+ not_an_integer: moet een geheel getal zijn
20
+ odd: moet oneven zijn
21
+ record_invalid: ! 'Validatie mislukt: %{errors}'
22
+ taken: is al in gebruik
23
+ too_long: is te lang (maximaal %{count} tekens)
24
+ too_short: is te kort (minimaal %{count} tekens)
25
+ wrong_length: heeft onjuiste lengte (moet %{count} tekens lang zijn)
26
+ invalid_key: mag enkel kleine letters, cijfers en underscores bevatten en moet beginnen met een letter.
27
+ valid_ip_addresses: moeten geldige IP-adressen zijn
28
+ invalid_email: Geen geldig email adres
29
+ invalid_date: Niet een bestaande datum
30
+ template:
31
+ body: ! 'Controleer de volgende velden:'
32
+ header:
33
+ one: ! '%{model} niet opgeslagen: 1 fout gevonden'
34
+ other: ! '%{model} niet opgeslagen: %{count} fouten gevonden'
35
+ activemodel:
36
+ errors:
37
+ <<: *errors
38
+ activerecord:
39
+ errors:
40
+ <<: *errors
41
+ active_interaction:
42
+ errors:
43
+ messages:
44
+ invalid: is ongeldig
45
+ invalid_type: is geen geldige %{type}
46
+ missing: is vereist
47
+ types:
48
+ array: array
49
+ boolean: boolean
50
+ date: date
51
+ date_time: date time
52
+ file: file
53
+ float: float
54
+ hash: hash
55
+ integer: integer
56
+ model: model
57
+ string: string
58
+ time: time
data/lib/i18n/i18n.rb ADDED
@@ -0,0 +1,13 @@
1
+ begin
2
+ require 'rails'
3
+ module I18n
4
+ class Railtie < ::Rails::Railtie #:nodoc:
5
+ initializer 'rails-i18n' do |app|
6
+ I18n.load_path << Dir[File.join(File.expand_path(File.dirname(__FILE__) + '/../../config/locales'), '*.yml')]
7
+ I18n.load_path.flatten!
8
+ end
9
+ end
10
+ end
11
+ rescue LoadError # rubocop:disable HandleExceptions
12
+ # We don't autoload locales in non-rails-projects
13
+ end
@@ -11,7 +11,7 @@ module Roqua
11
11
  def errors_to_object(response, obj)
12
12
  response['errors'].each do |attribute, errors|
13
13
  errors.each do |error|
14
- obj.errors.add(attribute, I18n.t("errors.messages.#{error}"))
14
+ obj.errors.add(attribute.to_sym, error.to_sym)
15
15
  end
16
16
  end
17
17
  end
@@ -1,5 +1,5 @@
1
1
  module Roqua
2
2
  module CoreApi
3
- VERSION = '0.0.30'
3
+ VERSION = '0.0.31'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,167 +1,167 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roqua-core-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.30
4
+ version: 0.0.31
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marten Veldthuis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-13 00:00:00.000000000 Z
11
+ date: 2014-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
19
  version: 0.12.0
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.12.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: active_interaction
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.1'
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: '1.1'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: omniauth-oauth2
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
47
  version: '1.1'
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: '1.1'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: virtus
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ~>
60
60
  - !ruby/object:Gem::Version
61
61
  version: '1.0'
62
62
  type: :runtime
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.0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: bundler
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ~>
74
74
  - !ruby/object:Gem::Version
75
75
  version: '1.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: '1.0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rake
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ~>
88
88
  - !ruby/object:Gem::Version
89
89
  version: '10.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: '10.0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: yard
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - "~>"
101
+ - - ~>
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0.8'
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.8'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: rspec
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - "~>"
115
+ - - ~>
116
116
  - !ruby/object:Gem::Version
117
117
  version: 3.0.0.beta1
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: 3.0.0.beta1
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: fabrication
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - "~>"
129
+ - - ~>
130
130
  - !ruby/object:Gem::Version
131
131
  version: '2.9'
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: '2.9'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: webmock
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - "~>"
143
+ - - ~>
144
144
  - !ruby/object:Gem::Version
145
145
  version: '1.17'
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - "~>"
150
+ - - ~>
151
151
  - !ruby/object:Gem::Version
152
152
  version: '1.17'
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: dotenv
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
- - - "~>"
157
+ - - ~>
158
158
  - !ruby/object:Gem::Version
159
159
  version: '0.10'
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - "~>"
164
+ - - ~>
165
165
  - !ruby/object:Gem::Version
166
166
  version: '0.10'
167
167
  description: Provides authenticated access to Core
@@ -170,17 +170,19 @@ executables: []
170
170
  extensions: []
171
171
  extra_rdoc_files: []
172
172
  files:
173
- - ".document"
174
- - ".gitignore"
175
- - ".rspec"
176
- - ".yardopts"
173
+ - .document
174
+ - .gitignore
175
+ - .rspec
176
+ - .yardopts
177
177
  - ChangeLog.md
178
178
  - Gemfile
179
179
  - Guardfile
180
180
  - LICENSE.txt
181
181
  - README.md
182
182
  - Rakefile
183
+ - config/locales/validation_errors.yml
183
184
  - core_api.gemspec
185
+ - lib/i18n/i18n.rb
184
186
  - lib/roqua-core-api.rb
185
187
  - lib/roqua/core_api.rb
186
188
  - lib/roqua/core_api/base.rb
@@ -232,17 +234,17 @@ require_paths:
232
234
  - lib
233
235
  required_ruby_version: !ruby/object:Gem::Requirement
234
236
  requirements:
235
- - - ">="
237
+ - - '>='
236
238
  - !ruby/object:Gem::Version
237
239
  version: '0'
238
240
  required_rubygems_version: !ruby/object:Gem::Requirement
239
241
  requirements:
240
- - - ">="
242
+ - - '>='
241
243
  - !ruby/object:Gem::Version
242
244
  version: '0'
243
245
  requirements: []
244
246
  rubyforge_project:
245
- rubygems_version: 2.2.0
247
+ rubygems_version: 2.0.14
246
248
  signing_key:
247
249
  specification_version: 4
248
250
  summary: API wrapper gem around Core's API
@@ -261,4 +263,3 @@ test_files:
261
263
  - spec/lib/roqua/core_api/sessions/basic_auth_session_spec.rb
262
264
  - spec/lib/roqua/core_api/sessions/oauth_session_spec.rb
263
265
  - spec/spec_helper.rb
264
- has_rdoc: