cleverbot 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 195c3c770286e7ff11c3900e2a4f1f67ee5299d1
4
+ data.tar.gz: 17288cf91b698eddea459ef6dac5dd393c5cf1c8
5
+ SHA512:
6
+ metadata.gz: 023f0b91a230c62d28afecc2c85989b91ae67e50c2abc4e9663599d6713de2edf14a6f404e84efbbdc109f376615d78dabafa14b32c4c11966394806cec8de10
7
+ data.tar.gz: 2d0771e7b52e49295b55726dfad5160078d6bdeb75251fc699c1454b0d9087f5e13d5782ae2f3f26ba18f008662db30491f353df9ae1879a337b12af48d98a99
data/Gemfile CHANGED
@@ -1,11 +1,12 @@
1
- source :rubygems
1
+ source 'https://rubygems.org'
2
2
 
3
- gem 'httparty', '~> 0.8.0'
3
+ gem 'httparty', '>= 0.8.1', '< 1.0'
4
4
 
5
5
  group :development do
6
- gem 'bundler', '~> 1.0'
7
- gem 'jeweler', '~> 1.6'
8
- gem 'rcov', '~> 0.9'
9
- gem 'rdoc', '~> 3.9'
10
- gem 'rspec', '~> 2.3'
6
+ gem 'bundler'
7
+ gem 'jeweler', '~> 1.8.7'
8
+ gem 'git', '>= 1.0.1', '< 1.2.6'
9
+ gem 'simplecov', '~> 0.7.1'
10
+ gem 'rdoc', '~> 4.0.1'
11
+ gem 'rspec', '~> 2.14.1'
11
12
  end
@@ -1,36 +1,73 @@
1
1
  GEM
2
- remote: http://rubygems.org/
2
+ remote: https://rubygems.org/
3
3
  specs:
4
- diff-lcs (1.1.3)
4
+ addressable (2.3.5)
5
+ builder (3.2.2)
6
+ diff-lcs (1.2.4)
7
+ faraday (0.8.8)
8
+ multipart-post (~> 1.2.0)
5
9
  git (1.2.5)
6
- httparty (0.8.0)
7
- multi_json
8
- multi_xml
9
- jeweler (1.6.4)
10
+ github_api (0.10.1)
11
+ addressable
12
+ faraday (~> 0.8.1)
13
+ hashie (>= 1.2)
14
+ multi_json (~> 1.4)
15
+ nokogiri (~> 1.5.2)
16
+ oauth2
17
+ hashie (2.0.5)
18
+ highline (1.6.19)
19
+ httparty (0.11.0)
20
+ multi_json (~> 1.0)
21
+ multi_xml (>= 0.5.2)
22
+ httpauth (0.2.0)
23
+ jeweler (1.8.7)
24
+ builder
10
25
  bundler (~> 1.0)
11
26
  git (>= 1.2.5)
27
+ github_api (= 0.10.1)
28
+ highline (>= 1.6.15)
29
+ nokogiri (= 1.5.10)
12
30
  rake
13
- multi_json (1.0.3)
14
- multi_xml (0.4.0)
15
- rake (0.9.2)
16
- rcov (0.9.10)
17
- rdoc (3.9.4)
18
- rspec (2.6.0)
19
- rspec-core (~> 2.6.0)
20
- rspec-expectations (~> 2.6.0)
21
- rspec-mocks (~> 2.6.0)
22
- rspec-core (2.6.4)
23
- rspec-expectations (2.6.0)
24
- diff-lcs (~> 1.1.2)
25
- rspec-mocks (2.6.0)
31
+ rdoc
32
+ json (1.8.0)
33
+ jwt (0.1.8)
34
+ multi_json (>= 1.5)
35
+ multi_json (1.7.9)
36
+ multi_xml (0.5.5)
37
+ multipart-post (1.2.0)
38
+ nokogiri (1.5.10)
39
+ oauth2 (0.9.2)
40
+ faraday (~> 0.8)
41
+ httpauth (~> 0.2)
42
+ jwt (~> 0.1.4)
43
+ multi_json (~> 1.0)
44
+ multi_xml (~> 0.5)
45
+ rack (~> 1.2)
46
+ rack (1.5.2)
47
+ rake (10.1.0)
48
+ rdoc (4.0.1)
49
+ json (~> 1.4)
50
+ rspec (2.14.1)
51
+ rspec-core (~> 2.14.0)
52
+ rspec-expectations (~> 2.14.0)
53
+ rspec-mocks (~> 2.14.0)
54
+ rspec-core (2.14.5)
55
+ rspec-expectations (2.14.2)
56
+ diff-lcs (>= 1.1.3, < 2.0)
57
+ rspec-mocks (2.14.3)
58
+ simplecov (0.7.1)
59
+ multi_json (~> 1.0)
60
+ simplecov-html (~> 0.7.1)
61
+ simplecov-html (0.7.1)
26
62
 
27
63
  PLATFORMS
28
64
  ruby
29
65
 
30
66
  DEPENDENCIES
31
- bundler (~> 1.0)
32
- httparty (~> 0.8.0)
33
- jeweler (~> 1.6)
34
- rcov (~> 0.9)
35
- rdoc (~> 3.9)
36
- rspec (~> 2.3)
67
+ bundler
68
+ git (>= 1.0.1, < 1.2.6)
69
+ httparty (>= 0.8.1, < 1.0)
70
+ jeweler (~> 1.8.7)
71
+ rdoc (~> 4.0.1)
72
+ rspec (~> 2.14.1)
73
+ simplecov (~> 0.7.1)
data/Rakefile CHANGED
@@ -28,11 +28,6 @@ RSpec::Core::RakeTask.new :spec do |spec|
28
28
  spec.pattern = FileList[File.join('spec', '**', '*_spec.rb')]
29
29
  end
30
30
 
31
- RSpec::Core::RakeTask.new :rcov do |spec|
32
- spec.pattern = File.join('spec', '**', '*_spec.rb')
33
- spec.rcov = true
34
- end
35
-
36
31
  task :default => :spec
37
32
 
38
33
  require 'rdoc/task'
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.2.0
@@ -4,14 +4,14 @@
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
- s.name = %q{cleverbot}
8
- s.version = "0.1.1"
7
+ s.name = "cleverbot"
8
+ s.version = "0.2.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Benjamin Manns"]
12
- s.date = %q{2011-09-16}
13
- s.description = %q{Ruby wrapper for Cleverbot.}
14
- s.email = %q{benmanns@gmail.com}
12
+ s.date = "2013-09-06"
13
+ s.description = "Ruby wrapper for Cleverbot."
14
+ s.email = "benmanns@gmail.com"
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE.txt",
17
17
  "README.rdoc"
@@ -36,37 +36,40 @@ Gem::Specification.new do |s|
36
36
  "spec/cleverbot_spec.rb",
37
37
  "spec/spec_helper.rb"
38
38
  ]
39
- s.homepage = %q{https://github.com/benmanns/cleverbot}
39
+ s.homepage = "https://github.com/benmanns/cleverbot"
40
40
  s.licenses = ["MIT"]
41
41
  s.require_paths = ["lib"]
42
- s.rubygems_version = %q{1.6.2}
43
- s.summary = %q{Ruby wrapper for Cleverbot.}
42
+ s.rubygems_version = "2.0.6"
43
+ s.summary = "Ruby wrapper for Cleverbot."
44
44
 
45
45
  if s.respond_to? :specification_version then
46
- s.specification_version = 3
46
+ s.specification_version = 4
47
47
 
48
48
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
49
- s.add_runtime_dependency(%q<httparty>, ["~> 0.8.0"])
50
- s.add_development_dependency(%q<bundler>, ["~> 1.0"])
51
- s.add_development_dependency(%q<jeweler>, ["~> 1.6"])
52
- s.add_development_dependency(%q<rcov>, ["~> 0.9"])
53
- s.add_development_dependency(%q<rdoc>, ["~> 3.9"])
54
- s.add_development_dependency(%q<rspec>, ["~> 2.3"])
49
+ s.add_runtime_dependency(%q<httparty>, ["< 1.0", ">= 0.8.1"])
50
+ s.add_development_dependency(%q<bundler>, [">= 0"])
51
+ s.add_development_dependency(%q<jeweler>, ["~> 1.8.7"])
52
+ s.add_development_dependency(%q<git>, ["< 1.2.6", ">= 1.0.1"])
53
+ s.add_development_dependency(%q<simplecov>, ["~> 0.7.1"])
54
+ s.add_development_dependency(%q<rdoc>, ["~> 4.0.1"])
55
+ s.add_development_dependency(%q<rspec>, ["~> 2.14.1"])
55
56
  else
56
- s.add_dependency(%q<httparty>, ["~> 0.8.0"])
57
- s.add_dependency(%q<bundler>, ["~> 1.0"])
58
- s.add_dependency(%q<jeweler>, ["~> 1.6"])
59
- s.add_dependency(%q<rcov>, ["~> 0.9"])
60
- s.add_dependency(%q<rdoc>, ["~> 3.9"])
61
- s.add_dependency(%q<rspec>, ["~> 2.3"])
57
+ s.add_dependency(%q<httparty>, ["< 1.0", ">= 0.8.1"])
58
+ s.add_dependency(%q<bundler>, [">= 0"])
59
+ s.add_dependency(%q<jeweler>, ["~> 1.8.7"])
60
+ s.add_dependency(%q<git>, ["< 1.2.6", ">= 1.0.1"])
61
+ s.add_dependency(%q<simplecov>, ["~> 0.7.1"])
62
+ s.add_dependency(%q<rdoc>, ["~> 4.0.1"])
63
+ s.add_dependency(%q<rspec>, ["~> 2.14.1"])
62
64
  end
63
65
  else
64
- s.add_dependency(%q<httparty>, ["~> 0.8.0"])
65
- s.add_dependency(%q<bundler>, ["~> 1.0"])
66
- s.add_dependency(%q<jeweler>, ["~> 1.6"])
67
- s.add_dependency(%q<rcov>, ["~> 0.9"])
68
- s.add_dependency(%q<rdoc>, ["~> 3.9"])
69
- s.add_dependency(%q<rspec>, ["~> 2.3"])
66
+ s.add_dependency(%q<httparty>, ["< 1.0", ">= 0.8.1"])
67
+ s.add_dependency(%q<bundler>, [">= 0"])
68
+ s.add_dependency(%q<jeweler>, ["~> 1.8.7"])
69
+ s.add_dependency(%q<git>, ["< 1.2.6", ">= 1.0.1"])
70
+ s.add_dependency(%q<simplecov>, ["~> 0.7.1"])
71
+ s.add_dependency(%q<rdoc>, ["~> 4.0.1"])
72
+ s.add_dependency(%q<rspec>, ["~> 2.14.1"])
70
73
  end
71
74
  end
72
75
 
@@ -48,7 +48,7 @@ module Cleverbot
48
48
  #
49
49
  # [<tt>body</tt>] <tt>String</tt> to be digested.
50
50
  def self.digest body
51
- Digest::MD5.hexdigest body[9...29]
51
+ Digest::MD5.hexdigest body[9...35]
52
52
  end
53
53
 
54
54
  # Sends a message to Cleverbot.com and returns a <tt>Hash</tt> containing the parameters received.
@@ -59,11 +59,11 @@ describe Cleverbot::Client do
59
59
  subject { Cleverbot::Client.digest @body }
60
60
  context 'given a body of 0123456789abcdefghijklmnopqrstuvwxyz' do
61
61
  before :each do
62
- @body = '0123456789abcdefghijklmnopqrstuvwxyz'
62
+ @body = '0123456789abcdefghijklmnopqrstuvwxyz-truncateme'
63
63
  end
64
64
 
65
- it 'should call Digest::MD5.hexdigest with 9abcdefghijklmnopqrs' do
66
- Digest::MD5.should_receive(:hexdigest).with @body[9..28]
65
+ it 'should call Digest::MD5.hexdigest with 9abcdefghijklmnopqrstuvwxyz' do
66
+ Digest::MD5.should_receive(:hexdigest).with @body[9..34]
67
67
  subject
68
68
  end
69
69
 
@@ -5,7 +5,7 @@ describe Cleverbot::Parser do
5
5
 
6
6
  it { should <= HTTParty::Parser }
7
7
 
8
- it { should be_supports_format :html }
8
+ it('should support format :html') { should be_supports_format :html }
9
9
 
10
10
  describe '::KEYS' do
11
11
  subject { Cleverbot::Parser::KEYS }
@@ -1,5 +1,9 @@
1
1
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
2
  $LOAD_PATH.unshift(File.dirname(__FILE__))
3
+
4
+ require 'simplecov'
5
+ SimpleCov.start
6
+
3
7
  require 'rspec'
4
8
  require 'cleverbot'
5
9
 
metadata CHANGED
@@ -1,83 +1,125 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cleverbot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
5
- prerelease:
4
+ version: 0.2.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Benjamin Manns
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2011-09-16 00:00:00.000000000 -04:00
13
- default_executable:
11
+ date: 2013-09-06 00:00:00.000000000 Z
14
12
  dependencies:
15
13
  - !ruby/object:Gem::Dependency
16
14
  name: httparty
17
- requirement: &17981700 !ruby/object:Gem::Requirement
18
- none: false
15
+ requirement: !ruby/object:Gem::Requirement
19
16
  requirements:
20
- - - ~>
17
+ - - <
18
+ - !ruby/object:Gem::Version
19
+ version: '1.0'
20
+ - - '>='
21
21
  - !ruby/object:Gem::Version
22
- version: 0.8.0
22
+ version: 0.8.1
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *17981700
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - <
28
+ - !ruby/object:Gem::Version
29
+ version: '1.0'
30
+ - - '>='
31
+ - !ruby/object:Gem::Version
32
+ version: 0.8.1
26
33
  - !ruby/object:Gem::Dependency
27
34
  name: bundler
28
- requirement: &17981100 !ruby/object:Gem::Requirement
29
- none: false
35
+ requirement: !ruby/object:Gem::Requirement
30
36
  requirements:
31
- - - ~>
37
+ - - '>='
32
38
  - !ruby/object:Gem::Version
33
- version: '1.0'
39
+ version: '0'
34
40
  type: :development
35
41
  prerelease: false
36
- version_requirements: *17981100
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - '>='
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
37
47
  - !ruby/object:Gem::Dependency
38
48
  name: jeweler
39
- requirement: &17978880 !ruby/object:Gem::Requirement
40
- none: false
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ~>
52
+ - !ruby/object:Gem::Version
53
+ version: 1.8.7
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
41
57
  requirements:
42
58
  - - ~>
43
59
  - !ruby/object:Gem::Version
44
- version: '1.6'
60
+ version: 1.8.7
61
+ - !ruby/object:Gem::Dependency
62
+ name: git
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - <
66
+ - !ruby/object:Gem::Version
67
+ version: 1.2.6
68
+ - - '>='
69
+ - !ruby/object:Gem::Version
70
+ version: 1.0.1
45
71
  type: :development
46
72
  prerelease: false
47
- version_requirements: *17978880
73
+ version_requirements: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - <
76
+ - !ruby/object:Gem::Version
77
+ version: 1.2.6
78
+ - - '>='
79
+ - !ruby/object:Gem::Version
80
+ version: 1.0.1
48
81
  - !ruby/object:Gem::Dependency
49
- name: rcov
50
- requirement: &17978380 !ruby/object:Gem::Requirement
51
- none: false
82
+ name: simplecov
83
+ requirement: !ruby/object:Gem::Requirement
52
84
  requirements:
53
85
  - - ~>
54
86
  - !ruby/object:Gem::Version
55
- version: '0.9'
87
+ version: 0.7.1
56
88
  type: :development
57
89
  prerelease: false
58
- version_requirements: *17978380
90
+ version_requirements: !ruby/object:Gem::Requirement
91
+ requirements:
92
+ - - ~>
93
+ - !ruby/object:Gem::Version
94
+ version: 0.7.1
59
95
  - !ruby/object:Gem::Dependency
60
96
  name: rdoc
61
- requirement: &17977860 !ruby/object:Gem::Requirement
62
- none: false
97
+ requirement: !ruby/object:Gem::Requirement
63
98
  requirements:
64
99
  - - ~>
65
100
  - !ruby/object:Gem::Version
66
- version: '3.9'
101
+ version: 4.0.1
67
102
  type: :development
68
103
  prerelease: false
69
- version_requirements: *17977860
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ requirements:
106
+ - - ~>
107
+ - !ruby/object:Gem::Version
108
+ version: 4.0.1
70
109
  - !ruby/object:Gem::Dependency
71
110
  name: rspec
72
- requirement: &17977360 !ruby/object:Gem::Requirement
73
- none: false
111
+ requirement: !ruby/object:Gem::Requirement
74
112
  requirements:
75
113
  - - ~>
76
114
  - !ruby/object:Gem::Version
77
- version: '2.3'
115
+ version: 2.14.1
78
116
  type: :development
79
117
  prerelease: false
80
- version_requirements: *17977360
118
+ version_requirements: !ruby/object:Gem::Requirement
119
+ requirements:
120
+ - - ~>
121
+ - !ruby/object:Gem::Version
122
+ version: 2.14.1
81
123
  description: Ruby wrapper for Cleverbot.
82
124
  email: benmanns@gmail.com
83
125
  executables: []
@@ -104,33 +146,28 @@ files:
104
146
  - spec/cleverbot/parser_spec.rb
105
147
  - spec/cleverbot_spec.rb
106
148
  - spec/spec_helper.rb
107
- has_rdoc: true
108
149
  homepage: https://github.com/benmanns/cleverbot
109
150
  licenses:
110
151
  - MIT
152
+ metadata: {}
111
153
  post_install_message:
112
154
  rdoc_options: []
113
155
  require_paths:
114
156
  - lib
115
157
  required_ruby_version: !ruby/object:Gem::Requirement
116
- none: false
117
158
  requirements:
118
- - - ! '>='
159
+ - - '>='
119
160
  - !ruby/object:Gem::Version
120
161
  version: '0'
121
- segments:
122
- - 0
123
- hash: -303389490701867246
124
162
  required_rubygems_version: !ruby/object:Gem::Requirement
125
- none: false
126
163
  requirements:
127
- - - ! '>='
164
+ - - '>='
128
165
  - !ruby/object:Gem::Version
129
166
  version: '0'
130
167
  requirements: []
131
168
  rubyforge_project:
132
- rubygems_version: 1.6.2
169
+ rubygems_version: 2.0.6
133
170
  signing_key:
134
- specification_version: 3
171
+ specification_version: 4
135
172
  summary: Ruby wrapper for Cleverbot.
136
173
  test_files: []