moonshot-rails 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c212161ee6bb8c6f116e8bd1dc91287d063638a372924eacbb2d6d5cc563c98e
4
- data.tar.gz: 42b045f38fd8a95acd37a7e6f2e84193b387631d8edb3f6adec839d6040cbaa6
3
+ metadata.gz: f7599d662e68db61c5e786bf91ee537eb510b9b36a4e825de4d414a2446cff03
4
+ data.tar.gz: 776899b71938f2ded58383037aa2bf35085dd94aa73d488d86faa8af9077cf93
5
5
  SHA512:
6
- metadata.gz: d5af21ff764829a3b75e9c386dacfb9dfddc7ff301492ca071002fc24dff0b2a86ee81e554e6e098e837221e7e3dc006e52531ff8c2aa63cad910de8eb0da625
7
- data.tar.gz: 6efb3ee75e7f52071319763fe2fdac13f861564c3e3e670a22ed34133377a8ac58d02c556f10d2435dfd677a29afa1ec783f05df840d8f63cb89c24e7f8a41c6
6
+ metadata.gz: ad97c008ba8073427928035f49c1b677841e9d9f9151b255793cd5f93f1752f388ed88acceb1d04798acc9c0f38f1e254d3cc45228ce8cbb63336e77d9fca631
7
+ data.tar.gz: 4c7af151b2335a0a2ff1c028501b264c68369451d6bd97ef8cc46b6e5a18ae49becaa51a00e7d32176c57871f6cfaf9b49af01bad3f8feaba9273d93a80583d7
@@ -0,0 +1,14 @@
1
+ .card.mw-800px.mx-auto.bg-white
2
+ .card-body
3
+ %h2.fs-2.mb-4= title
4
+ %ol.mb-0.ps-4
5
+ - items.each do |item|
6
+ %li.mb-4
7
+ .d-flex.justify-content-between.align-items-center
8
+ %h2.fs-4.mb-0{ class: class_names('text-gray-600 text-decoration-line-through' => item.completed?) }= item.title
9
+ - if item.completed?
10
+ %i.fas.fa-check.text-success
11
+ - else
12
+ = item
13
+ - if item.subtitle.present?
14
+ %p.fs-7.text-gray-600.lh-lg= item.subtitle
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ class Moonshot::App::JobsToBeDone < ViewComponent::Base
4
+ renders_many :items, 'ItemComponent'
5
+
6
+ attr_reader :title
7
+
8
+ def initialize title:
9
+ @title = title
10
+ end
11
+
12
+ def render?
13
+ !items.all?(&:completed?)
14
+ end
15
+
16
+ class ItemComponent < ViewComponent::Base
17
+ attr_reader :completed, :title, :subtitle
18
+
19
+ alias completed? completed
20
+
21
+ def initialize title:, subtitle: nil, completed: false
22
+ @title = title
23
+ @subtitle = subtitle
24
+ @completed = completed
25
+ end
26
+
27
+ def call
28
+ content
29
+ end
30
+ end
31
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MoonshotRails
4
- VERSION = '0.0.5'
4
+ VERSION = '0.0.6'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: moonshot-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Catalin Ionescu
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-05 00:00:00.000000000 Z
11
+ date: 2024-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -25,33 +25,19 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: 7.0.0
27
27
  - !ruby/object:Gem::Dependency
28
- name: pry
28
+ name: view_component
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: rspec
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :development
33
+ version: 3.0.0
34
+ type: :runtime
49
35
  prerelease: false
50
36
  version_requirements: !ruby/object:Gem::Requirement
51
37
  requirements:
52
38
  - - ">="
53
39
  - !ruby/object:Gem::Version
54
- version: '0'
40
+ version: 3.0.0
55
41
  description:
56
42
  email:
57
43
  - catalin.ionescu282@gmail.com
@@ -66,6 +52,8 @@ files:
66
52
  - app/assets/javascripts/moonshot/index.js
67
53
  - app/assets/javascripts/moonshot/post_hog_controller.js
68
54
  - app/assets/javascripts/moonshot/shepherd_controller.js
55
+ - app/components/moonshot/app/jobs_to_be_done.html.haml
56
+ - app/components/moonshot/app/jobs_to_be_done.rb
69
57
  - app/helpers/moonshot/moonshot_helper.rb
70
58
  - lib/moonshot-rails.rb
71
59
  - lib/moonshot-rails/config.rb