rest-core 3.3.1 → 3.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +6 -0
- data/lib/rest-core/middleware/default_site.rb +1 -3
- data/lib/rest-core/version.rb +1 -1
- data/rest-core.gemspec +3 -3
- data/test/test_default_site.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 791ce9f1c9627673f6bb3c4708c6077948c2f049
|
4
|
+
data.tar.gz: 364ccb0bcdb0788c64e28221b333408c401395f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2efd353f7e2c8058beeb5926427ffed27efdf3216b16bdf6c8fed1c7c57ba60636dc89be1b19db07aeac23c8ed954c4d106f179b755607589d6f63f93d2fdf7d
|
7
|
+
data.tar.gz: 0be08aada1f1a659d006a253809340e73d5590aa788be0d5d89780634f64be3c211715b5c8fd3c296e80db42cf66ed95d353deb1a51ad1d1f01b7922693b520a
|
data/CHANGES.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# CHANGES
|
2
2
|
|
3
|
+
## rest-core 3.3.2 -- 2014-10-11
|
4
|
+
|
5
|
+
* Just use `File.join` for `RC::DefaultSite` as `File::SEPARATOR` is
|
6
|
+
universally `/` and it would not try to raise exceptions for improperly
|
7
|
+
encoded URI. #11 Man Vuong (@kidlab)
|
8
|
+
|
3
9
|
## rest-core 3.3.1 -- 2014-10-08
|
4
10
|
|
5
11
|
* `RC::Oauth1Header` would now properly encode queries in oauth_callback.
|
@@ -8,10 +8,8 @@ class RestCore::DefaultSite
|
|
8
8
|
def call env, &k
|
9
9
|
path = if env[REQUEST_PATH].to_s.include?('://')
|
10
10
|
env[REQUEST_PATH]
|
11
|
-
elsif site(env).to_s.include?('://')
|
12
|
-
URI.join(site(env), env[REQUEST_PATH]).to_s
|
13
11
|
else
|
14
|
-
|
12
|
+
File.join(site(env).to_s, env[REQUEST_PATH].to_s)
|
15
13
|
end
|
16
14
|
|
17
15
|
app.call(env.merge(REQUEST_PATH => path), &k)
|
data/lib/rest-core/version.rb
CHANGED
data/rest-core.gemspec
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: rest-core 3.3.
|
2
|
+
# stub: rest-core 3.3.2 ruby lib
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "rest-core"
|
6
|
-
s.version = "3.3.
|
6
|
+
s.version = "3.3.2"
|
7
7
|
|
8
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
9
9
|
s.require_paths = ["lib"]
|
10
10
|
s.authors = ["Lin Jen-Shin (godfat)"]
|
11
|
-
s.date = "2014-10-
|
11
|
+
s.date = "2014-10-11"
|
12
12
|
s.description = "Modular Ruby clients interface for REST APIs.\n\nThere has been an explosion in the number of REST APIs available today.\nTo address the need for a way to access these APIs easily and elegantly,\nwe have developed rest-core, which consists of composable middleware\nthat allows you to build a REST client for any REST API. Or in the case of\ncommon APIs such as Facebook, Github, and Twitter, you can simply use the\ndedicated clients provided by [rest-more][].\n\n[rest-more]: https://github.com/godfat/rest-more"
|
13
13
|
s.email = ["godfat (XD) godfat.org"]
|
14
14
|
s.files = [
|
data/test/test_default_site.rb
CHANGED
@@ -21,4 +21,10 @@ describe RC::DefaultSite do
|
|
21
21
|
res[RC::REQUEST_PATH].should.eq 'http://example.com/nnf.tw'
|
22
22
|
end
|
23
23
|
end
|
24
|
+
|
25
|
+
would 'concatenate site and path regardlessly' do
|
26
|
+
app.call(RC::REQUEST_PATH => 'nnf.tw', 'site' => 'example.com') do |res|
|
27
|
+
res[RC::REQUEST_PATH].should.eq 'example.com/nnf.tw'
|
28
|
+
end
|
29
|
+
end
|
24
30
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rest-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.3.
|
4
|
+
version: 3.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lin Jen-Shin (godfat)
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-10-
|
11
|
+
date: 2014-10-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httpclient
|