shelltoad 0.4.2 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/lib/shelltoad/command.rb +5 -3
- data/lib/shelltoad/error.rb +5 -2
- data/shelltoad.gemspec +2 -2
- data/spec/shelltoad_spec.rb +0 -3
- data/spec/spec_helper.rb +5 -0
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.4
|
data/lib/shelltoad/command.rb
CHANGED
@@ -16,7 +16,7 @@ class Shelltoad
|
|
16
16
|
Error.all.each do |error|
|
17
17
|
output error.to_s
|
18
18
|
end
|
19
|
-
when "error", "er"
|
19
|
+
when "error", "er", "show", "sh"
|
20
20
|
magic_find(args.shift) do |error|
|
21
21
|
output error.view
|
22
22
|
end
|
@@ -33,7 +33,7 @@ class Shelltoad
|
|
33
33
|
end
|
34
34
|
when /^[\d]/
|
35
35
|
magic_find(command) do |error|
|
36
|
-
|
36
|
+
open error.url
|
37
37
|
end
|
38
38
|
else
|
39
39
|
raise BaseException, "Command not found"
|
@@ -65,7 +65,9 @@ class Shelltoad
|
|
65
65
|
|
66
66
|
def open(url)
|
67
67
|
[Configuration.browser, "firefox", "chromium-browser", "start" ].find do |browser|
|
68
|
-
|
68
|
+
fork {
|
69
|
+
system browser, url.to_s
|
70
|
+
}
|
69
71
|
end
|
70
72
|
end
|
71
73
|
|
data/lib/shelltoad/error.rb
CHANGED
@@ -5,7 +5,6 @@ require "hoptoad-api"
|
|
5
5
|
class Shelltoad
|
6
6
|
class Error
|
7
7
|
|
8
|
-
URL = URI.parse("#{Configuration.secure? ? "https" : "http"}://#{Configuration.account}.hoptoadapp.com")
|
9
8
|
|
10
9
|
CACHE = {} # Runtime cache for http queries
|
11
10
|
|
@@ -56,6 +55,10 @@ class Shelltoad
|
|
56
55
|
Shelltoad.output(*args)
|
57
56
|
end
|
58
57
|
|
58
|
+
def self.base_url
|
59
|
+
URI.parse("#{Configuration.secure? ? "https" : "http"}://#{Configuration.account}.hoptoadapp.com")
|
60
|
+
end
|
61
|
+
|
59
62
|
#
|
60
63
|
# API
|
61
64
|
#
|
@@ -118,7 +121,7 @@ class Shelltoad
|
|
118
121
|
end
|
119
122
|
|
120
123
|
def url(format = nil)
|
121
|
-
URI.parse(
|
124
|
+
URI.parse(self.class.base_url.to_s + path(format))
|
122
125
|
end
|
123
126
|
|
124
127
|
|
data/shelltoad.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{shelltoad}
|
8
|
-
s.version = "0.4.
|
8
|
+
s.version = "0.4.4"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Bogdan Gusiev"]
|
12
|
-
s.date = %q{2011-04-
|
12
|
+
s.date = %q{2011-04-28}
|
13
13
|
s.default_executable = %q{shelltoad}
|
14
14
|
s.description = %q{
|
15
15
|
}
|
data/spec/shelltoad_spec.rb
CHANGED
@@ -4,9 +4,6 @@ require "fakeweb"
|
|
4
4
|
describe Shelltoad do
|
5
5
|
|
6
6
|
before(:each) do
|
7
|
-
Shelltoad::Configuration.stubs(:key).returns("whatever")
|
8
|
-
Shelltoad::Configuration.stubs(:account).returns("startdatelabs")
|
9
|
-
Shelltoad::Configuration.stubs(:project_id).returns(14951)
|
10
7
|
Shelltoad::Error.any_instance.stubs(:commit).returns(true)
|
11
8
|
end
|
12
9
|
|
data/spec/spec_helper.rb
CHANGED
@@ -37,6 +37,11 @@ RSpec.configure do |config|
|
|
37
37
|
:body => File.read('spec/assets/error.xml')
|
38
38
|
)
|
39
39
|
|
40
|
+
Shelltoad::Configuration.stubs(:key).returns("whatever")
|
41
|
+
Shelltoad::Configuration.stubs(:account).returns("startdatelabs")
|
42
|
+
Shelltoad::Configuration.stubs(:project_id).returns(14951)
|
43
|
+
Shelltoad::Configuration.stubs(:secure?).returns(false)
|
44
|
+
Hoptoad.secure =false
|
40
45
|
end
|
41
46
|
|
42
47
|
config.after(:each) do
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shelltoad
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 7
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 0.4.
|
9
|
+
- 4
|
10
|
+
version: 0.4.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Bogdan Gusiev
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-04-
|
18
|
+
date: 2011-04-28 00:00:00 +03:00
|
19
19
|
default_executable: shelltoad
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|