view_primitives 0.1.0 → 0.1.1

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: cae6ead2a2d30db140973eb5f5a925e2845a3d6dc4caae79bbd8a461fb56eb9f
4
- data.tar.gz: 5ece5bd38e0e0db26522fb29fcec2f466396b58caff8a172a41f2bdc8b14ecaa
3
+ metadata.gz: 3bef69fa2796d5fec3caefbc2030477efadbe97cb28542e54b6f015edb3196de
4
+ data.tar.gz: a85bd022df50687b09ad134173dd76e264c66a7b24a4df8eff09918794a209cb
5
5
  SHA512:
6
- metadata.gz: 7175d71aa115dce9d0f34f6275b6d05a8997e41328f40809aaee7b127337f011b4323ef9a984085f01f2e9d56cfdb822c593a1bf6188028d6e9eb76658774573
7
- data.tar.gz: 35a018df2effe68ffccc863056e503f12a0fd3e101f38bba557f2e42247109091d9f2b50edea55e8f1da29ea06517109619f826428a70291329d26b03fe01cc8
6
+ metadata.gz: 424be22b1983a620253005a43f6598043553603eb6822de5c28b8bf10a49181039c3c5165f33ced82da6266af526422824b88ae7d0f7adad1d139e0fd695cf26
7
+ data.tar.gz: a3c8c3a237183d849329f998ad3c0d276fde2873db327d24d091ceeeff503518ba0ca20e3512c8683dc5ded47e13fd97066a16b62131e6923cea050f40a4e9f4
data/CHANGELOG.md CHANGED
@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.1.1] - 2026-06-01
11
+
12
+ ### Fixed
13
+
14
+ - `AddGenerator#copy_component` called `source_root` as an instance method; changed to `self.class.source_root` (caught by Ruby 4.0 stricter method dispatch)
15
+ - `template` and `copy_file` overrides in `AddGenerator` were treated as Thor generator actions and invoked with zero arguments; wrapped in `no_tasks` to exclude them from action dispatch
16
+ - Test helper did not require `ViewPrimitives::Generators::Components`, causing two tests to error with `NameError: uninitialized constant`
17
+
10
18
  ## [0.1.0] - 2026-05-30
11
19
 
12
20
  ### Added
data/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # ViewPrimitives
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/view_primitives.svg)](https://badge.fury.io/rb/view_primitives)
4
+ [![Build Status](https://github.com/alec-c4/view_primitives/actions/workflows/main.yml/badge.svg)](https://github.com/alec-c4/view_primitives/actions)
5
+
3
6
  A [shadcn/ui](https://ui.shadcn.com)-inspired component library for Rails built on [ViewComponent](https://viewcomponent.org).
4
7
 
5
8
  > **Acknowledgements** — The visual design, CSS class choices, and component structure of ViewPrimitives are heavily inspired by [shadcn/ui](https://ui.shadcn.com) and its Svelte port [shadcn-svelte](https://www.shadcn-svelte.com). We are grateful to [@shadcn](https://github.com/shadcn) and all contributors for their outstanding open-source work. ViewPrimitives is an independent Rails adaptation and is not affiliated with or endorsed by the shadcn/ui project.
@@ -49,22 +49,24 @@ module ViewPrimitives
49
49
  end
50
50
  end
51
51
 
52
- def template(source, *args, **options, &block)
53
- destination = args.first || options[:to]
54
- warn_overwrite(destination) if destination
55
- super
56
- end
52
+ no_tasks do
53
+ def template(source, *args, **options, &block)
54
+ destination = args.first || options[:to]
55
+ warn_overwrite(destination) if destination
56
+ super
57
+ end
57
58
 
58
- def copy_file(source, *args, **options)
59
- destination = args.first || options[:to]
60
- warn_overwrite(destination) if destination
61
- super
59
+ def copy_file(source, *args, **options)
60
+ destination = args.first || options[:to]
61
+ warn_overwrite(destination) if destination
62
+ super
63
+ end
62
64
  end
63
65
 
64
66
  private
65
67
 
66
68
  def copy_component(name)
67
- dir = File.join(source_root, name)
69
+ dir = File.join(self.class.source_root, name)
68
70
  Dir.each_child(dir).sort.each { |file| copy_template_file(name, file) }
69
71
  copy_extra_stimulus(name)
70
72
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ViewPrimitives
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: view_primitives
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexey Poimtsev