tasty 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -1
- data/Gemfile.lock +4 -4
- data/LICENSE.txt +1 -1
- data/README.rdoc +7 -1
- data/VERSION +1 -1
- data/lib/tasty.rb +5 -1
- data/tasty.gemspec +5 -5
- data/test/test_tasty.rb +8 -1
- metadata +9 -7
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
GEM
|
2
2
|
remote: http://rubygems.org/
|
3
3
|
specs:
|
4
|
-
crack (0.1.
|
4
|
+
crack (0.1.8)
|
5
5
|
fakeweb (1.2.8)
|
6
6
|
git (1.2.5)
|
7
|
-
httparty (0.
|
8
|
-
crack (= 0.1.
|
7
|
+
httparty (0.6.1)
|
8
|
+
crack (= 0.1.8)
|
9
9
|
jeweler (1.5.1)
|
10
10
|
bundler (~> 1.0.0)
|
11
11
|
git (>= 1.2.5)
|
@@ -21,7 +21,7 @@ PLATFORMS
|
|
21
21
|
DEPENDENCIES
|
22
22
|
bundler (~> 1.0.0)
|
23
23
|
fakeweb
|
24
|
-
httparty
|
24
|
+
httparty (~> 0.6.1)
|
25
25
|
jeweler (~> 1.5.1)
|
26
26
|
mocha
|
27
27
|
rcov
|
data/LICENSE.txt
CHANGED
data/README.rdoc
CHANGED
@@ -21,6 +21,12 @@ Ruby gem for interacting with the del.icio.us API
|
|
21
21
|
>> tasty = Tasty.new('delicious_username', 'delicious_password')
|
22
22
|
=> #<Tasty:0x101868d80 @delicious_api_url="https://api.del.icio.us/v1/", @password="delicious_password", @username="delicious_username">
|
23
23
|
|
24
|
+
== Changelog
|
25
|
+
|
26
|
+
=== 1.0.1
|
27
|
+
|
28
|
+
* Added set_timeout method to set timeout for HTTP requests
|
29
|
+
|
24
30
|
== Contributing to tasty
|
25
31
|
|
26
32
|
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
|
@@ -33,6 +39,6 @@ Ruby gem for interacting with the del.icio.us API
|
|
33
39
|
|
34
40
|
== Copyright
|
35
41
|
|
36
|
-
Copyright (c) 2010 David Czarnecki. See LICENSE.txt for
|
42
|
+
Copyright (c) 2010-2011 David Czarnecki. See LICENSE.txt for
|
37
43
|
further details.
|
38
44
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.1
|
data/lib/tasty.rb
CHANGED
@@ -3,7 +3,7 @@ require 'httparty'
|
|
3
3
|
class Tasty
|
4
4
|
include HTTParty
|
5
5
|
|
6
|
-
VERSION = '1.0.
|
6
|
+
VERSION = '1.0.1'.freeze
|
7
7
|
DEFAULT_HEADERS = {
|
8
8
|
'User-Agent' => "tasty gem #{VERSION}"
|
9
9
|
}
|
@@ -32,6 +32,10 @@ class Tasty
|
|
32
32
|
headers(http_headers)
|
33
33
|
end
|
34
34
|
|
35
|
+
def set_timeout(timeout)
|
36
|
+
default_timeout(timeout)
|
37
|
+
end
|
38
|
+
|
35
39
|
# Call del.icio.us using a particular API method, api_method. The options hash is where you can add any parameters appropriate for the API call.
|
36
40
|
def get(api_method, options = {})
|
37
41
|
query = {}
|
data/tasty.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{tasty}
|
8
|
-
s.version = "1.0.
|
8
|
+
s.version = "1.0.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["David Czarnecki"]
|
12
|
-
s.date = %q{
|
12
|
+
s.date = %q{2011-02-16}
|
13
13
|
s.description = %q{Ruby library for interacting with del.icio.us}
|
14
14
|
s.email = %q{czarneckid@acm.org}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -46,18 +46,18 @@ Gem::Specification.new do |s|
|
|
46
46
|
s.specification_version = 3
|
47
47
|
|
48
48
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
49
|
-
s.add_runtime_dependency(%q<httparty>, ["
|
49
|
+
s.add_runtime_dependency(%q<httparty>, ["~> 0.6.1"])
|
50
50
|
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
51
51
|
s.add_development_dependency(%q<jeweler>, ["~> 1.5.1"])
|
52
52
|
s.add_development_dependency(%q<rcov>, [">= 0"])
|
53
53
|
else
|
54
|
-
s.add_dependency(%q<httparty>, ["
|
54
|
+
s.add_dependency(%q<httparty>, ["~> 0.6.1"])
|
55
55
|
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
56
56
|
s.add_dependency(%q<jeweler>, ["~> 1.5.1"])
|
57
57
|
s.add_dependency(%q<rcov>, [">= 0"])
|
58
58
|
end
|
59
59
|
else
|
60
|
-
s.add_dependency(%q<httparty>, ["
|
60
|
+
s.add_dependency(%q<httparty>, ["~> 0.6.1"])
|
61
61
|
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
62
62
|
s.add_dependency(%q<jeweler>, ["~> 1.5.1"])
|
63
63
|
s.add_dependency(%q<rcov>, [">= 0"])
|
data/test/test_tasty.rb
CHANGED
@@ -12,7 +12,7 @@ class TestTasty < Test::Unit::TestCase
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def test_version_is_current
|
15
|
-
assert_equal '1.0.
|
15
|
+
assert_equal '1.0.1', Tasty::VERSION
|
16
16
|
end
|
17
17
|
|
18
18
|
def test_can_initialize_new_tasty_class
|
@@ -53,4 +53,11 @@ class TestTasty < Test::Unit::TestCase
|
|
53
53
|
|
54
54
|
assert_equal 'done', tasty_response['result']['code']
|
55
55
|
end
|
56
|
+
|
57
|
+
def test_can_set_timeout
|
58
|
+
tasty = Tasty.new('username', 'password')
|
59
|
+
tasty.expects(:default_timeout).at_least_once
|
60
|
+
|
61
|
+
tasty.set_timeout(5)
|
62
|
+
end
|
56
63
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tasty
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 1
|
10
|
+
version: 1.0.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- David Czarnecki
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
18
|
+
date: 2011-02-16 00:00:00 -05:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -25,12 +25,14 @@ dependencies:
|
|
25
25
|
version_requirements: &id001 !ruby/object:Gem::Requirement
|
26
26
|
none: false
|
27
27
|
requirements:
|
28
|
-
- -
|
28
|
+
- - ~>
|
29
29
|
- !ruby/object:Gem::Version
|
30
|
-
hash:
|
30
|
+
hash: 5
|
31
31
|
segments:
|
32
32
|
- 0
|
33
|
-
|
33
|
+
- 6
|
34
|
+
- 1
|
35
|
+
version: 0.6.1
|
34
36
|
requirement: *id001
|
35
37
|
- !ruby/object:Gem::Dependency
|
36
38
|
type: :development
|