cmor_testimonials 0.0.50.pre → 0.0.55.pre

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 (95) hide show
  1. checksums.yaml +4 -4
  2. metadata +7 -100
  3. data/spec/dummy/Rakefile +0 -6
  4. data/spec/dummy/app/assets/config/manifest.js +0 -3
  5. data/spec/dummy/app/assets/javascripts/application.js +0 -15
  6. data/spec/dummy/app/assets/javascripts/cable.js +0 -13
  7. data/spec/dummy/app/assets/stylesheets/application.css +0 -15
  8. data/spec/dummy/app/channels/application_cable/channel.rb +0 -4
  9. data/spec/dummy/app/channels/application_cable/connection.rb +0 -4
  10. data/spec/dummy/app/controllers/application_controller.rb +0 -2
  11. data/spec/dummy/app/helpers/application_helper.rb +0 -2
  12. data/spec/dummy/app/jobs/application_job.rb +0 -2
  13. data/spec/dummy/app/mailers/application_mailer.rb +0 -4
  14. data/spec/dummy/app/models/application_record.rb +0 -3
  15. data/spec/dummy/app/views/layouts/application.html.erb +0 -15
  16. data/spec/dummy/app/views/layouts/mailer.html.erb +0 -13
  17. data/spec/dummy/app/views/layouts/mailer.text.erb +0 -1
  18. data/spec/dummy/bin/bundle +0 -3
  19. data/spec/dummy/bin/rails +0 -4
  20. data/spec/dummy/bin/rake +0 -4
  21. data/spec/dummy/bin/setup +0 -36
  22. data/spec/dummy/bin/update +0 -31
  23. data/spec/dummy/bin/yarn +0 -11
  24. data/spec/dummy/config.ru +0 -5
  25. data/spec/dummy/config/application.rb +0 -31
  26. data/spec/dummy/config/boot.rb +0 -5
  27. data/spec/dummy/config/cable.yml +0 -10
  28. data/spec/dummy/config/database.yml +0 -25
  29. data/spec/dummy/config/environment.rb +0 -5
  30. data/spec/dummy/config/environments/development.rb +0 -61
  31. data/spec/dummy/config/environments/production.rb +0 -94
  32. data/spec/dummy/config/environments/test.rb +0 -46
  33. data/spec/dummy/config/initializers/application_controller_renderer.rb +0 -8
  34. data/spec/dummy/config/initializers/assets.rb +0 -14
  35. data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
  36. data/spec/dummy/config/initializers/cmor_testimonials.rb +0 -10
  37. data/spec/dummy/config/initializers/content_security_policy.rb +0 -25
  38. data/spec/dummy/config/initializers/cookies_serializer.rb +0 -5
  39. data/spec/dummy/config/initializers/filter_parameter_logging.rb +0 -4
  40. data/spec/dummy/config/initializers/i18n.rb +0 -2
  41. data/spec/dummy/config/initializers/inflections.rb +0 -16
  42. data/spec/dummy/config/initializers/mime_types.rb +0 -4
  43. data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
  44. data/spec/dummy/config/locales/en.yml +0 -33
  45. data/spec/dummy/config/puma.rb +0 -34
  46. data/spec/dummy/config/routes.rb +0 -3
  47. data/spec/dummy/config/spring.rb +0 -6
  48. data/spec/dummy/config/storage.yml +0 -34
  49. data/spec/dummy/db/development.sqlite3 +0 -0
  50. data/spec/dummy/db/migrate/20200119063530_create_active_storage_tables.active_storage.rb +0 -27
  51. data/spec/dummy/db/migrate/20200119063555_create_cmor_testimonials_categories.cmor_testimonials.rb +0 -12
  52. data/spec/dummy/db/migrate/20200119063556_create_cmor_testimonials_testimonials.cmor_testimonials.rb +0 -16
  53. data/spec/dummy/db/schema.rb +0 -57
  54. data/spec/dummy/db/test.sqlite3 +0 -0
  55. data/spec/dummy/log/development.log +0 -126
  56. data/spec/dummy/log/test.log +0 -578
  57. data/spec/dummy/package.json +0 -5
  58. data/spec/dummy/public/404.html +0 -67
  59. data/spec/dummy/public/422.html +0 -67
  60. data/spec/dummy/public/500.html +0 -66
  61. data/spec/dummy/public/apple-touch-icon-precomposed.png +0 -0
  62. data/spec/dummy/public/apple-touch-icon.png +0 -0
  63. data/spec/dummy/public/favicon.ico +0 -0
  64. data/spec/dummy/tmp/development_secret.txt +0 -1
  65. data/spec/dummy/tmp/storage/5S/ku/5SkuHECnXFuLLG5z6nKcaHXQ +0 -0
  66. data/spec/dummy/tmp/storage/5r/93/5r93FV2yGGf4L3uCenMGyYdk +0 -0
  67. data/spec/dummy/tmp/storage/6m/Db/6mDbkmxont6fafeAcpMB4A8Q +0 -0
  68. data/spec/dummy/tmp/storage/Au/AN/AuANBoDPvvg4sB96SQy8iCMH +0 -0
  69. data/spec/dummy/tmp/storage/E1/on/E1on5rh1hDWTr1WP6Kbhxdu3 +0 -0
  70. data/spec/dummy/tmp/storage/Fv/3x/Fv3xSS55puqpXgaVTon3X1zh +0 -0
  71. data/spec/dummy/tmp/storage/Kd/yW/KdyWkRohv5svkwpnHk3GUKXW +0 -0
  72. data/spec/dummy/tmp/storage/L2/Z8/L2Z8khBiRvsfGEECooibmwzW +0 -0
  73. data/spec/dummy/tmp/storage/NG/WA/NGWA8YFJrEdDVAhmc4fRbJsT +0 -0
  74. data/spec/dummy/tmp/storage/YH/6F/YH6FYWFzS62jvgfF67dSJvkS +0 -0
  75. data/spec/dummy/tmp/storage/Zt/yC/ZtyC4YZjzwSRnsGXGDrJLBh7 +0 -0
  76. data/spec/dummy/tmp/storage/df/B3/dfB3AzufS1R2iFMtXecYg5UJ +0 -0
  77. data/spec/dummy/tmp/storage/jP/Ae/jPAeMB15ifP98xfLrmQrUXKc +0 -0
  78. data/spec/dummy/tmp/storage/pP/SC/pPSCJrZzzi4oVygvCuwnnGp4 +0 -0
  79. data/spec/dummy/tmp/storage/sE/FM/sEFM27mUsQgJCijPFJF4RUqm +0 -0
  80. data/spec/dummy/tmp/storage/tT/au/tTauQj4qjUJZbin8u9FGqWPN +0 -0
  81. data/spec/dummy/tmp/storage/v8/VE/v8VEB2YXRf7poqaMvXkGEfrW +0 -0
  82. data/spec/dummy/tmp/storage/vy/8M/vy8MFSa3PhoxmW43QZ5vazNw +0 -0
  83. data/spec/models/cmor/testimonials/category_spec.rb +0 -9
  84. data/spec/models/cmor/testimonials/testimonial_spec.rb +0 -33
  85. data/spec/models/generic_spec.rb +0 -50
  86. data/spec/models/i18n_spec.rb +0 -41
  87. data/spec/rails_helper.rb +0 -63
  88. data/spec/spec_helper.rb +0 -96
  89. data/spec/support/capybara.rb +0 -1
  90. data/spec/support/factory_bot.rb +0 -9
  91. data/spec/support/pry.rb +0 -1
  92. data/spec/support/rao-shoulda_matchers.rb +0 -5
  93. data/spec/support/rao-view_helper.rb +0 -5
  94. data/spec/support/shoulda_matchers.rb +0 -9
  95. data/spec/view_helpers/cmor/testimonials/application_view_helper_spec.rb +0 -37
@@ -1,5 +0,0 @@
1
- {
2
- "name": "dummy",
3
- "private": true,
4
- "dependencies": {}
5
- }
@@ -1,67 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>The page you were looking for doesn't exist (404)</title>
5
- <meta name="viewport" content="width=device-width,initial-scale=1">
6
- <style>
7
- .rails-default-error-page {
8
- background-color: #EFEFEF;
9
- color: #2E2F30;
10
- text-align: center;
11
- font-family: arial, sans-serif;
12
- margin: 0;
13
- }
14
-
15
- .rails-default-error-page div.dialog {
16
- width: 95%;
17
- max-width: 33em;
18
- margin: 4em auto 0;
19
- }
20
-
21
- .rails-default-error-page 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
- .rails-default-error-page h1 {
35
- font-size: 100%;
36
- color: #730E15;
37
- line-height: 1.5em;
38
- }
39
-
40
- .rails-default-error-page 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 class="rails-default-error-page">
58
- <!-- This file lives in public/404.html -->
59
- <div class="dialog">
60
- <div>
61
- <h1>The page you were looking for doesn't exist.</h1>
62
- <p>You may have mistyped the address or the page may have moved.</p>
63
- </div>
64
- <p>If you are the application owner check the logs for more information.</p>
65
- </div>
66
- </body>
67
- </html>
@@ -1,67 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>The change you wanted was rejected (422)</title>
5
- <meta name="viewport" content="width=device-width,initial-scale=1">
6
- <style>
7
- .rails-default-error-page {
8
- background-color: #EFEFEF;
9
- color: #2E2F30;
10
- text-align: center;
11
- font-family: arial, sans-serif;
12
- margin: 0;
13
- }
14
-
15
- .rails-default-error-page div.dialog {
16
- width: 95%;
17
- max-width: 33em;
18
- margin: 4em auto 0;
19
- }
20
-
21
- .rails-default-error-page 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
- .rails-default-error-page h1 {
35
- font-size: 100%;
36
- color: #730E15;
37
- line-height: 1.5em;
38
- }
39
-
40
- .rails-default-error-page 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 class="rails-default-error-page">
58
- <!-- This file lives in public/422.html -->
59
- <div class="dialog">
60
- <div>
61
- <h1>The change you wanted was rejected.</h1>
62
- <p>Maybe you tried to change something you didn't have access to.</p>
63
- </div>
64
- <p>If you are the application owner check the logs for more information.</p>
65
- </div>
66
- </body>
67
- </html>
@@ -1,66 +0,0 @@
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
- .rails-default-error-page {
8
- background-color: #EFEFEF;
9
- color: #2E2F30;
10
- text-align: center;
11
- font-family: arial, sans-serif;
12
- margin: 0;
13
- }
14
-
15
- .rails-default-error-page div.dialog {
16
- width: 95%;
17
- max-width: 33em;
18
- margin: 4em auto 0;
19
- }
20
-
21
- .rails-default-error-page 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
- .rails-default-error-page h1 {
35
- font-size: 100%;
36
- color: #730E15;
37
- line-height: 1.5em;
38
- }
39
-
40
- .rails-default-error-page 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 class="rails-default-error-page">
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
File without changes
@@ -1 +0,0 @@
1
- 1fd0cd749072d6cf65fdd41b10dda3864fc1ae48cc700c2d951bc12bf0dae743398865f27c244a034183569a24d1471c459f22cd99dcd27c651991a6d62fa08f
@@ -1,9 +0,0 @@
1
- require 'rails_helper'
2
-
3
- RSpec.describe Cmor::Testimonials::Category, type: :model do
4
- subject { create :cmor_testimonials_category }
5
-
6
- context "associations" do
7
- it { should have_many :testimonials }
8
- end
9
- end
@@ -1,33 +0,0 @@
1
- require 'rails_helper'
2
-
3
- RSpec.describe Cmor::Testimonials::Testimonial, type: :model do
4
- subject { create :cmor_testimonials_testimonial }
5
-
6
- context "acts as list" do
7
- it { should respond_to(:move_to_top) }
8
- it { should respond_to(:move_higher) }
9
- it { should respond_to(:move_lower) }
10
- it { should respond_to(:move_to_bottom) }
11
- end
12
-
13
- context "associations" do
14
- it { should belong_to :category }
15
- end
16
-
17
- context "active_storage" do
18
- it { should respond_to :image }
19
- end
20
-
21
- describe "attach image" do
22
- let(:filename) { 'homer.png' }
23
- let(:file) { File.open(Cmor::Testimonials::Engine.root.join(*%W(spec files cmor testimonials testimonials #{filename}))) }
24
-
25
- before(:each) do
26
- subject.image.attach(io: file, filename: filename, content_type: 'image/png')
27
- subject.save!
28
- end
29
-
30
- it { expect(subject.image).to be_attached }
31
- it { expect(subject.image.filename.to_s).to eq(filename) }
32
- end
33
- end
@@ -1,50 +0,0 @@
1
- require 'rails_helper'
2
-
3
- RSpec.describe 'ActiveRecord::Base models', type: :model do
4
- DEFAULT_SPECS_TO_RUN = [
5
- :is_an_active_record,
6
- :is_instanciable,
7
- :valid_with_correct_attributes,
8
- :not_valid_with_empty_attributes,
9
- :saves_with_valid_attributes
10
- ]
11
-
12
- {
13
- Cmor::Testimonials::Category => {},
14
- Cmor::Testimonials::Testimonial => {},
15
- }.each do |model, options|
16
- options.reverse_merge!(specs_to_run: DEFAULT_SPECS_TO_RUN, specs_to_skip: [])
17
- specs_to_run = options.delete(:specs_to_run)
18
- specs_to_skip = options.delete(:specs_to_skip)
19
- specs = specs_to_run - specs_to_skip
20
-
21
- describe model do
22
- it 'is an ActiveRecord::Base' do
23
- expect(ActiveRecord::Base.descendants).to include(model)
24
- end if specs.include?(:is_an_active_record)
25
-
26
- it 'is instanciable' do
27
- instance = model.new
28
- expect(instance).to be_a(model)
29
- end if specs.include?(:is_instanciable)
30
-
31
- it 'is valid with correct attribute values' do
32
- instance = build(model.to_s.tableize.singularize.underscore.tr('/', '_'))
33
-
34
- instance.valid?
35
- expect(instance.errors.full_messages).to eq([])
36
- end if specs.include?(:valid_with_correct_attributes)
37
-
38
- it 'is not valid with empty attributes' do
39
- instance = model.new
40
- expect(instance).not_to be_valid
41
- end if specs.include?(:not_valid_with_empty_attributes)
42
-
43
- it 'saves with valid attributes' do
44
- instance = build(model.to_s.tableize.singularize.underscore.tr('/', '_'))
45
- expect(instance.save).to be_truthy
46
- expect(instance).to be_persisted
47
- end if specs.include?(:saves_with_valid_attributes)
48
- end
49
- end
50
- end
@@ -1,41 +0,0 @@
1
- require 'rails_helper'
2
-
3
- RSpec.describe 'Translations', type: :model do
4
- {
5
- Cmor::Testimonials::Category => {},
6
- Cmor::Testimonials::Testimonial => {},
7
- }.each do |model, options|
8
- I18n.available_locales.each do |locale|
9
- I18n.locale = locale
10
-
11
- describe "for locale #{locale}:" do
12
- describe "#{model} translations" do
13
- it 'include one' do
14
- I18n.locale = locale
15
- i18n_key = ['activerecord', 'models', model.name.underscore].join('.')
16
- i18n_options = {}
17
- expect(I18n.translate!(i18n_key, options)[:one]).to be_a(String)
18
- end
19
-
20
- it 'include other' do
21
- I18n.locale = locale
22
- i18n_key = ['activerecord', 'models', model.name.underscore].join('.')
23
- i18n_options = {}
24
- expect(I18n.translate!(i18n_key, options)[:other]).to be_a(String)
25
- end
26
-
27
- describe 'for attributes' do
28
-
29
- model.column_names.each do |column_name|
30
- it "include #{column_name}" do
31
- I18n.locale = locale
32
- i18n_key = ['activerecord', 'attributes', model.name.underscore, column_name].join('.')
33
- expect(I18n.translate!(i18n_key)).to be_a(String)
34
- end
35
- end
36
- end
37
- end
38
- end
39
- end
40
- end
41
- end
@@ -1,63 +0,0 @@
1
- # This file is copied to spec/ when you run 'rails generate rspec:install'
2
- require 'spec_helper'
3
- ENV['RAILS_ENV'] ||= 'test'
4
- require File.expand_path('../dummy/config/environment', __FILE__)
5
- # Prevent database truncation if the environment is production
6
- abort("The Rails environment is running in production mode!") if Rails.env.production?
7
- require 'rspec/rails'
8
- require 'shoulda-matchers'
9
- # Add additional requires below this line. Rails is not loaded until this point!
10
-
11
- # Requires supporting ruby files with custom matchers and macros, etc, in
12
- # spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
13
- # run as spec files by default. This means that files in spec/support that end
14
- # in _spec.rb will both be required and run as specs, causing the specs to be
15
- # run twice. It is recommended that you do not name files matching this glob to
16
- # end with _spec.rb. You can configure this pattern with the --pattern
17
- # option on the command line or in ~/.rspec, .rspec or `.rspec-local`.
18
- #
19
- # The following line is provided for convenience purposes. It has the downside
20
- # of increasing the boot-up time by auto-requiring all files in the support
21
- # directory. Alternatively, in the individual `*_spec.rb` files, manually
22
- # require only the support files necessary.
23
- #
24
- # Dir[Rails.root.join('spec', 'support', '**', '*.rb')].each { |f| require f }
25
- Dir[Cmor::Testimonials::Engine.root.join('spec', 'support', '**', '*.rb')].each { |f| require f }
26
-
27
- # Checks for pending migrations and applies them before tests are run.
28
- # If you are not using ActiveRecord, you can remove these lines.
29
- # begin
30
- # ActiveRecord::Migration.maintain_test_schema!
31
- # rescue ActiveRecord::PendingMigrationError => e
32
- # puts e.to_s.strip
33
- # exit 1
34
- # end
35
- RSpec.configure do |config|
36
- # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
37
- config.fixture_path = "#{::Rails.root}/spec/fixtures"
38
-
39
- # If you're not using ActiveRecord, or you'd prefer not to run each of your
40
- # examples within a transaction, remove the following line or assign false
41
- # instead of true.
42
- config.use_transactional_fixtures = true
43
-
44
- # RSpec Rails can automatically mix in different behaviours to your tests
45
- # based on their file location, for example enabling you to call `get` and
46
- # `post` in specs under `spec/controllers`.
47
- #
48
- # You can disable this behaviour by removing the line below, and instead
49
- # explicitly tag your specs with their type, e.g.:
50
- #
51
- # RSpec.describe UsersController, :type => :controller do
52
- # # ...
53
- # end
54
- #
55
- # The different available types are documented in the features, such as in
56
- # https://relishapp.com/rspec/rspec-rails/docs
57
- config.infer_spec_type_from_file_location!
58
-
59
- # Filter lines from Rails gems in backtraces.
60
- config.filter_rails_from_backtrace!
61
- # arbitrary gems may also be filtered via:
62
- # config.filter_gems_from_backtrace("gem name")
63
- end