meta_search_hub 1.1.3

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.
@@ -0,0 +1,34 @@
1
+ y2k:
2
+ estimated_hours: 1000
3
+ name : Y2K Software Updates
4
+ id : 1
5
+
6
+ virus:
7
+ estimated_hours: 80
8
+ name : Virus
9
+ id : 2
10
+
11
+ awesome:
12
+ estimated_hours: 100
13
+ name : Do something awesome
14
+ id : 3
15
+
16
+ metasearch:
17
+ estimated_hours: 100
18
+ name : MetaSearch Development
19
+ id : 4
20
+
21
+ another:
22
+ estimated_hours: 120
23
+ name : Another Project
24
+ id : 5
25
+
26
+ nil:
27
+ estimated_hours: 1000
28
+ name :
29
+ id : 6
30
+
31
+ blank:
32
+ estimated_hours: 1000
33
+ name : ""
34
+ id : 7
@@ -0,0 +1,47 @@
1
+ ActiveRecord::Schema.define do
2
+
3
+ create_table "companies", :force => true do |t|
4
+ t.string "name"
5
+ t.datetime "created_at"
6
+ t.datetime "updated_at"
7
+ end
8
+
9
+ create_table "developers", :force => true do |t|
10
+ t.integer "company_id"
11
+ t.string "name"
12
+ t.integer "salary"
13
+ t.boolean "slacker"
14
+ end
15
+
16
+ create_table "projects", :force => true do |t|
17
+ t.string "name"
18
+ t.float "estimated_hours"
19
+ end
20
+
21
+ create_table "developers_projects", :id => false, :force => true do |t|
22
+ t.integer "developer_id"
23
+ t.integer "project_id"
24
+ end
25
+
26
+ create_table "notes", :force => true do |t|
27
+ t.string "notable_type"
28
+ t.integer "notable_id"
29
+ t.string "note"
30
+ end
31
+
32
+ create_table "data_types", :force => true do |t|
33
+ t.integer "company_id"
34
+ t.string "str"
35
+ t.text "txt"
36
+ t.integer "int"
37
+ t.float "flt"
38
+ t.decimal "dec"
39
+ t.datetime "dtm"
40
+ t.timestamp "tms"
41
+ t.time "tim"
42
+ t.date "dat"
43
+ t.binary "bin"
44
+ t.boolean "bln"
45
+ end
46
+
47
+ end
data/test/helper.rb ADDED
@@ -0,0 +1,44 @@
1
+ require 'rubygems'
2
+ require 'test/unit'
3
+ require 'shoulda'
4
+ require 'active_support/time'
5
+ require 'active_record'
6
+ require 'active_record/fixtures'
7
+ require 'action_view'
8
+ require 'meta_search'
9
+
10
+ FIXTURES_PATH = File.join(File.dirname(__FILE__), 'fixtures')
11
+
12
+ Time.zone = 'Eastern Time (US & Canada)'
13
+
14
+ ActiveRecord::Base.establish_connection(
15
+ :adapter => defined?(JRUBY_VERSION) ? 'jdbcsqlite3' : 'sqlite3',
16
+ :database => ':memory:'
17
+ )
18
+
19
+ dep = defined?(ActiveSupport::Dependencies) ? ActiveSupport::Dependencies : ::Dependencies
20
+ dep.autoload_paths.unshift FIXTURES_PATH
21
+
22
+ ActiveRecord::Base.silence do
23
+ ActiveRecord::Migration.verbose = false
24
+ load File.join(FIXTURES_PATH, 'schema.rb')
25
+ end
26
+
27
+ ActiveRecord::Fixtures.create_fixtures(FIXTURES_PATH, ActiveRecord::Base.connection.tables)
28
+
29
+ I18n.load_path += Dir[File.join(File.dirname(__FILE__), 'locales', '*.yml')]
30
+
31
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
32
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
33
+
34
+ class Test::Unit::TestCase
35
+ def self.context_a_search_against(name, object, &block)
36
+ context "A search against #{name}" do
37
+ setup do
38
+ @s = object.search
39
+ end
40
+
41
+ merge_block(&block) if block_given?
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,5 @@
1
+ es:
2
+ activerecord:
3
+ attributes:
4
+ company:
5
+ name: Nombre
@@ -0,0 +1,18 @@
1
+ flanders:
2
+ activerecord:
3
+ attributes:
4
+ company:
5
+ name: "Company name-diddly"
6
+ developer:
7
+ name: "Developer name-diddly"
8
+ salary: "Developer salary-doodly"
9
+ meta_search:
10
+ or: 'or-diddly'
11
+ predicates:
12
+ contains: "%{attribute} contains-diddly"
13
+ equals: "%{attribute} equals-diddly"
14
+ attributes:
15
+ company:
16
+ reverse_name: "Company reverse name-diddly"
17
+ developer:
18
+ name_contains: "Developer name-diddly contains-aroonie"