mobilize-america-client 0.3.5 → 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +24 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/README.md +1 -1
- data/VERSION +1 -1
- data/lib/mobilize_america_client/client.rb +1 -0
- data/lib/mobilize_america_client/errors.rb +4 -0
- data/lib/mobilize_america_client/request.rb +4 -0
- data/mobilize-america-client.gemspec +8 -5
- data/spec/client/events_spec.rb +6 -0
- metadata +11 -8
- data/.travis.yml +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a8aa2a6520cae7a352ffabce99976284b1348b63f16cdc29d9933fb7b5b0881
|
4
|
+
data.tar.gz: d5a2a05390fc6f003042d345a16a2bf903cce4e130347207581f2b7ae5178863
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a58a2cbc1e069b67a845e16db9a8e4954b63b9fb2f0842cf9fc4913974ca9589e16c6fc7d13e767e1b8837cf9711f85e7358e917ad555c53e17d8fd321142ff9
|
7
|
+
data.tar.gz: c0995119c306cb4e1e96478401a3b91630a52c88990b72c1fe13ce137bd85c5cfe97c8aefbc991c6f601212b420f2d8554a1adfc02a66a3eafebc305fcb3c52d
|
@@ -0,0 +1,24 @@
|
|
1
|
+
name: CI
|
2
|
+
on: [push]
|
3
|
+
|
4
|
+
jobs:
|
5
|
+
test:
|
6
|
+
runs-on: ubuntu-latest
|
7
|
+
steps:
|
8
|
+
- uses: actions/checkout@v2
|
9
|
+
- uses: ruby/setup-ruby@477b21f02be01bcb8030d50f37cfec92bfa615b6
|
10
|
+
with:
|
11
|
+
ruby-version: 2.7
|
12
|
+
bundler-cache: true
|
13
|
+
- run: bundle install
|
14
|
+
- run: bundle exec rspec
|
15
|
+
rubocop:
|
16
|
+
runs-on: ubuntu-latest
|
17
|
+
steps:
|
18
|
+
- uses: actions/checkout@v2
|
19
|
+
- uses: ruby/setup-ruby@477b21f02be01bcb8030d50f37cfec92bfa615b6
|
20
|
+
with:
|
21
|
+
ruby-version: 2.7
|
22
|
+
bundler-cache: true
|
23
|
+
- run: bundle install
|
24
|
+
- run: bundle exec rubocop
|
data/.ruby-gemset
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
mobilize_america_client
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.7.4
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# MobilizeAmericaClient::Client
|
2
2
|
|
3
|
-
[![
|
3
|
+
[![CI Status](https://github.com/controlshift/mobilize_america_client/actions/workflows/ci.yml/badge.svg)](https://github.com/controlshift/mobilize_america_client/actions/workflows/ci.yml)
|
4
4
|
|
5
5
|
A minimalist API client for the [MobilizeAmerica API](https://github.com/mobilizeamerica/api):
|
6
6
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.6
|
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: mobilize-america-client 0.3.
|
5
|
+
# stub: mobilize-america-client 0.3.6 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "mobilize-america-client".freeze
|
9
|
-
s.version = "0.3.
|
9
|
+
s.version = "0.3.6"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib".freeze]
|
13
13
|
s.authors = ["Grey Moore".freeze]
|
14
|
-
s.date = "
|
14
|
+
s.date = "2021-09-14"
|
15
15
|
s.email = "grey@controlshiftlabs.com".freeze
|
16
16
|
s.executables = ["console".freeze, "setup".freeze]
|
17
17
|
s.extra_rdoc_files = [
|
@@ -20,9 +20,11 @@ Gem::Specification.new do |s|
|
|
20
20
|
"README.md"
|
21
21
|
]
|
22
22
|
s.files = [
|
23
|
+
".github/workflows/ci.yml",
|
23
24
|
".rspec",
|
24
25
|
".rubocop.yml",
|
25
|
-
".
|
26
|
+
".ruby-gemset",
|
27
|
+
".ruby-version",
|
26
28
|
"CODE_OF_CONDUCT.md",
|
27
29
|
"Gemfile",
|
28
30
|
"LICENSE",
|
@@ -37,6 +39,7 @@ Gem::Specification.new do |s|
|
|
37
39
|
"lib/mobilize_america_client/client.rb",
|
38
40
|
"lib/mobilize_america_client/client/events.rb",
|
39
41
|
"lib/mobilize_america_client/client/organizations.rb",
|
42
|
+
"lib/mobilize_america_client/errors.rb",
|
40
43
|
"lib/mobilize_america_client/request.rb",
|
41
44
|
"mobilize-america-client.gemspec",
|
42
45
|
"spec/client/client_spec.rb",
|
@@ -47,7 +50,7 @@ Gem::Specification.new do |s|
|
|
47
50
|
]
|
48
51
|
s.homepage = "http://github.com/controlshift/mobilize_america_client".freeze
|
49
52
|
s.licenses = ["MIT".freeze]
|
50
|
-
s.rubygems_version = "3.0.
|
53
|
+
s.rubygems_version = "3.0.9".freeze
|
51
54
|
s.summary = "Client gem for the MobilizeAmerica API".freeze
|
52
55
|
|
53
56
|
if s.respond_to? :specification_version then
|
data/spec/client/events_spec.rb
CHANGED
@@ -12,6 +12,12 @@ RSpec.describe MobilizeAmericaClient::Client::Events do
|
|
12
12
|
let(:events_url) { "#{base_url}/organizations/#{org_id}/events" }
|
13
13
|
let(:response) { {'data' => [{'id' => 1, 'description' => 'event 1'}, {'id' => 2, 'description' => 'event 2'}]} }
|
14
14
|
|
15
|
+
it 'should raise if response status is 404' do
|
16
|
+
stub_request(:get, events_url).with(headers: standard_headers).to_return(status: 404, body: {error: 'not found'}.to_json)
|
17
|
+
|
18
|
+
expect { subject.organization_events(organization_id: org_id) }.to raise_error MobilizeAmericaClient::NotFoundError
|
19
|
+
end
|
20
|
+
|
15
21
|
it 'should call the endpoint and return JSON' do
|
16
22
|
stub_request(:get, events_url).with(headers: standard_headers).to_return(body: response.to_json)
|
17
23
|
expect(subject.organization_events(organization_id: org_id)).to eq(response)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mobilize-america-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Grey Moore
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-09-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -122,7 +122,7 @@ dependencies:
|
|
122
122
|
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
|
-
description:
|
125
|
+
description:
|
126
126
|
email: grey@controlshiftlabs.com
|
127
127
|
executables:
|
128
128
|
- console
|
@@ -133,9 +133,11 @@ extra_rdoc_files:
|
|
133
133
|
- LICENSE.txt
|
134
134
|
- README.md
|
135
135
|
files:
|
136
|
+
- ".github/workflows/ci.yml"
|
136
137
|
- ".rspec"
|
137
138
|
- ".rubocop.yml"
|
138
|
-
- ".
|
139
|
+
- ".ruby-gemset"
|
140
|
+
- ".ruby-version"
|
139
141
|
- CODE_OF_CONDUCT.md
|
140
142
|
- Gemfile
|
141
143
|
- LICENSE
|
@@ -150,6 +152,7 @@ files:
|
|
150
152
|
- lib/mobilize_america_client/client.rb
|
151
153
|
- lib/mobilize_america_client/client/events.rb
|
152
154
|
- lib/mobilize_america_client/client/organizations.rb
|
155
|
+
- lib/mobilize_america_client/errors.rb
|
153
156
|
- lib/mobilize_america_client/request.rb
|
154
157
|
- mobilize-america-client.gemspec
|
155
158
|
- spec/client/client_spec.rb
|
@@ -161,7 +164,7 @@ homepage: http://github.com/controlshift/mobilize_america_client
|
|
161
164
|
licenses:
|
162
165
|
- MIT
|
163
166
|
metadata: {}
|
164
|
-
post_install_message:
|
167
|
+
post_install_message:
|
165
168
|
rdoc_options: []
|
166
169
|
require_paths:
|
167
170
|
- lib
|
@@ -176,8 +179,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
176
179
|
- !ruby/object:Gem::Version
|
177
180
|
version: '0'
|
178
181
|
requirements: []
|
179
|
-
rubygems_version: 3.
|
180
|
-
signing_key:
|
182
|
+
rubygems_version: 3.1.6
|
183
|
+
signing_key:
|
181
184
|
specification_version: 4
|
182
185
|
summary: Client gem for the MobilizeAmerica API
|
183
186
|
test_files: []
|