headquarters 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -0
- data/README.md +7 -20
- data/headquarters.gemspec +3 -2
- data/lib/headquarters.rb +1 -1
- data/lib/headquarters/api/endpoints.rb +1 -1
- data/lib/headquarters/client.rb +0 -2
- data/lib/headquarters/client/members.rb +4 -0
- data/lib/headquarters/version.rb +1 -1
- data/spec/spec_helper.rb +5 -0
- metadata +20 -7
- data/lib/headquarters/client/projects.rb +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 24634b85e2716a65df646022e9eb32511084a046
|
4
|
+
data.tar.gz: bb71c0c0ceb0b866c67511ba8d7c891ed5ee0abc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: afd95fd8be042cb7407a8c363391c40a8e73f5a0876d4a7c005528583783a53f8ff658c291c2878d30f375d12eb3db4bb03b08ad5dec3dbc53837af21caece5c
|
7
|
+
data.tar.gz: 3dd1c0f5432ff14f8c2b9399c2d986ae7918d18ab52c07b2d0647858b1145997224d13fa63116d3ba9466b1f6234b8f4a2e29ab71f99de5a7c9057a57ae71a25
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
# Headquarters
|
2
2
|
|
3
|
-
[![Build Status](https://semaphoreapp.com/api/v1/projects/2a53d14e-b72c-4047-bd1d-1193498cf8fe/311022/shields_badge.svg)](https://semaphoreapp.com/
|
3
|
+
[![Build Status](https://semaphoreapp.com/api/v1/projects/2a53d14e-b72c-4047-bd1d-1193498cf8fe/311022/shields_badge.svg)](https://semaphoreapp.com/subvisual/headquarters-ruby)
|
4
|
+
[![Test Coverage](https://codeclimate.com/github/subvisual/headquarters-ruby/badges/coverage.svg)](https://codeclimate.com/github/subvisual/headquarters-ruby/coverage)
|
4
5
|
|
5
|
-
Ruby wrapper for the [headquarters API](https://github.com/
|
6
|
+
Ruby wrapper for the [headquarters API](https://github.com/subvisual/headquarters)
|
6
7
|
|
7
8
|
## Installation
|
8
9
|
|
@@ -15,7 +16,7 @@ gem 'headquarters'
|
|
15
16
|
Or if you want the edge version:
|
16
17
|
|
17
18
|
```ruby
|
18
|
-
gem 'headquarters', github: '
|
19
|
+
gem 'headquarters', github: 'subvisual/headquarters-ruby'
|
19
20
|
```
|
20
21
|
|
21
22
|
And then execute:
|
@@ -78,24 +79,10 @@ client.members.all
|
|
78
79
|
Or you can search for a specific query
|
79
80
|
|
80
81
|
```ruby
|
81
|
-
client.members.search('
|
82
|
+
client.members.search('miguel@subvisual.co')
|
82
83
|
client.members.search('Miguel')
|
83
84
|
```
|
84
85
|
|
85
|
-
### Projects
|
86
|
-
|
87
|
-
To retrieve a collection of all projects of the team you can use the `all` operation:
|
88
|
-
|
89
|
-
```ruby
|
90
|
-
client.projects.all
|
91
|
-
```
|
92
|
-
|
93
|
-
Or you can search for a specific query
|
94
|
-
|
95
|
-
```ruby
|
96
|
-
client.projects.search('headquarters')
|
97
|
-
```
|
98
|
-
|
99
86
|
### Github
|
100
87
|
|
101
88
|
Within the `github` namespace, you can use the `pull_requests` method to get a list of all open Pull Requests in the Group Buddies organization:
|
@@ -116,10 +103,10 @@ client.github.pull_requests(query: 'is:open')
|
|
116
103
|
|
117
104
|
You can send emails for Group Buddies addresses (Any non-GB addresses will be filtered out).
|
118
105
|
|
119
|
-
`app_name` can be set to be appended to the sender. i.e. `from:
|
106
|
+
`app_name` can be set to be appended to the sender. i.e. `from: contact@subvisual.co, app_name: test` will become `contact+test@subvisual.co`. This is useful for filtering and labeling.
|
120
107
|
|
121
108
|
```ruby
|
122
|
-
client.email.deliver(to: '
|
109
|
+
client.email.deliver(to: 'miguel@subvisual.co,zamith@subvisual.co', subject: 'custom subject', body: '<b>HTML body</b>', app_name: 'hq')
|
123
110
|
```
|
124
111
|
|
125
112
|
When using rails you can use headquarters as the delivery method, and transparently send emails using ActiveMailer as usual:
|
data/headquarters.gemspec
CHANGED
@@ -7,10 +7,10 @@ Gem::Specification.new do |spec|
|
|
7
7
|
spec.name = 'headquarters'
|
8
8
|
spec.version = Headquarters::VERSION
|
9
9
|
spec.authors = ['Miguel Palhas', 'Luís Ferreira']
|
10
|
-
spec.email = ['
|
10
|
+
spec.email = ['miguel@subvisual.co', 'zamith@subvisual.co']
|
11
11
|
spec.summary = %q{Ruby wrapper for the headquarters API for Group Buddies}
|
12
12
|
spec.description = %q{Ruby wrapper for the headquarters API for Group Buddies}
|
13
|
-
spec.homepage = 'https://github.com/
|
13
|
+
spec.homepage = 'https://github.com/subvisual/headquarters-ruby'
|
14
14
|
spec.license = 'MIT'
|
15
15
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0")
|
@@ -25,4 +25,5 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.add_development_dependency 'rubocop', '~> 0.27.1'
|
26
26
|
spec.add_development_dependency 'rspec', '~> 3.1.0'
|
27
27
|
spec.add_development_dependency 'webmock', '~> 1.20.4'
|
28
|
+
spec.add_development_dependency 'codeclimate-test-reporter', '~> 0.4.8'
|
28
29
|
end
|
data/lib/headquarters.rb
CHANGED
data/lib/headquarters/client.rb
CHANGED
@@ -3,13 +3,11 @@ require 'headquarters/api'
|
|
3
3
|
module Headquarters
|
4
4
|
class Client < API
|
5
5
|
namespace :members
|
6
|
-
namespace :projects
|
7
6
|
namespace :email
|
8
7
|
namespace :github
|
9
8
|
end
|
10
9
|
end
|
11
10
|
|
12
11
|
require 'headquarters/client/members'
|
13
|
-
require 'headquarters/client/projects'
|
14
12
|
require 'headquarters/client/email'
|
15
13
|
require 'headquarters/client/github'
|
data/lib/headquarters/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: headquarters
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Palhas
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-10-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|
@@ -95,10 +95,24 @@ dependencies:
|
|
95
95
|
- - "~>"
|
96
96
|
- !ruby/object:Gem::Version
|
97
97
|
version: 1.20.4
|
98
|
+
- !ruby/object:Gem::Dependency
|
99
|
+
name: codeclimate-test-reporter
|
100
|
+
requirement: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - "~>"
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: 0.4.8
|
105
|
+
type: :development
|
106
|
+
prerelease: false
|
107
|
+
version_requirements: !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- - "~>"
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: 0.4.8
|
98
112
|
description: Ruby wrapper for the headquarters API for Group Buddies
|
99
113
|
email:
|
100
|
-
-
|
101
|
-
- zamith@
|
114
|
+
- miguel@subvisual.co
|
115
|
+
- zamith@subvisual.co
|
102
116
|
executables: []
|
103
117
|
extensions: []
|
104
118
|
extra_rdoc_files: []
|
@@ -119,7 +133,6 @@ files:
|
|
119
133
|
- lib/headquarters/client/email.rb
|
120
134
|
- lib/headquarters/client/github.rb
|
121
135
|
- lib/headquarters/client/members.rb
|
122
|
-
- lib/headquarters/client/projects.rb
|
123
136
|
- lib/headquarters/rails_delivery_method.rb
|
124
137
|
- lib/headquarters/railtie.rb
|
125
138
|
- lib/headquarters/request.rb
|
@@ -135,7 +148,7 @@ files:
|
|
135
148
|
- spec/headquarters_spec.rb
|
136
149
|
- spec/shared_examples/an_http_requester.rb
|
137
150
|
- spec/spec_helper.rb
|
138
|
-
homepage: https://github.com/
|
151
|
+
homepage: https://github.com/subvisual/headquarters-ruby
|
139
152
|
licenses:
|
140
153
|
- MIT
|
141
154
|
metadata: {}
|
@@ -155,7 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
155
168
|
version: '0'
|
156
169
|
requirements: []
|
157
170
|
rubyforge_project:
|
158
|
-
rubygems_version: 2.4.
|
171
|
+
rubygems_version: 2.4.8
|
159
172
|
signing_key:
|
160
173
|
specification_version: 4
|
161
174
|
summary: Ruby wrapper for the headquarters API for Group Buddies
|