taskmapper-github 0.12.0 → 0.12.1

This diff has not been reviewed by any users.
Sign up to get free protection for your applications and to get access to all the features.
@@ -12,22 +12,22 @@ GEM
12
12
  multi_json (~> 1.0)
13
13
  addressable (2.3.4)
14
14
  builder (3.0.4)
15
- diff-lcs (1.2.3)
15
+ diff-lcs (1.2.4)
16
16
  fakeweb (1.3.0)
17
17
  faraday (0.8.7)
18
18
  multipart-post (~> 1.1)
19
19
  faraday_middleware (0.9.0)
20
20
  faraday (>= 0.7.4, < 0.9)
21
21
  git (1.2.5)
22
- hashie (2.0.3)
22
+ hashie (2.0.5)
23
23
  i18n (0.6.1)
24
24
  jeweler (1.8.4)
25
25
  bundler (~> 1.0)
26
26
  git (>= 1.2.5)
27
27
  rake
28
28
  rdoc
29
- json (1.7.7)
30
- multi_json (1.7.2)
29
+ json (1.8.0)
30
+ multi_json (1.7.3)
31
31
  multipart-post (1.2.0)
32
32
  netrc (0.7.7)
33
33
  octokit (1.24.0)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.12.0
1
+ 0.12.1
@@ -23,7 +23,7 @@ module TaskMapper::Provider
23
23
  # declare needed overloaded methods here
24
24
  def authorize(auth = {})
25
25
  @authentication ||= TaskMapper::Authenticator.new(auth)
26
- auth[:login] = auth[:login] || auth[:username]
26
+ auth[:login] = auth.fetch(:login) || auth.fetch(:username)
27
27
  raise TaskMapper::Exception.new('Please provide at least a username') if auth[:login].blank?
28
28
  provider.login = auth[:login]
29
29
  provider.user_token = auth[:password] || auth[:token]
@@ -1,25 +1,17 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
2
 
3
- describe "TaskMapper::Provider::Github" do
3
+ describe "TaskMapper::Provider::tm" do
4
+ let(:tm) { TaskMapper.new(:github, :login => 'cored') }
5
+ subject { tm }
4
6
 
5
- before(:each) do
6
- @github = TaskMapper.new(:github, :login => 'cored')
7
+ context "when calling #valid? with valid credentials" do
8
+ before { tm.should_receive(:valid?).and_return(true) }
9
+ its(:valid?) { should be_true }
7
10
  end
8
11
 
9
- it "should be able to instantiate a new instance" do
10
- @github.should be_an_instance_of(TaskMapper)
11
- @github.should be_a_kind_of(TaskMapper::Provider::Github)
12
+ context "should return false when the user provides wrong credentials" do
13
+ before { tm.should_receive(:valid?).and_return(false) }
14
+ its(:valid?) { should be_false }
12
15
  end
13
16
 
14
- context 'when calling #valid?' do
15
- it 'should test #authenticated' do
16
- TaskMapper::Provider::Github.api.should_receive(:authenticated?).and_return true
17
- @github.valid?.should be_true
18
- end
19
-
20
- it 'should return false when the user provides wrong credentials' do
21
- TaskMapper::Provider::Github.api.should_receive(:authenticated?).and_return false
22
- @github.valid?.should_not be_true
23
- end
24
- end
25
17
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "taskmapper-github"
8
- s.version = "0.12.0"
8
+ s.version = "0.12.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["HybridGroup"]
12
- s.date = "2013-04-16"
12
+ s.date = "2013-05-23"
13
13
  s.description = "This provides an interface with github through the taskmapper gem."
14
14
  s.email = "hong.quach@abigfisch.com"
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: taskmapper-github
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.12.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-16 00:00:00.000000000 Z
12
+ date: 2013-05-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: taskmapper
@@ -182,7 +182,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
182
182
  version: '0'
183
183
  segments:
184
184
  - 0
185
- hash: 2080729090732993022
185
+ hash: -4044662299466977532
186
186
  required_rubygems_version: !ruby/object:Gem::Requirement
187
187
  none: false
188
188
  requirements: