offline 0.0.7 → 0.0.8

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: 9c825cc1adf35338485696ea6a5ec41acebeacd6
4
- data.tar.gz: 125ca92bccab8d2775519ad4409b09bd25f08d17
3
+ metadata.gz: 6fa01a786e6e82d07341184c96fefc1ddef467c2
4
+ data.tar.gz: c9021f527ba0272b69a8036aaa1839be74b00480
5
5
  SHA512:
6
- metadata.gz: 0a1c0e337a2b49acbd05667d4791c06b7d10917fd28b2d7bb87665db59de6c4e07886ea45ce2f9f52615b08d733909a1a40462599010b29f16874af64e955d66
7
- data.tar.gz: 4b41225dec2af4d58f41fdbda12bdb7b3c01e86f1b8389a808d411c5b2211c0f328fac18b9fbb4d6f65f90e91fb9b909a8047958f8f4cb0987ea85278fdfedc5
6
+ metadata.gz: 403cc51c6b175c1d20d2cb81dcaa0cbf371c77574479d5c49427b577c0101666e1897da4550755cdfcf0b3d80f01412aa398e6fce2eafeb989b4edb8e6155f56
7
+ data.tar.gz: e29667c56efdec4d700df63261f9af9e97a80bb300ac7c2b30937e253ced84ee80117d3e2d9b084b367f6f13473eb5769a0c0f41c5f99cf35826afd273a5aad5
data/.gitignore CHANGED
@@ -3,3 +3,4 @@
3
3
  Gemfile.lock
4
4
  pkg/*
5
5
  mirror
6
+ coverage
data/Gemfile CHANGED
@@ -1,6 +1,3 @@
1
- # A sample Gemfile
2
- source "http://rubygems.org"
3
-
4
- # gem "rails"
1
+ source "https://rubygems.org"
5
2
 
6
3
  gemspec
data/README.md CHANGED
@@ -1,4 +1,10 @@
1
1
  # Offline
2
+ [![Gem Version](https://badge.fury.io/rb/offline.png)](https://rubygems.org/gems/offline)
3
+ [![Build Status](https://travis-ci.org/vertis/offline.png?branch=master)](https://travis-ci.org/vertis/offline)
4
+ [![Dependency Status](https://gemnasium.com/vertis/offline.png?travis)](https://gemnasium.com/vertis/offline)
5
+ [![Code Climate](https://codeclimate.com/github/vertis/offline.png)](https://codeclimate.com/github/vertis/offline)
6
+ [![Coverage Status](https://coveralls.io/repos/vertis/offline/badge.png?branch=master)](https://coveralls.io/r/vertis/offline)
7
+
2
8
 
3
9
  Offline is an open source command line tool for mirroring & cloning github projects.
4
10
 
@@ -8,6 +8,7 @@ require 'httparty'
8
8
  require 'offline/helpers'
9
9
  require 'offline/app'
10
10
  require 'offline/github'
11
+ require 'offline/version'
11
12
 
12
13
  module Offline
13
14
  end
@@ -11,8 +11,8 @@ module Offline
11
11
  if pass
12
12
  self.class.basic_auth user, pass
13
13
  response = self.class.get("/user")
14
- if response.code==401
15
- raise Exception.new({"error"=>"not authorized"})
14
+ if response.code >= 400 && response.code < 500
15
+ raise Exception.new({ "code" => response.code, "error" => response.parsed_response["message"] })
16
16
  end
17
17
  end
18
18
  end
@@ -1,3 +1,3 @@
1
1
  module Offline
2
- VERSION = '0.0.7'
2
+ VERSION = '0.0.8'
3
3
  end
@@ -20,6 +20,7 @@ Gem::Specification.new do |s|
20
20
 
21
21
  s.add_development_dependency('rake')
22
22
  s.add_development_dependency('rspec')
23
+ s.add_development_dependency('coveralls')
23
24
 
24
25
  s.files = `git ls-files`.split("\n")
25
26
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
@@ -7,7 +7,7 @@ describe Offline::Github do
7
7
 
8
8
  context "authenticated user" do
9
9
  it "should fail if I give the wrong password" do
10
- expect { Offline::Github.new('vertis', 'password') }.to raise_error
10
+ expect { Offline::Github.new("notarealaccount#{rand(9999)}", 'password') }.to raise_error
11
11
  end
12
12
 
13
13
  unless ENV['TRAVIS']
@@ -1,5 +1,9 @@
1
+ require 'coveralls'
2
+ Coveralls.wear!
3
+
1
4
  $:.push File.expand_path("../lib", __FILE__)
2
5
  require "offline"
3
6
 
7
+
4
8
  RSpec.configure do |config|
5
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: offline
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luke Chadwick
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-29 00:00:00.000000000 Z
11
+ date: 2014-01-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - '>='
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: coveralls
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
69
83
  description: Tools for working with github
70
84
  email:
71
85
  - me@vertis.io