rest-more 2.0.2 → 2.0.3

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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: 5d7d25f35f71824a54722882781fec66d4a0f0d7
4
+ data.tar.gz: 162468ea7578ce061ed9b9ebcc71b510eb610313
5
+ !binary "U0hBNTEy":
6
+ metadata.gz: 263040498b133b04aaa64cf6d808cc95ea93b2cc6902f702a4354d7f4f92cb2f8ab706ed3bdf6681380ae9ccc8e888f9a5129ef8808741ad0906a56e500071b0
7
+ data.tar.gz: daf111d5deafae6196d8c70a0d7d89d76f799bde3ee7991df828d39997a0b9e78e7b980c79f859e29cb381191734a42eb29eb227975afbfc3ea34355e5b6d349
data/.travis.yml CHANGED
@@ -7,5 +7,6 @@ env:
7
7
 
8
8
  rvm:
9
9
  - 1.9.3
10
+ - 2.0.0
10
11
  - rbx-head
11
12
  - jruby-head
data/CHANGES.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # CHANGES
2
2
 
3
+ ## rest-more 2.0.3 -- 2013-04-01
4
+
5
+ * Fixed compatibility with Ruby 2.0.
6
+ * Adopt rest-core 2.0.3.
7
+
3
8
  ## rest-more 2.0.2 -- 2013-02-07
4
9
 
5
10
  * Updated Facebook OAuth URL from https://graph.facebook.com/oauth/authorize
data/Rakefile CHANGED
@@ -19,7 +19,7 @@ task 'gem:spec' do
19
19
  s.version = RestMore::VERSION
20
20
  s.homepage = 'https://github.com/cardinalblue/rest-more'
21
21
 
22
- %w[rest-core].each{ |g| s.add_runtime_dependency(g, '>=2.0.0') }
22
+ %w[rest-core].each{ |g| s.add_runtime_dependency(g, '>=2.0.3') }
23
23
 
24
24
  s.authors = ['Cardinal Blue', 'Lin Jen-Shin (godfat)']
25
25
  s.email = ['dev (XD) cardinalblue.com']
@@ -1,7 +1,7 @@
1
1
 
2
2
  source 'http://rubygems.org'
3
3
 
4
- gem 'rails', '3.2.11'
4
+ gem 'rails', '3.2.12'
5
5
 
6
6
  gem 'rest-client' # for rest-core
7
7
  gem 'rest-core', :path => '../../rest-core'
@@ -92,5 +92,7 @@ module RestCore::Dropbox::Client
92
92
  end
93
93
  end
94
94
 
95
- RestCore::Dropbox.send(:include, RestCore::ClientOauth1)
96
- RestCore::Dropbox.send(:include, RestCore::Dropbox::Client)
95
+ class RestCore::Dropbox
96
+ include RestCore::ClientOauth1
97
+ include RestCore::Dropbox::Client
98
+ end
@@ -291,6 +291,9 @@ module RestCore::Facebook::Client
291
291
  end
292
292
  end
293
293
 
294
- RestCore::Facebook.send(:include, RestCore::Facebook::Client)
295
- require 'rest-core/client/facebook/rails_util' if
296
- Object.const_defined?(:Rails)
294
+ class RestCore::Facebook
295
+ include RestCore::Facebook::Client
296
+
297
+ autoload :RailsUtil, 'rest-core/client/facebook/rails_util' if
298
+ Object.const_defined?(:Rails)
299
+ end
@@ -28,6 +28,9 @@ module RestCore::Github::Client
28
28
  end
29
29
  end
30
30
 
31
- RestCore::Github.send(:include, RestCore::Github::Client)
32
- require 'rest-core/client/github/rails_util' if
33
- Object.const_defined?(:Rails)
31
+ class RestCore::Github
32
+ include RestCore::Github::Client
33
+
34
+ autoload :RailsUtil, 'rest-core/client/github/rails_util' if
35
+ Object.const_defined?(:Rails)
36
+ end
@@ -36,7 +36,10 @@ module RestCore::Linkedin::Client
36
36
  end
37
37
  end
38
38
 
39
- RestCore::Linkedin.send(:include, RestCore::ClientOauth1)
40
- RestCore::Linkedin.send(:include, RestCore::Linkedin::Client)
41
- require 'rest-core/client/linkedin/rails_util' if
42
- Object.const_defined?(:Rails)
39
+ class RestCore::Linkedin
40
+ include RestCore::ClientOauth1
41
+ include RestCore::Linkedin::Client
42
+
43
+ autoload :RailsUtil, 'rest-core/client/linkedin/rails_util' if
44
+ Object.const_defined?(:Rails)
45
+ end
@@ -86,7 +86,10 @@ module RestCore::Twitter::Client
86
86
  end
87
87
  end
88
88
 
89
- RestCore::Twitter.send(:include, RestCore::ClientOauth1)
90
- RestCore::Twitter.send(:include, RestCore::Twitter::Client)
91
- require 'rest-core/client/twitter/rails_util' if
92
- Object.const_defined?(:Rails)
89
+ class RestCore::Twitter
90
+ include RestCore::ClientOauth1
91
+ include RestCore::Twitter::Client
92
+
93
+ autoload :RailsUtil, 'rest-core/client/twitter/rails_util' if
94
+ Object.const_defined?(:Rails)
95
+ end
@@ -37,9 +37,7 @@ module RestCore::RailsUtilUtil
37
37
  end
38
38
 
39
39
  def rc_options_extract members, options, method
40
- # Hash[] is for ruby 1.8.7
41
- # map(&:to_sym) is for ruby 1.8.7
42
- Hash[options.send(method){ |(k, v)| members.map(&:to_sym).member?(k) }]
40
+ options.send(method){ |(k, v)| members.member?(k) }
43
41
  end
44
42
  end
45
43
 
@@ -1,4 +1,4 @@
1
1
 
2
2
  module RestMore
3
- VERSION = '2.0.2'
3
+ VERSION = '2.0.3'
4
4
  end
data/rest-more.gemspec CHANGED
@@ -2,13 +2,13 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "rest-more"
5
- s.version = "2.0.2"
5
+ s.version = "2.0.3"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = [
9
9
  "Cardinal Blue",
10
10
  "Lin Jen-Shin (godfat)"]
11
- s.date = "2013-02-07"
11
+ s.date = "2013-04-01"
12
12
  s.description = "Various REST clients such as Facebook and Twitter built with [rest-core][]\n\n[rest-core]: https://github.com/cardinalblue/rest-core"
13
13
  s.email = ["dev (XD) cardinalblue.com"]
14
14
  s.executables = ["rib-rest-core"]
@@ -82,7 +82,7 @@ Gem::Specification.new do |s|
82
82
  "test/twitter/test_api.rb"]
83
83
  s.homepage = "https://github.com/cardinalblue/rest-more"
84
84
  s.require_paths = ["lib"]
85
- s.rubygems_version = "1.8.23"
85
+ s.rubygems_version = "2.0.0"
86
86
  s.summary = "Various REST clients such as Facebook and Twitter built with [rest-core][]"
87
87
  s.test_files = [
88
88
  "test/dropbox/test_api.rb",
@@ -101,14 +101,14 @@ Gem::Specification.new do |s|
101
101
  "test/twitter/test_api.rb"]
102
102
 
103
103
  if s.respond_to? :specification_version then
104
- s.specification_version = 3
104
+ s.specification_version = 4
105
105
 
106
106
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
107
- s.add_runtime_dependency(%q<rest-core>, [">= 2.0.0"])
107
+ s.add_runtime_dependency(%q<rest-core>, [">= 2.0.3"])
108
108
  else
109
- s.add_dependency(%q<rest-core>, [">= 2.0.0"])
109
+ s.add_dependency(%q<rest-core>, [">= 2.0.3"])
110
110
  end
111
111
  else
112
- s.add_dependency(%q<rest-core>, [">= 2.0.0"])
112
+ s.add_dependency(%q<rest-core>, [">= 2.0.3"])
113
113
  end
114
114
  end
@@ -60,7 +60,8 @@ describe RC::Facebook do
60
60
 
61
61
  @bad_fql_query = 'SELECT name FROM bad_table WHERE uid="12345"'
62
62
  bad_fql_request = "https://api.facebook.com/method/fql.query?" \
63
- "format=json&query=#{CGI.escape(@bad_fql_query)}"
63
+ "format=json&query=#{
64
+ RC::Middleware.escape(@bad_fql_query)}"
64
65
 
65
66
  stub_request(:get, bad_fql_request).to_return(:body => @fql_error)
66
67
  end
@@ -9,7 +9,7 @@ describe RC::Facebook do
9
9
 
10
10
  should 'do fql query with/without access_token' do
11
11
  fql = 'SELECT name FROM likes where id="123"'
12
- query = "format=json&query=#{CGI.escape(fql)}"
12
+ query = "format=json&query=#{RC::Middleware.escape(fql)}"
13
13
  stub_request(:get, "https://api.facebook.com/method/fql.query?#{query}").
14
14
  to_return(:body => '[]')
15
15
 
@@ -27,8 +27,10 @@ describe RC::Facebook do
27
27
  f0 = 'SELECT display_name FROM application WHERE app_id="233082465238"'
28
28
  f1 = 'SELECT display_name FROM application WHERE app_id="110225210740"'
29
29
  f0q, f1q = "\"#{f0.gsub('"', '\\"')}\"", "\"#{f1.gsub('"', '\\"')}\""
30
- q = "format=json&queries=#{CGI.escape("{\"f0\":#{f0q},\"f1\":#{f1q}}")}"
31
- p = "format=json&queries=#{CGI.escape("{\"f1\":#{f1q},\"f0\":#{f0q}}")}"
30
+ q = "format=json&queries=#{RC::Middleware.escape(
31
+ "{\"f0\":#{f0q},\"f1\":#{f1q}}")}"
32
+ p = "format=json&queries=#{RC::Middleware.escape(
33
+ "{\"f1\":#{f1q},\"f0\":#{f0q}}")}"
32
34
 
33
35
  stub_multi = lambda{
34
36
  stub_request(:get,
@@ -23,8 +23,8 @@ describe RC::Facebook do
23
23
  app_id = '1829'
24
24
  secret = app_id.reverse
25
25
  sig = '398262caea8442bd8801e8fba7c55c8a'
26
- fbs = "access_token=#{CGI.escape(access_token)}&expires=0&" \
27
- "secret=abc&session_key=def-456&sig=#{sig}&uid=3"
26
+ fbs = "access_token=#{RC::Middleware.escape(access_token)}&" \
27
+ "expires=0&secret=abc&session_key=def-456&sig=#{sig}&uid=3"
28
28
 
29
29
  check = lambda{ |token, fbs1|
30
30
  http_cookie =
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rest-more
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
5
- prerelease:
4
+ version: 2.0.3
6
5
  platform: ruby
7
6
  authors:
8
7
  - Cardinal Blue
@@ -10,24 +9,22 @@ authors:
10
9
  autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2013-02-07 00:00:00.000000000 Z
12
+ date: 2013-04-01 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: rest-core
17
16
  requirement: !ruby/object:Gem::Requirement
18
- none: false
19
17
  requirements:
20
18
  - - ! '>='
21
19
  - !ruby/object:Gem::Version
22
- version: 2.0.0
20
+ version: 2.0.3
23
21
  type: :runtime
24
22
  prerelease: false
25
23
  version_requirements: !ruby/object:Gem::Requirement
26
- none: false
27
24
  requirements:
28
25
  - - ! '>='
29
26
  - !ruby/object:Gem::Version
30
- version: 2.0.0
27
+ version: 2.0.3
31
28
  description: ! 'Various REST clients such as Facebook and Twitter built with [rest-core][]
32
29
 
33
30
 
@@ -108,27 +105,26 @@ files:
108
105
  - test/twitter/test_api.rb
109
106
  homepage: https://github.com/cardinalblue/rest-more
110
107
  licenses: []
108
+ metadata: {}
111
109
  post_install_message:
112
110
  rdoc_options: []
113
111
  require_paths:
114
112
  - lib
115
113
  required_ruby_version: !ruby/object:Gem::Requirement
116
- none: false
117
114
  requirements:
118
115
  - - ! '>='
119
116
  - !ruby/object:Gem::Version
120
117
  version: '0'
121
118
  required_rubygems_version: !ruby/object:Gem::Requirement
122
- none: false
123
119
  requirements:
124
120
  - - ! '>='
125
121
  - !ruby/object:Gem::Version
126
122
  version: '0'
127
123
  requirements: []
128
124
  rubyforge_project:
129
- rubygems_version: 1.8.23
125
+ rubygems_version: 2.0.0
130
126
  signing_key:
131
- specification_version: 3
127
+ specification_version: 4
132
128
  summary: Various REST clients such as Facebook and Twitter built with [rest-core][]
133
129
  test_files:
134
130
  - test/dropbox/test_api.rb