friendly_slug 0.1.6 → 0.1.7

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 (123) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/friendly_slug.gemspec +1 -1
  4. data/lib/friendly_slug/version.rb +1 -1
  5. metadata +1 -119
  6. data/friendly_slug_gem_test/.gitignore +0 -30
  7. data/friendly_slug_gem_test/.ruby-version +0 -1
  8. data/friendly_slug_gem_test/Gemfile +0 -32
  9. data/friendly_slug_gem_test/Gemfile.lock +0 -222
  10. data/friendly_slug_gem_test/README.md +0 -24
  11. data/friendly_slug_gem_test/Rakefile +0 -6
  12. data/friendly_slug_gem_test/app/assets/config/manifest.js +0 -3
  13. data/friendly_slug_gem_test/app/assets/images/.keep +0 -0
  14. data/friendly_slug_gem_test/app/assets/javascripts/application.js +0 -16
  15. data/friendly_slug_gem_test/app/assets/javascripts/blogs.coffee +0 -3
  16. data/friendly_slug_gem_test/app/assets/javascripts/cable.js +0 -13
  17. data/friendly_slug_gem_test/app/assets/javascripts/channels/.keep +0 -0
  18. data/friendly_slug_gem_test/app/assets/javascripts/topics.coffee +0 -3
  19. data/friendly_slug_gem_test/app/assets/stylesheets/application.css +0 -15
  20. data/friendly_slug_gem_test/app/assets/stylesheets/blogs.scss +0 -3
  21. data/friendly_slug_gem_test/app/assets/stylesheets/scaffolds.scss +0 -84
  22. data/friendly_slug_gem_test/app/assets/stylesheets/topics.scss +0 -3
  23. data/friendly_slug_gem_test/app/channels/application_cable/channel.rb +0 -4
  24. data/friendly_slug_gem_test/app/channels/application_cable/connection.rb +0 -4
  25. data/friendly_slug_gem_test/app/controllers/application_controller.rb +0 -2
  26. data/friendly_slug_gem_test/app/controllers/blogs_controller.rb +0 -60
  27. data/friendly_slug_gem_test/app/controllers/concerns/.keep +0 -0
  28. data/friendly_slug_gem_test/app/controllers/topics_controller.rb +0 -60
  29. data/friendly_slug_gem_test/app/helpers/application_helper.rb +0 -2
  30. data/friendly_slug_gem_test/app/helpers/blogs_helper.rb +0 -2
  31. data/friendly_slug_gem_test/app/helpers/topics_helper.rb +0 -2
  32. data/friendly_slug_gem_test/app/jobs/application_job.rb +0 -2
  33. data/friendly_slug_gem_test/app/mailers/application_mailer.rb +0 -4
  34. data/friendly_slug_gem_test/app/models/application_record.rb +0 -3
  35. data/friendly_slug_gem_test/app/models/blog.rb +0 -3
  36. data/friendly_slug_gem_test/app/models/concerns/.keep +0 -0
  37. data/friendly_slug_gem_test/app/models/topic.rb +0 -3
  38. data/friendly_slug_gem_test/app/views/blogs/_blog.json.jbuilder +0 -2
  39. data/friendly_slug_gem_test/app/views/blogs/_form.html.erb +0 -32
  40. data/friendly_slug_gem_test/app/views/blogs/edit.html.erb +0 -6
  41. data/friendly_slug_gem_test/app/views/blogs/index.html.erb +0 -31
  42. data/friendly_slug_gem_test/app/views/blogs/index.json.jbuilder +0 -1
  43. data/friendly_slug_gem_test/app/views/blogs/new.html.erb +0 -5
  44. data/friendly_slug_gem_test/app/views/blogs/show.html.erb +0 -19
  45. data/friendly_slug_gem_test/app/views/blogs/show.json.jbuilder +0 -1
  46. data/friendly_slug_gem_test/app/views/layouts/application.html.erb +0 -15
  47. data/friendly_slug_gem_test/app/views/layouts/mailer.html.erb +0 -13
  48. data/friendly_slug_gem_test/app/views/layouts/mailer.text.erb +0 -1
  49. data/friendly_slug_gem_test/app/views/topics/_form.html.erb +0 -37
  50. data/friendly_slug_gem_test/app/views/topics/_topic.json.jbuilder +0 -2
  51. data/friendly_slug_gem_test/app/views/topics/edit.html.erb +0 -6
  52. data/friendly_slug_gem_test/app/views/topics/index.html.erb +0 -33
  53. data/friendly_slug_gem_test/app/views/topics/index.json.jbuilder +0 -1
  54. data/friendly_slug_gem_test/app/views/topics/new.html.erb +0 -5
  55. data/friendly_slug_gem_test/app/views/topics/show.html.erb +0 -24
  56. data/friendly_slug_gem_test/app/views/topics/show.json.jbuilder +0 -1
  57. data/friendly_slug_gem_test/bin/bundle +0 -3
  58. data/friendly_slug_gem_test/bin/rails +0 -9
  59. data/friendly_slug_gem_test/bin/rake +0 -9
  60. data/friendly_slug_gem_test/bin/setup +0 -36
  61. data/friendly_slug_gem_test/bin/spring +0 -17
  62. data/friendly_slug_gem_test/bin/update +0 -31
  63. data/friendly_slug_gem_test/bin/yarn +0 -11
  64. data/friendly_slug_gem_test/config.ru +0 -5
  65. data/friendly_slug_gem_test/config/application.rb +0 -20
  66. data/friendly_slug_gem_test/config/boot.rb +0 -4
  67. data/friendly_slug_gem_test/config/cable.yml +0 -10
  68. data/friendly_slug_gem_test/config/credentials.yml.enc +0 -1
  69. data/friendly_slug_gem_test/config/database.yml +0 -25
  70. data/friendly_slug_gem_test/config/environment.rb +0 -5
  71. data/friendly_slug_gem_test/config/environments/development.rb +0 -61
  72. data/friendly_slug_gem_test/config/environments/production.rb +0 -94
  73. data/friendly_slug_gem_test/config/environments/test.rb +0 -46
  74. data/friendly_slug_gem_test/config/initializers/application_controller_renderer.rb +0 -8
  75. data/friendly_slug_gem_test/config/initializers/assets.rb +0 -14
  76. data/friendly_slug_gem_test/config/initializers/backtrace_silencers.rb +0 -7
  77. data/friendly_slug_gem_test/config/initializers/content_security_policy.rb +0 -25
  78. data/friendly_slug_gem_test/config/initializers/cookies_serializer.rb +0 -5
  79. data/friendly_slug_gem_test/config/initializers/filter_parameter_logging.rb +0 -4
  80. data/friendly_slug_gem_test/config/initializers/inflections.rb +0 -16
  81. data/friendly_slug_gem_test/config/initializers/mime_types.rb +0 -4
  82. data/friendly_slug_gem_test/config/initializers/wrap_parameters.rb +0 -14
  83. data/friendly_slug_gem_test/config/locales/en.yml +0 -33
  84. data/friendly_slug_gem_test/config/puma.rb +0 -34
  85. data/friendly_slug_gem_test/config/routes.rb +0 -5
  86. data/friendly_slug_gem_test/config/spring.rb +0 -6
  87. data/friendly_slug_gem_test/config/storage.yml +0 -34
  88. data/friendly_slug_gem_test/db/migrate/20180628233122_create_blogs.rb +0 -11
  89. data/friendly_slug_gem_test/db/migrate/20180630053922_create_topics.rb +0 -13
  90. data/friendly_slug_gem_test/db/schema.rb +0 -33
  91. data/friendly_slug_gem_test/db/seeds.rb +0 -9
  92. data/friendly_slug_gem_test/lib/assets/.keep +0 -0
  93. data/friendly_slug_gem_test/lib/tasks/.keep +0 -0
  94. data/friendly_slug_gem_test/log/.keep +0 -0
  95. data/friendly_slug_gem_test/package.json +0 -5
  96. data/friendly_slug_gem_test/public/404.html +0 -67
  97. data/friendly_slug_gem_test/public/422.html +0 -67
  98. data/friendly_slug_gem_test/public/500.html +0 -66
  99. data/friendly_slug_gem_test/public/apple-touch-icon-precomposed.png +0 -0
  100. data/friendly_slug_gem_test/public/apple-touch-icon.png +0 -0
  101. data/friendly_slug_gem_test/public/favicon.ico +0 -0
  102. data/friendly_slug_gem_test/public/robots.txt +0 -1
  103. data/friendly_slug_gem_test/test/application_system_test_case.rb +0 -5
  104. data/friendly_slug_gem_test/test/controllers/.keep +0 -0
  105. data/friendly_slug_gem_test/test/controllers/blogs_controller_test.rb +0 -48
  106. data/friendly_slug_gem_test/test/controllers/topics_controller_test.rb +0 -48
  107. data/friendly_slug_gem_test/test/fixtures/.keep +0 -0
  108. data/friendly_slug_gem_test/test/fixtures/blogs.yml +0 -17
  109. data/friendly_slug_gem_test/test/fixtures/files/.keep +0 -0
  110. data/friendly_slug_gem_test/test/fixtures/topics.yml +0 -27
  111. data/friendly_slug_gem_test/test/helpers/.keep +0 -0
  112. data/friendly_slug_gem_test/test/integration/.keep +0 -0
  113. data/friendly_slug_gem_test/test/integration/main_slug_test.rb +0 -34
  114. data/friendly_slug_gem_test/test/mailers/.keep +0 -0
  115. data/friendly_slug_gem_test/test/models/.keep +0 -0
  116. data/friendly_slug_gem_test/test/models/blog_test.rb +0 -19
  117. data/friendly_slug_gem_test/test/models/topic_test.rb +0 -18
  118. data/friendly_slug_gem_test/test/system/.keep +0 -0
  119. data/friendly_slug_gem_test/test/system/blogs_test.rb +0 -47
  120. data/friendly_slug_gem_test/test/system/topics_test.rb +0 -49
  121. data/friendly_slug_gem_test/test/test_helper.rb +0 -37
  122. data/friendly_slug_gem_test/tmp/.keep +0 -0
  123. data/friendly_slug_gem_test/vendor/.keep +0 -0
@@ -1,18 +0,0 @@
1
- require 'test_helper'
2
-
3
- class TopicTest < ActiveSupport::TestCase
4
- Topic.all.each do |topic|
5
- test "friendly database slug filters out ##{topic.id} title" do
6
- topic.slug = nil
7
- assert_equal(TestAnswers::TOPIC_ONE_PARAM_ANSWERS[topic.id], topic.to_param)
8
- end
9
- end
10
-
11
- test "friendly database slug filters out a new topic title" do
12
- topic = Topic.create!(title: "Baby This Is a New Topic")
13
- assert_equal(topic.to_param, "baby-this-is-a-new-topic")
14
-
15
- topic.update(title: "My Newly Updated Title")
16
- assert_equal(topic.to_param, "my-newly-updated-title")
17
- end
18
- end
File without changes
@@ -1,47 +0,0 @@
1
- require "application_system_test_case"
2
-
3
- class BlogsTest < ApplicationSystemTestCase
4
- setup do
5
- @blog = blogs(:one)
6
- end
7
-
8
- test "visiting the index" do
9
- visit blogs_url
10
- assert_selector "h1", text: "Blogs"
11
- end
12
-
13
- test "creating a Blog" do
14
- visit blogs_url
15
- click_on "New Blog"
16
-
17
- fill_in "Body", with: @blog.body
18
- fill_in "Title", with: @blog.title
19
- fill_in "Views", with: @blog.views
20
- click_on "Create Blog"
21
-
22
- assert_text "Blog was successfully created"
23
- click_on "Back"
24
- end
25
-
26
- test "updating a Blog" do
27
- visit blogs_url
28
- click_on "Edit", match: :first
29
-
30
- fill_in "Body", with: @blog.body
31
- fill_in "Title", with: @blog.title
32
- fill_in "Views", with: @blog.views
33
- click_on "Update Blog"
34
-
35
- assert_text "Blog was successfully updated"
36
- click_on "Back"
37
- end
38
-
39
- test "destroying a Blog" do
40
- visit blogs_url
41
- page.accept_confirm do
42
- click_on "Destroy", match: :first
43
- end
44
-
45
- assert_text "Blog was successfully destroyed"
46
- end
47
- end
@@ -1,49 +0,0 @@
1
- require "application_system_test_case"
2
-
3
- class TopicsTest < ApplicationSystemTestCase
4
- setup do
5
- @topic = topics(:one)
6
- end
7
-
8
- test "visiting the index" do
9
- visit topics_url
10
- assert_selector "h1", text: "Topics"
11
- end
12
-
13
- test "creating a Topic" do
14
- visit topics_url
15
- click_on "New Topic"
16
-
17
- fill_in "Slug", with: @topic.slug
18
- fill_in "Title", with: @topic.title
19
- fill_in "Type", with: @topic.type
20
- fill_in "Views", with: @topic.views
21
- click_on "Create Topic"
22
-
23
- assert_text "Topic was successfully created"
24
- click_on "Back"
25
- end
26
-
27
- test "updating a Topic" do
28
- visit topics_url
29
- click_on "Edit", match: :first
30
-
31
- fill_in "Slug", with: @topic.slug
32
- fill_in "Title", with: @topic.title
33
- fill_in "Type", with: @topic.type
34
- fill_in "Views", with: @topic.views
35
- click_on "Update Topic"
36
-
37
- assert_text "Topic was successfully updated"
38
- click_on "Back"
39
- end
40
-
41
- test "destroying a Topic" do
42
- visit topics_url
43
- page.accept_confirm do
44
- click_on "Destroy", match: :first
45
- end
46
-
47
- assert_text "Topic was successfully destroyed"
48
- end
49
- end
@@ -1,37 +0,0 @@
1
- ENV['RAILS_ENV'] ||= 'test'
2
- require_relative '../config/environment'
3
- require 'rails/test_help'
4
- require 'database_cleaner'
5
-
6
- class ActiveSupport::TestCase
7
- ActiveRecord::Migration.check_pending!
8
- fixtures :all
9
- end
10
-
11
- class ActionDispatch::IntegrationTest
12
- DatabaseCleaner.strategy = :truncation
13
- end
14
-
15
- module TestAnswers
16
- ONE_PARAM_ANSWERS = [
17
- "",
18
- "1",
19
- "2",
20
- "3",
21
- ]
22
-
23
- TWO_PARAM_ANSWERS = [
24
- "",
25
- "this-is-the-greatest-post-23_-asf-1",
26
- "just-a-normal-for-15-test-string-2",
27
- "just-george-normal-for-15-test-string-3",
28
- ]
29
-
30
- TOPIC_ONE_PARAM_ANSWERS = [
31
- "",
32
- "my-string",
33
- "my-string-2",
34
- "mystring3",
35
- "my-string-4",
36
- ]
37
- end
File without changes
File without changes