umts-microservices-engine 0.0.2 → 0.0.3

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: 75e14e03e11207896af79f0e5a102ff8a139e7cd
4
- data.tar.gz: 37a40ed242523be25d32c9cb1369c57f1a73c546
3
+ metadata.gz: 8aa564c1f714a9acef1f66ce887f91218cd57cbf
4
+ data.tar.gz: a52dca3b49356cb8a69b161d5c92b8e116fd59c0
5
5
  SHA512:
6
- metadata.gz: 9d6eb44c86793bf4345185fe4919dc11b6c99dfd7c601d3b6ccae09f112e56242e318b186e8b22928d20cd6b10f4cebbfdecaae7c80c9cca5eade528705a9cf8
7
- data.tar.gz: 227bb25ff5044144774e1211f177963f15b8006032fa48b4f6497d8ee3411991c0e9ec207367a7ab489448a2bb36f09247a8b8ff21841529b70deee493b15133
6
+ metadata.gz: 01019f290535d673bde1eeac6efbdecd09a405b56af64c39ced067d177f030476688b5bb9b23382c6eb30bc70821ff4f58bafca1944669dfe4b646f6a02c1251
7
+ data.tar.gz: c937ca7b8446be88823e9863ea422a479844a774d2f58aeb87b266daafb5eb62f49307f28cbe2945b1c5c51873d7c8c24a5c9483b8b3c6936a7f176f57710f24
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
- class CreateMicroservicesEngineConnections < ActiveRecord::Migration
2
+ class CreateMicroservicesEngineConnections < ActiveRecord::Migration[5.0]
3
3
  def change
4
4
  create_table :microservices_engine_connections do |t|
5
5
  t.string :name
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module MicroservicesEngine
3
- VERSION = '0.0.2'
3
+ VERSION = '0.0.3'
4
4
  end
@@ -40,7 +40,7 @@ describe MicroservicesEngine::V1::DataController, type: :controller do
40
40
 
41
41
  describe 'POST #register' do
42
42
  it 'responds' do
43
- post :register, @data
43
+ process :register, method: :post, params: @data
44
44
  expect(response.status).to be(200)
45
45
  end
46
46
 
@@ -49,7 +49,7 @@ describe MicroservicesEngine::V1::DataController, type: :controller do
49
49
  it 'accepts valid token' do
50
50
  # 1. Expect submitting the data to not cause any issues
51
51
 
52
- expect { post :register, @data }.not_to raise_error
52
+ expect { process :register, method: :post, params: @data }.not_to raise_error
53
53
  end
54
54
 
55
55
  it 'denies invalid token' do
@@ -57,7 +57,7 @@ describe MicroservicesEngine::V1::DataController, type: :controller do
57
57
  # 2. Expect the request to cause an error.
58
58
 
59
59
  @changed_data['token'] = 'mayonnaise_is_not_an_instrument_patrick'
60
- expect { post :register, @changed_data }.to raise_error(SecurityError)
60
+ expect { process :register, method: :post, params: @changed_data }.to raise_error(SecurityError)
61
61
  end
62
62
  end
63
63
 
@@ -70,7 +70,7 @@ describe MicroservicesEngine::V1::DataController, type: :controller do
70
70
  failing_builds.each do |failing_build|
71
71
  it 'fails with older version #{failing_build}' do
72
72
  change_build(failing_build, @changed_data)
73
- expect { post :register, @changed_data }.to raise_error(RuntimeError)
73
+ expect { process :register, method: :post, params: @changed_data }.to raise_error(RuntimeError)
74
74
  end
75
75
  end
76
76
  end
@@ -82,7 +82,7 @@ describe MicroservicesEngine::V1::DataController, type: :controller do
82
82
  it 'passes with newer version #{passing_build}' do
83
83
  change_build(passing_build, @changed_data)
84
84
  expect(MicroservicesEngine.build).to eq('1.1.1')
85
- post :register, @changed_data
85
+ process :register, method: :post, params: @changed_data
86
86
  expect(MicroservicesEngine.build).to eq(passing_build)
87
87
  end
88
88
  end
@@ -105,7 +105,7 @@ describe MicroservicesEngine::V1::DataController, type: :controller do
105
105
 
106
106
  describe 'new' do
107
107
  before(:each) do
108
- post :register, @data
108
+ process :register, method: :post, params: @data
109
109
  end
110
110
 
111
111
  it 'generates the models' do
@@ -132,7 +132,7 @@ describe MicroservicesEngine::V1::DataController, type: :controller do
132
132
  }
133
133
  @changed_data[:content].append(new_data)
134
134
 
135
- expect { post :register, @changed_data }
135
+ expect { process :register, method: :post, params: @changed_data }
136
136
  .to change { @connection.count }
137
137
  .by(1)
138
138
  end
@@ -140,12 +140,12 @@ describe MicroservicesEngine::V1::DataController, type: :controller do
140
140
 
141
141
  describe 'editing' do
142
142
  before(:each) do
143
- post :register, @data
143
+ process :register, method: :post, params: @data
144
144
  end
145
145
 
146
146
  it 'updates the name' do
147
147
  @changed_data[:content][0][:name] = 'Potatoes'
148
- expect { post :register, @changed_data }
148
+ expect { process :register, method: :post, params: @changed_data }
149
149
  .to change { @connection.all.map(&:name) }
150
150
  .from(@extract.call(@data, :name))
151
151
  .to(@extract.call(@changed_data, :name))
@@ -153,7 +153,7 @@ describe MicroservicesEngine::V1::DataController, type: :controller do
153
153
 
154
154
  it 'updates the url' do
155
155
  @changed_data[:content][0][:url] = 'pota://toe.s/'
156
- expect { post :register, @changed_data }
156
+ expect { process :register, method: :post, params: @changed_data }
157
157
  .to change { @connection.all.map(&:url) }
158
158
  .from(@extract.call(@data, :url))
159
159
  .to(@extract.call(@changed_data, :url))
@@ -161,19 +161,19 @@ describe MicroservicesEngine::V1::DataController, type: :controller do
161
161
 
162
162
  it 'swaps information to other model' do
163
163
  @changed_data[:content][0][:object] = 'SomeOtherObject'
164
- expect { post :register, @changed_data }
164
+ expect { process :register, method: :post, params: @changed_data }
165
165
  .not_to change { @connection.count }
166
166
  end
167
167
  end
168
168
 
169
169
  describe 'removing' do
170
170
  before(:each) do
171
- post :register, @data
171
+ process :register, method: :post, params: @data
172
172
  end
173
173
 
174
174
  it 'removes the model' do
175
175
  @changed_data[:content].delete_at(0)
176
- expect { post :register, @changed_data }
176
+ expect { process :register, method: :post, params: @changed_data }
177
177
  .to change { @connection.count }
178
178
  .by(-1)
179
179
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: umts-microservices-engine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - UMass Transportation Services
@@ -10,147 +10,105 @@ bindir: bin
10
10
  cert_chain: []
11
11
  date: 2016-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: rake
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '0'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: rspec-rails
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: rspec
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
13
  - !ruby/object:Gem::Dependency
56
14
  name: rails
57
15
  requirement: !ruby/object:Gem::Requirement
58
16
  requirements:
59
17
  - - "~>"
60
18
  - !ruby/object:Gem::Version
61
- version: 4.2.7.1
19
+ version: '5.0'
62
20
  type: :runtime
63
21
  prerelease: false
64
22
  version_requirements: !ruby/object:Gem::Requirement
65
23
  requirements:
66
24
  - - "~>"
67
25
  - !ruby/object:Gem::Version
68
- version: 4.2.7.1
26
+ version: '5.0'
69
27
  - !ruby/object:Gem::Dependency
70
28
  name: rspec-rails
71
29
  requirement: !ruby/object:Gem::Requirement
72
30
  requirements:
73
- - - ">="
31
+ - - "~>"
74
32
  - !ruby/object:Gem::Version
75
- version: '0'
33
+ version: '3.5'
76
34
  type: :development
77
35
  prerelease: false
78
36
  version_requirements: !ruby/object:Gem::Requirement
79
37
  requirements:
80
- - - ">="
38
+ - - "~>"
81
39
  - !ruby/object:Gem::Version
82
- version: '0'
40
+ version: '3.5'
83
41
  - !ruby/object:Gem::Dependency
84
42
  name: webmock
85
43
  requirement: !ruby/object:Gem::Requirement
86
44
  requirements:
87
- - - ">="
45
+ - - "~>"
88
46
  - !ruby/object:Gem::Version
89
- version: '0'
47
+ version: '2.1'
90
48
  type: :development
91
49
  prerelease: false
92
50
  version_requirements: !ruby/object:Gem::Requirement
93
51
  requirements:
94
- - - ">="
52
+ - - "~>"
95
53
  - !ruby/object:Gem::Version
96
- version: '0'
54
+ version: '2.1'
97
55
  - !ruby/object:Gem::Dependency
98
56
  name: rspec
99
57
  requirement: !ruby/object:Gem::Requirement
100
58
  requirements:
101
- - - ">="
59
+ - - "~>"
102
60
  - !ruby/object:Gem::Version
103
- version: '0'
61
+ version: '3.5'
104
62
  type: :development
105
63
  prerelease: false
106
64
  version_requirements: !ruby/object:Gem::Requirement
107
65
  requirements:
108
- - - ">="
66
+ - - "~>"
109
67
  - !ruby/object:Gem::Version
110
- version: '0'
68
+ version: '3.5'
111
69
  - !ruby/object:Gem::Dependency
112
70
  name: rubocop
113
71
  requirement: !ruby/object:Gem::Requirement
114
72
  requirements:
115
- - - ">="
73
+ - - "~>"
116
74
  - !ruby/object:Gem::Version
117
- version: '0'
75
+ version: '0.45'
118
76
  type: :development
119
77
  prerelease: false
120
78
  version_requirements: !ruby/object:Gem::Requirement
121
79
  requirements:
122
- - - ">="
80
+ - - "~>"
123
81
  - !ruby/object:Gem::Version
124
- version: '0'
82
+ version: '0.45'
125
83
  - !ruby/object:Gem::Dependency
126
84
  name: simplecov
127
85
  requirement: !ruby/object:Gem::Requirement
128
86
  requirements:
129
- - - ">="
87
+ - - "~>"
130
88
  - !ruby/object:Gem::Version
131
- version: '0'
89
+ version: '0.12'
132
90
  type: :development
133
91
  prerelease: false
134
92
  version_requirements: !ruby/object:Gem::Requirement
135
93
  requirements:
136
- - - ">="
94
+ - - "~>"
137
95
  - !ruby/object:Gem::Version
138
- version: '0'
96
+ version: '0.12'
139
97
  - !ruby/object:Gem::Dependency
140
98
  name: sqlite3
141
99
  requirement: !ruby/object:Gem::Requirement
142
100
  requirements:
143
- - - ">="
101
+ - - "~>"
144
102
  - !ruby/object:Gem::Version
145
- version: '0'
103
+ version: '1.3'
146
104
  type: :development
147
105
  prerelease: false
148
106
  version_requirements: !ruby/object:Gem::Requirement
149
107
  requirements:
150
- - - ">="
108
+ - - "~>"
151
109
  - !ruby/object:Gem::Version
152
- version: '0'
153
- description: Simple UMTS inter-service communication network
110
+ version: '1.3'
111
+ description:
154
112
  email:
155
113
  - transit-it@admin.umass.edu
156
114
  executables: []