rest 0.3.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,2 @@
1
+ .idea
2
+ pkg/
data/Rakefile CHANGED
@@ -1,24 +1,6 @@
1
1
  require 'rubygems'
2
2
  require 'rake'
3
3
 
4
- begin
5
- require 'jeweler2'
6
- Jeweler::Tasks.new do |gem|
7
- gem.name = "rest"
8
- gem.summary = "Rest client wrapper that chooses best installed client."
9
- gem.description = "Rest client wrapper that chooses best installed client."
10
- gem.email = "travis@iron.io"
11
- gem.homepage = "http://www.iron.io"
12
- gem.authors = ["Travis Reeder"]
13
- gem.add_dependency 'rest-client'
14
- #gem.add_dependency 'typhoeus'
15
- gem.required_ruby_version = '>= 1.9'
16
- end
17
- Jeweler::GemcutterTasks.new
18
- rescue LoadError
19
- puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler2"
20
- end
21
-
22
4
  require 'rake/testtask'
23
5
  Rake::TestTask.new(:test) do |test|
24
6
  test.libs << 'lib' << 'test'
@@ -2,7 +2,8 @@ require 'json'
2
2
  require 'logger'
3
3
 
4
4
  # This is a simple wrapper that can use different http clients depending on what's installed.
5
- # The purpose of this is so that users who can't install binaries easily (like windoze users) can have fallbacks that work
5
+ # The purpose of this is so that users who can't install binaries easily (like windoze users)
6
+ # can have fallbacks that work.
6
7
 
7
8
  module Rest
8
9
 
@@ -18,6 +19,10 @@ module Rest
18
19
  end
19
20
  end
20
21
 
22
+ def self.puts(s)
23
+ Kernel.puts(s)
24
+ end
25
+
21
26
 
22
27
  def self.gem=(g)
23
28
  @gem = g
@@ -27,16 +32,17 @@ module Rest
27
32
  @gem
28
33
  end
29
34
 
30
- #begin
31
- # require 'typhoeus'
32
- # Rest.gem = :typhoeus
33
- # require_relative 'wrappers/typhoeus_wrapper'
34
- #rescue LoadError => ex
35
- # puts "Please install 'typhoeus' gem for best performance."
35
+ begin
36
+ require 'typhoeus'
37
+ Rest.gem = :typhoeus
38
+ Rest.puts "Using typhoeus gem."
39
+ require_relative 'wrappers/typhoeus_wrapper'
40
+ rescue LoadError => ex
41
+ Rest.puts "Please install 'typhoeus' gem for best performance."
36
42
  require 'rest_client'
37
43
  Rest.gem = :rest_client
38
44
  require_relative 'wrappers/rest_client_wrapper'
39
- #end
45
+ end
40
46
 
41
47
  class Client
42
48
 
@@ -0,0 +1,3 @@
1
+ module Rest
2
+ VERSION = "1.0.0"
3
+ end
@@ -1,53 +1,26 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
- # -*- encoding: utf-8 -*-
1
+ require File.expand_path('../lib/rest/version', __FILE__)
5
2
 
6
- Gem::Specification.new do |s|
7
- s.name = "rest"
8
- s.version = "0.3.0"
3
+ Gem::Specification.new do |gem|
4
+ gem.authors = ["Travis Reeder"]
5
+ gem.email = ["treeder@gmail.com"]
6
+ gem.description = "Rest client wrapper that chooses best installed client."
7
+ gem.summary = "Rest client wrapper that chooses best installed client."
8
+ gem.homepage = "https://github.com/iron-io/rest"
9
9
 
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Travis Reeder"]
12
- s.date = "2012-06-08"
13
- s.description = "Rest client wrapper that chooses best installed client."
14
- s.email = "travis@iron.io"
15
- s.extra_rdoc_files = [
16
- "LICENSE",
17
- "README.markdown"
18
- ]
19
- s.files = [
20
- "LICENSE",
21
- "README.markdown",
22
- "Rakefile",
23
- "VERSION.yml",
24
- "lib/rest.rb",
25
- "lib/rest/client.rb",
26
- "lib/rest/wrappers/rest_client_wrapper.rb",
27
- "lib/rest/wrappers/typhoeus_wrapper.rb",
28
- "rest.gemspec",
29
- "test/test_base.rb",
30
- "test/test_rest.rb"
31
- ]
32
- s.homepage = "http://www.iron.io"
33
- s.require_paths = ["lib"]
34
- s.required_ruby_version = Gem::Requirement.new(">= 1.9")
35
- s.rubygems_version = "1.8.24"
36
- s.summary = "Rest client wrapper that chooses best installed client."
10
+ gem.files = `git ls-files`.split($\)
11
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
12
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
13
+ gem.name = "rest"
14
+ gem.require_paths = ["lib"]
15
+ gem.version = Rest::VERSION
37
16
 
38
- if s.respond_to? :specification_version then
39
- s.specification_version = 3
17
+ gem.required_rubygems_version = ">= 1.3.6"
18
+ gem.required_ruby_version = Gem::Requirement.new(">= 1.9")
19
+ gem.add_runtime_dependency "rest-client", ">= 0.3.0"
20
+
21
+ gem.add_development_dependency "test-unit"
22
+ gem.add_development_dependency "rake"
23
+ gem.add_development_dependency "uber_config"
40
24
 
41
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
42
- s.add_runtime_dependency(%q<rest-client>, [">= 0"])
43
- s.add_runtime_dependency(%q<rest-client>, [">= 0"])
44
- else
45
- s.add_dependency(%q<rest-client>, [">= 0"])
46
- s.add_dependency(%q<rest-client>, [">= 0"])
47
- end
48
- else
49
- s.add_dependency(%q<rest-client>, [">= 0"])
50
- s.add_dependency(%q<rest-client>, [">= 0"])
51
- end
52
25
  end
53
26
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 1.0.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-06-08 00:00:00.000000000 Z
12
+ date: 2012-06-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rest-client
@@ -18,9 +18,25 @@ dependencies:
18
18
  requirements:
19
19
  - - ! '>='
20
20
  - !ruby/object:Gem::Version
21
- version: '0'
21
+ version: 0.3.0
22
22
  type: :runtime
23
23
  prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: 0.3.0
30
+ - !ruby/object:Gem::Dependency
31
+ name: test-unit
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :development
39
+ prerelease: false
24
40
  version_requirements: !ruby/object:Gem::Requirement
25
41
  none: false
26
42
  requirements:
@@ -28,14 +44,30 @@ dependencies:
28
44
  - !ruby/object:Gem::Version
29
45
  version: '0'
30
46
  - !ruby/object:Gem::Dependency
31
- name: rest-client
47
+ name: rake
32
48
  requirement: !ruby/object:Gem::Requirement
33
49
  none: false
34
50
  requirements:
35
51
  - - ! '>='
36
52
  - !ruby/object:Gem::Version
37
53
  version: '0'
38
- type: :runtime
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ - !ruby/object:Gem::Dependency
63
+ name: uber_config
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ type: :development
39
71
  prerelease: false
40
72
  version_requirements: !ruby/object:Gem::Requirement
41
73
  none: false
@@ -44,25 +76,26 @@ dependencies:
44
76
  - !ruby/object:Gem::Version
45
77
  version: '0'
46
78
  description: Rest client wrapper that chooses best installed client.
47
- email: travis@iron.io
79
+ email:
80
+ - treeder@gmail.com
48
81
  executables: []
49
82
  extensions: []
50
- extra_rdoc_files:
51
- - LICENSE
52
- - README.markdown
83
+ extra_rdoc_files: []
53
84
  files:
85
+ - .gitignore
54
86
  - LICENSE
55
87
  - README.markdown
56
88
  - Rakefile
57
89
  - VERSION.yml
58
90
  - lib/rest.rb
59
91
  - lib/rest/client.rb
92
+ - lib/rest/version.rb
60
93
  - lib/rest/wrappers/rest_client_wrapper.rb
61
94
  - lib/rest/wrappers/typhoeus_wrapper.rb
62
95
  - rest.gemspec
63
96
  - test/test_base.rb
64
97
  - test/test_rest.rb
65
- homepage: http://www.iron.io
98
+ homepage: https://github.com/iron-io/rest
66
99
  licenses: []
67
100
  post_install_message:
68
101
  rdoc_options: []
@@ -79,11 +112,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
79
112
  requirements:
80
113
  - - ! '>='
81
114
  - !ruby/object:Gem::Version
82
- version: '0'
115
+ version: 1.3.6
83
116
  requirements: []
84
117
  rubyforge_project:
85
118
  rubygems_version: 1.8.24
86
119
  signing_key:
87
120
  specification_version: 3
88
121
  summary: Rest client wrapper that chooses best installed client.
89
- test_files: []
122
+ test_files:
123
+ - test/test_base.rb
124
+ - test/test_rest.rb