simple_calendar 2.4.3 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +5 -4
- data/.gitignore +4 -0
- data/Appraisals +5 -5
- data/CHANGELOG.md +7 -0
- data/Gemfile +4 -1
- data/Gemfile.lock +157 -136
- data/README.md +22 -15
- data/Rakefile +29 -5
- data/app/assets/stylesheets/simple_calendar.scss +4 -0
- data/app/views/simple_calendar/_calendar.html.erb +7 -7
- data/app/views/simple_calendar/_month_calendar.html.erb +8 -8
- data/app/views/simple_calendar/_week_calendar.html.erb +14 -12
- data/bin/rails +16 -0
- data/gemfiles/rails_6_1.gemfile +3 -1
- data/gemfiles/rails_6_1.gemfile.lock +159 -131
- data/gemfiles/{rails_6.gemfile → rails_7_0.gemfile} +4 -2
- data/gemfiles/rails_7_0.gemfile.lock +222 -0
- data/gemfiles/{rails_master.gemfile → rails_main.gemfile} +3 -1
- data/gemfiles/rails_main.gemfile.lock +246 -0
- data/lib/simple_calendar/calendar.rb +26 -14
- data/lib/simple_calendar/month_calendar.rb +4 -0
- data/lib/simple_calendar/version.rb +1 -1
- data/lib/simple_calendar/view_helpers.rb +3 -3
- data/lib/simple_calendar/week_calendar.rb +5 -1
- data/lib/simple_calendar.rb +8 -1
- data/simple_calendar.gemspec +1 -3
- data/test/calendars/calendar_test.rb +154 -0
- data/test/calendars/month_calendar_test.rb +16 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/config/manifest.js +1 -0
- data/test/dummy/app/assets/images/.keep +0 -0
- data/test/dummy/app/assets/stylesheets/application.css +1 -0
- data/test/dummy/app/channels/application_cable/channel.rb +4 -0
- data/test/dummy/app/channels/application_cable/connection.rb +4 -0
- data/test/dummy/app/controllers/application_controller.rb +2 -0
- data/test/dummy/app/controllers/concerns/.keep +0 -0
- data/test/dummy/app/controllers/meetings_controller.rb +59 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/helpers/meetings_helper.rb +2 -0
- data/test/dummy/app/jobs/application_job.rb +7 -0
- data/test/dummy/app/mailers/application_mailer.rb +4 -0
- data/test/dummy/app/models/application_record.rb +7 -0
- data/test/dummy/app/models/concerns/.keep +0 -0
- data/test/dummy/app/models/meeting.rb +2 -0
- data/test/dummy/app/views/layouts/application.html.erb +15 -0
- data/test/dummy/app/views/layouts/mailer.html.erb +13 -0
- data/test/dummy/app/views/layouts/mailer.text.erb +1 -0
- data/test/dummy/app/views/meetings/_form.html.erb +32 -0
- data/test/dummy/app/views/meetings/_meeting.html.erb +17 -0
- data/test/dummy/app/views/meetings/edit.html.erb +10 -0
- data/test/dummy/app/views/meetings/index.html.erb +24 -0
- data/test/dummy/app/views/meetings/new.html.erb +9 -0
- data/test/dummy/app/views/meetings/show.html.erb +10 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/bin/setup +33 -0
- data/test/dummy/config/application.rb +22 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/cable.yml +10 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +67 -0
- data/test/dummy/config/environments/production.rb +87 -0
- data/test/dummy/config/environments/test.rb +60 -0
- data/test/dummy/config/initializers/content_security_policy.rb +25 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +8 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/permissions_policy.rb +11 -0
- data/test/dummy/config/locales/en.yml +33 -0
- data/test/dummy/config/puma.rb +43 -0
- data/test/dummy/config/routes.rb +7 -0
- data/test/dummy/config/storage.yml +34 -0
- data/test/dummy/config.ru +6 -0
- data/test/dummy/db/migrate/20220930184313_create_meetings.rb +11 -0
- data/test/dummy/db/schema.rb +21 -0
- data/test/dummy/lib/assets/.keep +0 -0
- data/test/dummy/log/.keep +0 -0
- data/test/dummy/public/404.html +67 -0
- data/test/dummy/public/422.html +67 -0
- data/test/dummy/public/500.html +66 -0
- data/test/dummy/public/apple-touch-icon-precomposed.png +0 -0
- data/test/dummy/public/apple-touch-icon.png +0 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/storage/.keep +0 -0
- data/test/dummy/tmp/.keep +0 -0
- data/test/dummy/tmp/development_secret.txt +1 -0
- data/test/dummy/tmp/pids/.keep +0 -0
- data/test/dummy/tmp/pids/server.pid +1 -0
- data/test/dummy/tmp/restart.txt +0 -0
- data/test/dummy/tmp/storage/.keep +0 -0
- data/test/fixtures/meetings.yml +36 -0
- data/test/integrations/month_calendar_test.rb +58 -0
- data/test/simple_calendar_test.rb +7 -0
- data/test/test_helper.rb +14 -0
- metadata +80 -39
- data/gemfiles/rails_6.gemfile.lock +0 -195
- data/gemfiles/rails_master.gemfile.lock +0 -207
- data/spec/calendar_spec.rb +0 -176
- data/spec/calendars/month_calendar_spec.rb +0 -25
- data/spec/simple_calendar_spec.rb +0 -9
- data/spec/spec_helper.rb +0 -96
- data/spec/support/fake_event.rb +0 -9
- data/spec/support/view_context.rb +0 -20
- data/spec/views_generators_spec.rb +0 -7
- /data/lib/simple_calendar/{railtie.rb → engine.rb} +0 -0
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
|
data/spec/support/fake_event.rb
DELETED
@@ -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
|
File without changes
|