octopolo 1.4.0 → 1.5.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: a4bcb4049924fd9baffda4bd06d42effabbe247a
4
- data.tar.gz: a1c8a5438d4ea4bec64f5f452af13da939ee1aff
3
+ metadata.gz: 0cde0a4142059cc9f1fe442b113e56f5dc379bcb
4
+ data.tar.gz: 2873020336f920929c1e802fde64ff8cd491a3f8
5
5
  SHA512:
6
- metadata.gz: 950c567a168527dc9f3424667510896ac39b0798bc622035be698e350ca78092bc47f14dbf97461074951ead90733cf273aa55aa3496d08cb1023231c745bc7f
7
- data.tar.gz: 36e758529e0cd35400ba538044cbed8a428e76be589dd75332c698d33dedaa45b4264ecd63ee160db26e384a1901d3c0837cf8ef5f83d506415b0e64c31f8920
6
+ metadata.gz: 32e1de6b5f8ab37c2c7f3eb5c04cce1ce52034b5be8dfca4dac26535457f6540ca0ab621bfb2609596b95fdfd82370839b58c3f6f589d1ab1b1b06357b9f7fe5
7
+ data.tar.gz: 392d484fc5923145a640fc35f18a131b275209d46ff9953a3438e14e90e3242ca11870eb91ede051947280369c46eee2a678ee4f973dd7f77af26a0ca67dd362
data/.soyuz.yml CHANGED
@@ -1,7 +1,7 @@
1
1
  defaults:
2
2
  deploy_cmd: gem push *.gem
3
3
  before_deploy_cmds:
4
- - /usr/local/bin/op tag-release
4
+ #- /usr/local/bin/op tag-release
5
5
  - sed -i "" -e "s/\".*/\"$(git tag | sed s/v// | sort -n -t. -k1,1 -k2,2 -k3,3 | tail -1)\"/" lib/octopolo/version.rb
6
6
  - git add lib/octopolo/version.rb
7
7
  - git commit -m "Version Bump" && git push
@@ -8,3 +8,5 @@ rvm:
8
8
  - 2.1
9
9
  - 2.2
10
10
  script: bundle exec rspec
11
+ before_install:
12
+ - gem uninstall bundler && gem install bundler
@@ -1,3 +1,8 @@
1
+ #### v1.5.0
2
+ * Github team_member? method
3
+
4
+ > Lance Holsten: Unknown User: https://github.com/sportngin/octopolo/pull/113
5
+
1
6
  #### v1.4.0
2
7
  * Check PR status before marking deployable/accept-pull
3
8
 
@@ -121,6 +121,9 @@ module Octopolo
121
121
  client.status *args
122
122
  end
123
123
 
124
+ def self.team_member? team
125
+ client.team_member? team, user_config.github_user
126
+ end
124
127
 
125
128
  # now that you've set up your credentials, try again
126
129
  TryAgain = Class.new(StandardError)
@@ -1,3 +1,3 @@
1
1
  module Octopolo
2
- VERSION = "1.4.0"
2
+ VERSION = "1.5.0"
3
3
  end
@@ -179,6 +179,28 @@ module Octopolo
179
179
  end
180
180
  end
181
181
  end
182
+
183
+ context ".team_member? team" do
184
+ let(:valid_team) { 2396228 }
185
+ let(:invalid_team) { 2396227 }
186
+ let(:user_config) { stub(:user_config, github_user: "foo", github_token: "bar") }
187
+
188
+ before { GitHub.stub(user_config: user_config) }
189
+
190
+ context "when valid team member" do
191
+ it "returns true" do
192
+ client.should_receive(:team_member?).with(valid_team, user_config.github_user) { true }
193
+ GitHub.team_member?(valid_team).should == true
194
+ end
195
+ end
196
+
197
+ context "when not a valid team member" do
198
+ it "returns false" do
199
+ client.should_receive(:team_member?).with(invalid_team, user_config.github_user) { false }
200
+ GitHub.team_member?(invalid_team).should == false
201
+ end
202
+ end
203
+ end
182
204
  end
183
205
  end
184
206
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: octopolo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrick Byrne
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-11-17 00:00:00.000000000 Z
13
+ date: 2017-08-01 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: gli