morse_searchable 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/routes.rb +4 -0
- data/lib/morse_searchable/version.rb +1 -1
- data/lib/searchable_routing_concern.rb +12 -0
- data/spec/controllers/searchable_spec.rb +0 -6
- data/spec/dummy/config/routes.rb +3 -2
- data/spec/rails_helper.rb +1 -2
- data/spec/routing/concern_routing_spec.rb +21 -0
- data/spec/spec_helper.rb +10 -0
- metadata +4 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9840ce0956c26eaeffbbb29243c46b36d605a433
|
4
|
+
data.tar.gz: 1147c9d963d87c4d03b68b32f6bda489b1cadabd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 210411d47906b0c11510edea795d32f9316a14245676c89ea682a92d19e573dd64606dae1c24f072b5e51b2841a06c78be13ded48eeded7faf5ab930a2752976
|
7
|
+
data.tar.gz: e7c99edd4bf23b0c968cc226c31166c74557fb3f82a9e3060b63838f787e15d3780e73443d72b512ca0f56b0c247e2529af337f68ba06cbb25cbf531e1379cc9
|
data/config/routes.rb
CHANGED
data/spec/dummy/config/routes.rb
CHANGED
data/spec/rails_helper.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# This file is copied to spec/ when you run 'rails generate rspec:install'
|
2
2
|
ENV['RAILS_ENV'] ||= 'test'
|
3
|
-
require File.expand_path('
|
3
|
+
require File.expand_path('../dummy/config/environment', __FILE__)
|
4
4
|
# Prevent database truncation if the environment is production
|
5
5
|
abort("The Rails environment is running in production mode!") if Rails.env.production?
|
6
6
|
require 'spec_helper'
|
@@ -24,7 +24,6 @@ require 'rspec/rails'
|
|
24
24
|
|
25
25
|
# Checks for pending migrations before tests are run.
|
26
26
|
# If you are not using ActiveRecord, you can remove this line.
|
27
|
-
ActiveRecord::Migration.maintain_test_schema!
|
28
27
|
|
29
28
|
RSpec.configure do |config|
|
30
29
|
# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'rails_helper'
|
2
|
+
|
3
|
+
RSpec.describe "FakesController", type: :routing do
|
4
|
+
|
5
|
+
describe "get /fakes/feed", type: :routing do
|
6
|
+
it 'should be searchable' do
|
7
|
+
expect(get: "/fakes/feed").to route_to(
|
8
|
+
controller: "fakes",
|
9
|
+
action: 'feed',
|
10
|
+
)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
describe "get /fakes/filters", type: :routing do
|
14
|
+
it 'should be filterable' do
|
15
|
+
expect(get: "/fakes/filters").to route_to(
|
16
|
+
controller: "fakes",
|
17
|
+
action: 'filters',
|
18
|
+
)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
data/spec/spec_helper.rb
CHANGED
@@ -21,6 +21,16 @@ require 'shoulda/matchers'
|
|
21
21
|
Dir["./spec/support/**/*.rb"].sort.each {|f| require f}
|
22
22
|
|
23
23
|
Dir[File.expand_path("../support/**/*.rb",__FILE__)].each {|f| require f}
|
24
|
+
|
25
|
+
|
26
|
+
class FakesController < ActionController::Base
|
27
|
+
include Searchable
|
28
|
+
|
29
|
+
def set_meta_filters_here(args={})
|
30
|
+
set_meta_filters(args)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
24
34
|
class Thing
|
25
35
|
def self.all
|
26
36
|
[]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: morse_searchable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- fredmcgroarty
|
@@ -167,6 +167,7 @@ files:
|
|
167
167
|
- lib/morse_searchable.rb
|
168
168
|
- lib/morse_searchable/engine.rb
|
169
169
|
- lib/morse_searchable/version.rb
|
170
|
+
- lib/searchable_routing_concern.rb
|
170
171
|
- lib/tasks/morse_searchable_tasks.rake
|
171
172
|
- spec/controllers/searchable_spec.rb
|
172
173
|
- spec/dummy/README.rdoc
|
@@ -204,6 +205,7 @@ files:
|
|
204
205
|
- spec/dummy/public/500.html
|
205
206
|
- spec/dummy/public/favicon.ico
|
206
207
|
- spec/rails_helper.rb
|
208
|
+
- spec/routing/concern_routing_spec.rb
|
207
209
|
- spec/spec_helper.rb
|
208
210
|
homepage:
|
209
211
|
licenses:
|
@@ -266,4 +268,5 @@ test_files:
|
|
266
268
|
- spec/dummy/Rakefile
|
267
269
|
- spec/dummy/README.rdoc
|
268
270
|
- spec/rails_helper.rb
|
271
|
+
- spec/routing/concern_routing_spec.rb
|
269
272
|
- spec/spec_helper.rb
|