t 0.7.0 → 0.8.0
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/README.md +28 -18
- data/lib/t/cli.rb +167 -166
- data/lib/t/delete.rb +12 -12
- data/lib/t/list.rb +26 -26
- data/lib/t/printable.rb +12 -2
- data/lib/t/rcfile.rb +11 -11
- data/lib/t/requestable.rb +5 -5
- data/lib/t/search.rb +14 -14
- data/lib/t/set.rb +15 -14
- data/lib/t/version.rb +1 -1
- data/spec/cli_spec.rb +154 -150
- data/spec/delete_spec.rb +11 -11
- data/spec/list_spec.rb +25 -24
- data/spec/rcfile_spec.rb +29 -15
- data/spec/search_spec.rb +19 -14
- data/spec/set_spec.rb +15 -15
- data/t.gemspec +1 -1
- metadata +3 -3
data/spec/set_spec.rb
CHANGED
@@ -18,9 +18,19 @@ describe T::Set do
|
|
18
18
|
$stdout = @old_stdout
|
19
19
|
end
|
20
20
|
|
21
|
+
describe "#active" do
|
22
|
+
before do
|
23
|
+
@t.options = @t.options.merge("profile" => fixture_path + "/.trc")
|
24
|
+
end
|
25
|
+
it "should have the correct output" do
|
26
|
+
@t.set("active", "testcli", "abc123")
|
27
|
+
$stdout.string.chomp.should == "Active account has been updated."
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
21
31
|
describe "#bio" do
|
22
32
|
before do
|
23
|
-
@t.options = @t.options.merge(
|
33
|
+
@t.options = @t.options.merge("profile" => fixture_path + "/.trc")
|
24
34
|
stub_post("/1/account/update_profile.json").
|
25
35
|
with(:body => {:description => "A mind forever voyaging through strange seas of thought, alone.", :include_entities => "false"}).
|
26
36
|
to_return(:body => fixture("sferik.json"), :headers => {:content_type => "application/json; charset=utf-8"})
|
@@ -37,19 +47,9 @@ describe T::Set do
|
|
37
47
|
end
|
38
48
|
end
|
39
49
|
|
40
|
-
describe "#default" do
|
41
|
-
before do
|
42
|
-
@t.options = @t.options.merge(:profile => fixture_path + "/.trc")
|
43
|
-
end
|
44
|
-
it "should have the correct output" do
|
45
|
-
@t.set("default", "testcli", "abc123")
|
46
|
-
$stdout.string.chomp.should == "Default account has been updated."
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
50
|
describe "#language" do
|
51
51
|
before do
|
52
|
-
@t.options = @t.options.merge(
|
52
|
+
@t.options = @t.options.merge("profile" => fixture_path + "/.trc")
|
53
53
|
stub_post("/1/account/settings.json").
|
54
54
|
with(:body => {:lang => "en"}).
|
55
55
|
to_return(:body => fixture("settings.json"), :headers => {:content_type => "application/json; charset=utf-8"})
|
@@ -68,7 +68,7 @@ describe T::Set do
|
|
68
68
|
|
69
69
|
describe "#location" do
|
70
70
|
before do
|
71
|
-
@t.options = @t.options.merge(
|
71
|
+
@t.options = @t.options.merge("profile" => fixture_path + "/.trc")
|
72
72
|
stub_post("/1/account/update_profile.json").
|
73
73
|
with(:body => {:location => "San Francisco", :include_entities => "false"}).
|
74
74
|
to_return(:body => fixture("sferik.json"), :headers => {:content_type => "application/json; charset=utf-8"})
|
@@ -87,7 +87,7 @@ describe T::Set do
|
|
87
87
|
|
88
88
|
describe "#name" do
|
89
89
|
before do
|
90
|
-
@t.options = @t.options.merge(
|
90
|
+
@t.options = @t.options.merge("profile" => fixture_path + "/.trc")
|
91
91
|
stub_post("/1/account/update_profile.json").
|
92
92
|
with(:body => {:name => "Erik Michaels-Ober", :include_entities => "false"}).
|
93
93
|
to_return(:body => fixture("sferik.json"), :headers => {:content_type => "application/json; charset=utf-8"})
|
@@ -106,7 +106,7 @@ describe T::Set do
|
|
106
106
|
|
107
107
|
describe "#url" do
|
108
108
|
before do
|
109
|
-
@t.options = @t.options.merge(
|
109
|
+
@t.options = @t.options.merge("profile" => fixture_path + "/.trc")
|
110
110
|
stub_post("/1/account/update_profile.json").
|
111
111
|
with(:body => {:url => "https://github.com/sferik", :include_entities => "false"}).
|
112
112
|
to_return(:body => fixture("sferik.json"), :headers => {:content_type => "application/json; charset=utf-8"})
|
data/t.gemspec
CHANGED
@@ -29,7 +29,7 @@ Gem::Specification.new do |gem|
|
|
29
29
|
gem.files += Dir.glob("lib/**/*.rb")
|
30
30
|
gem.files += Dir.glob("bin/**/*")
|
31
31
|
gem.files += Dir.glob("spec/**/*")
|
32
|
-
gem.homepage = 'http://github.com/
|
32
|
+
gem.homepage = 'http://sferik.github.com/t/'
|
33
33
|
gem.name = 't'
|
34
34
|
gem.require_paths = ['lib']
|
35
35
|
gem.required_rubygems_version = Gem::Requirement.new(">= 1.3.6") if gem.respond_to? :required_rubygems_version=
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: t
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
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: 2012-04-
|
12
|
+
date: 2012-04-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|
@@ -378,7 +378,7 @@ files:
|
|
378
378
|
- spec/rcfile_spec.rb
|
379
379
|
- spec/search_spec.rb
|
380
380
|
- spec/set_spec.rb
|
381
|
-
homepage: http://github.com/
|
381
|
+
homepage: http://sferik.github.com/t/
|
382
382
|
licenses: []
|
383
383
|
post_install_message:
|
384
384
|
rdoc_options: []
|