coupdoeil 1.0.0.pre.beta.4 → 1.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +10 -1
- data/Rakefile +21 -0
- data/app/controllers/coupdoeil/popovers_controller.rb +1 -1
- data/app/models/coupdoeil/params.rb +2 -2
- data/app/models/coupdoeil/popover/option/animation.rb +1 -1
- data/app/models/coupdoeil/popover/option/loading.rb +1 -1
- data/app/models/coupdoeil/popover/option/offset.rb +3 -3
- data/app/models/coupdoeil/popover/option/placement.rb +8 -8
- data/app/models/coupdoeil/popover/option/trigger.rb +1 -1
- data/app/models/coupdoeil/popover/option.rb +4 -4
- data/app/models/coupdoeil/popover/options_set.rb +1 -1
- data/app/models/coupdoeil/popover/registry.rb +3 -3
- data/app/models/coupdoeil/popover.rb +3 -3
- data/app/models/coupdoeil/tag.rb +1 -1
- data/config/routes.rb +2 -0
- data/lib/coupdoeil/engine.rb +17 -15
- data/lib/coupdoeil/version.rb +3 -1
- data/lib/coupdoeil.rb +2 -0
- data/lib/generators/coupdoeil/install/install_generator.rb +65 -61
- data/lib/generators/coupdoeil/popover/popover_generator.rb +20 -14
- data/lib/tasks/coupdoeil_tasks.rake +2 -0
- metadata +18 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 76c263c22c11fb3ffe7fa96da1d9a3dcfe12dd209b57b999ffc3eb0623c6babf
|
4
|
+
data.tar.gz: 61ba2b5faee4080f7db503c7ae7869015a091970e10d6587f7fc3123a07da00f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f94fb2662bd3b9915860cba9d13bc1a209e8e670820ffb1d4294b1ba0808103df441e3a75ed064e0b22676963ee3fa60aa902c03a0d6073f2981ed026435700c
|
7
|
+
data.tar.gz: ba5e0d524441b0199bf8f9175a01efa6f8c9fe99cd6f7992f5ce4444b878eed62bad7056f63000ff8be9a04b0b24fd9531e4d37ae72208bdecffab37b15e929a
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -6,6 +6,8 @@ A framework to easily handle popovers.
|
|
6
6
|
## Documentation
|
7
7
|
See [coupdoeil.org](https://coupdoeil.org) for full documentation.
|
8
8
|
|
9
|
+
There is also an [introduction article I wrote for the first release.](https://dev.to/pagehey/coupdoeil-ruby-gem-174a)
|
10
|
+
|
9
11
|
## Overview
|
10
12
|
|
11
13
|
### What is a Coupdoeil::Popover?
|
@@ -23,7 +25,12 @@ Click to toggle examples
|
|
23
25
|
<summary><i>A form in a popup</i></summary>
|
24
26
|
<img src="https://coupdoeil.org/overview-example-2.gif" alt="popover example" />
|
25
27
|
</details>
|
26
|
-
|
28
|
+
<details>
|
29
|
+
<summary><i>A side menu with sub items</i></summary>
|
30
|
+
<img src="https://coupdoeil.org/overview-example-3.gif" alt="side menu with sub items popover example" />
|
31
|
+
</details>
|
32
|
+
|
33
|
+
[See more use-cases in documentation](https://coupdoeil.org/case-studies.html)
|
27
34
|
|
28
35
|
The current implementation takes inspiration from both ViewComponent and ActionMailer, to make it as easy as possible to use while offering a wide range of possibilities.
|
29
36
|
|
@@ -57,6 +64,8 @@ Which is embedded by doing so:
|
|
57
64
|
</div>
|
58
65
|
```
|
59
66
|
|
67
|
+
|
68
|
+
|
60
69
|
### Why use Coupdoeil popovers?
|
61
70
|
|
62
71
|
The concept of 'quick look' allowed by popovers can really improve UX by avoiding the need to navigate to another page and back again just to check summary for a resource.
|
data/Rakefile
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require "bundler/setup"
|
2
4
|
|
3
5
|
APP_RAKEFILE = File.expand_path("test/dummy/Rakefile", __dir__)
|
@@ -6,9 +8,28 @@ load "rails/tasks/engine.rake"
|
|
6
8
|
load "rails/tasks/statistics.rake"
|
7
9
|
|
8
10
|
require "bundler/gem_tasks"
|
11
|
+
require "rubocop/rake_task"
|
12
|
+
require "minitest/test_task"
|
13
|
+
|
14
|
+
require "minitest/test_task"
|
15
|
+
|
16
|
+
Minitest::TestTask.create(:test) do |t|
|
17
|
+
t.libs << "test"
|
18
|
+
t.libs << "lib"
|
19
|
+
t.warning = false
|
20
|
+
t.test_globs = ["test/**/*_test.rb"]
|
21
|
+
end
|
22
|
+
|
23
|
+
desc "Run rubocop"
|
24
|
+
task :rubocop do
|
25
|
+
RuboCop::RakeTask.new
|
26
|
+
end
|
9
27
|
|
10
28
|
namespace :release do
|
11
29
|
task :full do
|
30
|
+
Rake::Task["rubocop"].invoke
|
31
|
+
Rake::Task["test"].invoke
|
32
|
+
|
12
33
|
package_version = JSON.parse(File.read("package.json")).fetch("version")
|
13
34
|
doc_version = YAML.load_file("docs/_config.yml").dig("data", "library", "version")
|
14
35
|
|
@@ -6,7 +6,7 @@ module Coupdoeil
|
|
6
6
|
before_action :set_popover_class
|
7
7
|
before_action :set_popover_params
|
8
8
|
|
9
|
-
filters = _process_action_callbacks.map(&:filter) -
|
9
|
+
filters = _process_action_callbacks.map(&:filter) - [:set_action_and_resource_name, :set_popover_class, :set_popover_params]
|
10
10
|
skip_before_action(*filters, raise: false)
|
11
11
|
skip_after_action(*filters, raise: false)
|
12
12
|
skip_around_action(*filters, raise: false)
|
@@ -12,7 +12,7 @@ module Coupdoeil
|
|
12
12
|
|
13
13
|
SerializationError = Class.new(StandardError)
|
14
14
|
|
15
|
-
def deserialize_global_id(hash) = GlobalID::Locator.locate
|
15
|
+
def deserialize_global_id(hash) = GlobalID::Locator.locate(hash[GLOBAL_ID_KEY])
|
16
16
|
def deserialize_hash(serialized_hash) = serialized_hash.transform_values { deserialize_param(_1) }
|
17
17
|
def serialized_global_id?(hash) = hash.size == 1 && hash.include?(GLOBAL_ID_KEY)
|
18
18
|
|
@@ -71,7 +71,7 @@ module Coupdoeil
|
|
71
71
|
param.map { |arg| deserialize_param(arg) }
|
72
72
|
when Hash
|
73
73
|
if serialized_global_id?(param)
|
74
|
-
deserialize_global_id
|
74
|
+
deserialize_global_id(param)
|
75
75
|
else
|
76
76
|
deserialize_hash(param)
|
77
77
|
end
|
@@ -6,7 +6,7 @@ module Coupdoeil
|
|
6
6
|
class Animation < Coupdoeil::Popover::Option
|
7
7
|
self.bit_size = 3
|
8
8
|
|
9
|
-
VALUES =
|
9
|
+
VALUES = [false, "slide-in", "fade-in", "slide-out", "custom"].freeze
|
10
10
|
INDEX_BY_VALUES = VALUES.each_with_index.to_h.with_indifferent_access.freeze
|
11
11
|
|
12
12
|
class << self
|
@@ -29,7 +29,7 @@ module Coupdoeil
|
|
29
29
|
def validate!
|
30
30
|
return ensure_no_overflow if (value in Float | Integer) || value.to_s.match?(/^-?\d+(\.\d{1,3})?(px|rem)?$/)
|
31
31
|
|
32
|
-
raise_invalid_option
|
32
|
+
raise_invalid_option("Value should be a signed float or integer, followed or not by 'rem' or 'px'.")
|
33
33
|
end
|
34
34
|
|
35
35
|
private
|
@@ -39,8 +39,8 @@ module Coupdoeil
|
|
39
39
|
integer, decimals = float_value.abs.to_s.split(".").map(&:to_i)
|
40
40
|
return if integer.in?(0..255) && decimals.in?(0..999)
|
41
41
|
|
42
|
-
raise_invalid_option
|
43
|
-
with a maximum of 3 decimal digits."
|
42
|
+
raise_invalid_option("Number should be comprised between -255.999 and 255.999, \
|
43
|
+
with a maximum of 3 decimal digits.")
|
44
44
|
end
|
45
45
|
end
|
46
46
|
end
|
@@ -6,13 +6,13 @@ module Coupdoeil
|
|
6
6
|
class Placement < Coupdoeil::Popover::Option
|
7
7
|
self.bit_size = 4 * 4
|
8
8
|
|
9
|
-
VALUES =
|
10
|
-
auto
|
11
|
-
top top-start top-end
|
12
|
-
right right-start right-end
|
13
|
-
bottom bottom-start bottom-end
|
14
|
-
left left-start left-end
|
15
|
-
].freeze
|
9
|
+
VALUES = [
|
10
|
+
"auto",
|
11
|
+
["top", "top-start", "top-end"],
|
12
|
+
["right", "right-start", "right-end"],
|
13
|
+
["bottom", "bottom-start", "bottom-end"],
|
14
|
+
["left", "left-start", "left-end"],
|
15
|
+
].flatten.freeze
|
16
16
|
INDEX_BY_VALUES = VALUES.each_with_index.to_h.with_indifferent_access.freeze
|
17
17
|
|
18
18
|
class << self
|
@@ -35,7 +35,7 @@ module Coupdoeil
|
|
35
35
|
next if placement_value.strip.in?(VALUES)
|
36
36
|
|
37
37
|
values_sentence = VALUES.to_sentence(last_word_connector: " or ")
|
38
|
-
raise_invalid_option
|
38
|
+
raise_invalid_option("Value must be one of: #{values_sentence}")
|
39
39
|
end
|
40
40
|
end
|
41
41
|
end
|
@@ -1,4 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
module Coupdoeil
|
3
4
|
class Popover
|
4
5
|
class Option
|
@@ -20,7 +21,7 @@ module Coupdoeil
|
|
20
21
|
attr_reader :value
|
21
22
|
|
22
23
|
def initialize(value)
|
23
|
-
value = value.to_s if value.is_a?
|
24
|
+
value = value.to_s if value.is_a?(Symbol)
|
24
25
|
@value = value
|
25
26
|
end
|
26
27
|
|
@@ -29,8 +30,7 @@ module Coupdoeil
|
|
29
30
|
private
|
30
31
|
|
31
32
|
def raise_invalid_option(message)
|
32
|
-
raise InvalidOptionError,
|
33
|
-
"Invalid value '#{value}' (#{value.class.name}) for #{self.class.key} option. #{message}"
|
33
|
+
raise InvalidOptionError, "Invalid value '#{value}' (#{value.class.name}) for #{self.class.key} option. #{message}"
|
34
34
|
end
|
35
35
|
|
36
36
|
def validate_inclusion!
|
@@ -38,7 +38,7 @@ module Coupdoeil
|
|
38
38
|
return if value.in?(values)
|
39
39
|
|
40
40
|
values_sentence = values.to_sentence(two_words_connector: " or ", last_word_connector: " or ")
|
41
|
-
raise_invalid_option
|
41
|
+
raise_invalid_option("Value must be one of: #{values_sentence}")
|
42
42
|
end
|
43
43
|
end
|
44
44
|
end
|
@@ -7,12 +7,12 @@ module Coupdoeil
|
|
7
7
|
|
8
8
|
def initialize
|
9
9
|
@semaphore = Mutex.new
|
10
|
-
@registry =
|
10
|
+
@registry = {}
|
11
11
|
end
|
12
12
|
|
13
13
|
def register(type, klass) = @semaphore.synchronize { @registry[type] = klass }
|
14
|
-
def lookup(type) = @semaphore.synchronize {@registry.fetch(type) }
|
15
|
-
def safe_lookup(type) = @semaphore.synchronize {@registry[type] }
|
14
|
+
def lookup(type) = @semaphore.synchronize { @registry.fetch(type) }
|
15
|
+
def safe_lookup(type) = @semaphore.synchronize { @registry[type] }
|
16
16
|
|
17
17
|
def lookup_or_register(type)
|
18
18
|
safe_lookup(type) ||
|
@@ -35,7 +35,7 @@ module Coupdoeil
|
|
35
35
|
cache: true,
|
36
36
|
loading: :async,
|
37
37
|
trigger: "hover",
|
38
|
-
opening_delay: true
|
38
|
+
opening_delay: true,
|
39
39
|
)
|
40
40
|
|
41
41
|
DoubleRenderError = Class.new(::AbstractController::DoubleRenderError)
|
@@ -74,7 +74,7 @@ module Coupdoeil
|
|
74
74
|
define_singleton_method(action_name) { setup_class.new(self).with_type(action_name) }
|
75
75
|
end
|
76
76
|
public_send(method_name)
|
77
|
-
|
77
|
+
end
|
78
78
|
|
79
79
|
def respond_to_missing?(method, include_all = false)
|
80
80
|
action_methods.include?(method.name) || super
|
@@ -104,7 +104,7 @@ module Coupdoeil
|
|
104
104
|
|
105
105
|
def view_context
|
106
106
|
super.tap do |context|
|
107
|
-
context.extend
|
107
|
+
context.extend(ViewContextDelegation)
|
108
108
|
context.popover = self
|
109
109
|
context.__cp_view_context = @__cp_view_context
|
110
110
|
end
|
data/app/models/coupdoeil/tag.rb
CHANGED
data/config/routes.rb
CHANGED
data/lib/coupdoeil/engine.rb
CHANGED
@@ -1,16 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Coupdoeil
|
2
4
|
class Engine < ::Rails::Engine
|
3
5
|
isolate_namespace Coupdoeil
|
4
6
|
config.eager_load_namespaces << Coupdoeil
|
5
7
|
config.coupdoeil = ActiveSupport::OrderedOptions.new
|
6
8
|
|
7
|
-
config.autoload_once_paths =
|
8
|
-
#{root}/app/controllers
|
9
|
-
#{root}/app/controllers/concerns
|
10
|
-
#{root}/app/helpers
|
11
|
-
#{root}/app/models
|
12
|
-
#{root}/app/models/concerns
|
13
|
-
|
9
|
+
config.autoload_once_paths = [
|
10
|
+
"#{root}/app/controllers",
|
11
|
+
"#{root}/app/controllers/concerns",
|
12
|
+
"#{root}/app/helpers",
|
13
|
+
"#{root}/app/models",
|
14
|
+
"#{root}/app/models/concerns",
|
15
|
+
]
|
14
16
|
|
15
17
|
# If you don't want to precompile Coupdoeil's assets (eg. because you're using webpack),
|
16
18
|
# you can do this in an intiailzer:
|
@@ -24,13 +26,13 @@ module Coupdoeil
|
|
24
26
|
# config.after_initialize do
|
25
27
|
# config.assets.precompile -= %w[coupdoeil/popover-arrow.css]
|
26
28
|
# end
|
27
|
-
PRECOMPILE_ASSETS =
|
28
|
-
coupdoeil.js
|
29
|
-
coupdoeil.min.js
|
30
|
-
coupdoeil.min.js.map
|
31
|
-
coupdoeil/popover.css
|
32
|
-
coupdoeil/popover-arrow.css
|
33
|
-
coupdoeil/popover-animation.css
|
29
|
+
PRECOMPILE_ASSETS = [
|
30
|
+
"coupdoeil.js",
|
31
|
+
"coupdoeil.min.js",
|
32
|
+
"coupdoeil.min.js.map",
|
33
|
+
"coupdoeil/popover.css",
|
34
|
+
"coupdoeil/popover-arrow.css",
|
35
|
+
"coupdoeil/popover-animation.css",
|
34
36
|
]
|
35
37
|
|
36
38
|
initializer "coupdoeil.assets" do
|
@@ -40,7 +42,7 @@ module Coupdoeil
|
|
40
42
|
end
|
41
43
|
|
42
44
|
initializer "coupdoeil.logger" do
|
43
|
-
stdout_logger = ActiveSupport::Logger.new(
|
45
|
+
stdout_logger = ActiveSupport::Logger.new($stdout)
|
44
46
|
stdout_logger.formatter = ::Logger::Formatter.new
|
45
47
|
tagged_stdout_logger = ActiveSupport::TaggedLogging.new(stdout_logger)
|
46
48
|
config.coupdoeil.logger = tagged_stdout_logger.tagged("Coupdoeil")
|
data/lib/coupdoeil/version.rb
CHANGED
data/lib/coupdoeil.rb
CHANGED
@@ -1,83 +1,87 @@
|
|
1
|
-
|
2
|
-
Coupdoeil::InstallGenerator.source_root Coupdoeil::Engine.root.join("lib/generators/coupdoeil/install/templates")
|
1
|
+
# frozen_string_literal: true
|
3
2
|
|
4
|
-
|
3
|
+
module Coupdoeil
|
4
|
+
class InstallGenerator < Rails::Generators::Base
|
5
|
+
Coupdoeil::InstallGenerator.source_root(Coupdoeil::Engine.root.join("lib/generators/coupdoeil/install/templates"))
|
5
6
|
|
6
|
-
|
7
|
-
create_file "app/popovers/application_popover.rb", <<~RUBY
|
8
|
-
class ApplicationPopover < Coupdoeil::Popover
|
9
|
-
end
|
10
|
-
RUBY
|
11
|
-
end
|
7
|
+
desc "Create base class for popovers and default layout."
|
12
8
|
|
13
|
-
|
14
|
-
|
15
|
-
|
9
|
+
def create_base_class
|
10
|
+
create_file("app/popovers/application_popover.rb", <<~RUBY)
|
11
|
+
class ApplicationPopover < Coupdoeil::Popover
|
12
|
+
end
|
13
|
+
RUBY
|
14
|
+
end
|
16
15
|
|
17
|
-
|
18
|
-
|
19
|
-
if Rails.root.join("config/importmap.rb").exist?
|
20
|
-
append_to_importmap
|
21
|
-
elsif Rails.root.join("package.json").exist?
|
22
|
-
add_with_node
|
23
|
-
else
|
24
|
-
puts "You must either be running with node (package.json) or importmap-rails (config/importmap.rb) to use this gem."
|
16
|
+
def insert_default_layout
|
17
|
+
template("layout.html.erb.tt", "app/popovers/layouts/popover.html.erb")
|
25
18
|
end
|
26
|
-
end
|
27
19
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
20
|
+
def install_javascripts
|
21
|
+
puts ""
|
22
|
+
if Rails.root.join("config/importmap.rb").exist?
|
23
|
+
append_to_importmap
|
24
|
+
elsif Rails.root.join("package.json").exist?
|
25
|
+
add_with_node
|
26
|
+
else
|
27
|
+
puts "You must either be running with node (package.json) or importmap-rails (config/importmap.rb) to use this gem."
|
28
|
+
end
|
29
|
+
end
|
33
30
|
|
34
|
-
|
31
|
+
def install_stylesheets
|
32
|
+
puts ""
|
33
|
+
import_stylesheet
|
34
|
+
hidden_class_requirement
|
35
|
+
end
|
35
36
|
|
36
|
-
|
37
|
-
puts "Using importmap"
|
38
|
-
puts "Pin Coupdoeil"
|
39
|
-
append_to_file "config/importmap.rb", %(pin "coupdoeil", to: "coupdoeil.min.js", preload: true\n)
|
37
|
+
private
|
40
38
|
|
41
|
-
|
42
|
-
|
43
|
-
|
39
|
+
def append_to_importmap
|
40
|
+
puts "Using importmap"
|
41
|
+
puts "Pin Coupdoeil"
|
42
|
+
append_to_file("config/importmap.rb", %(pin "coupdoeil", to: "coupdoeil.min.js", preload: true\n))
|
44
43
|
|
45
|
-
|
46
|
-
|
47
|
-
say "Import Coupdoeil"
|
48
|
-
append_to_file "app/javascript/application.js", %(import "coupdoeil"\n)
|
49
|
-
else
|
50
|
-
say "You must import coupdoeil in your JavaScript entrypoint file", :red
|
44
|
+
puts "Import Coupdoeil"
|
45
|
+
append_to_file("app/javascript/application.js", %(import "coupdoeil"\n))
|
51
46
|
end
|
52
47
|
|
53
|
-
|
54
|
-
|
55
|
-
|
48
|
+
def add_with_node
|
49
|
+
if Rails.root.join("app/javascript/application.js").exist?
|
50
|
+
say("Import Coupdoeil")
|
51
|
+
append_to_file("app/javascript/application.js", %(import "coupdoeil"\n))
|
52
|
+
else
|
53
|
+
say("You must import coupdoeil in your JavaScript entrypoint file", :red)
|
54
|
+
end
|
55
|
+
|
56
|
+
say("Install Coupdoeil")
|
57
|
+
run("yarn add coupdoeil")
|
58
|
+
end
|
56
59
|
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
60
|
+
def import_stylesheet
|
61
|
+
puts "To use Coupdoeil popover style, add to your layout's head:"
|
62
|
+
puts ""
|
63
|
+
puts <<-ERB
|
61
64
|
<%= stylesheet_link_tag "coupdoeil/popover" %>
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
65
|
+
ERB
|
66
|
+
puts ""
|
67
|
+
puts "Or one of two:"
|
68
|
+
puts ""
|
69
|
+
puts <<-ERB
|
67
70
|
<%= stylesheet_link_tag "coupdoeil/popover-arrow" %>
|
68
71
|
<%= stylesheet_link_tag "coupdoeil/popover-animation" %>
|
69
|
-
|
70
|
-
|
72
|
+
ERB
|
73
|
+
end
|
71
74
|
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
75
|
+
def hidden_class_requirement
|
76
|
+
puts ""
|
77
|
+
puts "Also make sure you have a CSS implementation of .hidden class:"
|
78
|
+
puts ""
|
79
|
+
puts <<-CSS
|
77
80
|
.hidden {
|
78
81
|
display: none;
|
79
82
|
}
|
80
|
-
|
81
|
-
|
83
|
+
CSS
|
84
|
+
puts ""
|
85
|
+
end
|
82
86
|
end
|
83
87
|
end
|
@@ -1,21 +1,27 @@
|
|
1
|
-
|
2
|
-
source_root File.expand_path("templates", __dir__)
|
1
|
+
# frozen_string_literal: true
|
3
2
|
|
4
|
-
|
3
|
+
module Coupdoeil
|
4
|
+
class PopoverGenerator < Rails::Generators::NamedBase
|
5
|
+
source_root File.expand_path("templates", __dir__)
|
5
6
|
|
6
|
-
|
7
|
+
check_class_collision suffix: "Popover"
|
7
8
|
|
8
|
-
|
9
|
+
class_option :skip_views, type: :boolean, desc: "Skip view files", default: false
|
9
10
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
11
|
+
argument :action_names, type: :array, default: []
|
12
|
+
|
13
|
+
def create_popover_file
|
14
|
+
template(
|
15
|
+
"popover.rb",
|
16
|
+
File.join("app/popovers", class_path, "#{file_name}_popover.rb"),
|
17
|
+
)
|
18
|
+
unless options.skip_views?
|
19
|
+
action_names.each do |action_name|
|
20
|
+
path = [*class_path, file_name].join("/")
|
21
|
+
create_file("app/popovers/#{path}_popover/#{action_name}.html.erb", <<~ERB)
|
22
|
+
<p>Hello from #{class_name}Popover##{action_name}</p>
|
23
|
+
ERB
|
24
|
+
end
|
19
25
|
end
|
20
26
|
end
|
21
27
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coupdoeil
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PageHey
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-07-
|
10
|
+
date: 2025-07-06 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: actionpack
|
@@ -38,41 +38,41 @@ dependencies:
|
|
38
38
|
- !ruby/object:Gem::Version
|
39
39
|
version: 7.1.0
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
|
-
name:
|
41
|
+
name: globalid
|
42
42
|
requirement: !ruby/object:Gem::Requirement
|
43
43
|
requirements:
|
44
|
+
- - "~>"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '1.2'
|
44
47
|
- - ">="
|
45
48
|
- !ruby/object:Gem::Version
|
46
|
-
version:
|
49
|
+
version: 1.2.1
|
47
50
|
type: :runtime
|
48
51
|
prerelease: false
|
49
52
|
version_requirements: !ruby/object:Gem::Requirement
|
50
53
|
requirements:
|
54
|
+
- - "~>"
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: '1.2'
|
51
57
|
- - ">="
|
52
58
|
- !ruby/object:Gem::Version
|
53
|
-
version:
|
59
|
+
version: 1.2.1
|
54
60
|
- !ruby/object:Gem::Dependency
|
55
|
-
name:
|
61
|
+
name: railties
|
56
62
|
requirement: !ruby/object:Gem::Requirement
|
57
63
|
requirements:
|
58
|
-
- - "~>"
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
version: '1.2'
|
61
64
|
- - ">="
|
62
65
|
- !ruby/object:Gem::Version
|
63
|
-
version: 1.
|
66
|
+
version: 7.1.0
|
64
67
|
type: :runtime
|
65
68
|
prerelease: false
|
66
69
|
version_requirements: !ruby/object:Gem::Requirement
|
67
70
|
requirements:
|
68
|
-
- - "~>"
|
69
|
-
- !ruby/object:Gem::Version
|
70
|
-
version: '1.2'
|
71
71
|
- - ">="
|
72
72
|
- !ruby/object:Gem::Version
|
73
|
-
version: 1.
|
73
|
+
version: 7.1.0
|
74
74
|
- !ruby/object:Gem::Dependency
|
75
|
-
name:
|
75
|
+
name: activerecord
|
76
76
|
requirement: !ruby/object:Gem::Requirement
|
77
77
|
requirements:
|
78
78
|
- - ">="
|
@@ -86,7 +86,7 @@ dependencies:
|
|
86
86
|
- !ruby/object:Gem::Version
|
87
87
|
version: '0'
|
88
88
|
- !ruby/object:Gem::Dependency
|
89
|
-
name:
|
89
|
+
name: jekyll
|
90
90
|
requirement: !ruby/object:Gem::Requirement
|
91
91
|
requirements:
|
92
92
|
- - ">="
|
@@ -100,7 +100,7 @@ dependencies:
|
|
100
100
|
- !ruby/object:Gem::Version
|
101
101
|
version: '0'
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
|
-
name:
|
103
|
+
name: stimulus-rails
|
104
104
|
requirement: !ruby/object:Gem::Requirement
|
105
105
|
requirements:
|
106
106
|
- - ">="
|
@@ -114,7 +114,7 @@ dependencies:
|
|
114
114
|
- !ruby/object:Gem::Version
|
115
115
|
version: '0'
|
116
116
|
- !ruby/object:Gem::Dependency
|
117
|
-
name:
|
117
|
+
name: turbo-rails
|
118
118
|
requirement: !ruby/object:Gem::Requirement
|
119
119
|
requirements:
|
120
120
|
- - ">="
|