cloud_search 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --color --format documentation
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in cloud_search.gemspec
4
+ gemspec
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2012 Willian Fernandes
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,70 @@
1
+ # CloudSearch
2
+
3
+ TODO: Write a gem description
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem "cloud_search"
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install cloud_search
18
+
19
+ ## Usage
20
+
21
+ The example bellow uses the Amazon's example database called `imdb-movies`:
22
+
23
+ ```ruby
24
+ # Use your AWS CloudSearch configuration
25
+ CloudSearch.configure do |config|
26
+ config.domain_id = "pl6u4t3elu7dhsbwaqbsy3y6be"
27
+ config.domain_name = "imdb-movies"
28
+ end
29
+
30
+ # Search for 'star wars' on 'imdb-movies'
31
+ resp, msg = CloudSearch::Search.request("star wars",
32
+ :actor,
33
+ :director,
34
+ :title,
35
+ :year,
36
+ :text_relevance)
37
+
38
+ # Or you can search using part of the name
39
+ resp, msg = CloudSearch::Search.request("matri*",
40
+ :actor,
41
+ :title,
42
+ :year,
43
+ :text_relevance)
44
+
45
+ # Number of results
46
+ resp["found"]
47
+
48
+ resp["hit"].each do |result|
49
+ movie = result["data"]
50
+
51
+ # List of actors on the movie
52
+ movie["actor"]
53
+
54
+ # Movie's name
55
+ movie["title"]
56
+
57
+ # A rank number used to sort the results
58
+ # The `text_relevance` key is added by AMS CloudSearch
59
+ movie["text_relevance"]
60
+ end
61
+ ```
62
+
63
+ ## Contributing
64
+
65
+ 1. Fork it
66
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
67
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
68
+ 4. Push to the branch (`git push origin my-new-feature`)
69
+ 5. Create new Pull Request
70
+
@@ -0,0 +1,9 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ require "rspec/core/rake_task"
4
+
5
+ RSpec::Core::RakeTask.new
6
+
7
+ task :default => :spec
8
+ task :test => :spec
9
+
@@ -0,0 +1,30 @@
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'cloud_search/version'
5
+
6
+ Gem::Specification.new do |gem|
7
+ gem.name = "cloud_search"
8
+ gem.version = CloudSearch::VERSION
9
+ gem.platform = Gem::Platform::RUBY
10
+ gem.authors = ["Willian Fernandes"]
11
+ gem.email = ["willian@willianfernandes.com.br"]
12
+ gem.homepage = "http://rubygems.org/gems/cloud_search"
13
+ gem.summary = "A wraper to Amazon CloudSearch's API"
14
+ gem.description = gem.summary
15
+
16
+ gem.files = `git ls-files`.split($/)
17
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
18
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
19
+ gem.require_paths = ["lib"]
20
+
21
+ gem.add_development_dependency "pry"
22
+ gem.add_development_dependency "rake"
23
+ gem.add_development_dependency "rspec" , "~> 2.11"
24
+ gem.add_development_dependency "simplecov" , "~> 0.6"
25
+ gem.add_development_dependency "vcr" , "~> 2.2"
26
+ gem.add_development_dependency "webmock"
27
+
28
+ gem.add_dependency "em-http-request" , "~> 1.0"
29
+ end
30
+
@@ -0,0 +1,16 @@
1
+ require "em-http"
2
+ require "cloud_search/version"
3
+
4
+ module CloudSearch
5
+ autoload :Config, "cloud_search/config"
6
+ autoload :Search, "cloud_search/search"
7
+
8
+ def self.config
9
+ Config.instance
10
+ end
11
+
12
+ def self.configure(&block)
13
+ block.call(self.config)
14
+ end
15
+ end
16
+
@@ -0,0 +1,36 @@
1
+ require "singleton"
2
+
3
+ module CloudSearch
4
+ class Config
5
+ include Singleton
6
+
7
+ attr_accessor :api_version
8
+ attr_accessor :configuration_url
9
+ attr_accessor :domain_id
10
+ attr_accessor :domain_name
11
+ attr_accessor :document_url
12
+ attr_accessor :region
13
+ attr_accessor :search_url
14
+
15
+ def api_version
16
+ @api_version ||= "2011-02-01"
17
+ end
18
+
19
+ def configuration_url
20
+ @configuration_url ||= "https://cloudsearch.#{self.region}.amazonaws.com"
21
+ end
22
+
23
+ def document_url
24
+ @document_url ||= "http://doc-#{self.domain_name}-#{self.domain_id}.#{self.region}.cloudsearch.amazonaws.com"
25
+ end
26
+
27
+ def region
28
+ @region ||= "us-east-1"
29
+ end
30
+
31
+ def search_url
32
+ @search_url ||= "http://search-#{self.domain_name}-#{self.domain_id}.#{self.region}.cloudsearch.amazonaws.com"
33
+ end
34
+ end
35
+ end
36
+
@@ -0,0 +1,35 @@
1
+ require "json"
2
+
3
+ module CloudSearch
4
+ class Search
5
+ def self.request(query, *fields)
6
+ response, message = nil
7
+
8
+ EM.run do
9
+ url = CloudSearch.config.search_url
10
+ url+= "/#{CloudSearch.config.api_version}"
11
+ url+= "/search"
12
+ url+= "?q=#{CGI.escape(query)}"
13
+ url+= "&return-fields=#{CGI.escape(fields.join(","))}" if fields.any?
14
+
15
+ http = EM::HttpRequest.new(url).get
16
+
17
+ http.callback {
18
+ message = "#{http.response_header.status} - #{http.response.length} bytes\n#{url}\n"
19
+ response = JSON.parse(http.response)
20
+
21
+ EM.stop
22
+ }
23
+
24
+ http.errback {
25
+ message = "#{url}\n#{http.error}"
26
+
27
+ EM.stop
28
+ }
29
+ end
30
+
31
+ [response, message]
32
+ end
33
+ end
34
+ end
35
+
@@ -0,0 +1,3 @@
1
+ module CloudSearch
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,23 @@
1
+ require "spec_helper"
2
+
3
+ describe CloudSearch::Config do
4
+ subject { CloudSearch::Config.instance }
5
+
6
+ before do
7
+ CloudSearch.configure do |config|
8
+ config.domain_id = "pl6u4t3elu7dhsbwaqbsy3y6be"
9
+ config.domain_name = "imdb-movies"
10
+ end
11
+ end
12
+
13
+ describe "after set some configurations" do
14
+ it { expect(subject.api_version).to eql("2011-02-01") }
15
+ it { expect(subject.configuration_url).to eql("https://cloudsearch.us-east-1.amazonaws.com") }
16
+ it { expect(subject.domain_id).to eql("pl6u4t3elu7dhsbwaqbsy3y6be") }
17
+ it { expect(subject.domain_name).to eql("imdb-movies") }
18
+ it { expect(subject.document_url).to eql("http://doc-imdb-movies-pl6u4t3elu7dhsbwaqbsy3y6be.us-east-1.cloudsearch.amazonaws.com") }
19
+ it { expect(subject.region).to eql("us-east-1") }
20
+ it { expect(subject.search_url).to eql("http://search-imdb-movies-pl6u4t3elu7dhsbwaqbsy3y6be.us-east-1.cloudsearch.amazonaws.com") }
21
+ end
22
+ end
23
+
@@ -0,0 +1,39 @@
1
+ require "spec_helper"
2
+
3
+ describe CloudSearch::Search do
4
+ subject { CloudSearch::Search }
5
+
6
+ before do
7
+ CloudSearch.configure do |config|
8
+ config.domain_id = "pl6u4t3elu7dhsbwaqbsy3y6be"
9
+ config.domain_name = "imdb-movies"
10
+ end
11
+ end
12
+
13
+ describe ".request" do
14
+ let(:fields) { [:actor, :director, :title, :year, :text_relevance] }
15
+
16
+ context "given valid parameters" do
17
+ it "returns http 200 code" do
18
+ VCR.use_cassette("search/request/full") do
19
+ resp, msg = subject.request("star wars", *fields)
20
+ expect(msg).to match(/^200/)
21
+ end
22
+ end
23
+
24
+ it "returns one or more results" do
25
+ VCR.use_cassette("search/request/full") do
26
+ resp, msg = subject.request("star wars", *fields)
27
+ expect(resp["hits"]["found"]).to be >= 1
28
+ end
29
+ end
30
+ end
31
+
32
+ context "given invalid parameters" do
33
+ it "returns" do
34
+
35
+ end
36
+ end
37
+ end
38
+ end
39
+
@@ -0,0 +1,114 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://search-imdb-movies-pl6u4t3elu7dhsbwaqbsy3y6be.us-east-1.cloudsearch.amazonaws.com/2011-02-01/search?q=star%20wars&return-fields=actor,director,title,year,text_relevance
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers: {}
10
+ response:
11
+ status:
12
+ code: 200
13
+ message: OK
14
+ headers:
15
+ !binary "Q29udGVudC1UeXBl":
16
+ - !binary |-
17
+ YXBwbGljYXRpb24vanNvbg==
18
+ !binary "RGF0ZQ==":
19
+ - !binary |-
20
+ RnJpLCAxNCBTZXAgMjAxMiAxNjoyODozNSBHTVQ=
21
+ !binary "U2VydmVy":
22
+ - !binary |-
23
+ U2VydmVy
24
+ !binary "Q29udGVudC1MZW5ndGg=":
25
+ - !binary |-
26
+ MzUzNg==
27
+ !binary "Q29ubmVjdGlvbg==":
28
+ - !binary |-
29
+ Q2xvc2U=
30
+ body:
31
+ encoding: ASCII-8BIT
32
+ string: !binary |-
33
+ eyJyYW5rIjoiLXRleHRfcmVsZXZhbmNlIiwibWF0Y2gtZXhwciI6IihsYWJl
34
+ bCAnc3RhciB3YXJzJykiLCJoaXRzIjp7ImZvdW5kIjo3LCJzdGFydCI6MCwi
35
+ aGl0IjpbeyJpZCI6InR0MTE4NTgzNCIsImRhdGEiOnsiYWN0b3IiOlsiQWJl
36
+ cmNyb21iaWUsIElhbiIsIkJha2VyLCBEZWUgQnJhZGxleSIsIkJ1cnRvbiwg
37
+ Q29yZXkiLCJFY2tzdGVpbiwgQXNobGV5IiwiRnV0dGVybWFuLCBOaWthIiwi
38
+ S2FuZSwgVG9tIiwiTGFudGVyLCBNYXR0IiwiVGFiZXIsIENhdGhlcmluZSIs
39
+ IlRheWxvciwgSmFtZXMgQXJub2xkIiwiV29vZCwgTWF0dGhldyJdLCJkaXJl
40
+ Y3RvciI6WyJGaWxvbmksIERhdmUiXSwidGV4dF9yZWxldmFuY2UiOlsiMzA4
41
+ Il0sInRpdGxlIjpbIlN0YXIgV2FyczogVGhlIENsb25lIFdhcnMiXSwieWVh
42
+ ciI6WyIyMDA4Il19fSx7ImlkIjoidHQwMDc2NzU5IiwiZGF0YSI6eyJhY3Rv
43
+ ciI6WyJCYWtlciwgS2VubnkiLCJDdXNoaW5nLCBQZXRlciIsIkRhbmllbHMs
44
+ IEFudGhvbnkiLCJEZSBBcmFnb24sIE1hcmlhIiwiRGlhbW9uZCwgUGV0ZXIi
45
+ LCJGaXNoZXIsIENhcnJpZSIsIkZvcmQsIEhhcnJpc29uIiwiR29mZmUsIFJ1
46
+ c3R5IiwiR3Vpbm5lc3MsIEFsZWMiLCJIYW1pbGwsIE1hcmsiLCJKb2huc3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ri, 14 Sep 2012 16:28:35 GMT
114
+ recorded_with: VCR 2.2.4
@@ -0,0 +1,12 @@
1
+ require "bundler"
2
+ Bundler.require(:default, :development)
3
+
4
+ require "simplecov"
5
+ SimpleCov.start
6
+
7
+ require "cloud_search"
8
+
9
+ Dir[File.dirname(__FILE__) + "/support/**/*.rb"].each do |file|
10
+ require file
11
+ end
12
+
@@ -0,0 +1,5 @@
1
+ VCR.configure do |c|
2
+ c.cassette_library_dir = File.expand_path("../../fixtures/vcr_cassettes", __FILE__)
3
+ c.hook_into :webmock
4
+ end
5
+
metadata ADDED
@@ -0,0 +1,179 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: cloud_search
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Willian Fernandes
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-10-11 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: pry
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: rake
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
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: rspec
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ~>
52
+ - !ruby/object:Gem::Version
53
+ version: '2.11'
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: '2.11'
62
+ - !ruby/object:Gem::Dependency
63
+ name: simplecov
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ~>
68
+ - !ruby/object:Gem::Version
69
+ version: '0.6'
70
+ type: :development
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ~>
76
+ - !ruby/object:Gem::Version
77
+ version: '0.6'
78
+ - !ruby/object:Gem::Dependency
79
+ name: vcr
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ~>
84
+ - !ruby/object:Gem::Version
85
+ version: '2.2'
86
+ type: :development
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ~>
92
+ - !ruby/object:Gem::Version
93
+ version: '2.2'
94
+ - !ruby/object:Gem::Dependency
95
+ name: webmock
96
+ requirement: !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - ! '>='
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
102
+ type: :development
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ - !ruby/object:Gem::Dependency
111
+ name: em-http-request
112
+ requirement: !ruby/object:Gem::Requirement
113
+ none: false
114
+ requirements:
115
+ - - ~>
116
+ - !ruby/object:Gem::Version
117
+ version: '1.0'
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ~>
124
+ - !ruby/object:Gem::Version
125
+ version: '1.0'
126
+ description: A wraper to Amazon CloudSearch's API
127
+ email:
128
+ - willian@willianfernandes.com.br
129
+ executables: []
130
+ extensions: []
131
+ extra_rdoc_files: []
132
+ files:
133
+ - .gitignore
134
+ - .rspec
135
+ - Gemfile
136
+ - LICENSE.txt
137
+ - README.md
138
+ - Rakefile
139
+ - cloud_search.gemspec
140
+ - lib/cloud_search.rb
141
+ - lib/cloud_search/config.rb
142
+ - lib/cloud_search/search.rb
143
+ - lib/cloud_search/version.rb
144
+ - spec/cloud_search/config_spec.rb
145
+ - spec/cloud_search/search_spec.rb
146
+ - spec/fixtures/vcr_cassettes/search/request/full.yml
147
+ - spec/spec_helper.rb
148
+ - spec/support/vcr.rb
149
+ homepage: http://rubygems.org/gems/cloud_search
150
+ licenses: []
151
+ post_install_message:
152
+ rdoc_options: []
153
+ require_paths:
154
+ - lib
155
+ required_ruby_version: !ruby/object:Gem::Requirement
156
+ none: false
157
+ requirements:
158
+ - - ! '>='
159
+ - !ruby/object:Gem::Version
160
+ version: '0'
161
+ required_rubygems_version: !ruby/object:Gem::Requirement
162
+ none: false
163
+ requirements:
164
+ - - ! '>='
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
167
+ requirements: []
168
+ rubyforge_project:
169
+ rubygems_version: 1.8.23
170
+ signing_key:
171
+ specification_version: 3
172
+ summary: A wraper to Amazon CloudSearch's API
173
+ test_files:
174
+ - spec/cloud_search/config_spec.rb
175
+ - spec/cloud_search/search_spec.rb
176
+ - spec/fixtures/vcr_cassettes/search/request/full.yml
177
+ - spec/spec_helper.rb
178
+ - spec/support/vcr.rb
179
+ has_rdoc: