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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 383e449ceb64e632142bf10943e49891d2260b4e
4
- data.tar.gz: ca9283fadc1bacfde9c6530914c17cd3a2ab4e13
3
+ metadata.gz: 24634b85e2716a65df646022e9eb32511084a046
4
+ data.tar.gz: bb71c0c0ceb0b866c67511ba8d7c891ed5ee0abc
5
5
  SHA512:
6
- metadata.gz: 76bcf93f543f721cb0b9f516d2ba4d0467b185398086c3f5ed3de71e8d5b1241ec9fa995e058c468a750c5dba6cdd82e804c6485f139e3f8f9eb2e1645bef159
7
- data.tar.gz: b99a92e7ef02f1fc033383a1f7f799809cba8d8165bb1b8afba6aa7f5d00fbb0c8fbea10e10857d469e3385e437f449d6c7a93916ec7dcfc8f5b8e5eb6e3269c
6
+ metadata.gz: afd95fd8be042cb7407a8c363391c40a8e73f5a0876d4a7c005528583783a53f8ff658c291c2878d30f375d12eb3db4bb03b08ad5dec3dbc53837af21caece5c
7
+ data.tar.gz: 3dd1c0f5432ff14f8c2b9399c2d986ae7918d18ab52c07b2d0647858b1145997224d13fa63116d3ba9466b1f6234b8f4a2e29ab71f99de5a7c9057a57ae71a25
data/Gemfile CHANGED
@@ -3,4 +3,5 @@ source 'https://rubygems.org'
3
3
  # Specify your gem's dependencies in headquarters.gemspec
4
4
  gemspec
5
5
 
6
+ gem 'dotenv'
6
7
  gem 'pry'
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/groupbuddies/headquarters-ruby)
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/groupbuddies/headquarters)
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: 'groupbuddies/headquarters-ruby'
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('mpalhas@groupbuddies.com')
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: hq@groupbuddies.com, app_name: test` will become `hq+test@groupbuddies.com`. This is useful for filtering and labeling.
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: 'mpalhas@groupbuddies.com,zamith@groupbuddies.com', subject: 'custom subject', body: '<b>HTML body</b>', app_name: 'hq')
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:
@@ -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 = ['mpalhas@groupbuddies.com', 'zamith@groupbuddies.com']
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/groupbuddies/headquarters-ruby'
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
@@ -9,7 +9,7 @@ if defined? ::Rails::Railtie
9
9
  end
10
10
 
11
11
  module Headquarters
12
- API_BASE = 'https://hq.groupbuddies.com'
12
+ API_BASE = 'https://hq.subvisual.co'
13
13
  ROOT_PATH = File.dirname(__FILE__)
14
14
 
15
15
  @api_base = API_BASE
@@ -2,7 +2,7 @@ module Headquarters
2
2
  class API
3
3
  module Endpoints
4
4
  MEMBERS = '/members'
5
- PROJECTS = '/projects'
5
+ ME = '/members/me'
6
6
  EMAIL = '/emails'
7
7
  OAUTH_TOKEN = '/oauth/token'
8
8
 
@@ -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'
@@ -4,6 +4,10 @@ module Headquarters
4
4
  get Endpoints::MEMBERS
5
5
  end
6
6
 
7
+ def me
8
+ get Endpoints::ME
9
+ end
10
+
7
11
  def search(query)
8
12
  get Endpoints::MEMBERS, query: { q: query }
9
13
  end
@@ -1,3 +1,3 @@
1
1
  module Headquarters
2
- VERSION = '0.3.1'
2
+ VERSION = '0.4.0'
3
3
  end
@@ -1,3 +1,8 @@
1
+ if ENV['CI']
2
+ require 'codeclimate-test-reporter'
3
+ CodeClimate::TestReporter.start
4
+ end
5
+
1
6
  require 'headquarters'
2
7
  require 'climate_control'
3
8
 
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.3.1
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-04-29 00:00:00.000000000 Z
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
- - mpalhas@groupbuddies.com
101
- - zamith@groupbuddies.com
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/groupbuddies/headquarters-ruby
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.6
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
@@ -1,7 +0,0 @@
1
- module Headquarters
2
- class Client::Projects < API
3
- def all
4
- get Endpoints::PROJECTS
5
- end
6
- end
7
- end