simple_calendar 2.4.2 → 3.0.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 (106) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +5 -4
  3. data/.gitignore +4 -0
  4. data/Appraisals +5 -5
  5. data/CHANGELOG.md +11 -0
  6. data/Gemfile +4 -1
  7. data/Gemfile.lock +161 -142
  8. data/README.md +22 -15
  9. data/Rakefile +29 -5
  10. data/app/assets/stylesheets/simple_calendar.scss +4 -0
  11. data/app/views/simple_calendar/_calendar.html.erb +7 -7
  12. data/app/views/simple_calendar/_month_calendar.html.erb +8 -8
  13. data/app/views/simple_calendar/_week_calendar.html.erb +14 -12
  14. data/bin/rails +16 -0
  15. data/gemfiles/rails_6_1.gemfile +3 -1
  16. data/gemfiles/rails_6_1.gemfile.lock +161 -135
  17. data/gemfiles/{rails_6.gemfile → rails_7_0.gemfile} +4 -2
  18. data/gemfiles/rails_7_0.gemfile.lock +222 -0
  19. data/gemfiles/{rails_master.gemfile → rails_main.gemfile} +3 -1
  20. data/gemfiles/rails_main.gemfile.lock +246 -0
  21. data/lib/simple_calendar/calendar.rb +26 -14
  22. data/lib/simple_calendar/{railtie.rb → engine.rb} +3 -1
  23. data/lib/simple_calendar/month_calendar.rb +4 -0
  24. data/lib/simple_calendar/version.rb +1 -1
  25. data/lib/simple_calendar/view_helpers.rb +3 -3
  26. data/lib/simple_calendar/week_calendar.rb +5 -1
  27. data/lib/simple_calendar.rb +8 -1
  28. data/simple_calendar.gemspec +1 -3
  29. data/test/calendars/calendar_test.rb +154 -0
  30. data/test/calendars/month_calendar_test.rb +16 -0
  31. data/test/dummy/Rakefile +6 -0
  32. data/test/dummy/app/assets/config/manifest.js +1 -0
  33. data/test/dummy/app/assets/images/.keep +0 -0
  34. data/test/dummy/app/assets/stylesheets/application.css +1 -0
  35. data/test/dummy/app/channels/application_cable/channel.rb +4 -0
  36. data/test/dummy/app/channels/application_cable/connection.rb +4 -0
  37. data/test/dummy/app/controllers/application_controller.rb +2 -0
  38. data/test/dummy/app/controllers/concerns/.keep +0 -0
  39. data/test/dummy/app/controllers/meetings_controller.rb +59 -0
  40. data/test/dummy/app/helpers/application_helper.rb +2 -0
  41. data/test/dummy/app/helpers/meetings_helper.rb +2 -0
  42. data/test/dummy/app/jobs/application_job.rb +7 -0
  43. data/test/dummy/app/mailers/application_mailer.rb +4 -0
  44. data/test/dummy/app/models/application_record.rb +7 -0
  45. data/test/dummy/app/models/concerns/.keep +0 -0
  46. data/test/dummy/app/models/meeting.rb +2 -0
  47. data/test/dummy/app/views/layouts/application.html.erb +15 -0
  48. data/test/dummy/app/views/layouts/mailer.html.erb +13 -0
  49. data/test/dummy/app/views/layouts/mailer.text.erb +1 -0
  50. data/test/dummy/app/views/meetings/_form.html.erb +32 -0
  51. data/test/dummy/app/views/meetings/_meeting.html.erb +17 -0
  52. data/test/dummy/app/views/meetings/edit.html.erb +10 -0
  53. data/test/dummy/app/views/meetings/index.html.erb +24 -0
  54. data/test/dummy/app/views/meetings/new.html.erb +9 -0
  55. data/test/dummy/app/views/meetings/show.html.erb +10 -0
  56. data/test/dummy/bin/rails +4 -0
  57. data/test/dummy/bin/rake +4 -0
  58. data/test/dummy/bin/setup +33 -0
  59. data/test/dummy/config/application.rb +22 -0
  60. data/test/dummy/config/boot.rb +5 -0
  61. data/test/dummy/config/cable.yml +10 -0
  62. data/test/dummy/config/database.yml +25 -0
  63. data/test/dummy/config/environment.rb +5 -0
  64. data/test/dummy/config/environments/development.rb +67 -0
  65. data/test/dummy/config/environments/production.rb +87 -0
  66. data/test/dummy/config/environments/test.rb +60 -0
  67. data/test/dummy/config/initializers/content_security_policy.rb +25 -0
  68. data/test/dummy/config/initializers/filter_parameter_logging.rb +8 -0
  69. data/test/dummy/config/initializers/inflections.rb +16 -0
  70. data/test/dummy/config/initializers/permissions_policy.rb +11 -0
  71. data/test/dummy/config/locales/en.yml +33 -0
  72. data/test/dummy/config/puma.rb +43 -0
  73. data/test/dummy/config/routes.rb +7 -0
  74. data/test/dummy/config/storage.yml +34 -0
  75. data/test/dummy/config.ru +6 -0
  76. data/test/dummy/db/migrate/20220930184313_create_meetings.rb +11 -0
  77. data/test/dummy/db/schema.rb +21 -0
  78. data/test/dummy/lib/assets/.keep +0 -0
  79. data/test/dummy/log/.keep +0 -0
  80. data/test/dummy/public/404.html +67 -0
  81. data/test/dummy/public/422.html +67 -0
  82. data/test/dummy/public/500.html +66 -0
  83. data/test/dummy/public/apple-touch-icon-precomposed.png +0 -0
  84. data/test/dummy/public/apple-touch-icon.png +0 -0
  85. data/test/dummy/public/favicon.ico +0 -0
  86. data/test/dummy/storage/.keep +0 -0
  87. data/test/dummy/tmp/.keep +0 -0
  88. data/test/dummy/tmp/development_secret.txt +1 -0
  89. data/test/dummy/tmp/pids/.keep +0 -0
  90. data/test/dummy/tmp/pids/server.pid +1 -0
  91. data/test/dummy/tmp/restart.txt +0 -0
  92. data/test/dummy/tmp/storage/.keep +0 -0
  93. data/test/fixtures/meetings.yml +36 -0
  94. data/test/integrations/month_calendar_test.rb +58 -0
  95. data/test/simple_calendar_test.rb +7 -0
  96. data/test/test_helper.rb +14 -0
  97. metadata +80 -39
  98. data/gemfiles/rails_6.gemfile.lock +0 -197
  99. data/gemfiles/rails_master.gemfile.lock +0 -205
  100. data/spec/calendar_spec.rb +0 -176
  101. data/spec/calendars/month_calendar_spec.rb +0 -25
  102. data/spec/simple_calendar_spec.rb +0 -9
  103. data/spec/spec_helper.rb +0 -96
  104. data/spec/support/fake_event.rb +0 -9
  105. data/spec/support/view_context.rb +0 -20
  106. data/spec/views_generators_spec.rb +0 -7
data/spec/spec_helper.rb DELETED
@@ -1,96 +0,0 @@
1
- require "active_support/all"
2
-
3
- # This file was generated by the `rspec --init` command. Conventionally, all
4
- # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
5
- # The generated `.rspec` file contains `--require spec_helper` which will cause
6
- # this file to always be loaded, without a need to explicitly require it in any
7
- # files.
8
- #
9
- # Given that it is always loaded, you are encouraged to keep this file as
10
- # light-weight as possible. Requiring heavyweight dependencies from this file
11
- # will add to the boot time of your test suite on EVERY test run, even for an
12
- # individual file that may not need all of that loaded. Instead, consider making
13
- # a separate helper file that requires the additional dependencies and performs
14
- # the additional setup, and require it from the spec files that actually need
15
- # it.
16
- #
17
- # The `.rspec` file also contains a few flags that are not defaults but that
18
- # users commonly want.
19
- #
20
- # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
21
- RSpec.configure do |config|
22
- # rspec-expectations config goes here. You can use an alternate
23
- # assertion/expectation library such as wrong or the stdlib/minitest
24
- # assertions if you prefer.
25
- config.expect_with :rspec do |expectations|
26
- # This option will default to `true` in RSpec 4. It makes the `description`
27
- # and `failure_message` of custom matchers include text for helper methods
28
- # defined using `chain`, e.g.:
29
- # be_bigger_than(2).and_smaller_than(4).description
30
- # # => "be bigger than 2 and smaller than 4"
31
- # ...rather than:
32
- # # => "be bigger than 2"
33
- expectations.include_chain_clauses_in_custom_matcher_descriptions = true
34
- end
35
-
36
- # rspec-mocks config goes here. You can use an alternate test double
37
- # library (such as bogus or mocha) by changing the `mock_with` option here.
38
- config.mock_with :rspec do |mocks|
39
- # Prevents you from mocking or stubbing a method that does not exist on
40
- # a real object. This is generally recommended, and will default to
41
- # `true` in RSpec 4.
42
- mocks.verify_partial_doubles = true
43
- end
44
-
45
- # The settings below are suggested to provide a good initial experience
46
- # with RSpec, but feel free to customize to your heart's content.
47
- # # These two settings work together to allow you to limit a spec run
48
- # # to individual examples or groups you care about by tagging them with
49
- # # `:focus` metadata. When nothing is tagged with `:focus`, all examples
50
- # # get run.
51
- # config.filter_run :focus
52
- # config.run_all_when_everything_filtered = true
53
- #
54
- # # Allows RSpec to persist some state between runs in order to support
55
- # # the `--only-failures` and `--next-failure` CLI options. We recommend
56
- # # you configure your source control system to ignore this file.
57
- # config.example_status_persistence_file_path = "spec/examples.txt"
58
- #
59
- # # Limits the available syntax to the non-monkey patched syntax that is
60
- # # recommended. For more details, see:
61
- # # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
62
- # # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
63
- # # - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
64
- # config.disable_monkey_patching!
65
- #
66
- # # This setting enables warnings. It's recommended, but in some cases may
67
- # # be too noisy due to issues in dependencies.
68
- # config.warnings = true
69
- #
70
- # # Many RSpec users commonly either run the entire suite or an individual
71
- # # file, and it's useful to allow more verbose output when running an
72
- # # individual spec file.
73
- # if config.files_to_run.one?
74
- # # Use the documentation formatter for detailed output,
75
- # # unless a formatter has already been configured
76
- # # (e.g. via a command-line flag).
77
- # config.default_formatter = 'doc'
78
- # end
79
- #
80
- # # Print the 10 slowest examples and example groups at the
81
- # # end of the spec run, to help surface which specs are running
82
- # # particularly slow.
83
- # config.profile_examples = 10
84
- #
85
- # # Run specs in random order to surface order dependencies. If you find an
86
- # # order dependency and want to debug it, you can fix the order by providing
87
- # # the seed, which is printed after each run.
88
- # # --seed 1234
89
- # config.order = :random
90
- #
91
- # # Seed global randomization in this process using the `--seed` CLI option.
92
- # # Setting this allows you to use `--seed` to deterministically reproduce
93
- # # test failures related to randomization by passing the same `--seed` value
94
- # # as the one that triggered the failure.
95
- # Kernel.srand config.seed
96
- end
@@ -1,9 +0,0 @@
1
- class FakeEvent
2
- attr_accessor :name, :start_time, :end_time
3
-
4
- def initialize(name = "event", start_time = nil, end_time = nil)
5
- @name = name
6
- @start_time = start_time
7
- @end_time = end_time
8
- end
9
- end
@@ -1,20 +0,0 @@
1
- class ViewContext
2
- attr_accessor :start_date, :start_date_param
3
-
4
- def initialize(start_date = nil, options = {})
5
- @start_date = start_date
6
- @start_date_param = options.fetch(:start_date_param, :start_date)
7
- end
8
-
9
- def params
10
- if @start_date.present?
11
- ActionController::Parameters.new({start_date_param => @start_date})
12
- else
13
- ActionController::Parameters.new
14
- end
15
- end
16
-
17
- def render(options = {})
18
- options
19
- end
20
- end
@@ -1,7 +0,0 @@
1
- require "spec_helper"
2
- require "generators/simple_calendar/views_generator"
3
-
4
- describe SimpleCalendar::Generators::ViewsGenerator do
5
- it "copies the files to app/views/simple_calendar"
6
- it "verifies the content"
7
- end