rails3-jquery-autocomplete 0.9.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. data/{CHANGELOG.md → CHANGELOG.MD} +1 -0
  2. data/README.markdown +4 -1
  3. data/lib/generators/templates/autocomplete-rails-uncompressed.js +1 -1
  4. data/lib/generators/templates/autocomplete-rails.js +1 -1
  5. data/lib/rails3-jquery-autocomplete.rb +1 -1
  6. data/lib/rails3-jquery-autocomplete/form_helper.rb +1 -0
  7. data/lib/rails3-jquery-autocomplete/formtastic_plugin.rb +3 -4
  8. data/lib/rails3-jquery-autocomplete/version.rb +1 -1
  9. metadata +10 -104
  10. data/.document +0 -5
  11. data/.gitignore +0 -26
  12. data/Gemfile +0 -18
  13. data/integration/.gitignore +0 -2
  14. data/integration/.rspec +0 -1
  15. data/integration/Gemfile +0 -18
  16. data/integration/README +0 -256
  17. data/integration/Rakefile +0 -7
  18. data/integration/app/controllers/application_controller.rb +0 -3
  19. data/integration/app/controllers/autocomplete_controller.rb +0 -7
  20. data/integration/app/controllers/id_elements_controller.rb +0 -8
  21. data/integration/app/controllers/multiple_selections_controller.rb +0 -7
  22. data/integration/app/controllers/nested_models_controller.rb +0 -8
  23. data/integration/app/controllers/scoped_autocompletes_controller.rb +0 -7
  24. data/integration/app/controllers/simple_forms_controller.rb +0 -7
  25. data/integration/app/controllers/sub_classes_controller.rb +0 -7
  26. data/integration/app/helpers/application_helper.rb +0 -2
  27. data/integration/app/helpers/autocomplete_helper.rb +0 -2
  28. data/integration/app/helpers/error_messages_helper.rb +0 -23
  29. data/integration/app/helpers/id_elements_helper.rb +0 -2
  30. data/integration/app/helpers/layout_helper.rb +0 -22
  31. data/integration/app/helpers/sub_classes_helper.rb +0 -2
  32. data/integration/app/models/address.rb +0 -2
  33. data/integration/app/models/brand.rb +0 -18
  34. data/integration/app/models/feature.rb +0 -13
  35. data/integration/app/models/foreign_brand.rb +0 -15
  36. data/integration/app/models/product.rb +0 -17
  37. data/integration/app/views/autocomplete/new.html.haml +0 -10
  38. data/integration/app/views/id_elements/new.html.haml +0 -12
  39. data/integration/app/views/layouts/application.html.haml +0 -21
  40. data/integration/app/views/multiple_selections/new.html.haml +0 -9
  41. data/integration/app/views/nested_models/new.html.haml +0 -11
  42. data/integration/app/views/scoped_autocompletes/new.html.haml +0 -10
  43. data/integration/app/views/simple_forms/new.html.haml +0 -8
  44. data/integration/app/views/sub_classes/new.html.haml +0 -9
  45. data/integration/autotest/discover.rb +0 -2
  46. data/integration/config.ru +0 -4
  47. data/integration/config/application.rb +0 -42
  48. data/integration/config/boot.rb +0 -13
  49. data/integration/config/cucumber.yml +0 -8
  50. data/integration/config/database.yml +0 -25
  51. data/integration/config/environment.rb +0 -5
  52. data/integration/config/environments/development.rb +0 -26
  53. data/integration/config/environments/production.rb +0 -49
  54. data/integration/config/environments/test.rb +0 -35
  55. data/integration/config/initializers/backtrace_silencers.rb +0 -7
  56. data/integration/config/initializers/inflections.rb +0 -10
  57. data/integration/config/initializers/mime_types.rb +0 -5
  58. data/integration/config/initializers/secret_token.rb +0 -7
  59. data/integration/config/initializers/session_store.rb +0 -8
  60. data/integration/config/locales/en.yml +0 -5
  61. data/integration/config/routes.rb +0 -90
  62. data/integration/db/migrate/20101209014338_create_brands.rb +0 -13
  63. data/integration/db/migrate/20101209014355_create_products.rb +0 -14
  64. data/integration/db/migrate/20101209053936_add_type_to_brand.rb +0 -9
  65. data/integration/db/migrate/20110209020136_create_features.rb +0 -14
  66. data/integration/db/migrate/20110423000347_add_state_to_brands.rb +0 -9
  67. data/integration/db/migrate/20110512153732_create_addresses.rb +0 -13
  68. data/integration/db/migrate/20110512153811_add_address_id_to_brand.rb +0 -9
  69. data/integration/db/schema.rb +0 -44
  70. data/integration/db/seeds.rb +0 -3
  71. data/integration/doc/README_FOR_APP +0 -2
  72. data/integration/features/autocomplete.feature +0 -73
  73. data/integration/features/step_definitions/autocomplete_steps.rb +0 -15
  74. data/integration/features/step_definitions/pickle_steps.rb +0 -100
  75. data/integration/features/step_definitions/web_steps.rb +0 -219
  76. data/integration/features/support/env.rb +0 -61
  77. data/integration/features/support/paths.rb +0 -33
  78. data/integration/features/support/pickle.rb +0 -24
  79. data/integration/lib/tasks/cucumber.rake +0 -53
  80. data/integration/public/404.html +0 -26
  81. data/integration/public/422.html +0 -26
  82. data/integration/public/500.html +0 -26
  83. data/integration/public/favicon.ico +0 -0
  84. data/integration/public/images/rails.png +0 -0
  85. data/integration/public/javascripts/application.js +0 -0
  86. data/integration/public/javascripts/autocomplete-rails.js +0 -16
  87. data/integration/public/javascripts/jquery-1.5.1.min.js +0 -17
  88. data/integration/public/javascripts/jquery-ui.min.js +0 -97
  89. data/integration/public/javascripts/jquery.min.js +0 -167
  90. data/integration/public/javascripts/rails.js +0 -137
  91. data/integration/public/robots.txt +0 -5
  92. data/integration/public/stylesheets/application.css +0 -61
  93. data/integration/public/stylesheets/jquery-ui-1.8.2.custom.css +0 -489
  94. data/integration/public/stylesheets/sass/application.sass +0 -66
  95. data/integration/script/cucumber +0 -10
  96. data/integration/script/rails +0 -6
  97. data/integration/spec/acceptance/acceptance_helper.rb +0 -15
  98. data/integration/spec/acceptance/autocomplete_spec.rb +0 -81
  99. data/integration/spec/acceptance/support/helpers.rb +0 -12
  100. data/integration/spec/acceptance/support/paths.rb +0 -33
  101. data/integration/spec/spec_helper.rb +0 -37
  102. data/rails3-jquery-autocomplete.gemspec +0 -31
@@ -1,66 +0,0 @@
1
- $primary_color: #4b7399
2
-
3
- body
4
- background-color: $primary_color
5
- font:
6
- family: Verdana, Helvetica, Arial
7
- size: 14px
8
-
9
- a
10
- color: blue
11
- img
12
- border: none
13
-
14
- .clear
15
- clear: both
16
- height: 0
17
- overflow: hidden
18
-
19
- #container
20
- width: 75%
21
- margin: 0 auto
22
- background: white
23
- padding: 20px 40px
24
- border: solid 1px black
25
- margin-top: 20px
26
-
27
- #flash_notice,
28
- #flash_error,
29
- #flash_alert
30
- padding: 5px 8px
31
- margin: 10px 0
32
-
33
- #flash_notice
34
- background-color: #ccffcc
35
- border: solid 1px #66cc66
36
-
37
- #flash_error,
38
- #flash_alert
39
- background-color: #ffcccc
40
- border: solid 1px #cc6666
41
-
42
- .fieldWithErrors
43
- display: inline
44
-
45
- .error_messages
46
- width: 400px
47
- border: 2px solid #cf0000
48
- padding: 0
49
- padding-bottom: 12px
50
- margin-bottom: 20px
51
- background-color: #f0f0f0
52
- font:
53
- size: 12px
54
- h2
55
- text-align: left
56
- padding: 5px 5px 5px 15px
57
- margin: 0
58
- font:
59
- weight: bold
60
- size: 12px
61
- background-color: #cc0000
62
- color: white
63
- p
64
- margin: 8px 10px
65
- ul
66
- margin: 0
@@ -1,10 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- vendored_cucumber_bin = Dir["#{File.dirname(__FILE__)}/../vendor/{gems,plugins}/cucumber*/bin/cucumber"].first
4
- if vendored_cucumber_bin
5
- load File.expand_path(vendored_cucumber_bin)
6
- else
7
- require 'rubygems' unless ENV['NO_RUBYGEMS']
8
- require 'cucumber'
9
- load Cucumber::BINARY
10
- end
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
-
4
- APP_PATH = File.expand_path('../../config/application', __FILE__)
5
- require File.expand_path('../../config/boot', __FILE__)
6
- require 'rails/commands'
@@ -1,15 +0,0 @@
1
- require File.expand_path(File.dirname(__FILE__) + "/../spec_helper")
2
- require "steak"
3
- require 'steak/autocomplete'
4
-
5
- if defined?(ActiveRecord::Base)
6
- begin
7
- require 'database_cleaner'
8
- DatabaseCleaner.strategy = :truncation
9
- rescue LoadError => ignore_if_database_cleaner_not_present
10
- end
11
- end
12
-
13
- # Put your acceptance spec helpers inside /spec/acceptance/support
14
- Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
15
-
@@ -1,81 +0,0 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/acceptance_helper')
2
-
3
- feature "Autocomplete", %q{
4
- In order to do funky stuff
5
- As a User
6
- I want autocomplete!
7
- } do
8
-
9
- background do
10
- enable_javascript
11
- lambda do
12
- Brand.create! [
13
- { :name => "Alpha" , :state => true },
14
- { :name => "Beta" , :state => false },
15
- { :name => "Gamma" , :state => false },
16
- { :name => "Kappa" , :state => true },
17
- { :name => "Kappler" , :state => false }
18
- ]
19
- end.should change(Brand, :count).by(5)
20
- lambda { Feature.create! [{:name => "Shiny"}, {:name => "Glowy"}] }.should change(Feature, :count).by(2)
21
- end
22
-
23
- context "Autocomplete" do
24
- scenario "Autocomplete" do
25
- visit home_page
26
- fill_in "Brand name", :with => "al"
27
- choose_autocomplete_result "Alpha"
28
- find_field("Brand name").value.should include("Alpha")
29
- end
30
-
31
- scenario "Autocomplete, id_element option" do
32
- visit new_id_element_page
33
- fill_in "Brand name", :with => "al"
34
- choose_autocomplete_result "Alpha"
35
- find_field("Brand name").value.should include("Alpha")
36
- find_field("Brand").value.should include(Brand.find_by_name("Alpha").id.to_s)
37
- end
38
-
39
- scenario "Autocomplete for a sub class" do
40
- lambda { ForeignBrand.create! :name => "Omega" }.should change(ForeignBrand, :count)
41
-
42
- visit new_sub_class_page
43
- fill_in "Brand name", :with => "om"
44
- choose_autocomplete_result "Omega"
45
- find_field("Brand name").value.should include("Omega")
46
- end
47
-
48
- scenario "Multiple autocomplete" do
49
- visit new_multiple_section_page
50
- send_to("Brand name", "al")
51
- choose_autocomplete_result "Alpha"
52
- send_to("Brand name", "bet")
53
- choose_autocomplete_result "Beta"
54
- find_field("Brand name").value.should include("Alpha,Beta")
55
- end
56
-
57
- scenario "Autocomplete for Nested Models" do
58
- visit new_nested_model_page
59
- send_to("Feature Name", "sh")
60
- choose_autocomplete_result "Shiny"
61
- find_field("Feature Name").value.should include("Glowy,Shiny")
62
- end
63
-
64
- scenario "Autocomplete for simple_form" do
65
- visit new_simple_form_page
66
- fill_in("Brand name", :with => "al")
67
- choose_autocomplete_result "Alpha"
68
- find_field("Brand name").value.should include("Alpha")
69
- end
70
-
71
- scenario "Autocomplete with scope" do
72
- kappa_brand = Brand.find_by_name('Kappa')
73
- kappa_brand.address = Address.create!
74
- kappa_brand.save!
75
- visit new_scoped_cutocomplete_page
76
- fill_in("Brand name", :with => "ka")
77
- choose_autocomplete_result "Kappa"
78
- find_field("Brand name").value.should include("Kappa")
79
- end
80
- end
81
- end
@@ -1,12 +0,0 @@
1
- module HelperMethods
2
- def enable_javascript
3
- Capybara.current_driver = :selenium
4
- Capybara.default_wait_time = 1
5
- end
6
-
7
- def send_to(element, key)
8
- find_field(element).native.send_keys(key)
9
- end
10
- end
11
-
12
- RSpec.configuration.include HelperMethods, :type => :acceptance
@@ -1,33 +0,0 @@
1
- module NavigationHelpers
2
- # Put helper methods related to the paths in your application here.
3
-
4
- def home_page
5
- "/"
6
- end
7
-
8
- def new_id_element_page
9
- "/id_elements/new"
10
- end
11
-
12
- def new_sub_class_page
13
- "/sub_classes/new"
14
- end
15
-
16
- def new_multiple_section_page
17
- "/multiple_selections/new"
18
- end
19
-
20
- def new_nested_model_page
21
- "/nested_models/new"
22
- end
23
-
24
- def new_simple_form_page
25
- "/simple_forms/new"
26
- end
27
-
28
- def new_scoped_cutocomplete_page
29
- "/scoped_autocompletes/new"
30
- end
31
- end
32
-
33
- RSpec.configuration.include NavigationHelpers, :type => :acceptance
@@ -1,37 +0,0 @@
1
- # This file is copied to spec/ when you run 'rails generate rspec:install'
2
- ENV["RAILS_ENV"] ||= 'test'
3
- require File.expand_path("../../config/environment", __FILE__)
4
- require 'rspec/rails'
5
- require 'capybara'
6
- require 'capybara/rails'
7
- require "capybara/dsl"
8
-
9
- # Requires supporting ruby files with custom matchers and macros, etc,
10
- # in spec/support/ and its subdirectories.
11
- Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
12
-
13
- RSpec.configure do |config|
14
- # == Mock Framework
15
- #
16
- # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
17
- #
18
- # config.mock_with :mocha
19
- # config.mock_with :flexmock
20
- # config.mock_with :rr
21
- config.mock_with :rspec
22
-
23
- # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
24
- config.fixture_path = "#{::Rails.root}/spec/fixtures"
25
-
26
- # If you're not using ActiveRecord, or you'd prefer not to run each of your
27
- # examples within a transaction, remove the following line or assign false
28
- # instead of true.
29
- config.use_transactional_fixtures = false
30
-
31
- config.include Capybara
32
- config.after(:each) do
33
- Capybara.reset_sessions!
34
- Capybara.use_default_driver
35
- DatabaseCleaner.clean
36
- end
37
- end
@@ -1,31 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
- $:.push File.expand_path("../lib", __FILE__)
3
- require "rails3-jquery-autocomplete/version"
4
-
5
- Gem::Specification.new do |s|
6
- s.name = %q{rails3-jquery-autocomplete}
7
- s.version = Rails3JQueryAutocomplete::VERSION
8
- s.platform = Gem::Platform::RUBY
9
- s.authors = ["David Padilla"]
10
- s.email = %q{david.padilla@crowdint.com}
11
- s.homepage = %q{http://github.com/crowdint/rails3-jquery-autocomplete}
12
- s.summary = %q{Use jQuery's autocomplete plugin with Rails 3.}
13
- s.description = %q{Use jQuery's autocomplete plugin with Rails 3.}
14
-
15
- s.add_dependency('rails', '~>3.0')
16
-
17
- s.add_development_dependency('sqlite3-ruby')
18
- s.add_development_dependency('mongoid', '>= 2.0.0')
19
- s.add_development_dependency('mongo_mapper', '>= 0.9')
20
- s.add_development_dependency('bson_ext', '~>1.3.0')
21
- s.add_development_dependency('shoulda', '~>2.11.1')
22
- s.add_development_dependency('uglifier')
23
- s.add_development_dependency('rr')
24
- s.add_development_dependency('rcov')
25
-
26
- s.files = `git ls-files`.split("\n")
27
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
28
- s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
29
- s.require_paths = ["lib"]
30
- end
31
-