tb_redirects 0.0.1 → 0.9.0

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.
Files changed (68) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +42 -0
  3. data/app/models/tb_redirect.rb +2 -1
  4. data/lib/tb_redirects/version.rb +1 -1
  5. data/spec/concerns/tb_redirects/has_redirects_spec.rb +22 -0
  6. data/spec/controllers/admin/tb_redirects_controller_spec.rb +77 -0
  7. data/spec/controllers/application_controller_spec.rb +25 -0
  8. data/spec/dummy/README.rdoc +28 -0
  9. data/spec/dummy/Rakefile +6 -0
  10. data/spec/dummy/app/assets/javascripts/admin/application.js +16 -0
  11. data/spec/dummy/app/assets/javascripts/application.js +17 -0
  12. data/spec/dummy/app/assets/javascripts/bootstrap_modules.js +14 -0
  13. data/spec/dummy/app/assets/stylesheets/admin/application.scss +3 -0
  14. data/spec/dummy/app/assets/stylesheets/application.scss +6 -0
  15. data/spec/dummy/app/assets/stylesheets/imports/bootstrap_modules.scss +56 -0
  16. data/spec/dummy/app/assets/stylesheets/imports/bootstrap_theme.scss +875 -0
  17. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  18. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  19. data/spec/dummy/app/models/widget.rb +3 -0
  20. data/spec/dummy/app/views/layouts/application.html.erb +32 -0
  21. data/spec/dummy/app/views/layouts/error_page.html.erb +8 -0
  22. data/spec/dummy/bin/bundle +3 -0
  23. data/spec/dummy/bin/rails +4 -0
  24. data/spec/dummy/bin/rake +4 -0
  25. data/spec/dummy/bin/setup +29 -0
  26. data/spec/dummy/config.ru +4 -0
  27. data/spec/dummy/config/application.rb +31 -0
  28. data/spec/dummy/config/boot.rb +5 -0
  29. data/spec/dummy/config/database.yml +28 -0
  30. data/spec/dummy/config/environment.rb +5 -0
  31. data/spec/dummy/config/environments/development.rb +41 -0
  32. data/spec/dummy/config/environments/production.rb +79 -0
  33. data/spec/dummy/config/environments/test.rb +44 -0
  34. data/spec/dummy/config/initializers/assets.rb +11 -0
  35. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  36. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
  37. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  38. data/spec/dummy/config/initializers/inflections.rb +16 -0
  39. data/spec/dummy/config/initializers/mime_types.rb +4 -0
  40. data/spec/dummy/config/initializers/session_store.rb +3 -0
  41. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  42. data/spec/dummy/config/locales/en.yml +23 -0
  43. data/spec/dummy/config/routes.rb +56 -0
  44. data/spec/dummy/config/secrets.yml +22 -0
  45. data/spec/dummy/db/migrate/20160211160614_create_spud_admin_permissions.tb_core.rb +12 -0
  46. data/spec/dummy/db/migrate/20160211160615_create_spud_users.tb_core.rb +30 -0
  47. data/spec/dummy/db/migrate/20160211160616_add_time_zone_to_spud_user.tb_core.rb +7 -0
  48. data/spec/dummy/db/migrate/20160211160617_add_scope_to_spud_admin_permissions.tb_core.rb +7 -0
  49. data/spec/dummy/db/migrate/20160211160618_create_spud_user_settings.tb_core.rb +12 -0
  50. data/spec/dummy/db/migrate/20160211160619_create_spud_roles.tb_core.rb +11 -0
  51. data/spec/dummy/db/migrate/20160211160620_create_spud_permissions.tb_core.rb +11 -0
  52. data/spec/dummy/db/migrate/20160211160621_create_spud_role_permissions.tb_core.rb +12 -0
  53. data/spec/dummy/db/migrate/20160211160622_drop_spud_admin_permissions.tb_core.rb +16 -0
  54. data/spec/dummy/db/migrate/20160211160623_add_requires_password_change_to_spud_users.tb_core.rb +6 -0
  55. data/spec/dummy/db/migrate/20160211185931_create_widgets.rb +9 -0
  56. data/spec/dummy/db/migrate/20160212211331_create_tb_redirects.tb_redirects.rb +15 -0
  57. data/spec/dummy/db/schema.rb +97 -0
  58. data/spec/dummy/public/404.html +67 -0
  59. data/spec/dummy/public/422.html +67 -0
  60. data/spec/dummy/public/500.html +66 -0
  61. data/spec/dummy/public/favicon.ico +0 -0
  62. data/spec/factories/tb_redirects.rb +9 -0
  63. data/spec/helpers/admin/tb_redirects_helper_spec.rb +16 -0
  64. data/spec/jobs/tb_redirects/detect_redirect_loop_job_spec.rb +69 -0
  65. data/spec/models/tb_redirect_spec.rb +77 -0
  66. data/spec/rails_helper.rb +78 -0
  67. data/spec/spec_helper.rb +92 -0
  68. metadata +132 -5
@@ -0,0 +1,66 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ body {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body>
58
+ <!-- This file lives in public/500.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>We're sorry, but something went wrong.</h1>
62
+ </div>
63
+ <p>If you are the application owner check the logs for more information.</p>
64
+ </div>
65
+ </body>
66
+ </html>
File without changes
@@ -0,0 +1,9 @@
1
+ FactoryGirl.define do
2
+ factory :tb_redirect do
3
+ owner_type nil
4
+ owner_id nil
5
+ sequence(:source){ |n| "/test-#{n}" }
6
+ sequence(:destination){ |n| "/redirected-#{n}" }
7
+ created_by 'user'
8
+ end
9
+ end
@@ -0,0 +1,16 @@
1
+ require 'rails_helper'
2
+
3
+ RSpec.describe Admin::TbRedirectsHelper, type: :helper do
4
+
5
+ describe '#created_by_for_tb_redirect' do
6
+ it 'should return an info label' do
7
+ result = helper.created_by_for_tb_redirect('user')
8
+ expect(result).to include('label-info')
9
+ end
10
+ it 'should return a default label' do
11
+ result = helper.created_by_for_tb_redirect('cms')
12
+ expect(result).to include('label-default')
13
+ end
14
+ end
15
+
16
+ end
@@ -0,0 +1,69 @@
1
+ require 'rails_helper'
2
+
3
+ RSpec.describe TbRedirects::DetectRedirectLoopJob, type: :job do
4
+
5
+ before do
6
+ TbRedirect.skip_callback(:save, :after, :schedule_loop_detection)
7
+ end
8
+ after do
9
+ TbRedirect.set_callback(:save, :after, :schedule_loop_detection)
10
+ end
11
+
12
+ describe '#perform' do
13
+ it 'should destroy a redirect' do
14
+ redirects = TbRedirect.create([
15
+ {:source => '/1', :destination => '/2', :created_by => 'user'},
16
+ {:source => '/2', :destination => '/3', :created_by => 'user'},
17
+ {:source => '/3', :destination => '/1', :created_by => 'user'}
18
+ ])
19
+ expect{
20
+ TbRedirects::DetectRedirectLoopJob.perform_now(redirects.first)
21
+ }.to change(TbRedirect, :count).by(-1)
22
+ end
23
+
24
+ it 'should not destroy anything' do
25
+ redirects = TbRedirect.create([
26
+ {:source => '/1', :destination => '/2', :created_by => 'user'},
27
+ {:source => '/2', :destination => '/3', :created_by => 'user'},
28
+ {:source => '/3', :destination => '/4', :created_by => 'user'}
29
+ ])
30
+ expect{
31
+ TbRedirects::DetectRedirectLoopJob.perform_now(redirects.first)
32
+ }.to_not change(TbRedirect, :count)
33
+ end
34
+ end
35
+
36
+ describe '#search_parent' do
37
+ before(:each) do
38
+ @redirects = TbRedirect.create([
39
+ {:source => '/1', :destination => '/2', :created_by => 'user'},
40
+ {:source => '/2', :destination => '/3', :created_by => 'user'},
41
+ {:source => '/3', :destination => '/1', :created_by => 'user'}
42
+ ])
43
+ @redirect = @redirects.first
44
+ end
45
+
46
+ it 'should destroy a redirect' do
47
+ job = TbRedirects::DetectRedirectLoopJob.new(@redirect)
48
+ expect{
49
+ job.send(:search_parent, @redirects.second, @redirect.destination)
50
+ }.to change(TbRedirect, :count).by(-1)
51
+ end
52
+
53
+ it 'should continue searching' do
54
+ job = TbRedirects::DetectRedirectLoopJob.new(@redirect)
55
+ expect{
56
+ job.send(:search_parent, @redirects.third, @redirect.destination)
57
+ }.to change(job, :attempts).by(2)
58
+ end
59
+
60
+ it 'should give up after MAX_ATTEMPTS' do
61
+ job = TbRedirects::DetectRedirectLoopJob.new(@redirect)
62
+ job.instance_variable_set(:@attempts, TbRedirects::DetectRedirectLoopJob::MAX_ATTEMPTS+1)
63
+ expect{
64
+ job.send(:search_parent, @redirects.second, @redirect.destination)
65
+ }.to raise_error(TbRedirects::DetectRedirectLoopJob::AttemptsExceeded)
66
+ end
67
+ end
68
+
69
+ end
@@ -0,0 +1,77 @@
1
+ require 'rails_helper'
2
+
3
+ RSpec.describe TbRedirect, type: :model do
4
+
5
+ describe '.find_by_uri' do
6
+ before(:each) do
7
+ @sample_a = FactoryGirl.create(:tb_redirect, :source => '/test', :destination => '/redirected')
8
+ @sample_b = FactoryGirl.create(:tb_redirect, :source => 'http://test.com/blog', :destination => '/redirected')
9
+ @sample_c = FactoryGirl.create(:tb_redirect, :source => 'http://test.com/about', :destination => '/redirected')
10
+ end
11
+
12
+ it 'should find a record where the path matches' do
13
+ result = TbRedirect.find_by_uri('http://google.com/test')
14
+ expect(result).to eq(@sample_a)
15
+ end
16
+
17
+ it 'should find a record where the full URI matches' do
18
+ result = TbRedirect.find_by_uri('http://test.com/blog')
19
+ expect(result).to eq(@sample_b)
20
+ end
21
+
22
+ it 'should find no records' do
23
+ result = TbRedirect.find_by_uri('http://test.com/contact')
24
+ expect(result).to eq(nil)
25
+ end
26
+
27
+ it 'should catch an invalid URI error' do
28
+ expect{
29
+ TbRedirect.find_by_uri('%!&*')
30
+ }.to_not raise_error
31
+ end
32
+
33
+ end
34
+
35
+ describe '.create_smart' do
36
+ it 'should create a new redirect' do
37
+ redirect_1 = FactoryGirl.create(:tb_redirect)
38
+ expect{
39
+ redirect_2 = TbRedirect.create_smart(FactoryGirl.attributes_for(:tb_redirect, :source => '/new'))
40
+ }.to change(TbRedirect, :count).by(1)
41
+ end
42
+
43
+ it 'should update an existing redirect' do
44
+ redirect_1 = FactoryGirl.create(:tb_redirect)
45
+ expect{
46
+ redirect_2 = TbRedirect.create_smart(FactoryGirl.attributes_for(:tb_redirect, :source => redirect_1.source))
47
+ }.to_not change(TbRedirect, :count)
48
+ end
49
+ end
50
+
51
+ describe '#source_not_equals_destination' do
52
+ it 'should not allow the source and destination to be equal' do
53
+ redirect_1 = FactoryGirl.build(:tb_redirect, :source => 'a', :destination => 'a')
54
+ expect(redirect_1).to be_invalid
55
+ end
56
+ end
57
+
58
+ describe '#destroy_opposite_redirect' do
59
+ it 'should destroy the other redirect' do
60
+ redirect_1 = FactoryGirl.build(:tb_redirect, :source => 'a', :destination => 'b')
61
+ redirect_2 = FactoryGirl.build(:tb_redirect, :source => 'b', :destination => 'a')
62
+ expect{
63
+ redirect_1.reload
64
+ }.to raise_error(ActiveRecord::RecordNotFound)
65
+ end
66
+ end
67
+
68
+ describe '#schedule_loop_detection' do
69
+ it 'should schedule a job' do
70
+ parent = FactoryGirl.create(:tb_redirect)
71
+ expect{
72
+ FactoryGirl.create(:tb_redirect, :source => parent.destination)
73
+ }.to have_enqueued_job(TbRedirects::DetectRedirectLoopJob)
74
+ end
75
+ end
76
+
77
+ end
@@ -0,0 +1,78 @@
1
+ require 'simplecov'
2
+ SimpleCov.start 'rails'
3
+
4
+ # This file is copied to spec/ when you run 'rails generate rspec:install'
5
+ ENV['RAILS_ENV'] ||= 'test'
6
+ require File.expand_path("../dummy/config/environment.rb", __FILE__)
7
+
8
+ # Prevent database truncation if the environment is production
9
+ abort("The Rails environment is running in production mode!") if Rails.env.production?
10
+
11
+ require 'spec_helper'
12
+ require 'rspec/rails'
13
+ require 'database_cleaner'
14
+ require 'factory_girl_rails'
15
+ require 'tb_core/test_helper'
16
+
17
+ # Add additional requires below this line. Rails is not loaded until this point!
18
+
19
+ # Requires supporting ruby files with custom matchers and macros, etc, in
20
+ # spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
21
+ # run as spec files by default. This means that files in spec/support that end
22
+ # in _spec.rb will both be required and run as specs, causing the specs to be
23
+ # run twice. It is recommended that you do not name files matching this glob to
24
+ # end with _spec.rb. You can configure this pattern with the --pattern
25
+ # option on the command line or in ~/.rspec, .rspec or `.rspec-local`.
26
+ #
27
+ # The following line is provided for convenience purposes. It has the downside
28
+ # of increasing the boot-up time by auto-requiring all files in the support
29
+ # directory. Alternatively, in the individual `*_spec.rb` files, manually
30
+ # require only the support files necessary.
31
+ #
32
+ # Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }
33
+
34
+ # Checks for pending migration and applies them before tests are run.
35
+ # If you are not using ActiveRecord, you can remove this line.
36
+ # ActiveRecord::Migration.maintain_test_schema!
37
+
38
+ RSpec.configure do |config|
39
+ config.infer_base_class_for_anonymous_controllers = false
40
+
41
+ # If you're not using ActiveRecord, or you'd prefer not to run each of your
42
+ # examples within a transaction, remove the following line or assign false
43
+ # instead of true.
44
+ config.use_transactional_fixtures = true
45
+
46
+ # RSpec Rails can automatically mix in different behaviours to your tests
47
+ # based on their file location, for example enabling you to call `get` and
48
+ # `post` in specs under `spec/controllers`.
49
+ #
50
+ # You can disable this behaviour by removing the line below, and instead
51
+ # explicitly tag your specs with their type, e.g.:
52
+ #
53
+ # RSpec.describe UsersController, :type => :controller do
54
+ # # ...
55
+ # end
56
+ #
57
+ # The different available types are documented in the features, such as in
58
+ # https://relishapp.com/rspec/rspec-rails/docs
59
+ config.infer_spec_type_from_file_location!
60
+
61
+ # Filter lines from Rails gems in backtraces.
62
+ config.filter_rails_from_backtrace!
63
+ # arbitrary gems may also be filtered via:
64
+ # config.filter_gems_from_backtrace("gem name")
65
+
66
+ # Clean the database as needed
67
+ # https://github.com/DatabaseCleaner/database_cleaner#rspec-example
68
+ config.before(:suite) do
69
+ DatabaseCleaner.strategy = :transaction
70
+ DatabaseCleaner.clean_with(:truncation)
71
+ end
72
+ config.around(:each) do |example|
73
+ DatabaseCleaner.cleaning do
74
+ example.run
75
+ end
76
+ end
77
+
78
+ end
@@ -0,0 +1,92 @@
1
+ # This file was generated by the `rails generate rspec:install` command. Conventionally, all
2
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
+ # The generated `.rspec` file contains `--require spec_helper` which will cause
4
+ # this file to always be loaded, without a need to explicitly require it in any
5
+ # files.
6
+ #
7
+ # Given that it is always loaded, you are encouraged to keep this file as
8
+ # light-weight as possible. Requiring heavyweight dependencies from this file
9
+ # will add to the boot time of your test suite on EVERY test run, even for an
10
+ # individual file that may not need all of that loaded. Instead, consider making
11
+ # a separate helper file that requires the additional dependencies and performs
12
+ # the additional setup, and require it from the spec files that actually need
13
+ # it.
14
+ #
15
+ # The `.rspec` file also contains a few flags that are not defaults but that
16
+ # users commonly want.
17
+ #
18
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
19
+ RSpec.configure do |config|
20
+ # rspec-expectations config goes here. You can use an alternate
21
+ # assertion/expectation library such as wrong or the stdlib/minitest
22
+ # assertions if you prefer.
23
+ config.expect_with :rspec do |expectations|
24
+ # This option will default to `true` in RSpec 4. It makes the `description`
25
+ # and `failure_message` of custom matchers include text for helper methods
26
+ # defined using `chain`, e.g.:
27
+ # be_bigger_than(2).and_smaller_than(4).description
28
+ # # => "be bigger than 2 and smaller than 4"
29
+ # ...rather than:
30
+ # # => "be bigger than 2"
31
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
32
+ end
33
+
34
+ # rspec-mocks config goes here. You can use an alternate test double
35
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
36
+ config.mock_with :rspec do |mocks|
37
+ # Prevents you from mocking or stubbing a method that does not exist on
38
+ # a real object. This is generally recommended, and will default to
39
+ # `true` in RSpec 4.
40
+ mocks.verify_partial_doubles = true
41
+ end
42
+
43
+ # The settings below are suggested to provide a good initial experience
44
+ # with RSpec, but feel free to customize to your heart's content.
45
+ =begin
46
+ # These two settings work together to allow you to limit a spec run
47
+ # to individual examples or groups you care about by tagging them with
48
+ # `:focus` metadata. When nothing is tagged with `:focus`, all examples
49
+ # get run.
50
+ config.filter_run :focus
51
+ config.run_all_when_everything_filtered = true
52
+
53
+ # Allows RSpec to persist some state between runs in order to support
54
+ # the `--only-failures` and `--next-failure` CLI options. We recommend
55
+ # you configure your source control system to ignore this file.
56
+ config.example_status_persistence_file_path = "spec/examples.txt"
57
+
58
+ # Limits the available syntax to the non-monkey patched syntax that is
59
+ # recommended. For more details, see:
60
+ # - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
61
+ # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
62
+ # - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
63
+ config.disable_monkey_patching!
64
+
65
+ # Many RSpec users commonly either run the entire suite or an individual
66
+ # file, and it's useful to allow more verbose output when running an
67
+ # individual spec file.
68
+ if config.files_to_run.one?
69
+ # Use the documentation formatter for detailed output,
70
+ # unless a formatter has already been configured
71
+ # (e.g. via a command-line flag).
72
+ config.default_formatter = 'doc'
73
+ end
74
+
75
+ # Print the 10 slowest examples and example groups at the
76
+ # end of the spec run, to help surface which specs are running
77
+ # particularly slow.
78
+ config.profile_examples = 10
79
+
80
+ # Run specs in random order to surface order dependencies. If you find an
81
+ # order dependency and want to debug it, you can fix the order by providing
82
+ # the seed, which is printed after each run.
83
+ # --seed 1234
84
+ config.order = :random
85
+
86
+ # Seed global randomization in this process using the `--seed` CLI option.
87
+ # Setting this allows you to use `--seed` to deterministically reproduce
88
+ # test failures related to randomization by passing the same `--seed` value
89
+ # as the one that triggered the failure.
90
+ Kernel.srand config.seed
91
+ =end
92
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tb_redirects
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Greg Woods
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-16 00:00:00.000000000 Z
11
+ date: 2016-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tb_core
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.3.6
19
+ version: 1.3.7
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.3.6
26
+ version: 1.3.7
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rails
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -117,6 +117,7 @@ extensions: []
117
117
  extra_rdoc_files: []
118
118
  files:
119
119
  - MIT-LICENSE
120
+ - README.md
120
121
  - Rakefile
121
122
  - app/assets/javascripts/admin/tb_redirects.js
122
123
  - app/assets/javascripts/tb_redirects.js
@@ -140,6 +141,69 @@ files:
140
141
  - lib/tb_redirects.rb
141
142
  - lib/tb_redirects/engine.rb
142
143
  - lib/tb_redirects/version.rb
144
+ - spec/concerns/tb_redirects/has_redirects_spec.rb
145
+ - spec/controllers/admin/tb_redirects_controller_spec.rb
146
+ - spec/controllers/application_controller_spec.rb
147
+ - spec/dummy/README.rdoc
148
+ - spec/dummy/Rakefile
149
+ - spec/dummy/app/assets/javascripts/admin/application.js
150
+ - spec/dummy/app/assets/javascripts/application.js
151
+ - spec/dummy/app/assets/javascripts/bootstrap_modules.js
152
+ - spec/dummy/app/assets/stylesheets/admin/application.scss
153
+ - spec/dummy/app/assets/stylesheets/application.scss
154
+ - spec/dummy/app/assets/stylesheets/imports/bootstrap_modules.scss
155
+ - spec/dummy/app/assets/stylesheets/imports/bootstrap_theme.scss
156
+ - spec/dummy/app/controllers/application_controller.rb
157
+ - spec/dummy/app/helpers/application_helper.rb
158
+ - spec/dummy/app/models/widget.rb
159
+ - spec/dummy/app/views/layouts/application.html.erb
160
+ - spec/dummy/app/views/layouts/error_page.html.erb
161
+ - spec/dummy/bin/bundle
162
+ - spec/dummy/bin/rails
163
+ - spec/dummy/bin/rake
164
+ - spec/dummy/bin/setup
165
+ - spec/dummy/config.ru
166
+ - spec/dummy/config/application.rb
167
+ - spec/dummy/config/boot.rb
168
+ - spec/dummy/config/database.yml
169
+ - spec/dummy/config/environment.rb
170
+ - spec/dummy/config/environments/development.rb
171
+ - spec/dummy/config/environments/production.rb
172
+ - spec/dummy/config/environments/test.rb
173
+ - spec/dummy/config/initializers/assets.rb
174
+ - spec/dummy/config/initializers/backtrace_silencers.rb
175
+ - spec/dummy/config/initializers/cookies_serializer.rb
176
+ - spec/dummy/config/initializers/filter_parameter_logging.rb
177
+ - spec/dummy/config/initializers/inflections.rb
178
+ - spec/dummy/config/initializers/mime_types.rb
179
+ - spec/dummy/config/initializers/session_store.rb
180
+ - spec/dummy/config/initializers/wrap_parameters.rb
181
+ - spec/dummy/config/locales/en.yml
182
+ - spec/dummy/config/routes.rb
183
+ - spec/dummy/config/secrets.yml
184
+ - spec/dummy/db/migrate/20160211160614_create_spud_admin_permissions.tb_core.rb
185
+ - spec/dummy/db/migrate/20160211160615_create_spud_users.tb_core.rb
186
+ - spec/dummy/db/migrate/20160211160616_add_time_zone_to_spud_user.tb_core.rb
187
+ - spec/dummy/db/migrate/20160211160617_add_scope_to_spud_admin_permissions.tb_core.rb
188
+ - spec/dummy/db/migrate/20160211160618_create_spud_user_settings.tb_core.rb
189
+ - spec/dummy/db/migrate/20160211160619_create_spud_roles.tb_core.rb
190
+ - spec/dummy/db/migrate/20160211160620_create_spud_permissions.tb_core.rb
191
+ - spec/dummy/db/migrate/20160211160621_create_spud_role_permissions.tb_core.rb
192
+ - spec/dummy/db/migrate/20160211160622_drop_spud_admin_permissions.tb_core.rb
193
+ - spec/dummy/db/migrate/20160211160623_add_requires_password_change_to_spud_users.tb_core.rb
194
+ - spec/dummy/db/migrate/20160211185931_create_widgets.rb
195
+ - spec/dummy/db/migrate/20160212211331_create_tb_redirects.tb_redirects.rb
196
+ - spec/dummy/db/schema.rb
197
+ - spec/dummy/public/404.html
198
+ - spec/dummy/public/422.html
199
+ - spec/dummy/public/500.html
200
+ - spec/dummy/public/favicon.ico
201
+ - spec/factories/tb_redirects.rb
202
+ - spec/helpers/admin/tb_redirects_helper_spec.rb
203
+ - spec/jobs/tb_redirects/detect_redirect_loop_job_spec.rb
204
+ - spec/models/tb_redirect_spec.rb
205
+ - spec/rails_helper.rb
206
+ - spec/spec_helper.rb
143
207
  homepage: https://bitbucket.org/westlakedesign/tb_redirects
144
208
  licenses:
145
209
  - MIT
@@ -164,4 +228,67 @@ rubygems_version: 2.4.5.1
164
228
  signing_key:
165
229
  specification_version: 4
166
230
  summary: Simple redirect management for Twice Baked
167
- test_files: []
231
+ test_files:
232
+ - spec/concerns/tb_redirects/has_redirects_spec.rb
233
+ - spec/controllers/admin/tb_redirects_controller_spec.rb
234
+ - spec/controllers/application_controller_spec.rb
235
+ - spec/dummy/app/assets/javascripts/admin/application.js
236
+ - spec/dummy/app/assets/javascripts/application.js
237
+ - spec/dummy/app/assets/javascripts/bootstrap_modules.js
238
+ - spec/dummy/app/assets/stylesheets/admin/application.scss
239
+ - spec/dummy/app/assets/stylesheets/application.scss
240
+ - spec/dummy/app/assets/stylesheets/imports/bootstrap_modules.scss
241
+ - spec/dummy/app/assets/stylesheets/imports/bootstrap_theme.scss
242
+ - spec/dummy/app/controllers/application_controller.rb
243
+ - spec/dummy/app/helpers/application_helper.rb
244
+ - spec/dummy/app/models/widget.rb
245
+ - spec/dummy/app/views/layouts/application.html.erb
246
+ - spec/dummy/app/views/layouts/error_page.html.erb
247
+ - spec/dummy/bin/bundle
248
+ - spec/dummy/bin/rails
249
+ - spec/dummy/bin/rake
250
+ - spec/dummy/bin/setup
251
+ - spec/dummy/config/application.rb
252
+ - spec/dummy/config/boot.rb
253
+ - spec/dummy/config/database.yml
254
+ - spec/dummy/config/environment.rb
255
+ - spec/dummy/config/environments/development.rb
256
+ - spec/dummy/config/environments/production.rb
257
+ - spec/dummy/config/environments/test.rb
258
+ - spec/dummy/config/initializers/assets.rb
259
+ - spec/dummy/config/initializers/backtrace_silencers.rb
260
+ - spec/dummy/config/initializers/cookies_serializer.rb
261
+ - spec/dummy/config/initializers/filter_parameter_logging.rb
262
+ - spec/dummy/config/initializers/inflections.rb
263
+ - spec/dummy/config/initializers/mime_types.rb
264
+ - spec/dummy/config/initializers/session_store.rb
265
+ - spec/dummy/config/initializers/wrap_parameters.rb
266
+ - spec/dummy/config/locales/en.yml
267
+ - spec/dummy/config/routes.rb
268
+ - spec/dummy/config/secrets.yml
269
+ - spec/dummy/config.ru
270
+ - spec/dummy/db/migrate/20160211160614_create_spud_admin_permissions.tb_core.rb
271
+ - spec/dummy/db/migrate/20160211160615_create_spud_users.tb_core.rb
272
+ - spec/dummy/db/migrate/20160211160616_add_time_zone_to_spud_user.tb_core.rb
273
+ - spec/dummy/db/migrate/20160211160617_add_scope_to_spud_admin_permissions.tb_core.rb
274
+ - spec/dummy/db/migrate/20160211160618_create_spud_user_settings.tb_core.rb
275
+ - spec/dummy/db/migrate/20160211160619_create_spud_roles.tb_core.rb
276
+ - spec/dummy/db/migrate/20160211160620_create_spud_permissions.tb_core.rb
277
+ - spec/dummy/db/migrate/20160211160621_create_spud_role_permissions.tb_core.rb
278
+ - spec/dummy/db/migrate/20160211160622_drop_spud_admin_permissions.tb_core.rb
279
+ - spec/dummy/db/migrate/20160211160623_add_requires_password_change_to_spud_users.tb_core.rb
280
+ - spec/dummy/db/migrate/20160211185931_create_widgets.rb
281
+ - spec/dummy/db/migrate/20160212211331_create_tb_redirects.tb_redirects.rb
282
+ - spec/dummy/db/schema.rb
283
+ - spec/dummy/public/404.html
284
+ - spec/dummy/public/422.html
285
+ - spec/dummy/public/500.html
286
+ - spec/dummy/public/favicon.ico
287
+ - spec/dummy/Rakefile
288
+ - spec/dummy/README.rdoc
289
+ - spec/factories/tb_redirects.rb
290
+ - spec/helpers/admin/tb_redirects_helper_spec.rb
291
+ - spec/jobs/tb_redirects/detect_redirect_loop_job_spec.rb
292
+ - spec/models/tb_redirect_spec.rb
293
+ - spec/rails_helper.rb
294
+ - spec/spec_helper.rb