socialcast 1.4.3 → 1.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4f0e178e0620294a929e5a6ae75eb044eb7d06a7
4
- data.tar.gz: 3fc32ac52c0c6d5959b45809f77f9ecdb7c5944a
3
+ metadata.gz: fdcfa989228dc7215bf90107adee8d7730807d95
4
+ data.tar.gz: 20e2c6479f03bf249651424ad54b9098a90b0dd6
5
5
  SHA512:
6
- metadata.gz: 8940f43229991a1fc4531218fd57703832666eff9881c2c3fb970347f5ce38da9c5b5f96be2c8494994cfae111ee354e52ee50fc039adbd116a992795cc20336
7
- data.tar.gz: 0ffa8481375d39edbf55469de1aaab30cdd961652a95c5943bacad3d5fb03dae3996cb790ba82bd963281a1ee24a1952e30a330f6adfcc8ef3e94d6f6ea91bd9
6
+ metadata.gz: c013b3fe77d45fc2ccdb281961cad5b8954caec954b39d578646da6950897be6122877de6b324b594be276ad8ddd33dafb7994ab594f4e56a1cf7380a6795290
7
+ data.tar.gz: 9b5efe24444842651fca0ab18e5690047bb92005ac05150a4674b2e168b6538b7b2fb96aea8d3bd339b527e7e33d338e9480b20821fc3ef51ba79f8c371ce789
@@ -1 +1 @@
1
- 2.3.1
1
+ 2.4.1
@@ -1,5 +1,5 @@
1
1
  module Socialcast
2
2
  module CommandLine
3
- VERSION = '1.4.3'
3
+ VERSION = '1.4.4'
4
4
  end
5
5
  end
@@ -15,7 +15,7 @@ Gem::Specification.new do |s|
15
15
 
16
16
  s.rubyforge_project = "socialcast"
17
17
 
18
- s.add_runtime_dependency 'rest-client', '~> 1.7'
18
+ s.add_runtime_dependency 'rest-client', '~> 2.0'
19
19
  s.add_runtime_dependency 'json', '>= 1.4.6'
20
20
  s.add_runtime_dependency 'thor', '~> 0.14', '>= 0.14.6'
21
21
  s.add_runtime_dependency 'highline', '~> 1.6', '>= 1.6.2'
@@ -23,7 +23,7 @@ Gem::Specification.new do |s|
23
23
  s.add_runtime_dependency 'activesupport', '>= 4.0'
24
24
  s.add_runtime_dependency 'builder', '~> 3.1'
25
25
  s.add_development_dependency 'rspec', '~> 3.3'
26
- s.add_development_dependency 'webmock', '~> 1.7', '>= 1.7.7'
26
+ s.add_development_dependency 'webmock', '~> 2.3', '>= 2.3.1'
27
27
  s.add_development_dependency 'rake', '0.9.2.2'
28
28
  s.add_development_dependency 'pry', '~> 0.9'
29
29
 
@@ -42,15 +42,17 @@ describe Socialcast::CommandLine::Authenticate do
42
42
  before { allow(Socialcast::CommandLine).to receive(:config_dir).and_return(stubbed_config_dir) }
43
43
  context 'as a successfull authenticated user' do
44
44
  before do
45
- stub_request(:get, "https://ryan%40socialcast.com:foo@test.staging.socialcast.com/api/userinfo.json").
46
- to_return(:status => 200, :body => current_user_stub.to_json)
45
+ stub_request(:get, "https://test.staging.socialcast.com/api/userinfo.json")
46
+ .with(:basic_auth => ['ryan@socialcast.com', 'foo'])
47
+ .to_return(:status => 200, :body => current_user_stub.to_json)
47
48
  end
48
49
  it { expect(current_user['id']).to eq(123) }
49
50
  end
50
51
  context 'when you not authenticated properly' do
51
52
  before do
52
- stub_request(:get, "https://ryan%40socialcast.com:foo@test.staging.socialcast.com/api/userinfo.json").
53
- to_return(:status => 200, :body => current_user_error.to_json)
53
+ stub_request(:get, "https://test.staging.socialcast.com/api/userinfo.json")
54
+ .with(:basic_auth => ['ryan@socialcast.com', 'foo'])
55
+ .to_return(:status => 200, :body => current_user_error.to_json)
54
56
  end
55
57
  it { expect { current_user }.to raise_error(RuntimeError) }
56
58
  end
@@ -109,8 +109,8 @@ describe Socialcast::CommandLine::CLI do
109
109
  # Expects -u=emily@socialcast.com -p=demo --domain=demo.socialcast.com
110
110
  context 'with a basic message' do
111
111
  before do
112
- stub_request(:post, "https://ryan%40socialcast.com:foo@test.staging.socialcast.com/api/messages.json").
113
- with(:body => { "message" => { "body" => "testing", "url" => nil, "message_type" => nil, "attachment_ids" => [], "group_id" => nil }}).
112
+ stub_request(:post, "https://test.staging.socialcast.com/api/messages.json").
113
+ with(:basic_auth => ['ryan@socialcast.com', 'foo'], :body => { "message" => { "body" => "testing", "url" => nil, "message_type" => nil, "attachment_ids" => [], "group_id" => nil }}).
114
114
  with(:headers => {'Accept' => 'application/json'}).
115
115
  to_return(:status => 200, :body => "", :headers => {})
116
116
 
@@ -138,7 +138,8 @@ describe Socialcast::CommandLine::CLI do
138
138
  'permalink_url' => 'https://test.stagings.socialcast.com/messages/123'
139
139
  )
140
140
  }
141
- stub_request(:post, "https://ryan%40socialcast.com:foo@test.staging.socialcast.com/api/messages.json")
141
+ stub_request(:post, "https://test.staging.socialcast.com/api/messages.json")
142
+ .with(:basic_auth => ['ryan@socialcast.com', 'foo'])
142
143
  .with(:body => message_request_data)
143
144
  .with(:headers => {'Accept' => 'application/json'})
144
145
  .to_return(:status => 200, :body => message_response_data.to_json, :headers => {})
@@ -156,11 +157,12 @@ describe Socialcast::CommandLine::CLI do
156
157
 
157
158
  context 'with a message_type message' do
158
159
  before do
159
- stub_request(:post, "https://ryan%40socialcast.com:foo@test.staging.socialcast.com/api/messages.json").
160
- with(:body => /message\_type\"\:review\_request/).
161
- with(:body => /please\sreview/).
162
- with(:headers => {'Accept' => 'application/json'}).
163
- to_return(:status => 200, :body => "", :headers => {})
160
+ stub_request(:post, "https://test.staging.socialcast.com/api/messages.json")
161
+ .with(:basic_auth => ['ryan@socialcast.com', 'foo'])
162
+ .with(:body => /message\_type\"\:review\_request/)
163
+ .with(:body => /please\sreview/)
164
+ .with(:headers => {'Accept' => 'application/json'})
165
+ .to_return(:status => 200, :body => "", :headers => {})
164
166
 
165
167
  Socialcast::CommandLine::CLI.start ['share', 'please review', '--message_type=review_request']
166
168
  end
@@ -170,10 +172,11 @@ describe Socialcast::CommandLine::CLI do
170
172
  end
171
173
  context 'with a group_id param' do
172
174
  before do
173
- stub_request(:post, "https://ryan%40socialcast.com:foo@test.staging.socialcast.com/api/messages.json").
174
- with(:body => /group\_id\"\:123/).
175
- with(:headers => {'Accept' => 'application/json'}).
176
- to_return(:status => 200, :body => "", :headers => {})
175
+ stub_request(:post, "https://test.staging.socialcast.com/api/messages.json")
176
+ .with(:basic_auth => ['ryan@socialcast.com', 'foo'])
177
+ .with(:body => /group\_id\"\:123/)
178
+ .with(:headers => {'Accept' => 'application/json'})
179
+ .to_return(:status => 200, :body => "", :headers => {})
177
180
 
178
181
  Socialcast::CommandLine::CLI.start ['share', 'hi', '--group_id=123']
179
182
  end
@@ -183,11 +186,12 @@ describe Socialcast::CommandLine::CLI do
183
186
  end
184
187
  context "with a proxy" do
185
188
  before do
186
- stub_request(:post, "https://ryan%40socialcast.com:foo@test.staging.socialcast.com/api/messages.json").
187
- with(:body => /message\_type\"\:null/).
188
- with(:body => /testing/).
189
- with(:headers => {'Accept' => 'application/json'}).
190
- to_return(:status => 200, :body => "", :headers => {})
189
+ stub_request(:post, "https://test.staging.socialcast.com/api/messages.json")
190
+ .with(:basic_auth => ['ryan@socialcast.com', 'foo'])
191
+ .with(:body => /message\_type\"\:null/)
192
+ .with(:body => /testing/)
193
+ .with(:headers => {'Accept' => 'application/json'})
194
+ .to_return(:status => 200, :body => "", :headers => {})
191
195
 
192
196
  Socialcast::CommandLine::CLI.start ['share', 'testing']
193
197
  end
@@ -429,7 +429,9 @@ describe Socialcast::CommandLine::ProvisionUser do
429
429
  before do
430
430
  entry = create_entry 'user', :mail => 'user@example.com', :givenName => 'first name', :sn => 'last name'
431
431
  expect(ldap).to receive(:search).once.with(hash_including(:attributes => ['givenName', 'sn', 'mail', 'isMemberOf'])).and_yield(entry)
432
- stub_request(:post, "https://ryan%40socialcast.com:foo@test.staging.socialcast.com/api/users/provision").to_return(:status => 401)
432
+ stub_request(:post, "https://test.staging.socialcast.com/api/users/provision")
433
+ .with(:basic_auth => ['ryan@socialcast.com', 'foo'])
434
+ .to_return(:status => 401)
433
435
  end
434
436
  it do
435
437
  expect do
@@ -442,7 +444,9 @@ describe Socialcast::CommandLine::ProvisionUser do
442
444
  before do
443
445
  entry = create_entry 'user', :mail => 'user@example.com', :givenName => 'first name', :sn => 'last name'
444
446
  expect(ldap).to receive(:search).once.with(hash_including(:attributes => ['givenName', 'sn', 'mail', 'isMemberOf'])).and_yield(entry)
445
- stub_request(:post, "https://ryan%40socialcast.com:foo@test.staging.socialcast.com/api/users/provision").to_return(:status => 403)
447
+ stub_request(:post, "https://test.staging.socialcast.com/api/users/provision")
448
+ .with(:basic_auth => ['ryan@socialcast.com', 'foo'])
449
+ .to_return(:status => 403)
446
450
  end
447
451
  it do
448
452
  expect do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: socialcast
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.3
4
+ version: 1.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Sonnek
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2017-03-06 00:00:00.000000000 Z
13
+ date: 2017-06-28 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rest-client
@@ -18,14 +18,14 @@ dependencies:
18
18
  requirements:
19
19
  - - "~>"
20
20
  - !ruby/object:Gem::Version
21
- version: '1.7'
21
+ version: '2.0'
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - "~>"
27
27
  - !ruby/object:Gem::Version
28
- version: '1.7'
28
+ version: '2.0'
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: json
31
31
  requirement: !ruby/object:Gem::Requirement
@@ -148,20 +148,20 @@ dependencies:
148
148
  requirements:
149
149
  - - "~>"
150
150
  - !ruby/object:Gem::Version
151
- version: '1.7'
151
+ version: '2.3'
152
152
  - - ">="
153
153
  - !ruby/object:Gem::Version
154
- version: 1.7.7
154
+ version: 2.3.1
155
155
  type: :development
156
156
  prerelease: false
157
157
  version_requirements: !ruby/object:Gem::Requirement
158
158
  requirements:
159
159
  - - "~>"
160
160
  - !ruby/object:Gem::Version
161
- version: '1.7'
161
+ version: '2.3'
162
162
  - - ">="
163
163
  - !ruby/object:Gem::Version
164
- version: 1.7.7
164
+ version: 2.3.1
165
165
  - !ruby/object:Gem::Dependency
166
166
  name: rake
167
167
  requirement: !ruby/object:Gem::Requirement
@@ -277,7 +277,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
277
277
  version: '0'
278
278
  requirements: []
279
279
  rubyforge_project: socialcast
280
- rubygems_version: 2.5.1
280
+ rubygems_version: 2.6.12
281
281
  signing_key:
282
282
  specification_version: 4
283
283
  summary: command line interface to socialcast api