cobot_client 3.0.0 → 3.1.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: 385453cc971469ee0aa77b629caad121b0bac713
4
- data.tar.gz: 3bdf837bdbf70114b6388de7de4964acdf118113
3
+ metadata.gz: 1e33543f24073fe4a3c349c97874dd846533bea1
4
+ data.tar.gz: 3c9818a5755292537b3fb8fbf0fa566c780dc382
5
5
  SHA512:
6
- metadata.gz: 011aa0946233946fa5d88f9b797220baee3062cc072d672ffd00a775e54d5d8f00cae22fc14bda213a65f5ee8d5cb6111da4e415c18cb93f382201915ab08400
7
- data.tar.gz: c11c2109aa6162dc63d5e2e75e585c64640c0c94949348bcf6f90315882143d32a55df751eceb815b928124781cc51661523259ec49688126e930151f0a4f1d9
6
+ metadata.gz: afc679f1b10dd8a731a46cb43e97f0858a3e8827c87b6293308597ec2edaa8af6883917e90464e8056533094ee4141c77098667137ed787c7224b2d3860ab0c9
7
+ data.tar.gz: 7923351ded252310bed7277ba5d93a65021f261cb9bcc0c3f8710d1bd909697360bd596e0a423ded6d1b62097087eef2691a951eb34812050048c658ad417170
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+
2
+ # 3.1.0
3
+
4
+ * adds user_edtiable attribute to navigation links
5
+
1
6
  # 3.0.0
2
7
 
3
- * bumps rest-client to ~2.0.1, which results in CobotClient::ResourceNotFound to be renamed to CobotClient::NotFound (FrauBienenstich)
8
+ * bumps rest-client to ~2.0.1, which results in CobotClient::ResourceNotFound to be renamed to CobotClient::NotFound (FrauBienenstich)
@@ -7,4 +7,5 @@ class CobotClient::NavigationLink
7
7
  attribute :label, String
8
8
  attribute :iframe_url, String
9
9
  attribute :user_url, String
10
+ attribute :user_editable, Boolean, default: true
10
11
  end
@@ -36,7 +36,8 @@ module CobotClient
36
36
  response = @api_client.post(@subdomain, '/navigation_links',
37
37
  section: link.section,
38
38
  label: link.label,
39
- iframe_url: link.iframe_url
39
+ iframe_url: link.iframe_url,
40
+ user_editable: link.user_editable
40
41
  )
41
42
 
42
43
  NavigationLink.new response
@@ -1,3 +1,3 @@
1
1
  module CobotClient
2
- VERSION = '3.0.0'
2
+ VERSION = '3.1.0'
3
3
  end
@@ -2,12 +2,12 @@ require 'spec_helper'
2
2
 
3
3
  describe CobotClient::NavigationLinkService, '#install_links' do
4
4
  let(:service) { CobotClient::NavigationLinkService.new(api_client, 'co-up') }
5
- let(:api_client) { double(:api_client) }
5
+ let(:api_client) { instance_double(CobotClient::ApiClient) }
6
6
 
7
7
  context 'when there are links already' do
8
8
  before(:each) do
9
- allow(api_client).to receive(:get).with(
10
- 'co-up', '/navigation_links') { [{label: 'test link'}] }
9
+ allow(api_client).to receive(:get)
10
+ .with('co-up', '/navigation_links') { [{label: 'test link'}] }
11
11
  end
12
12
 
13
13
  it 'installs no links' do
@@ -22,16 +22,23 @@ describe CobotClient::NavigationLinkService, '#install_links' do
22
22
  end
23
23
 
24
24
  context 'when there are no links installed' do
25
- let(:link) { double(:link, section: 'admin/manage', label: 'test link', iframe_url: '/test') }
25
+ let(:link) do
26
+ instance_double(CobotClient::NavigationLink,
27
+ section: 'admin/manage', label: 'test link', iframe_url: '/test',
28
+ user_editable: true)
29
+ end
26
30
 
27
31
  before(:each) do
28
32
  allow(api_client).to receive(:get).with('co-up', '/navigation_links') { [] }
29
33
  end
30
34
 
31
35
  it 'installs the links' do
32
- expect(api_client).to receive(:post).with('co-up', '/navigation_links', {
33
- section: 'admin/manage', label: 'test link', iframe_url: '/test'
34
- }) { {} }
36
+ expect(api_client).to receive(:post)
37
+ .with('co-up', '/navigation_links',
38
+ section: 'admin/manage',
39
+ label: 'test link',
40
+ iframe_url: '/test',
41
+ user_editable: true) { {} }
35
42
 
36
43
  service.install_links [link]
37
44
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cobot_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Lang
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-17 00:00:00.000000000 Z
11
+ date: 2018-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: virtus