configuration_service 2.0.5 → 2.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- NjZmYTRlOWVjZTY2N2NlMjhlNjIwMTBmNmY2ZGU5YWVjZGYyMTY5OA==
5
- data.tar.gz: !binary |-
6
- YjQ2YzUwMWM1YTFlMWY5ZTM1MzBiOTgyM2I4ZDJlNWI3Y2U5OWVhYg==
2
+ SHA1:
3
+ metadata.gz: 0d77ac4451fbc4e6b19276dddbba08a4d44240cb
4
+ data.tar.gz: d645e3e4b48494e7f8bbd84b73a194c45f257a0c
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- ZmU3YTI3OTcwMTBkMWQyYmMzNDZiNDQzMzU2MWMzODIzMGU3ZWY4ZWM1YWI3
10
- ZGI2ZDYwOWNjOGUxMmQzOGEwYmQxMDUzZWEwMjkxNTIzNWVhNThmYjRmZWY2
11
- YTQ3NmZiNmY4MzAzZDI2YTUwYTljY2RhYmU4YjQ1ZTcxMWFiYmU=
12
- data.tar.gz: !binary |-
13
- MTY0ZjJkZWYzNWI2ZDdlYjMzZDlkZWMzZmQ0MTg5Y2QyZDdjM2NjYWU4YjQ3
14
- OWNiMzNhNzFkYzQ3OGJkMDc0NjQxNTAwMDExYzAzYjdiZWY0OWYzZDRiNDEx
15
- OTNjMGZmZmY4YWY5NWQ5MGJjMGE1ZGUyNmVlNzRjYmY2NDk5MTY=
6
+ metadata.gz: b3dbe5db6da2659032e7d15fb55ed98173e8cc7ff6cffa7af6610c64aa4f49dfa4949826b4984d1b1adb4598bf8dd9c76b6149c4aab8e0f34bb2311f88476e16
7
+ data.tar.gz: 8c89bd07e788933c053b369fd642ee8768d7faa9d42726afcaf2c779af8ab6f134d0815a81bda1f9057be8221861ed281761cef8423be2ebf51568097bea8dd1
data/.yardopts CHANGED
@@ -1,3 +1,5 @@
1
1
  --no-private
2
+ --exclude README.md
3
+ --readme README.rdoc
2
4
  -
3
5
  features/*.feature
data/README.md ADDED
@@ -0,0 +1,24 @@
1
+ [![Gem Version](https://badge.fury.io/rb/configuration_service.svg)](http://badge.fury.io/rb/configuration_service) [![Build Status](https://travis-ci.org/hetznerZA/configuration_service.svg?branch=master)](https://travis-ci.org/hetznerZA/configuration_service) [![Dependency Status](https://gemnasium.com/hetznerZA/configuration_service.svg)](https://gemnasium.com/hetznerZA/configuration_service)
2
+
3
+ # Configuration service
4
+
5
+ The configuration service provides authorized publication and consumption of identified configuration data with metadata.
6
+
7
+ See [rubygems.org](https://rubygems.org/search?query=configuration_service-provider) for a list of service providers.
8
+
9
+ ## Documentation
10
+
11
+ For documentation of the released gem, see [rubydoc.info](http://www.rubydoc.info/gems/configuration_service).
12
+
13
+ ## Testing
14
+
15
+ Test as follows:
16
+
17
+ ```shell
18
+ git clone git@github.com:hetznerZA/configuration_service.git
19
+ cd configuration_service
20
+ bundle install
21
+ bundle exec rake
22
+ ```
23
+
24
+ Note that the tests are applied to a stub service provider. This just tests the test framework architecture.
data/Rakefile CHANGED
@@ -1,5 +1,4 @@
1
1
  require "bundler/gem_tasks"
2
- require 'rdoc/task'
3
2
  require 'rspec/core/rake_task'
4
3
 
5
4
  task :default => :test
@@ -11,12 +10,3 @@ task :test => :spec do
11
10
  ENV["TEST_ORCHESTRATION_PROVIDER"] ||= "stub"
12
11
  sh %{bundle exec cucumber}
13
12
  end
14
-
15
- RDoc::Task.new do |rdoc|
16
- rdoc.title = "Configuration service"
17
- rdoc.main = "README.rdoc"
18
- rdoc.rdoc_dir = "rdoc"
19
- end
20
-
21
- desc "Regenerate documentation"
22
- task :doc => :rerdoc
@@ -7,7 +7,7 @@ Then(/^I should receive a 'no match' indication$/) do
7
7
  end
8
8
 
9
9
  Then(/^the configuration data should be returned for the identifier$/) do
10
- expect(@test.requested_configuration).to eq @test.existing_configuration
10
+ expect(@test.configuration_found_for_identifier?).to eq true
11
11
  end
12
12
 
13
13
  Given(/^no meta data filter$/) do
@@ -23,7 +23,7 @@ When(/^I request configuration data$/) do
23
23
  end
24
24
 
25
25
  Then(/^the configuration data should be returned for the index and meta data filter$/) do
26
- expect(@test.requested_configuration).to eq @test.existing_configuration
26
+ pending "Searching with metadata filters not yet supported"
27
27
  end
28
28
 
29
29
  Given(/^configuration data at the index is not present$/) do
@@ -1,3 +1,5 @@
1
+ require "securerandom"
2
+
1
3
  module ConfigurationService
2
4
 
3
5
  ##
@@ -157,13 +157,6 @@ module ConfigurationService
157
157
  end
158
158
  end
159
159
 
160
- ##
161
- # @see ConfigurationService::Test::Orchestrator#existing_configuration
162
- #
163
- def existing_configuration
164
- @existing_configuration.data
165
- end
166
-
167
160
  ##
168
161
  # @see ConfigurationService::Test::Orchestrator#existing_revision
169
162
  #
@@ -185,7 +178,7 @@ module ConfigurationService
185
178
  #
186
179
  def request_configuration
187
180
  wrap_response do
188
- service.request_configuration
181
+ @requested_configuration = service.request_configuration
189
182
  end
190
183
  end
191
184
 
@@ -211,6 +204,17 @@ module ConfigurationService
211
204
  end
212
205
  end
213
206
 
207
+ ##
208
+ # Configuration was found for requested identifier
209
+ #
210
+ # @return [true] if last request returned configuration with the +identifier+.
211
+ #
212
+ # @see ConfigurationService::Test::Orchestrator#configuration_found_for_identifier?
213
+ #
214
+ def configuration_found_for_identifier?
215
+ @requested_configuration.identifier == @identifier
216
+ end
217
+
214
218
  ##
215
219
  # Arrange for the next publish or request operation to fail
216
220
  #
@@ -65,17 +65,6 @@ module ConfigurationService
65
65
  @provider.given_missing_configuration
66
66
  end
67
67
 
68
- ##
69
- # Return a published configuration fixture
70
- #
71
- # E.g. as arranged by {#given_existing_configuration}.
72
- #
73
- # @todo replace with predicate: this exposes domain state
74
- #
75
- def existing_configuration
76
- @provider.existing_configuration
77
- end
78
-
79
68
  ##
80
69
  # Return the revision of a published configuration fixture
81
70
  #
@@ -135,6 +124,15 @@ module ConfigurationService
135
124
  @response = @provider.publish_configuration
136
125
  end
137
126
 
127
+ ##
128
+ # Configuration for the requested identifier was found
129
+ #
130
+ # The test orchestration provider should verify that the returned configuration is for the requested identifier.
131
+ #
132
+ def configuration_found_for_identifier?
133
+ @provider.configuration_found_for_identifier?
134
+ end
135
+
138
136
  ##
139
137
  # Whether the last publish or request was allowed
140
138
  #
@@ -1,5 +1,5 @@
1
1
  module ConfigurationService
2
2
 
3
- VERSION = "2.0.5"
3
+ VERSION = "2.0.6"
4
4
 
5
5
  end
metadata CHANGED
@@ -1,83 +1,83 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: configuration_service
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.5
4
+ version: 2.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sheldon Hearn
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-08-20 00:00:00.000000000 Z
11
+ date: 2015-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.7'
20
20
  type: :development
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: '1.7'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '10.0'
34
34
  type: :development
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: '10.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: cucumber
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '2.0'
48
48
  type: :development
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: '2.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: '3.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: '3.3'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec-expectations
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
75
  version: '3.3'
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: '3.3'
83
83
  description: Configuration service
@@ -87,12 +87,13 @@ executables: []
87
87
  extensions: []
88
88
  extra_rdoc_files: []
89
89
  files:
90
- - .gemspec
91
- - .gitignore
92
- - .rspec
93
- - .travis.yml
94
- - .yardopts
90
+ - ".gemspec"
91
+ - ".gitignore"
92
+ - ".rspec"
93
+ - ".travis.yml"
94
+ - ".yardopts"
95
95
  - Gemfile
96
+ - README.md
96
97
  - README.rdoc
97
98
  - Rakefile
98
99
  - features/authorization.feature
@@ -133,12 +134,12 @@ require_paths:
133
134
  - lib
134
135
  required_ruby_version: !ruby/object:Gem::Requirement
135
136
  requirements:
136
- - - ! '>='
137
+ - - ">="
137
138
  - !ruby/object:Gem::Version
138
139
  version: '0'
139
140
  required_rubygems_version: !ruby/object:Gem::Requirement
140
141
  requirements:
141
- - - ! '>='
142
+ - - ">="
142
143
  - !ruby/object:Gem::Version
143
144
  version: '0'
144
145
  requirements: []