autosuggest-rb 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +44 -31
- data/Rakefile +10 -0
- data/autosuggest-rb.gemspec +7 -6
- data/lib/autosuggest/controller_macros.rb +9 -3
- data/lib/autosuggest/form_helper.rb +1 -1
- data/lib/autosuggest/version.rb +1 -1
- data/lib/generators/autosuggest_generator.rb +2 -1
- data/test/controller_test.rb +73 -0
- data/test/db_stores_test.rb +8 -0
- data/test/form_helper_test.rb +22 -0
- data/test/support/active_record.rb +43 -0
- data/test/test_helper.rb +28 -0
- metadata +19 -56
- data/integration/.gitignore +0 -4
- data/integration/Gemfile +0 -43
- data/integration/README +0 -256
- data/integration/Rakefile +0 -7
- data/integration/app/controllers/application_controller.rb +0 -3
- data/integration/app/helpers/application_helper.rb +0 -2
- data/integration/app/views/layouts/application.html.erb +0 -14
- data/integration/config.ru +0 -4
- data/integration/config/application.rb +0 -46
- data/integration/config/boot.rb +0 -6
- data/integration/config/database.yml +0 -22
- data/integration/config/environment.rb +0 -5
- data/integration/config/environments/development.rb +0 -26
- data/integration/config/environments/production.rb +0 -49
- data/integration/config/environments/test.rb +0 -35
- data/integration/config/initializers/backtrace_silencers.rb +0 -7
- data/integration/config/initializers/inflections.rb +0 -10
- data/integration/config/initializers/mime_types.rb +0 -5
- data/integration/config/initializers/secret_token.rb +0 -7
- data/integration/config/initializers/session_store.rb +0 -8
- data/integration/config/locales/en.yml +0 -5
- data/integration/config/routes.rb +0 -58
- data/integration/db/seeds.rb +0 -7
- data/integration/doc/README_FOR_APP +0 -2
- data/integration/lib/tasks/.gitkeep +0 -0
- data/integration/public/404.html +0 -26
- data/integration/public/422.html +0 -26
- data/integration/public/500.html +0 -26
- data/integration/public/favicon.ico +0 -0
- data/integration/public/images/rails.png +0 -0
- data/integration/public/index.html +0 -239
- data/integration/public/javascripts/application.js +0 -2
- data/integration/public/javascripts/controls.js +0 -965
- data/integration/public/javascripts/dragdrop.js +0 -974
- data/integration/public/javascripts/effects.js +0 -1123
- data/integration/public/javascripts/prototype.js +0 -6001
- data/integration/public/javascripts/rails.js +0 -191
- data/integration/public/robots.txt +0 -5
- data/integration/public/stylesheets/.gitkeep +0 -0
- data/integration/script/rails +0 -6
- data/integration/test/performance/browsing_test.rb +0 -9
- data/integration/test/test_helper.rb +0 -13
- data/integration/vendor/plugins/.gitkeep +0 -0
- data/spec/lib/class_methods_spec.rb +0 -9
- data/spec/spec_helper.rb +0 -17
data/README.markdown
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
# autosuggest
|
1
|
+
# autosuggest-rb
|
2
2
|
|
3
3
|
## Installing
|
4
4
|
|
5
5
|
Include the gem on your Gemfile
|
6
6
|
|
7
|
-
gem 'autosuggest'
|
7
|
+
gem 'autosuggest-rb'
|
8
8
|
|
9
9
|
Install it
|
10
10
|
|
@@ -17,7 +17,7 @@ Run the generator
|
|
17
17
|
And include jquery.autoSuggest.js and autoSuggest.css on your layouts
|
18
18
|
|
19
19
|
javascript_include_tag "jquery.autoSuggest.js"
|
20
|
-
|
20
|
+
stylesheet_link_tag "autoSuggest.css"
|
21
21
|
|
22
22
|
## Usage
|
23
23
|
|
@@ -52,7 +52,16 @@ From the view you can create the autosuggest field like this:
|
|
52
52
|
f.autosuggest_field :tags, autosuggest_tag_name_recipes_path
|
53
53
|
end
|
54
54
|
|
55
|
+
By default, autosuggest only queries the db for existing tags, but if you want to be able to create new ones, just pass these options:
|
56
|
+
|
57
|
+
f.autosuggest_field :tags, autosuggest_tag_name_recipes_path, :autosuggest_options => { "newValuesInputName" => recipes[new_tags]" }
|
58
|
+
|
59
|
+
Then you can do whatever you want from the controller using params[:recipes][:new_tags]
|
60
|
+
|
61
|
+
|
55
62
|
These are the default options:
|
63
|
+
|
64
|
+
"queryParam" => "query",
|
56
65
|
"selectedItemProp" => "name",
|
57
66
|
"searchObjProps" => "name",
|
58
67
|
"neverSubmit" => "true",
|
@@ -62,69 +71,73 @@ But you can pass options in by using the autosuggest_options param
|
|
62
71
|
|
63
72
|
f.autosuggest_field :tags, autosuggest_tag_name_recipes_path, :autosuggest_options => {"neverSubmit" => "true"}
|
64
73
|
|
65
|
-
Here are the other options you can pass in
|
74
|
+
Here are the other options you can pass in - pasted from http://code.drewwilson.com/entry/autosuggest-jquery-plugin
|
75
|
+
|
76
|
+
**asHtmlName:** string (false by default) - Enables you to specify your own custom name that will be attributed to the text field
|
77
|
+
|
78
|
+
**newValuesInputName:** string (false by default) - Enables you to define a name for a hidden field that will catch new names that don't match any in the db
|
66
79
|
|
67
|
-
asHtmlID
|
80
|
+
**asHtmlID:** string (false by default) - Enables you to specify your own custom ID that will be appended to the top level AutoSuggest UL element's ID name. Otherwise it will default to using a random ID. Example: id="CUSTOM_ID". This is also applies to the hidden input filed that holds all of the selected values. Example: id="as-values-CUSTOM_ID"
|
68
81
|
|
69
|
-
startText
|
82
|
+
**startText:** string ("Enter Name Here" by default) - Text to display when the AutoSuggest input field is empty.
|
70
83
|
|
71
|
-
emptyText
|
84
|
+
**emptyText:** string ("No Results" by default) - Text to display when their are no search results.
|
72
85
|
|
73
|
-
preFill
|
86
|
+
**preFill:** object or string (empty object by default) - Enables you to pre-fill the AutoSuggest box with selections when the page is first loaded. You can pass in a comma separated list of values (a string), or an object. When using a string, each value is used as both the display text on the selected item and for it's value. When using an object, the options selectedItemProp will define the object property to use for the display text and selectedValuesProp will define the object property to use for the value for the selected item. Note: you must setup your preFill object in that format. A preFill object can look just like the example objects laid out above.
|
74
87
|
|
75
|
-
limitText
|
88
|
+
**limitText:** string ("No More Selections Are Allowed" by default) - Text to display when the number of selections has reached it's limit.
|
76
89
|
|
77
|
-
selectedItemProp
|
90
|
+
**selectedItemProp:** string ("value" by default) - Name of object property to use as the display text for each chosen item.
|
78
91
|
|
79
|
-
selectedValuesProp
|
92
|
+
**selectedValuesProp:** string ("value" by default) - Name of object property to use as the value for each chosen item. This value will be stored into the hidden input field.
|
80
93
|
|
81
|
-
searchObjProps
|
94
|
+
**searchObjProps:** string ("value" by default) - Comma separated list of object property names. The values in these objects properties will be used as the text to perform the search on.
|
82
95
|
|
83
|
-
queryParam
|
96
|
+
**queryParam:** string ("q" by default) - The name of the param that will hold the search string value in the AJAX request.
|
84
97
|
|
85
|
-
retrieveLimit
|
98
|
+
**retrieveLimit:** number (false by default) - If set to a number, it will add a '&limit=' param to the AJAX request. It also limits the number of search results allowed to be displayed in the results dropdown box.
|
86
99
|
|
87
|
-
extraParams
|
100
|
+
**extraParams:** string ("" by default) - This will be added onto the end of the AJAX request URL. Make sure you add an '&' before each param.
|
88
101
|
|
89
|
-
matchCase
|
102
|
+
**matchCase:** true or false (false by default) - Make the search case sensitive when set to true.
|
90
103
|
|
91
|
-
minChars
|
104
|
+
**minChars:** number (1 by default) - Minimum number of characters that must be entered into the AutoSuggest input field before the search begins.
|
92
105
|
|
93
|
-
keyDelay
|
106
|
+
**keyDelay:** number (400 by default) - Number of milliseconds to delay after a keydown on the AutoSuggest input field and before search is started.
|
94
107
|
|
95
|
-
resultsHighlight
|
108
|
+
**resultsHighlight:** true or false (true by default) - Option to choose whether or not to highlight the matched text in each result item.
|
96
109
|
|
97
|
-
neverSubmit
|
110
|
+
**neverSubmit:** true or false (false by default) - If set to true this option will never allow the 'return' key to submit the form that AutoSuggest is a part of.
|
98
111
|
|
99
|
-
selectionLimit
|
112
|
+
**selectionLimit:** number (false by default) - Limits the number of selections that are allowed to be made to the number specified.
|
100
113
|
|
101
|
-
showResultList
|
114
|
+
**showResultList:** true or false (true by default) - If set to false, the Results Dropdown List will never be shown at any time.
|
102
115
|
|
103
|
-
start
|
116
|
+
**start:** callback function - Custom function that is run only once on each AutoSuggest field when the code is first applied.
|
104
117
|
|
105
|
-
selectionClick
|
118
|
+
**selectionClick:** callback function - Custom function that is run when a previously chosen item is clicked. The item that is clicked is passed into this callback function as 'elem'.
|
106
119
|
|
107
120
|
Example: selectionClick: function(elem){ elem.fadeTo("slow", 0.33); }
|
108
121
|
|
109
|
-
selectionAdded
|
122
|
+
**selectionAdded:** callback function - Custom function that is run when a selection is made by choosing one from the Results dropdown, or by using the tab/comma keys to add one. The selection item is passed into this callback function as 'elem'.
|
110
123
|
|
111
124
|
Example: selectionAdded: function(elem){ elem.fadeTo("slow", 0.33); }
|
112
125
|
|
113
|
-
selectionRemoved
|
126
|
+
**selectionRemoved:** callback function - Custom function that is run when a selection removed from the AutoSuggest by using the delete key or by clicking the "x" inside the selection. The selection item is passed into this callback function as 'elem'.
|
114
127
|
|
115
128
|
Example: selectionRemoved: function(elem){ elem.fadeTo("fast", 0, function(){ elem.remove(); }); }
|
116
129
|
|
117
|
-
formatList
|
130
|
+
**formatList:** callback function - Custom function that is run after all the data has been retrieved and before the results are put into the suggestion results list. This is here so you can modify what & how things show up in the suggestion results list.
|
118
131
|
|
119
|
-
beforeRetrieve
|
132
|
+
**beforeRetrieve:** callback function - Custom function that is run right before the AJAX request is made, or before the local objected is searched. This is used to modify the search string before it is processed. So if a user entered "jim" into the AutoSuggest box, you can call this function to prepend their query with "guy_". Making the final query = "guy_jim". The search query is passed into this function. Example: beforeRetrieve: function(string){ return string; }
|
120
133
|
|
121
|
-
retrieveComplete
|
134
|
+
**retrieveComplete:** callback function - Custom function that is run after the ajax request has completed. The data object MUST be returned if this is used. Example: retrieveComplete: function(data){ return data; }
|
122
135
|
|
123
|
-
resultClick
|
136
|
+
**resultClick:** callback function - Custom function that is run when a search result item is clicked. The data from the item that is clicked is passed into this callback function as 'data'.
|
124
137
|
|
125
138
|
Example: resultClick: function(data){ console.log(data); }
|
126
139
|
|
127
|
-
resultsComplete
|
140
|
+
**resultsComplete:** callback function - Custom function that is run when the suggestion results dropdown list is made visible. Will run after every search query.
|
128
141
|
|
129
142
|
|
130
143
|
|
data/Rakefile
CHANGED
data/autosuggest-rb.gemspec
CHANGED
@@ -14,14 +14,15 @@ Gem::Specification.new do |s|
|
|
14
14
|
|
15
15
|
s.rubyforge_project = "autosuggest-rb"
|
16
16
|
|
17
|
+
s.add_dependency('rails', '~>3.0')
|
18
|
+
s.add_dependency('yajl-ruby')
|
19
|
+
|
20
|
+
s.add_development_dependency('sqlite3-ruby')
|
21
|
+
s.add_development_dependency('shoulda', '2.11.3')
|
22
|
+
s.add_development_dependency('ruby-debug19')
|
23
|
+
|
17
24
|
s.files = `git ls-files`.split("\n")
|
18
25
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
19
26
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
20
27
|
s.require_paths = ["lib"]
|
21
|
-
|
22
|
-
s.add_dependency('rails', '~>3.0')
|
23
|
-
s.add_development_dependency('rspec')
|
24
|
-
s.add_development_dependency('rspec-rails')
|
25
|
-
s.add_development_dependency('ruby-debug19')
|
26
|
-
s.add_development_dependency('mocha')
|
27
28
|
end
|
@@ -1,14 +1,20 @@
|
|
1
|
+
require 'yajl'
|
2
|
+
|
1
3
|
module Autosuggest
|
2
4
|
module ControllerMacros
|
3
5
|
# when called, you must add a custom route for action like this:
|
4
6
|
# resources :products do
|
5
7
|
# get :autosuggest_brand_name, :on => :collection
|
6
8
|
# end
|
7
|
-
def autosuggest(object, name)
|
9
|
+
def autosuggest(object, name, options={})
|
10
|
+
display_name = options[:display] || name
|
11
|
+
order = options[:order] || "#{name} ASC"
|
12
|
+
limit = options[:limit] || 10
|
13
|
+
|
8
14
|
define_method "autosuggest_#{object}_#{name}" do
|
9
15
|
# assuming an ActiveRecord mysql backed model for right now
|
10
|
-
results = objectify(object).where("#{name} LIKE ?", "%#{params[:
|
11
|
-
render :json => results.map{|r| {:name => r.send(
|
16
|
+
results = objectify(object).where("#{name} LIKE ?", "%#{params[:query]}%").order(order).limit(limit)
|
17
|
+
render :json => Yajl::Encoder.encode(results.map{|r| {:name => r.send(display_name), :value => r.id}})
|
12
18
|
end
|
13
19
|
end
|
14
20
|
end
|
@@ -5,7 +5,7 @@ module ActionView
|
|
5
5
|
text_field_class = "autosuggest_#{object_name}_#{method}"
|
6
6
|
options[:class] = "#{options[:class].to_s} #{text_field_class}"
|
7
7
|
autosuggest_options = options.delete(:autosuggest_options) || {}
|
8
|
-
autosuggest_options.reverse_merge!("selectedItemProp" => "name", "searchObjProps" => "name", "neverSubmit" => "true", "asHtmlName" => "#{object_name}[set_#{method}]")
|
8
|
+
autosuggest_options.reverse_merge!("queryParam" => "query", "selectedItemProp" => "name", "searchObjProps" => "name", "neverSubmit" => "true", "asHtmlName" => "#{object_name}[set_#{method}]")
|
9
9
|
|
10
10
|
_out = text_field(object_name, method, options)
|
11
11
|
_out << raw(%{
|
data/lib/autosuggest/version.rb
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
require 'rails/generators'
|
2
2
|
|
3
3
|
class AutosuggestGenerator < Rails::Generators::Base
|
4
|
+
|
4
5
|
def install
|
5
|
-
# Copy the unobtrusive JS file
|
6
|
+
# Copy the unobtrusive JS file and CSS file
|
6
7
|
copy_file('jquery.autoSuggest.js', 'public/javascripts/jquery.autoSuggest.js')
|
7
8
|
copy_file('autoSuggest.css', 'public/stylesheets/autoSuggest.css')
|
8
9
|
end
|
@@ -0,0 +1,73 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
module Autosuggest
|
4
|
+
module TestCase
|
5
|
+
include Shoulda::InstanceMethods
|
6
|
+
extend Shoulda::ClassMethods
|
7
|
+
include Shoulda::Assertions
|
8
|
+
extend Shoulda::Macros
|
9
|
+
include Shoulda::Helpers
|
10
|
+
|
11
|
+
context "GET autosuggest action" do
|
12
|
+
should "respond succesfully" do
|
13
|
+
get :autosuggest_tag_name
|
14
|
+
assert_response :success
|
15
|
+
|
16
|
+
get :autosuggest_tag_name, :query => ''
|
17
|
+
assert_response :success
|
18
|
+
|
19
|
+
get :autosuggest_tag_name, :query => nil
|
20
|
+
assert_response :success
|
21
|
+
|
22
|
+
get :autosuggest_tag_name, :query => 'Ch'
|
23
|
+
assert_response :success
|
24
|
+
end
|
25
|
+
|
26
|
+
should "respond with expexted JSON" do
|
27
|
+
get :autosuggest_tag_name, :query => 'Ca'
|
28
|
+
json_response = JSON.parse(@response.body)
|
29
|
+
assert_equal json_response.first["name"], "Cajun"
|
30
|
+
end
|
31
|
+
|
32
|
+
should "return results in alphabetical order by default" do
|
33
|
+
get :autosuggest_tag_name, :query => 'Ch'
|
34
|
+
json_response = JSON.parse(@response.body)
|
35
|
+
assert_equal json_response.first["name"], "Chicken"
|
36
|
+
assert_equal json_response.last["name"], "Chinese"
|
37
|
+
end
|
38
|
+
|
39
|
+
should "be able to sort in other ways" do
|
40
|
+
@controller.class_eval do
|
41
|
+
autosuggest :tag, :name, :order => "name DESC"
|
42
|
+
end
|
43
|
+
|
44
|
+
get :autosuggest_tag_name, :query => 'Ch'
|
45
|
+
json_response = JSON.parse(@response.body)
|
46
|
+
assert_equal json_response.first["name"], "Chinese"
|
47
|
+
assert_equal json_response.last["name"], "Chicken"
|
48
|
+
end
|
49
|
+
|
50
|
+
should "be able to limit the results" do
|
51
|
+
@controller.class_eval do
|
52
|
+
autosuggest :tag, :name, :limit => 1
|
53
|
+
end
|
54
|
+
|
55
|
+
get :autosuggest_tag_name, :query => 'Ch'
|
56
|
+
json_response = JSON.parse(@response.body)
|
57
|
+
assert_equal json_response.count, 1
|
58
|
+
assert_equal json_response.first["name"], "Chicken"
|
59
|
+
end
|
60
|
+
|
61
|
+
should "be able to customize what is displayed" do
|
62
|
+
@controller.class_eval do
|
63
|
+
autosuggest :tag, :name, :display => :display_name
|
64
|
+
end
|
65
|
+
|
66
|
+
get :autosuggest_tag_name, :query => 'Ch'
|
67
|
+
json_response = JSON.parse(@response.body)
|
68
|
+
assert_equal json_response.first["name"], "Tag: Chicken"
|
69
|
+
assert_equal json_response.last["name"], "Tag: Chinese"
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class Tag
|
4
|
+
attr_accessor :name
|
5
|
+
end
|
6
|
+
|
7
|
+
class FormHelperTest < ActionView::TestCase
|
8
|
+
context "autosuggest_field" do
|
9
|
+
should "render properly" do
|
10
|
+
output = autosuggest_field(:tag, :name, 'some/path')
|
11
|
+
assert_match /class=\" autosuggest_tag_name\"/, output
|
12
|
+
assert_match /\$\('.autosuggest_tag_name'\)/, output
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
context "autosuggest_field_tag" do
|
17
|
+
should "render properly" do
|
18
|
+
raise "implement this"
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
module Autosuggest
|
2
|
+
module TestCase
|
3
|
+
module ActiveRecord
|
4
|
+
def setup
|
5
|
+
::ActiveRecord::Base.establish_connection(:adapter => "sqlite3", :database => ":memory:")
|
6
|
+
::ActiveRecord::Schema.define(:version => 1) do
|
7
|
+
create_table :tags do |t|
|
8
|
+
t.string :name
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
create_models
|
13
|
+
|
14
|
+
@controller = RecipesController.new
|
15
|
+
|
16
|
+
@tag1 = @tag_class.create(:name => 'Chinese')
|
17
|
+
@tag2 = @tag_class.create(:name => 'Chicken')
|
18
|
+
@tag3 = @tag_class.create(:name => 'Cajun')
|
19
|
+
end
|
20
|
+
|
21
|
+
def teardown
|
22
|
+
destroy_models
|
23
|
+
::ActiveRecord::Base.connection.tables.each do |table|
|
24
|
+
::ActiveRecord::Base.connection.drop_table(table)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
private
|
29
|
+
def create_models
|
30
|
+
@tag_class = Object.const_set(:Tag, Class.new(::ActiveRecord::Base))
|
31
|
+
@tag_class.class_eval do
|
32
|
+
def display_name
|
33
|
+
"Tag: #{name}"
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
def destroy_models
|
39
|
+
Object.send(:remove_const, :Tag)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
data/test/test_helper.rb
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
ENV['RAILS_ENV'] ||= 'test'
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'bundler/setup'
|
5
|
+
require 'rails/all'
|
6
|
+
require 'rails/test_help'
|
7
|
+
require 'autosuggest-rb'
|
8
|
+
require 'ruby-debug'
|
9
|
+
require 'shoulda'
|
10
|
+
|
11
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
12
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
13
|
+
|
14
|
+
module Autosuggest
|
15
|
+
class Application < Rails::Application
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
Autosuggest::Application.routes.draw do
|
20
|
+
match '/:controller(/:action(/:id))'
|
21
|
+
end
|
22
|
+
|
23
|
+
ActionController::Base.send :include, Autosuggest::Application.routes.url_helpers
|
24
|
+
|
25
|
+
Ingredient = Class.new
|
26
|
+
RecipesController = Class.new(ActionController::Base)
|
27
|
+
RecipesController.autosuggest(:tag, :name)
|
28
|
+
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: autosuggest-rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.3
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Derrick Camerino
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-05-
|
13
|
+
date: 2011-05-30 00:00:00 -07:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -25,7 +25,7 @@ dependencies:
|
|
25
25
|
type: :runtime
|
26
26
|
version_requirements: *id001
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: yajl-ruby
|
29
29
|
prerelease: false
|
30
30
|
requirement: &id002 !ruby/object:Gem::Requirement
|
31
31
|
none: false
|
@@ -33,10 +33,10 @@ dependencies:
|
|
33
33
|
- - ">="
|
34
34
|
- !ruby/object:Gem::Version
|
35
35
|
version: "0"
|
36
|
-
type: :
|
36
|
+
type: :runtime
|
37
37
|
version_requirements: *id002
|
38
38
|
- !ruby/object:Gem::Dependency
|
39
|
-
name:
|
39
|
+
name: sqlite3-ruby
|
40
40
|
prerelease: false
|
41
41
|
requirement: &id003 !ruby/object:Gem::Requirement
|
42
42
|
none: false
|
@@ -47,18 +47,18 @@ dependencies:
|
|
47
47
|
type: :development
|
48
48
|
version_requirements: *id003
|
49
49
|
- !ruby/object:Gem::Dependency
|
50
|
-
name:
|
50
|
+
name: shoulda
|
51
51
|
prerelease: false
|
52
52
|
requirement: &id004 !ruby/object:Gem::Requirement
|
53
53
|
none: false
|
54
54
|
requirements:
|
55
|
-
- - "
|
55
|
+
- - "="
|
56
56
|
- !ruby/object:Gem::Version
|
57
|
-
version:
|
57
|
+
version: 2.11.3
|
58
58
|
type: :development
|
59
59
|
version_requirements: *id004
|
60
60
|
- !ruby/object:Gem::Dependency
|
61
|
-
name:
|
61
|
+
name: ruby-debug19
|
62
62
|
prerelease: false
|
63
63
|
requirement: &id005 !ruby/object:Gem::Requirement
|
64
64
|
none: false
|
@@ -83,49 +83,6 @@ files:
|
|
83
83
|
- README.markdown
|
84
84
|
- Rakefile
|
85
85
|
- autosuggest-rb.gemspec
|
86
|
-
- integration/.gitignore
|
87
|
-
- integration/Gemfile
|
88
|
-
- integration/README
|
89
|
-
- integration/Rakefile
|
90
|
-
- integration/app/controllers/application_controller.rb
|
91
|
-
- integration/app/helpers/application_helper.rb
|
92
|
-
- integration/app/views/layouts/application.html.erb
|
93
|
-
- integration/config.ru
|
94
|
-
- integration/config/application.rb
|
95
|
-
- integration/config/boot.rb
|
96
|
-
- integration/config/database.yml
|
97
|
-
- integration/config/environment.rb
|
98
|
-
- integration/config/environments/development.rb
|
99
|
-
- integration/config/environments/production.rb
|
100
|
-
- integration/config/environments/test.rb
|
101
|
-
- integration/config/initializers/backtrace_silencers.rb
|
102
|
-
- integration/config/initializers/inflections.rb
|
103
|
-
- integration/config/initializers/mime_types.rb
|
104
|
-
- integration/config/initializers/secret_token.rb
|
105
|
-
- integration/config/initializers/session_store.rb
|
106
|
-
- integration/config/locales/en.yml
|
107
|
-
- integration/config/routes.rb
|
108
|
-
- integration/db/seeds.rb
|
109
|
-
- integration/doc/README_FOR_APP
|
110
|
-
- integration/lib/tasks/.gitkeep
|
111
|
-
- integration/public/404.html
|
112
|
-
- integration/public/422.html
|
113
|
-
- integration/public/500.html
|
114
|
-
- integration/public/favicon.ico
|
115
|
-
- integration/public/images/rails.png
|
116
|
-
- integration/public/index.html
|
117
|
-
- integration/public/javascripts/application.js
|
118
|
-
- integration/public/javascripts/controls.js
|
119
|
-
- integration/public/javascripts/dragdrop.js
|
120
|
-
- integration/public/javascripts/effects.js
|
121
|
-
- integration/public/javascripts/prototype.js
|
122
|
-
- integration/public/javascripts/rails.js
|
123
|
-
- integration/public/robots.txt
|
124
|
-
- integration/public/stylesheets/.gitkeep
|
125
|
-
- integration/script/rails
|
126
|
-
- integration/test/performance/browsing_test.rb
|
127
|
-
- integration/test/test_helper.rb
|
128
|
-
- integration/vendor/plugins/.gitkeep
|
129
86
|
- lib/autosuggest-rb.rb
|
130
87
|
- lib/autosuggest/controller_macros.rb
|
131
88
|
- lib/autosuggest/form_helper.rb
|
@@ -134,8 +91,11 @@ files:
|
|
134
91
|
- lib/generators/assets/autoSuggest.css
|
135
92
|
- lib/generators/assets/jquery.autoSuggest.js
|
136
93
|
- lib/generators/autosuggest_generator.rb
|
137
|
-
-
|
138
|
-
-
|
94
|
+
- test/controller_test.rb
|
95
|
+
- test/db_stores_test.rb
|
96
|
+
- test/form_helper_test.rb
|
97
|
+
- test/support/active_record.rb
|
98
|
+
- test/test_helper.rb
|
139
99
|
has_rdoc: true
|
140
100
|
homepage: ""
|
141
101
|
licenses: []
|
@@ -165,5 +125,8 @@ signing_key:
|
|
165
125
|
specification_version: 3
|
166
126
|
summary: This is a gem that wraps the AutoSuggest javascript plugin
|
167
127
|
test_files:
|
168
|
-
-
|
169
|
-
-
|
128
|
+
- test/controller_test.rb
|
129
|
+
- test/db_stores_test.rb
|
130
|
+
- test/form_helper_test.rb
|
131
|
+
- test/support/active_record.rb
|
132
|
+
- test/test_helper.rb
|