Skip to content

Commit

Permalink
Fix #88: URI parsing issue when using API endpoints from the gitconfig
Browse files Browse the repository at this point in the history
Closes #90, #88

LGTM given by: @nhance

Squashed commit of the following:

commit fe72200
Author: Valentino <[email protected]>
Date:   Mon Mar 16 12:11:15 2015 -0400

    Remove ruby version from Gemfile

commit 75a88c6
Author: Valentino <[email protected]>
Date:   Mon Mar 16 12:06:44 2015 -0400

    Fix URI parsing issue when using API endpoints from the gitconfig

commit afeae6c
Author: Valentino <[email protected]>
Date:   Mon Mar 16 10:46:40 2015 -0400

    Added multi-depency to tests
  • Loading branch information
Valentino committed Mar 16, 2015
1 parent ab24a43 commit 7bc9b7f
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 24 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
pkg/*
**/.DS_Store
.rspec
gemfiles
12 changes: 12 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
appraise "latest-gli-release" do
gem "gli"
end

appraise "latest-github-api-release" do
gem "github_api"
end

appraise "current-reflow-locked-versions" do
gem "gli", "2.12.2"
gem "github_api", "0.12.3"
end
2 changes: 0 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
source 'https://rubygems.org'

ruby "2.1.5"

gemspec
42 changes: 24 additions & 18 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,18 @@ PATH
GEM
remote: https://rubygems.org/
specs:
addressable (2.3.5)
addressable (2.3.7)
appraisal (1.0.3)
bundler
rake
thor (>= 0.14.0)
byebug (3.5.1)
columnize (~> 0.8)
debugger-linecache (~> 1.2)
slop (~> 3.6)
coderay (1.1.0)
colorize (0.6.0)
columnize (0.8.9)
columnize (0.9.0)
crack (0.4.2)
safe_yaml (~> 1.0.0)
debugger-linecache (1.2.0)
Expand All @@ -38,14 +42,13 @@ GEM
oauth2
gli (2.12.2)
hashie (3.4.0)
highline (1.6.21)
highline (1.7.1)
httpclient (2.6.0.1)
json (1.7.5)
json_pure (1.8.2)
jwt (1.2.1)
jwt (1.4.1)
method_source (0.8.2)
mini_portile (0.6.2)
multi_json (1.10.1)
multi_json (1.11.0)
multi_xml (0.5.5)
multipart-post (2.0.0)
nokogiri (1.6.6.2)
Expand All @@ -60,40 +63,43 @@ GEM
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
pry-byebug (2.0.0)
pry-byebug (3.0.1)
byebug (~> 3.4)
pry (~> 0.10)
rack (1.6.0)
rake (0.9.2.2)
rdoc (3.12)
json (~> 1.4)
rake (10.4.2)
rdoc (4.2.0)
rspec (3.0.0)
rspec-core (~> 3.0.0)
rspec-expectations (~> 3.0.0)
rspec-mocks (~> 3.0.0)
rspec-core (3.0.3)
rspec-core (3.0.4)
rspec-support (~> 3.0.0)
rspec-expectations (3.0.3)
rspec-expectations (3.0.4)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.0.0)
rspec-mocks (3.0.3)
rspec-mocks (3.0.4)
rspec-support (~> 3.0.0)
rspec-support (3.0.3)
safe_yaml (1.0.1)
rspec-support (3.0.4)
safe_yaml (1.0.4)
slop (3.6.0)
thread_safe (0.3.4)
webmock (1.17.4)
addressable (>= 2.2.7)
thor (0.19.1)
thread_safe (0.3.5)
webmock (1.20.4)
addressable (>= 2.3.6)
crack (>= 0.3.2)
wwtd (0.7.0)

PLATFORMS
ruby

DEPENDENCIES
appraisal (= 1.0.3)
bundler
git_reflow!
pry-byebug
rake
rdoc
rspec (~> 3.0.0)
webmock
wwtd (= 0.7.0)
5 changes: 3 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#!/usr/bin/env rake
require 'rake'
require 'bundler/gem_tasks'
require 'bundler/setup'
require 'rspec/core/rake_task'

Dir[File.join(File.dirname(__FILE__),'lib/tasks/*.rake')].each { |f| load f }

RSpec::Core::RakeTask.new(:spec)

task :default => [:spec]
11 changes: 11 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
dependencies:
override:
- 'rvm-exec 2.0.0-p643 bundle install'
- 'rvm-exec 2.1.5 bundle install'
- 'rvm-exec 2.2.1 bundle install'

test:
override:
- 'rvm-exec 2.0.0-p643 bundle exec rake'
- 'rvm-exec 2.1.5 bundle exec rake'
- 'rvm-exec 2.2.1 bundle exec rake'
2 changes: 2 additions & 0 deletions git_reflow.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@ spec = Gem::Specification.new do |s|
s.require_paths << 'lib'
s.rdoc_options << '--title' << 'git_reflow' << '--main' << 'README.rdoc' << '-ri'

s.add_development_dependency('appraisal', '1.0.3')
s.add_development_dependency('bundler')
s.add_development_dependency('pry-byebug')
s.add_development_dependency('rake')
s.add_development_dependency('rdoc')
s.add_development_dependency('rspec', '~> 3.0.0')
s.add_development_dependency('webmock')
s.add_development_dependency('wwtd', '0.7.0')

s.add_dependency('colorize', '0.6.0')
s.add_dependency('gli', '2.12.2')
Expand Down
4 changes: 2 additions & 2 deletions lib/git_reflow/git_server/git_hub.rb
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def self.oauth_token=(oauth_token)
end

def self.api_endpoint
endpoint = GitReflow::Config.get('github.endpoint')
endpoint = "#{GitReflow::Config.get('github.endpoint')}".strip
(endpoint.length > 0) ? endpoint : ::Github.endpoint
end

Expand All @@ -131,7 +131,7 @@ def self.api_endpoint=(api_endpoint)
end

def self.site_url
site_url = GitReflow::Config.get('github.site')
site_url = "#{GitReflow::Config.get('github.site')}".strip
(site_url.length > 0) ? site_url : ::Github.site
end

Expand Down

0 comments on commit 7bc9b7f

Please sign in to comment.