rufus-jig 0.1.20 → 0.1.21

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.txt CHANGED
@@ -2,6 +2,12 @@
2
2
  = rufus-jig CHANGELOG.txt
3
3
 
4
4
 
5
+ == rufus-jig - 0.1.21 release 2010/09/21
6
+
7
+ - fixed port.to_i minor issue
8
+ - caching is only for GET !
9
+
10
+
5
11
  == rufus-jig - 0.1.20 released 2010/06/22
6
12
 
7
13
  - URI.parse(x) can't do UTF-8, so working around...
data/Rakefile CHANGED
@@ -40,7 +40,7 @@ Jeweler::Tasks.new do |gem|
40
40
  gem.test_file = 'test/test.rb'
41
41
 
42
42
  gem.add_dependency 'rufus-lru'
43
- gem.add_dependency 'rufus-json', '>= 0.2.1'
43
+ gem.add_dependency 'rufus-json', '>= 0.2.5'
44
44
  gem.add_development_dependency 'rake'
45
45
  gem.add_development_dependency 'yard'
46
46
  gem.add_development_dependency 'jeweler'
data/TODO.txt CHANGED
@@ -25,3 +25,6 @@
25
25
 
26
26
  [ ] timeout per request ?
27
27
 
28
+ [ ] net http persistent
29
+ http://seattlerb.rubyforge.org/net-http-persistent/Net/HTTP/Persistent.html
30
+
@@ -206,7 +206,7 @@ module Rufus::Jig
206
206
  path = '/' if path == ''
207
207
 
208
208
  cached = from_cache(path, opts)
209
- opts.delete(:etag) if not cached
209
+ opts.delete(:etag) if (not cached) || method != :get
210
210
 
211
211
  opts = rehash_options(opts)
212
212
  data = repack_data(data, opts)
@@ -314,9 +314,9 @@ module Rufus::Jig
314
314
 
315
315
  def do_cache (method, path, response, body, opts)
316
316
 
317
- if (method == :delete) || (opts[:cache] == false)
317
+ if (method != :get) || (opts[:cache] == false)
318
318
  @cache.delete(path)
319
- elsif (method == :get) && (et = response.headers['Etag'])
319
+ elsif et = response.headers['Etag']
320
320
  @cache[path] = [ et, Rufus::Jig.marshal_copy(body) ]
321
321
  end
322
322
  end
@@ -382,6 +382,8 @@ class Rufus::Jig::Http
382
382
  [ args.shift, args.shift ]
383
383
  end
384
384
 
385
+ port = port.to_i
386
+
385
387
  path = args.shift
386
388
  path = '/' if path == ''
387
389
 
@@ -1,7 +1,7 @@
1
1
 
2
2
  module Rufus
3
3
  module Jig
4
- VERSION = '0.1.20'
4
+ VERSION = '0.1.21'
5
5
  end
6
6
  end
7
7
 
data/rufus-jig.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rufus-jig}
8
- s.version = "0.1.20"
8
+ s.version = "0.1.21"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["John Mettraux", "Kenneth Kalmer"]
12
- s.date = %q{2010-06-22}
12
+ s.date = %q{2010-09-21}
13
13
  s.description = %q{
14
14
  Json Interwebs Get.
15
15
 
@@ -79,7 +79,7 @@ Gem::Specification.new do |s|
79
79
 
80
80
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
81
81
  s.add_runtime_dependency(%q<rufus-lru>, [">= 0"])
82
- s.add_runtime_dependency(%q<rufus-json>, [">= 0.2.1"])
82
+ s.add_runtime_dependency(%q<rufus-json>, [">= 0.2.5"])
83
83
  s.add_development_dependency(%q<rake>, [">= 0"])
84
84
  s.add_development_dependency(%q<yard>, [">= 0"])
85
85
  s.add_development_dependency(%q<jeweler>, [">= 0"])
@@ -87,7 +87,7 @@ Gem::Specification.new do |s|
87
87
  s.add_development_dependency(%q<em-http-request>, [">= 0"])
88
88
  else
89
89
  s.add_dependency(%q<rufus-lru>, [">= 0"])
90
- s.add_dependency(%q<rufus-json>, [">= 0.2.1"])
90
+ s.add_dependency(%q<rufus-json>, [">= 0.2.5"])
91
91
  s.add_dependency(%q<rake>, [">= 0"])
92
92
  s.add_dependency(%q<yard>, [">= 0"])
93
93
  s.add_dependency(%q<jeweler>, [">= 0"])
@@ -96,7 +96,7 @@ Gem::Specification.new do |s|
96
96
  end
97
97
  else
98
98
  s.add_dependency(%q<rufus-lru>, [">= 0"])
99
- s.add_dependency(%q<rufus-json>, [">= 0.2.1"])
99
+ s.add_dependency(%q<rufus-json>, [">= 0.2.5"])
100
100
  s.add_dependency(%q<rake>, [">= 0"])
101
101
  s.add_dependency(%q<yard>, [">= 0"])
102
102
  s.add_dependency(%q<jeweler>, [">= 0"])
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 20
9
- version: 0.1.20
8
+ - 21
9
+ version: 0.1.21
10
10
  platform: ruby
11
11
  authors:
12
12
  - John Mettraux
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-06-22 00:00:00 +09:00
18
+ date: 2010-09-21 00:00:00 +09:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -40,8 +40,8 @@ dependencies:
40
40
  segments:
41
41
  - 0
42
42
  - 2
43
- - 1
44
- version: 0.2.1
43
+ - 5
44
+ version: 0.2.5
45
45
  type: :runtime
46
46
  version_requirements: *id002
47
47
  - !ruby/object:Gem::Dependency