google_set 0.2.0 → 0.2.1
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.
- data/README.rdoc +2 -1
- data/Rakefile +5 -11
- data/VERSION +1 -1
- data/google_set.gemspec +1 -1
- data/lib/google_set.rb +1 -1
- data/spec/google_set_spec.rb +2 -2
- data/spec/spec_helper.rb +1 -6
- metadata +28 -13
- data/.gitignore +0 -21
data/README.rdoc
CHANGED
@@ -13,7 +13,8 @@ Simple API for {Google Sets}[http://labs.google.com/sets]
|
|
13
13
|
sudo gem install google_set
|
14
14
|
|
15
15
|
== Acknowledgements
|
16
|
-
Based on {bjeanes}[http://github.com/bjeanes] similar gem {google_sets}[http://github.com/bjeanes/google-sets/]
|
16
|
+
Based on {bjeanes}[http://github.com/bjeanes] similar gem {google_sets}[http://github.com/bjeanes/google-sets/].
|
17
|
+
Thanks to {andruby}[https://github.com/andruby] for the contributions.
|
17
18
|
|
18
19
|
== Note on Patches/Pull Requests
|
19
20
|
|
data/Rakefile
CHANGED
@@ -10,7 +10,7 @@ begin
|
|
10
10
|
gem.email = "dev+dcadenas@cuboxsa.com"
|
11
11
|
gem.homepage = "http://github.com/cubox/google_set"
|
12
12
|
gem.authors = ["Daniel Cadenas"]
|
13
|
-
gem.add_development_dependency "rspec", ">=
|
13
|
+
gem.add_development_dependency "rspec", ">= 2"
|
14
14
|
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
15
15
|
end
|
16
16
|
Jeweler::GemcutterTasks.new
|
@@ -18,16 +18,10 @@ rescue LoadError
|
|
18
18
|
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
19
19
|
end
|
20
20
|
|
21
|
-
require '
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
end
|
26
|
-
|
27
|
-
Spec::Rake::SpecTask.new(:rcov) do |spec|
|
28
|
-
spec.libs << 'lib' << 'spec'
|
29
|
-
spec.pattern = 'spec/**/*_spec.rb'
|
30
|
-
spec.rcov = true
|
21
|
+
require 'rspec/core/rake_task'
|
22
|
+
RSpec::Core::RakeTask.new(:spec) do |t|
|
23
|
+
t.rspec_opts = ["-f progress", "-r ./spec/spec_helper.rb"]
|
24
|
+
t.pattern = 'spec/*_spec.rb'
|
31
25
|
end
|
32
26
|
|
33
27
|
task :spec => :check_dependencies
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.1
|
data/google_set.gemspec
CHANGED
data/lib/google_set.rb
CHANGED
@@ -13,7 +13,7 @@ class GoogleSet
|
|
13
13
|
def self.for(*terms)
|
14
14
|
path = "http://labs.google.com/sets?&#{query_string(*terms)}"
|
15
15
|
result = open(path).read
|
16
|
-
result.scan(%r{<a href="http://www\.google\.com/search\?hl=en&q=[^"]+">(.*?)</a>}).
|
16
|
+
result.scan(%r{<a href="http://www\.google\.com/search\?hl=en&q=[^"]+">(.*?)</a>}).flatten
|
17
17
|
rescue StandardError => e
|
18
18
|
raise GoogleSet::Error.new(e)
|
19
19
|
end
|
data/spec/google_set_spec.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
require
|
1
|
+
require 'spec_helper'
|
2
2
|
|
3
3
|
describe "GoogleSet" do
|
4
4
|
it "should return related terms for the specified term" do
|
5
|
-
GoogleSet.for("
|
5
|
+
GoogleSet.for("banana", "orange").should include("apples")
|
6
6
|
end
|
7
7
|
|
8
8
|
it "should return nothing if no elements are specified" do
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google_set
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 21
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 2
|
9
|
+
- 1
|
10
|
+
version: 0.2.1
|
5
11
|
platform: ruby
|
6
12
|
authors:
|
7
13
|
- Daniel Cadenas
|
@@ -9,19 +15,23 @@ autorequire:
|
|
9
15
|
bindir: bin
|
10
16
|
cert_chain: []
|
11
17
|
|
12
|
-
date:
|
18
|
+
date: 2011-05-12 00:00:00 -03:00
|
13
19
|
default_executable:
|
14
20
|
dependencies:
|
15
21
|
- !ruby/object:Gem::Dependency
|
16
22
|
name: rspec
|
17
|
-
|
18
|
-
|
19
|
-
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
20
26
|
requirements:
|
21
27
|
- - ">="
|
22
28
|
- !ruby/object:Gem::Version
|
23
|
-
|
24
|
-
|
29
|
+
hash: 7
|
30
|
+
segments:
|
31
|
+
- 2
|
32
|
+
version: "2"
|
33
|
+
type: :development
|
34
|
+
version_requirements: *id001
|
25
35
|
description: Simple API for Google Sets
|
26
36
|
email: dev+dcadenas@cuboxsa.com
|
27
37
|
executables: []
|
@@ -33,7 +43,6 @@ extra_rdoc_files:
|
|
33
43
|
- README.rdoc
|
34
44
|
files:
|
35
45
|
- .document
|
36
|
-
- .gitignore
|
37
46
|
- LICENSE
|
38
47
|
- README.rdoc
|
39
48
|
- Rakefile
|
@@ -48,26 +57,32 @@ homepage: http://github.com/cubox/google_set
|
|
48
57
|
licenses: []
|
49
58
|
|
50
59
|
post_install_message:
|
51
|
-
rdoc_options:
|
52
|
-
|
60
|
+
rdoc_options: []
|
61
|
+
|
53
62
|
require_paths:
|
54
63
|
- lib
|
55
64
|
required_ruby_version: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
56
66
|
requirements:
|
57
67
|
- - ">="
|
58
68
|
- !ruby/object:Gem::Version
|
69
|
+
hash: 3
|
70
|
+
segments:
|
71
|
+
- 0
|
59
72
|
version: "0"
|
60
|
-
version:
|
61
73
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
74
|
+
none: false
|
62
75
|
requirements:
|
63
76
|
- - ">="
|
64
77
|
- !ruby/object:Gem::Version
|
78
|
+
hash: 3
|
79
|
+
segments:
|
80
|
+
- 0
|
65
81
|
version: "0"
|
66
|
-
version:
|
67
82
|
requirements: []
|
68
83
|
|
69
84
|
rubyforge_project:
|
70
|
-
rubygems_version: 1.
|
85
|
+
rubygems_version: 1.6.2
|
71
86
|
signing_key:
|
72
87
|
specification_version: 3
|
73
88
|
summary: Simple API for Google Sets
|