mush 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.travis.yml +4 -0
- data/Gemfile +9 -5
- data/Gemfile.lock +60 -10
- data/README.md +9 -9
- data/Rakefile +15 -28
- data/VERSION +1 -1
- data/bin/bitly +0 -0
- data/bin/isgd +0 -0
- data/bin/mush +0 -0
- data/bin/owly +0 -0
- data/bin/shorten +0 -0
- data/mush.gemspec +30 -31
- data/test/helper.rb +4 -8
- data/test/test_mush.rb +53 -61
- metadata +116 -134
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 99555f67ace862b592bbd9fcec7c4d71cc7a895f
|
4
|
+
data.tar.gz: 5a478d3e69baeb2722599d198ae457235d62e678
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: c58d7657871d0fa2bc573927568be7487d67885d4e21b7ba6b19a858b6be01ab8f8cc85ae3fb920239e31c7a6308bba368fa272ab2401f82ce4cb3b756a39fe2
|
7
|
+
data.tar.gz: 0bf457908098139535358be7eabfa0fb851013ee86a833b57ef209376f061cb1cde44a7781365dfd9f1e41ce33572be4adb06a8a3235833859bcd7d0643dda07
|
data/.travis.yml
ADDED
data/Gemfile
CHANGED
@@ -1,8 +1,12 @@
|
|
1
|
-
source "
|
1
|
+
source "https://rubygems.org"
|
2
2
|
|
3
|
-
gem "httparty", "0.6.1"
|
3
|
+
gem "httparty", ">= 0.6.1"
|
4
4
|
|
5
5
|
group :development do
|
6
|
-
|
7
|
-
|
8
|
-
|
6
|
+
gem "bump"
|
7
|
+
gem "mocha"
|
8
|
+
gem "minitest"
|
9
|
+
gem "minitest-colorize"
|
10
|
+
gem "jeweler"
|
11
|
+
gem "rcov", :platform => :ruby_18
|
12
|
+
end
|
data/Gemfile.lock
CHANGED
@@ -1,18 +1,68 @@
|
|
1
1
|
GEM
|
2
|
-
remote:
|
2
|
+
remote: https://rubygems.org/
|
3
3
|
specs:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
4
|
+
addressable (2.3.5)
|
5
|
+
builder (3.2.2)
|
6
|
+
bump (0.4.2)
|
7
|
+
faraday (0.8.8)
|
8
|
+
multipart-post (~> 1.2.0)
|
9
|
+
git (1.2.6)
|
10
|
+
github_api (0.10.1)
|
11
|
+
addressable
|
12
|
+
faraday (~> 0.8.1)
|
13
|
+
hashie (>= 1.2)
|
14
|
+
multi_json (~> 1.4)
|
15
|
+
nokogiri (~> 1.5.2)
|
16
|
+
oauth2
|
17
|
+
hashie (2.0.5)
|
18
|
+
highline (1.6.19)
|
19
|
+
httparty (0.11.0)
|
20
|
+
multi_json (~> 1.0)
|
21
|
+
multi_xml (>= 0.5.2)
|
22
|
+
httpauth (0.2.0)
|
23
|
+
jeweler (1.8.7)
|
24
|
+
builder
|
25
|
+
bundler (~> 1.0)
|
26
|
+
git (>= 1.2.5)
|
27
|
+
github_api (= 0.10.1)
|
28
|
+
highline (>= 1.6.15)
|
29
|
+
nokogiri (= 1.5.10)
|
8
30
|
rake
|
9
|
-
|
10
|
-
|
31
|
+
rdoc
|
32
|
+
json (1.8.0)
|
33
|
+
jwt (0.1.8)
|
34
|
+
multi_json (>= 1.5)
|
35
|
+
metaclass (0.0.1)
|
36
|
+
minitest (4.7.5)
|
37
|
+
minitest-colorize (0.0.5)
|
38
|
+
minitest (>= 2.0)
|
39
|
+
mocha (0.14.0)
|
40
|
+
metaclass (~> 0.0.1)
|
41
|
+
multi_json (1.8.0)
|
42
|
+
multi_xml (0.5.5)
|
43
|
+
multipart-post (1.2.0)
|
44
|
+
nokogiri (1.5.10)
|
45
|
+
oauth2 (0.9.2)
|
46
|
+
faraday (~> 0.8)
|
47
|
+
httpauth (~> 0.2)
|
48
|
+
jwt (~> 0.1.4)
|
49
|
+
multi_json (~> 1.0)
|
50
|
+
multi_xml (~> 0.5)
|
51
|
+
rack (~> 1.2)
|
52
|
+
rack (1.5.2)
|
53
|
+
rake (10.1.0)
|
54
|
+
rcov (1.0.0)
|
55
|
+
rdoc (4.0.1)
|
56
|
+
json (~> 1.4)
|
11
57
|
|
12
58
|
PLATFORMS
|
13
59
|
ruby
|
14
60
|
|
15
61
|
DEPENDENCIES
|
16
|
-
|
17
|
-
|
18
|
-
|
62
|
+
bump
|
63
|
+
httparty (>= 0.6.1)
|
64
|
+
jeweler
|
65
|
+
minitest
|
66
|
+
minitest-colorize
|
67
|
+
mocha
|
68
|
+
rcov
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
MUSh
|
1
|
+
MUSh [![Build Status](https://travis-ci.org/rafmagana/mush.png)](https://travis-ci.org/rafmagana/mush)
|
2
2
|
====
|
3
3
|
|
4
4
|
A multiple service URL shortener gem with command-line utilities
|
@@ -9,21 +9,21 @@ Installation
|
|
9
9
|
------------
|
10
10
|
|
11
11
|
MUSh depends on [HTTParty](https://github.com/jnunemaker/httparty "HTTParty")
|
12
|
-
|
12
|
+
|
13
13
|
sudo gem install httparty
|
14
14
|
sudo gem install mush
|
15
15
|
|
16
16
|
or
|
17
|
-
|
17
|
+
|
18
18
|
sudo gem install mush --include-dependencies
|
19
|
-
|
19
|
+
|
20
20
|
Supported services
|
21
21
|
------------------
|
22
22
|
|
23
23
|
* bit.ly
|
24
24
|
* is.gd
|
25
25
|
|
26
|
-
and thanks to [Noel Dellofano](https://github.com/pinkvelociraptor
|
26
|
+
and thanks to [Noel Dellofano](https://github.com/pinkvelociraptor) from [ZenDesk](http://www.zendesk.com/)
|
27
27
|
|
28
28
|
* ow.ly
|
29
29
|
* custom service
|
@@ -46,7 +46,7 @@ Sorry, but at this moment, if you want to use the <code>bitly</code> or <code>ow
|
|
46
46
|
Add the following alias to your ~/.bash_profile or ~/.bashrc
|
47
47
|
|
48
48
|
alias bitly='bitly -l your_login -k your_apikey'
|
49
|
-
|
49
|
+
|
50
50
|
alias owly='owly -k your_apikey'
|
51
51
|
|
52
52
|
then use it this way (you won't need the -u)
|
@@ -74,7 +74,7 @@ Usage as a Gem
|
|
74
74
|
custom = Mush::Services::Custom.new
|
75
75
|
custom.set_service = "http://chop.ws/index.php?api=1&return_url_text=1&longUrl={{url}}"
|
76
76
|
custom.shorten 'foo.raflabs.com'
|
77
|
-
|
77
|
+
|
78
78
|
ToDo
|
79
79
|
----
|
80
80
|
|
@@ -85,7 +85,7 @@ ToDo
|
|
85
85
|
|
86
86
|
Note on Patches/Pull Requests
|
87
87
|
-----------------------------
|
88
|
-
|
88
|
+
|
89
89
|
* Fork the project.
|
90
90
|
* Make your feature/service addition or bug fix.
|
91
91
|
* Add tests for it. This is important so I don't break it in a
|
@@ -97,4 +97,4 @@ Note on Patches/Pull Requests
|
|
97
97
|
Copyright
|
98
98
|
---------
|
99
99
|
|
100
|
-
Copyright (c) 2011 Rafael Magana. See LICENSE for details.
|
100
|
+
Copyright (c) 2011 Rafael Magana. See LICENSE for details.
|
data/Rakefile
CHANGED
@@ -1,28 +1,20 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
require '
|
3
|
-
require '
|
2
|
+
require 'bundler/setup'
|
3
|
+
require 'bump/tasks'
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
gem.authors = ["Rafael Magaña"]
|
14
|
-
gem.add_development_dependency "shoulda", ">= 2.11.3"
|
15
|
-
gem.add_development_dependency "mocha", ">= 0.9.8"
|
16
|
-
gem.add_runtime_dependency('httparty', [">= 0.6.1"])
|
17
|
-
end
|
18
|
-
Jeweler::GemcutterTasks.new
|
19
|
-
rescue LoadError
|
20
|
-
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
5
|
+
require 'jeweler'
|
6
|
+
Jeweler::Tasks.new do |gem|
|
7
|
+
gem.name = "mush"
|
8
|
+
gem.summary = %Q{A multiple service URL shortener gem with command-line utilities}
|
9
|
+
gem.description = %Q{A gem to shorten URLs using different services, it has one command-line utility for each supported service and one for custom shorteners called 'shorten'.}
|
10
|
+
gem.email = "raf.magana@gmail.com"
|
11
|
+
gem.homepage = "http://github.com/rafmagana/mush"
|
12
|
+
gem.authors = ["Rafael Magana"]
|
21
13
|
end
|
14
|
+
Jeweler::GemcutterTasks.new
|
22
15
|
|
23
16
|
require 'rake/testtask'
|
24
|
-
Rake::TestTask.new(:
|
25
|
-
test.libs << 'lib' << 'test'
|
17
|
+
Rake::TestTask.new(:default) do |test|
|
26
18
|
test.pattern = 'test/**/test_*.rb'
|
27
19
|
test.verbose = true
|
28
20
|
end
|
@@ -40,16 +32,11 @@ rescue LoadError
|
|
40
32
|
end
|
41
33
|
end
|
42
34
|
|
43
|
-
task
|
44
|
-
|
45
|
-
task :default => :test
|
46
|
-
|
47
|
-
require 'rake/rdoctask'
|
35
|
+
require 'rdoc/task'
|
48
36
|
Rake::RDocTask.new do |rdoc|
|
49
|
-
version = File.
|
50
|
-
|
37
|
+
version = File.read('VERSION')
|
51
38
|
rdoc.rdoc_dir = 'rdoc'
|
52
39
|
rdoc.title = "mush #{version}"
|
53
40
|
rdoc.rdoc_files.include('README*')
|
54
41
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
55
|
-
end
|
42
|
+
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.2
|
data/bin/bitly
CHANGED
File without changes
|
data/bin/isgd
CHANGED
File without changes
|
data/bin/mush
CHANGED
File without changes
|
data/bin/owly
CHANGED
File without changes
|
data/bin/shorten
CHANGED
File without changes
|
data/mush.gemspec
CHANGED
@@ -4,21 +4,22 @@
|
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
|
-
s.name =
|
8
|
-
s.version = "0.2.
|
7
|
+
s.name = "mush"
|
8
|
+
s.version = "0.2.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
-
s.authors = ["Rafael
|
12
|
-
s.date =
|
13
|
-
s.description =
|
14
|
-
s.email =
|
15
|
-
s.executables = ["
|
11
|
+
s.authors = ["Rafael Magana"]
|
12
|
+
s.date = "2013-09-13"
|
13
|
+
s.description = "A gem to shorten URLs using different services, it has one command-line utility for each supported service and one for custom shorteners called 'shorten'."
|
14
|
+
s.email = "raf.magana@gmail.com"
|
15
|
+
s.executables = ["bitly", "isgd", "mush", "owly", "shorten"]
|
16
16
|
s.extra_rdoc_files = [
|
17
17
|
"LICENSE",
|
18
18
|
"README.md"
|
19
19
|
]
|
20
20
|
s.files = [
|
21
21
|
".document",
|
22
|
+
".travis.yml",
|
22
23
|
"Gemfile",
|
23
24
|
"Gemfile.lock",
|
24
25
|
"LICENSE",
|
@@ -42,41 +43,39 @@ Gem::Specification.new do |s|
|
|
42
43
|
"test/helper.rb",
|
43
44
|
"test/test_mush.rb"
|
44
45
|
]
|
45
|
-
s.homepage =
|
46
|
+
s.homepage = "http://github.com/rafmagana/mush"
|
46
47
|
s.require_paths = ["lib"]
|
47
|
-
s.rubygems_version =
|
48
|
-
s.summary =
|
49
|
-
s.test_files = [
|
50
|
-
"test/helper.rb",
|
51
|
-
"test/test_mush.rb"
|
52
|
-
]
|
48
|
+
s.rubygems_version = "2.0.6"
|
49
|
+
s.summary = "A multiple service URL shortener gem with command-line utilities"
|
53
50
|
|
54
51
|
if s.respond_to? :specification_version then
|
55
|
-
|
56
|
-
s.specification_version = 3
|
52
|
+
s.specification_version = 4
|
57
53
|
|
58
54
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
59
|
-
s.add_runtime_dependency(%q<httparty>, ["= 0.6.1"])
|
60
|
-
s.add_development_dependency(%q<mocha>, ["= 0.9.8"])
|
61
|
-
s.add_development_dependency(%q<shoulda>, ["= 2.11.3"])
|
62
|
-
s.add_development_dependency(%q<shoulda>, [">= 2.11.3"])
|
63
|
-
s.add_development_dependency(%q<mocha>, [">= 0.9.8"])
|
64
55
|
s.add_runtime_dependency(%q<httparty>, [">= 0.6.1"])
|
56
|
+
s.add_development_dependency(%q<bump>, [">= 0"])
|
57
|
+
s.add_development_dependency(%q<mocha>, [">= 0"])
|
58
|
+
s.add_development_dependency(%q<minitest>, [">= 0"])
|
59
|
+
s.add_development_dependency(%q<minitest-colorize>, [">= 0"])
|
60
|
+
s.add_development_dependency(%q<jeweler>, [">= 0"])
|
61
|
+
s.add_development_dependency(%q<rcov>, [">= 0"])
|
65
62
|
else
|
66
|
-
s.add_dependency(%q<httparty>, ["= 0.6.1"])
|
67
|
-
s.add_dependency(%q<mocha>, ["= 0.9.8"])
|
68
|
-
s.add_dependency(%q<shoulda>, ["= 2.11.3"])
|
69
|
-
s.add_dependency(%q<shoulda>, [">= 2.11.3"])
|
70
|
-
s.add_dependency(%q<mocha>, [">= 0.9.8"])
|
71
63
|
s.add_dependency(%q<httparty>, [">= 0.6.1"])
|
64
|
+
s.add_dependency(%q<bump>, [">= 0"])
|
65
|
+
s.add_dependency(%q<mocha>, [">= 0"])
|
66
|
+
s.add_dependency(%q<minitest>, [">= 0"])
|
67
|
+
s.add_dependency(%q<minitest-colorize>, [">= 0"])
|
68
|
+
s.add_dependency(%q<jeweler>, [">= 0"])
|
69
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
72
70
|
end
|
73
71
|
else
|
74
|
-
s.add_dependency(%q<httparty>, ["= 0.6.1"])
|
75
|
-
s.add_dependency(%q<mocha>, ["= 0.9.8"])
|
76
|
-
s.add_dependency(%q<shoulda>, ["= 2.11.3"])
|
77
|
-
s.add_dependency(%q<shoulda>, [">= 2.11.3"])
|
78
|
-
s.add_dependency(%q<mocha>, [">= 0.9.8"])
|
79
72
|
s.add_dependency(%q<httparty>, [">= 0.6.1"])
|
73
|
+
s.add_dependency(%q<bump>, [">= 0"])
|
74
|
+
s.add_dependency(%q<mocha>, [">= 0"])
|
75
|
+
s.add_dependency(%q<minitest>, [">= 0"])
|
76
|
+
s.add_dependency(%q<minitest-colorize>, [">= 0"])
|
77
|
+
s.add_dependency(%q<jeweler>, [">= 0"])
|
78
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
80
79
|
end
|
81
80
|
end
|
82
81
|
|
data/test/helper.rb
CHANGED
@@ -1,11 +1,7 @@
|
|
1
|
-
require '
|
2
|
-
require '
|
3
|
-
require '
|
4
|
-
require '
|
1
|
+
require 'bundler/setup'
|
2
|
+
require 'minitest/autorun'
|
3
|
+
require 'minitest/colorize'
|
4
|
+
require 'mocha/setup'
|
5
5
|
|
6
6
|
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
7
|
-
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
8
7
|
require 'mush'
|
9
|
-
|
10
|
-
class Test::Unit::TestCase
|
11
|
-
end
|
data/test/test_mush.rb
CHANGED
@@ -1,77 +1,74 @@
|
|
1
|
-
require 'helper'
|
1
|
+
require File.expand_path('../helper', __FILE__)
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
should "include HTTParty module" do
|
3
|
+
describe Mush do
|
4
|
+
describe "Mush::Service class" do
|
5
|
+
it "include HTTParty module" do
|
7
6
|
assert Mush::Service.include? HTTParty
|
8
7
|
end
|
9
|
-
|
10
|
-
|
8
|
+
|
9
|
+
it "define a #shorten method" do
|
11
10
|
assert Mush::Service.new.respond_to? :shorten
|
12
11
|
end
|
13
|
-
|
14
|
-
|
15
|
-
|
12
|
+
|
13
|
+
it "raise and exception if use tries to use #shorten method" do
|
14
|
+
assert_raises Mush::InterfaceMethodNotImplementedError do
|
16
15
|
Mush::Service.new.shorten
|
17
16
|
end
|
18
17
|
end
|
19
|
-
|
20
|
-
|
18
|
+
|
19
|
+
it "add an instance method called 'get' that wrappes the HTTParty#get method" do
|
21
20
|
assert Mush::Service.new.respond_to? :get
|
22
21
|
end
|
23
22
|
end
|
24
|
-
|
25
|
-
|
26
|
-
|
23
|
+
|
24
|
+
describe "All Services" do
|
25
|
+
before do
|
27
26
|
s = Mush::Services
|
28
27
|
@services = [s::IsGd, s::Bitly]
|
29
28
|
end
|
30
|
-
|
31
|
-
|
29
|
+
|
30
|
+
it "be subclasses of Mush::Service" do
|
32
31
|
@services.each do |service|
|
33
|
-
assert Mush::Service, service
|
32
|
+
assert service < Mush::Service, "#{service} extends Mush::Service"
|
34
33
|
end
|
35
34
|
end
|
36
|
-
|
37
|
-
|
35
|
+
|
36
|
+
it "raise an exception if shorten is called with an empty url" do
|
38
37
|
@services.each do |service|
|
39
|
-
|
38
|
+
assert_raises Mush::InvalidURI do
|
40
39
|
service.new.shorten('')
|
41
40
|
end
|
42
41
|
end
|
43
42
|
end
|
44
|
-
|
45
43
|
end
|
46
|
-
|
47
|
-
|
48
|
-
|
44
|
+
|
45
|
+
describe "Service" do
|
46
|
+
before do
|
49
47
|
@long_url = "http://www.a_very_long_url.com"
|
50
48
|
@shortened_url = "http://is.gd/test"
|
51
49
|
@httparty_response = stub('HTTParty::Response', :body => @shortened_url)
|
52
50
|
end
|
53
|
-
|
54
|
-
context "not authorizable" do
|
55
51
|
|
56
|
-
|
52
|
+
describe "not authorizable" do
|
53
|
+
before do
|
57
54
|
@httparty_response = stub('HTTParty::Response', :body => @shortened_url)
|
58
55
|
@custom_shortener = 'http://is.gd/api.php?longurl={{url}}'
|
59
56
|
end
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
57
|
+
|
58
|
+
describe "IsGd" do
|
59
|
+
|
60
|
+
it "return a shortened url" do
|
64
61
|
Mush::Services::IsGd.any_instance.stubs(:get).with(instance_of(String), instance_of(Hash)).returns(@httparty_response)
|
65
|
-
|
66
|
-
isgd = Mush::Services::IsGd.new
|
62
|
+
|
63
|
+
isgd = Mush::Services::IsGd.new
|
67
64
|
isgd_result = isgd.shorten(@long_url)
|
68
|
-
|
65
|
+
|
69
66
|
assert_equal @shortened_url, isgd_result
|
70
67
|
end
|
71
68
|
end
|
72
69
|
|
73
|
-
|
74
|
-
|
70
|
+
describe "Custom" do
|
71
|
+
it "return a shortened url" do
|
75
72
|
Mush::Services::Custom.any_instance.stubs(:get).with(instance_of(String), instance_of(Hash)).returns(@httparty_response)
|
76
73
|
|
77
74
|
custom = Mush::Services::Custom.new
|
@@ -83,49 +80,44 @@ class TestMush < Test::Unit::TestCase
|
|
83
80
|
end
|
84
81
|
end
|
85
82
|
|
86
|
-
|
87
|
-
|
83
|
+
describe "authorizable" do
|
84
|
+
before do
|
88
85
|
@response = @shortened_url
|
89
86
|
end
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
87
|
+
|
88
|
+
describe "Bitly" do
|
89
|
+
it "has authentication credentials to return a shortened url" do
|
90
|
+
|
94
91
|
httparty_response = stub('HTTParty::Response', :[] => @shortened_url)
|
95
92
|
bitly = Mush::Services::Bitly.new
|
96
|
-
|
97
|
-
|
93
|
+
|
94
|
+
assert_raises Mush::InvalidAuthorizationData do
|
98
95
|
bitly.shorten(@long_url)
|
99
96
|
end
|
100
|
-
|
97
|
+
|
101
98
|
bitly.login = "login"
|
102
99
|
bitly.apikey = "apikey"
|
103
100
|
|
104
|
-
|
105
|
-
|
106
|
-
end
|
107
|
-
|
101
|
+
bitly.shorten(@long_url)
|
102
|
+
|
108
103
|
Mush::Services::Bitly.any_instance.stubs(:get).with(instance_of(String), instance_of(Hash)).returns(httparty_response)
|
109
104
|
assert_equal @shortened_url, bitly.shorten(@long_url)
|
110
105
|
end
|
111
106
|
end
|
112
107
|
|
113
|
-
|
114
|
-
|
115
|
-
|
108
|
+
describe "Owly" do
|
109
|
+
it "has authentication credentials to return a shortened url" do
|
110
|
+
|
116
111
|
httparty_response = stub('HTTParty::Response', :[] => @shortened_url)
|
117
112
|
owly = Mush::Services::Owly.new
|
118
|
-
|
119
|
-
|
113
|
+
|
114
|
+
assert_raises Mush::InvalidAuthorizationData do
|
120
115
|
owly.shorten(@long_url)
|
121
116
|
end
|
122
|
-
|
117
|
+
|
123
118
|
owly.apikey = "apikey"
|
124
|
-
|
125
|
-
|
126
|
-
owly.shorten(@long_url)
|
127
|
-
end
|
128
|
-
|
119
|
+
owly.shorten(@long_url)
|
120
|
+
|
129
121
|
Mush::Services::Owly.any_instance.stubs(:get).with(instance_of(String), instance_of(Hash)).returns(httparty_response)
|
130
122
|
end
|
131
123
|
end
|
metadata
CHANGED
@@ -1,134 +1,129 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: mush
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease: false
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 2
|
9
|
-
- 1
|
10
|
-
version: 0.2.1
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.2
|
11
5
|
platform: ruby
|
12
|
-
authors:
|
13
|
-
-
|
6
|
+
authors:
|
7
|
+
- Rafael Magana
|
14
8
|
autorequire:
|
15
9
|
bindir: bin
|
16
10
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
dependencies:
|
21
|
-
- !ruby/object:Gem::Dependency
|
22
|
-
prerelease: false
|
23
|
-
version_requirements: &id001 !ruby/object:Gem::Requirement
|
24
|
-
none: false
|
25
|
-
requirements:
|
26
|
-
- - "="
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
hash: 5
|
29
|
-
segments:
|
30
|
-
- 0
|
31
|
-
- 6
|
32
|
-
- 1
|
33
|
-
version: 0.6.1
|
11
|
+
date: 2013-09-13 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
34
14
|
name: httparty
|
35
|
-
requirement:
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.6.1
|
36
20
|
type: :runtime
|
37
|
-
- !ruby/object:Gem::Dependency
|
38
21
|
prerelease: false
|
39
|
-
version_requirements:
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.6.1
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bump
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
50
42
|
name: mocha
|
51
|
-
requirement:
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
52
48
|
type: :development
|
53
|
-
- !ruby/object:Gem::Dependency
|
54
49
|
prerelease: false
|
55
|
-
version_requirements:
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
requirement: *id003
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: minitest
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
68
62
|
type: :development
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
63
|
prerelease: false
|
71
|
-
version_requirements:
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
requirement: *id004
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: minitest-colorize
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
84
76
|
type: :development
|
85
|
-
- !ruby/object:Gem::Dependency
|
86
77
|
prerelease: false
|
87
|
-
version_requirements:
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
requirement: *id005
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: jeweler
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
100
90
|
type: :development
|
101
|
-
- !ruby/object:Gem::Dependency
|
102
91
|
prerelease: false
|
103
|
-
version_requirements:
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rcov
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - '>='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
description: A gem to shorten URLs using different services, it has one command-line
|
112
|
+
utility for each supported service and one for custom shorteners called 'shorten'.
|
118
113
|
email: raf.magana@gmail.com
|
119
|
-
executables:
|
114
|
+
executables:
|
115
|
+
- bitly
|
120
116
|
- isgd
|
121
117
|
- mush
|
122
|
-
- bitly
|
123
|
-
- shorten
|
124
118
|
- owly
|
119
|
+
- shorten
|
125
120
|
extensions: []
|
126
|
-
|
127
|
-
extra_rdoc_files:
|
121
|
+
extra_rdoc_files:
|
128
122
|
- LICENSE
|
129
123
|
- README.md
|
130
|
-
files:
|
124
|
+
files:
|
131
125
|
- .document
|
126
|
+
- .travis.yml
|
132
127
|
- Gemfile
|
133
128
|
- Gemfile.lock
|
134
129
|
- LICENSE
|
@@ -151,40 +146,27 @@ files:
|
|
151
146
|
- mush.gemspec
|
152
147
|
- test/helper.rb
|
153
148
|
- test/test_mush.rb
|
154
|
-
has_rdoc: true
|
155
149
|
homepage: http://github.com/rafmagana/mush
|
156
150
|
licenses: []
|
157
|
-
|
151
|
+
metadata: {}
|
158
152
|
post_install_message:
|
159
153
|
rdoc_options: []
|
160
|
-
|
161
|
-
require_paths:
|
154
|
+
require_paths:
|
162
155
|
- lib
|
163
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
none: false
|
174
|
-
requirements:
|
175
|
-
- - ">="
|
176
|
-
- !ruby/object:Gem::Version
|
177
|
-
hash: 3
|
178
|
-
segments:
|
179
|
-
- 0
|
180
|
-
version: "0"
|
156
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
157
|
+
requirements:
|
158
|
+
- - '>='
|
159
|
+
- !ruby/object:Gem::Version
|
160
|
+
version: '0'
|
161
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
162
|
+
requirements:
|
163
|
+
- - '>='
|
164
|
+
- !ruby/object:Gem::Version
|
165
|
+
version: '0'
|
181
166
|
requirements: []
|
182
|
-
|
183
167
|
rubyforge_project:
|
184
|
-
rubygems_version:
|
168
|
+
rubygems_version: 2.0.6
|
185
169
|
signing_key:
|
186
|
-
specification_version:
|
170
|
+
specification_version: 4
|
187
171
|
summary: A multiple service URL shortener gem with command-line utilities
|
188
|
-
test_files:
|
189
|
-
- test/helper.rb
|
190
|
-
- test/test_mush.rb
|
172
|
+
test_files: []
|