poms 2.2.1 → 2.3.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: 44472a89a690f6181bd0705849dfd50e3f3de6fa
4
- data.tar.gz: 6e6fa3ccc4349d7e8e41cf9b84f487424aadb35a
3
+ metadata.gz: 85292060b0c5dea4b9f7398aeb16a9d0f6df5190
4
+ data.tar.gz: ee21d0dd068514a0ee38d93a2719f9969fb48a28
5
5
  SHA512:
6
- metadata.gz: 5c0f996b98d940391e922906c92fbb87b8b580cce05af18c2a882784847790e14ac7456038b40dea1cb435f33b5ad125ea885489588ddafed35e6a272b1587e6
7
- data.tar.gz: e2d26cc111a8e896b97a09171953964fdf670d8b7b6363073eb37e2a55a7e0e828887eb159797e9aa193a00ce80d3a7cdca7c78e555d4234a47b0d97ca3844ec
6
+ metadata.gz: 7b7b665ceb080c2f88785c76da9c833232180f2e25f789234f8d37928e636cdee8763229a6ea76fc1d86d10e1edf5407ef6c1da30799d053b5c96bc6a942b175
7
+ data.tar.gz: 792cf6b0628b82dbced00ef5b6990219d99fb83a9b45ee15274ae4bc8d24dd410d29fc95cdeec17e0d31ce0c6c2b4963da967280f8d69cbaca747a74fc4e13e8
data/.gitignore CHANGED
@@ -15,3 +15,4 @@ spec/reports
15
15
  test/tmp
16
16
  test/version_tmp
17
17
  tmp
18
+ .ruby-version
@@ -18,6 +18,10 @@ Style/BlockDelimiters:
18
18
  Exclude:
19
19
  - 'spec/**/*.rb'
20
20
 
21
+ Metrics/BlockLength:
22
+ Exclude:
23
+ - 'spec/**/*.rb'
24
+
21
25
  Style/AndOr:
22
26
  Exclude:
23
27
  - 'lib/poms.rb' # here we do rely on how `or` has lower precedence than `||`
@@ -33,20 +37,20 @@ ModuleLength:
33
37
  RSpec/ExampleLength:
34
38
  Max: 15
35
39
 
36
- Style/AlignParameters:
40
+ Layout/AlignParameters:
37
41
  EnforcedStyle: with_fixed_indentation
38
42
 
39
- Style/FirstParameterIndentation:
43
+ Layout/FirstParameterIndentation:
40
44
  EnforcedStyle: consistent
41
45
 
42
- Style/IndentArray:
46
+ Layout/IndentArray:
43
47
  EnforcedStyle: consistent
44
48
 
45
- Style/IndentHash:
49
+ Layout/IndentHash:
46
50
  EnforcedStyle: consistent
47
51
 
48
- Style/MultilineMethodCallIndentation:
52
+ Layout/MultilineMethodCallIndentation:
49
53
  EnforcedStyle: indented
50
54
 
51
- Style/MultilineOperationIndentation:
55
+ Layout/MultilineOperationIndentation:
52
56
  EnforcedStyle: indented
data/circle.yml CHANGED
@@ -1,4 +1,6 @@
1
1
  machine:
2
+ ruby:
3
+ version: 2.3.4
2
4
  timezone:
3
5
  Europe/Amsterdam
4
6
  environment:
@@ -12,5 +12,5 @@ Poms.first('POMS_S_NTR_2342303')
12
12
  # => A hash representing the data corresponding to the given MID
13
13
 
14
14
  # Fetch multiple entities
15
- Poms.fetch(%w(WO_TELEAC_003061 POMS_EO_622912))
15
+ Poms.fetch(%w[WO_TELEAC_003061 POMS_EO_622912])
16
16
  # => An array of hashes representing data corresponding to those MIDs
@@ -64,7 +64,9 @@ module Poms
64
64
 
65
65
  def members(mid)
66
66
  Api::PaginationClient.execute(build_request(
67
- uri: Api::Uris::Media.members(config.base_uri, mid)
67
+ method: :post,
68
+ uri: Api::Uris::Media.members(config.base_uri, mid),
69
+ body: Api::Search.empty
68
70
  ))
69
71
  end
70
72
 
@@ -45,9 +45,8 @@ module Poms
45
45
  private
46
46
 
47
47
  def validate!
48
- unless %i(get post).include?(@method)
49
- raise ArgumentError, 'method should be :get or :post'
50
- end
48
+ raise ArgumentError, 'method should be :get or :post' unless
49
+ %i[get post].include?(@method)
51
50
  end
52
51
  end
53
52
  end
@@ -11,6 +11,11 @@ module Poms
11
11
 
12
12
  module_function
13
13
 
14
+ # Helper function for returning and empty body.
15
+ def empty
16
+ {}
17
+ end
18
+
14
19
  def build(options)
15
20
  return {} if options.empty?
16
21
  all = options.map do |key, value|
@@ -12,7 +12,7 @@ module Poms
12
12
 
13
13
  # List of special credential keys that need to be present in order to be
14
14
  # able to use the API.
15
- REQUIRED_CREDENTIAL_KEYS = [:key, :origin, :secret].freeze
15
+ REQUIRED_CREDENTIAL_KEYS = %i[key origin secret].freeze
16
16
 
17
17
  # Build a new configuration object, including validations and freezing.
18
18
  #
@@ -6,7 +6,7 @@ module Poms
6
6
  module Fields
7
7
  module_function
8
8
 
9
- IMAGE_TYPE_PRIORITY = %w(PROMO_LANDSCAPE PICTURE).freeze
9
+ IMAGE_TYPE_PRIORITY = %w[PROMO_LANDSCAPE PICTURE].freeze
10
10
 
11
11
  # Returns the title, main by default
12
12
  def title(item, type = 'MAIN')
@@ -1,4 +1,4 @@
1
1
  # The version
2
2
  module Poms
3
- VERSION = '2.2.1'.freeze
3
+ VERSION = '2.3.0'.freeze
4
4
  end
@@ -23,8 +23,8 @@ Gem::Specification.new do |spec|
23
23
  spec.add_development_dependency 'guard'
24
24
  spec.add_development_dependency 'rake'
25
25
  spec.add_development_dependency 'rspec'
26
- spec.add_development_dependency 'rubocop-rspec', '~> 1.7.0'
27
- spec.add_development_dependency 'rubocop', '~> 0.42.0'
26
+ spec.add_development_dependency 'rubocop-rspec', '~> 1.20.0'
27
+ spec.add_development_dependency 'rubocop', '~> 0.51.0'
28
28
  spec.add_development_dependency 'simplecov'
29
29
  spec.add_development_dependency 'timecop'
30
30
  spec.add_development_dependency 'vcr'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: poms
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.1
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Kruijsen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-19 00:00:00.000000000 Z
11
+ date: 2017-11-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -114,28 +114,28 @@ dependencies:
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 1.7.0
117
+ version: 1.20.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
- version: 1.7.0
124
+ version: 1.20.0
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: rubocop
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: 0.42.0
131
+ version: 0.51.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
- version: 0.42.0
138
+ version: 0.51.0
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: simplecov
141
141
  requirement: !ruby/object:Gem::Requirement
@@ -202,7 +202,6 @@ files:
202
202
  - ".gitignore"
203
203
  - ".rubocop.yml"
204
204
  - ".rubocop_todo.yml"
205
- - ".ruby-version"
206
205
  - CHANGELOG.md
207
206
  - Gemfile
208
207
  - Guardfile
@@ -252,9 +251,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
252
251
  version: '0'
253
252
  requirements: []
254
253
  rubyforge_project:
255
- rubygems_version: 2.5.1
254
+ rubygems_version: 2.6.13
256
255
  signing_key:
257
256
  specification_version: 4
258
257
  summary: Interface to POMS CouchDB API
259
258
  test_files: []
260
- has_rdoc:
@@ -1 +0,0 @@
1
- 2.3.0