ice_cube-select 4.0.1 → 4.0.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b267c3fc6a79d43f87e543decc642b0f015aeb7c20432d4a37417668675c5eb6
4
- data.tar.gz: 6ebe87a3e3864a60fa04e48941b025f6b5c0389257f6f70634edb76312cbe951
3
+ metadata.gz: 230f1e378cf7b69122298e0fc8920d9bdb93ca122c8c7f94fbb0c28e7396c0f5
4
+ data.tar.gz: 99b34354b2d5b2d48b8d6d83a5480e44be96882986c01b826942c04d27a51ce1
5
5
  SHA512:
6
- metadata.gz: 614ec3d61248f7cec039111fb30aeb56dcfe44852d6cd0062601101d825daeafa0c63bfddbec36bfebe2241f4e5afc8ce6e91a276710991758eb726017c6d698
7
- data.tar.gz: e1b6ff94c01d96ede907e00d364a5053b93b4b593f1100973c0375640aeae9fae5c29f4077aebe1b39321ce39e5410b8358d76a2411130696a23636eba59ccdd
6
+ metadata.gz: f32828f0644ab2fac30f43c51b02308e968a475fe83e4be38af357fa4112070e8598e2eb0082c8d8f7a4cfd709f190bf7ecd35c8f51d2feb900f7b77b2c240e1
7
+ data.tar.gz: 5f39310d8cb4149b78802dd4e49f964452015fb6b7afbe6b76c9227157804e91a7acdeb70b18ccb8bb2328d469add0bf9190868af0f242db9687cd4b68f9f8ce
data/README.md CHANGED
@@ -22,6 +22,15 @@ Add the gem to your Gemfile:
22
22
  gem 'ice_cube-select'
23
23
  ```
24
24
 
25
+ Then install the assets:
26
+
27
+ ```bash
28
+ bundle install
29
+ rails generate ice_cube_select:install
30
+ ```
31
+
32
+ This copies the CSS and JavaScript files to your `app/assets` directory for use with Propshaft (Rails 8 default asset pipeline).
33
+
25
34
  ### Assets
26
35
 
27
36
  Include the stylesheet and JavaScript in your layout:
@@ -32,8 +41,6 @@ Include the stylesheet and JavaScript in your layout:
32
41
  <%= javascript_include_tag "ice_cube_select_dialog" %>
33
42
  ```
34
43
 
35
- Works with Propshaft (Rails 8 default) out of the box.
36
-
37
44
  ### Form Helper
38
45
 
39
46
  In the form view call the helper:
@@ -563,14 +563,14 @@
563
563
  ${texts.months}:
564
564
  </p>
565
565
  <p class="monthly_rule_type">
566
- <span>
567
- <label for="monthly_rule_type_day">${texts.day_of_month}</label>
566
+ <label class="monthly_rule_type_option">
568
567
  <input type="radio" class="monthly_rule_type_day" name="monthly_rule_type" id="monthly_rule_type_day" value="true" />
569
- </span>
570
- <span>
571
- <label for="monthly_rule_type_week">${texts.day_of_week}</label>
568
+ <span>${texts.day_of_month}</span>
569
+ </label>
570
+ <label class="monthly_rule_type_option">
572
571
  <input type="radio" class="monthly_rule_type_week" name="monthly_rule_type" id="monthly_rule_type_week" value="true" />
573
- </span>
572
+ <span>${texts.day_of_week}</span>
573
+ </label>
574
574
  </p>
575
575
  <p class="ice_cube_select_calendar_day"></p>
576
576
  <p class="ice_cube_select_calendar_week"></p>
@@ -362,8 +362,24 @@ select option.bold {
362
362
  }
363
363
 
364
364
  /* Monthly rule type */
365
- .monthly_rule_type span {
366
- margin-right: 15px;
365
+ .monthly_rule_type {
366
+ display: flex;
367
+ flex-wrap: wrap;
368
+ gap: 8px 20px;
369
+ align-items: center;
370
+ }
371
+
372
+ .monthly_rule_type_option {
373
+ display: inline-flex;
374
+ align-items: center;
375
+ gap: 6px;
376
+ white-space: nowrap;
377
+ cursor: pointer;
378
+ font-weight: normal;
379
+ }
380
+
381
+ .monthly_rule_type_option input[type="radio"] {
382
+ margin: 0;
367
383
  }
368
384
 
369
385
  /* Summary section */
@@ -9,3 +9,8 @@ gem "rspec-rails", ">= 2.14", "< 8"
9
9
  gem "rake"
10
10
  gem "reissue"
11
11
  gem "standard"
12
+
13
+ gem "capybara"
14
+ gem "capybara-playwright-driver"
15
+ gem "puma"
16
+ gem "simplecov"
@@ -0,0 +1,24 @@
1
+ ===============================================================================
2
+
3
+ ice_cube_select assets have been installed!
4
+
5
+ Files copied:
6
+ - app/assets/stylesheets/ice_cube_select.css
7
+ - app/assets/javascripts/ice_cube_select.js
8
+ - app/assets/javascripts/ice_cube_select_dialog.js
9
+
10
+ Next steps:
11
+
12
+ 1. Include the assets in your layout (app/views/layouts/application.html.erb):
13
+
14
+ <%= stylesheet_link_tag 'ice_cube_select', 'data-turbo-track': 'reload' %>
15
+ <%= javascript_include_tag 'ice_cube_select', 'data-turbo-track': 'reload' %>
16
+ <%= javascript_include_tag 'ice_cube_select_dialog', 'data-turbo-track': 'reload' %>
17
+
18
+ 2. Use in your forms:
19
+
20
+ <%= f.ice_cube_select :schedule, :start_date => Date.today %>
21
+
22
+ For more information, visit: https://github.com/saturnflyer/ice_cube_select
23
+
24
+ ===============================================================================
@@ -0,0 +1,32 @@
1
+ require "rails/generators"
2
+
3
+ module IceCubeSelect
4
+ module Generators
5
+ class InstallGenerator < Rails::Generators::Base
6
+ source_root File.expand_path("../../../../app/assets", __FILE__)
7
+
8
+ desc "Copies ice_cube_select assets to your application for use with Propshaft"
9
+
10
+ def copy_stylesheets
11
+ copy_file "stylesheets/ice_cube_select.css",
12
+ "app/assets/stylesheets/ice_cube_select.css"
13
+ end
14
+
15
+ def copy_javascripts
16
+ copy_file "javascripts/ice_cube_select.js",
17
+ "app/assets/javascripts/ice_cube_select.js"
18
+ copy_file "javascripts/ice_cube_select_dialog.js",
19
+ "app/assets/javascripts/ice_cube_select_dialog.js"
20
+ end
21
+
22
+ def show_readme
23
+ return unless behavior == :invoke
24
+
25
+ install_path = File.join(File.dirname(__FILE__), "INSTALL")
26
+ if File.exist?(install_path)
27
+ say File.read(install_path), :green
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -1,3 +1,3 @@
1
1
  module IceCubeSelect
2
- VERSION = "4.0.1"
2
+ VERSION = "4.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ice_cube-select
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.1
4
+ version: 4.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jim Gay
@@ -59,6 +59,8 @@ files:
59
59
  - config/locales/fr.yml
60
60
  - config/locales/nl.yml
61
61
  - gemfiles/Gemfile.rails-8.0
62
+ - lib/generators/ice_cube_select/INSTALL
63
+ - lib/generators/ice_cube_select/install_generator.rb
62
64
  - lib/helpers/ice_cube_select_helper.rb
63
65
  - lib/ice_cube/select.rb
64
66
  - lib/ice_cube_select.rb
@@ -69,6 +71,13 @@ homepage: http://github.com/saturnflyer/ice_cube_select
69
71
  licenses:
70
72
  - MIT
71
73
  metadata: {}
74
+ post_install_message: |
75
+ ice_cube_select installed successfully!
76
+
77
+ To copy assets to your app (required for Rails 8+ Propshaft):
78
+ rails generate ice_cube_select:install
79
+
80
+ For more info: https://github.com/saturnflyer/ice_cube_select
72
81
  rdoc_options: []
73
82
  require_paths:
74
83
  - lib
@@ -83,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
83
92
  - !ruby/object:Gem::Version
84
93
  version: '0'
85
94
  requirements: []
86
- rubygems_version: 4.0.3
95
+ rubygems_version: 4.0.10
87
96
  specification_version: 4
88
97
  summary: A select helper which gives you magical powers to generate ice_cube rules.
89
98
  test_files: []