google_suggest 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: d510ac37b4aabe2a1d960856151381d432de1b15
4
+ data.tar.gz: f12acbcfd59cdc1b6c1e09d7ec82115627650dda
5
+ SHA512:
6
+ metadata.gz: 7735865c7555e49c5ad6f56058e65ce762db0a54dc83e7ed0e90b2e48f35de2e1be0241b158d492689387479d213483ec2426bd587c07f3432fe52af843ae3b2
7
+ data.tar.gz: 780a9a67bc9709f2f187ede5f88f994344eb30482d4ee868cd1eb2ce355213c38148399efb9477ee69e63440e1baf1cc349f3b54a0a263f176e5d2895949149b
data/Gemfile CHANGED
@@ -1,10 +1,3 @@
1
- source "http://rubygems.org"
2
-
3
- gem 'nokogiri'
4
-
5
- group :development, :test do
6
- gem 'json', :platform => :ruby_18
7
- gem 'rake'
8
- gem 'rspec', '~> 2.8.0'
9
- end
1
+ source "https://rubygems.org"
10
2
 
3
+ gemspec
data/Gemfile.lock CHANGED
@@ -1,24 +1,30 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ google_suggest (0.0.4)
5
+ nokogiri (~> 1.6.0)
6
+
1
7
  GEM
2
- remote: http://rubygems.org/
8
+ remote: https://rubygems.org/
3
9
  specs:
4
- diff-lcs (1.1.3)
5
- json (1.6.4)
6
- nokogiri (1.5.0)
7
- rake (0.9.2.2)
8
- rspec (2.8.0)
9
- rspec-core (~> 2.8.0)
10
- rspec-expectations (~> 2.8.0)
11
- rspec-mocks (~> 2.8.0)
12
- rspec-core (2.8.0)
13
- rspec-expectations (2.8.0)
14
- diff-lcs (~> 1.1.2)
15
- rspec-mocks (2.8.0)
10
+ diff-lcs (1.2.5)
11
+ mini_portile (0.6.2)
12
+ nokogiri (1.6.6.2)
13
+ mini_portile (~> 0.6.0)
14
+ rake (10.4.2)
15
+ rspec (2.14.1)
16
+ rspec-core (~> 2.14.0)
17
+ rspec-expectations (~> 2.14.0)
18
+ rspec-mocks (~> 2.14.0)
19
+ rspec-core (2.14.8)
20
+ rspec-expectations (2.14.5)
21
+ diff-lcs (>= 1.1.3, < 2.0)
22
+ rspec-mocks (2.14.6)
16
23
 
17
24
  PLATFORMS
18
25
  ruby
19
26
 
20
27
  DEPENDENCIES
21
- json
22
- nokogiri
28
+ google_suggest!
23
29
  rake
24
- rspec (~> 2.8.0)
30
+ rspec (~> 2.14.0)
data/LICENCE.txt CHANGED
File without changes
data/Rakefile CHANGED
@@ -1,3 +1,4 @@
1
+ require 'bundler/gem_tasks'
1
2
  require 'rspec/core/rake_task'
2
3
 
3
4
  RSpec::Core::RakeTask.new do |t|
@@ -0,0 +1,25 @@
1
+ lib = File.expand_path('../lib', __FILE__)
2
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
+
4
+ require 'google_suggest/version'
5
+ require 'rake'
6
+
7
+ Gem::Specification.new do |spec|
8
+ spec.name = 'google_suggest'
9
+ spec.required_ruby_version = '>= 1.8.7'
10
+ spec.summary = 'A gem which allows us to retrieve suggest words from Google in your Ruby Code.'
11
+ spec.version = GoogleSuggest::VERSION
12
+ spec.author = 'Tatsuya Sato'
13
+ spec.email = 'satoryu.1981@gmail.com'
14
+ spec.homepage = 'http://github.com/satoryu/google_suggest/'
15
+ spec.files = FileList[%w[
16
+ [A-Z]*
17
+ lib/**/*.rb
18
+ spec/**/*
19
+ ]]
20
+ spec.add_runtime_dependency "nokogiri", '~> 1.6.0'
21
+
22
+ spec.add_development_dependency 'rake'
23
+ spec.add_development_dependency 'rspec', '~> 2.14.0'
24
+ end
25
+
@@ -0,0 +1,3 @@
1
+ class GoogleSuggest
2
+ VERSION = '0.0.4'
3
+ end
File without changes
@@ -1,5 +1,4 @@
1
- # encoding: utf-8
2
- require File.expand_path(File.join(File.dirname(__FILE__), 'spec_helper'))
1
+ require 'spec_helper'
3
2
 
4
3
  describe GoogleSuggest do
5
4
  context "default settiong" do
@@ -13,16 +12,16 @@ describe GoogleSuggest do
13
12
  before do
14
13
  google_suggest = GoogleSuggest.new
15
14
  res = Object.new
16
- res.stub!(:body) do
15
+ allow(res).to receive(:body) do
17
16
  doc = nil
18
17
  File.open(File.join(File.dirname(__FILE__), 'sample_us.xml')) do |f|
19
18
  doc = f.read
20
19
  end
21
20
  doc
22
21
  end
23
- google_suggest.stub!(:http_get) { res }
22
+ allow(google_suggest).to receive(:http_get) { res }
24
23
  suggestions = google_suggest.suggest_for('google')
25
- GoogleSuggest.stub!(:new).and_return { mock('google_suggest', :suggest_for => suggestions) }
24
+ allow(GoogleSuggest).to receive(:new).and_return { double('google_suggest', :suggest_for => suggestions) }
26
25
 
27
26
  @suggestions = GoogleSuggest.suggest_for('google')
28
27
  end
@@ -69,15 +68,15 @@ describe GoogleSuggest do
69
68
 
70
69
  before do
71
70
  @google_suggest = GoogleSuggest.new
72
- res = Object.new
73
- res.stub!(:body) do
71
+ res = double(:response)
72
+ allow(res).to receive(:body) do
74
73
  doc = nil
75
74
  File.open(File.join(File.dirname(__FILE__), 'sample_us.xml')) do |f|
76
75
  doc = f.read
77
76
  end
78
77
  doc
79
78
  end
80
- @google_suggest.stub!(:http_get) { res }
79
+ allow(@google_suggest).to receive(:http_get) { res }
81
80
  end
82
81
 
83
82
  it do
@@ -110,14 +109,14 @@ describe GoogleSuggest do
110
109
  before do
111
110
  @google_suggest = GoogleSuggest.new
112
111
  res = Object.new
113
- res.stub!(:body) do
112
+ allow(res).to receive(:body) do
114
113
  doc = nil
115
114
  File.open(File.join(File.dirname(__FILE__), 'sample_ja.xml')) do |f|
116
115
  doc = f.read
117
116
  end
118
117
  doc
119
118
  end
120
- @google_suggest.stub!(:http_get) { res }
119
+ allow(@google_suggest).to receive(:http_get) { res }
121
120
  end
122
121
  subject {@google_suggest.suggest_for('グーグル').shift['suggestion']}
123
122
 
data/spec/sample_ja.xml CHANGED
File without changes
data/spec/sample_us.xml CHANGED
File without changes
data/spec/spec_helper.rb CHANGED
File without changes
metadata CHANGED
@@ -1,27 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google_suggest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
5
- prerelease:
4
+ version: 0.0.4
6
5
  platform: ruby
7
6
  authors:
8
7
  - Tatsuya Sato
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-01-17 00:00:00.000000000Z
11
+ date: 2015-06-08 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: nokogiri
16
- requirement: &3824240 !ruby/object:Gem::Requirement
17
- none: false
15
+ requirement: !ruby/object:Gem::Requirement
18
16
  requirements:
19
- - - ! '>='
17
+ - - "~>"
20
18
  - !ruby/object:Gem::Version
21
- version: '0'
19
+ version: 1.6.0
22
20
  type: :runtime
23
21
  prerelease: false
24
- version_requirements: *3824240
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 1.6.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 2.14.0
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 2.14.0
25
55
  description:
26
56
  email: satoryu.1981@gmail.com
27
57
  executables: []
@@ -32,34 +62,35 @@ files:
32
62
  - Gemfile.lock
33
63
  - LICENCE.txt
34
64
  - Rakefile
65
+ - google_suggest.gemspec
35
66
  - lib/google_suggest.rb
67
+ - lib/google_suggest/version.rb
36
68
  - spec/google_suggest_spec.rb
37
69
  - spec/sample_ja.xml
38
70
  - spec/sample_us.xml
39
71
  - spec/spec_helper.rb
40
72
  homepage: http://github.com/satoryu/google_suggest/
41
73
  licenses: []
74
+ metadata: {}
42
75
  post_install_message:
43
76
  rdoc_options: []
44
77
  require_paths:
45
78
  - lib
46
79
  required_ruby_version: !ruby/object:Gem::Requirement
47
- none: false
48
80
  requirements:
49
- - - ! '>='
81
+ - - ">="
50
82
  - !ruby/object:Gem::Version
51
83
  version: 1.8.7
52
84
  required_rubygems_version: !ruby/object:Gem::Requirement
53
- none: false
54
85
  requirements:
55
- - - ! '>='
86
+ - - ">="
56
87
  - !ruby/object:Gem::Version
57
88
  version: '0'
58
89
  requirements: []
59
90
  rubyforge_project:
60
- rubygems_version: 1.8.10
91
+ rubygems_version: 2.4.5
61
92
  signing_key:
62
- specification_version: 3
93
+ specification_version: 4
63
94
  summary: A gem which allows us to retrieve suggest words from Google in your Ruby
64
95
  Code.
65
96
  test_files: []