moonshot-rails 0.0.4 → 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: 80ae99ac2e3300a7795f3612397bb4c338c3fe4641392ba83bc2d6910f14cdd6
4
- data.tar.gz: 0b20b0277be40bc1ac7bb57a2c49e5da29726e4d7a400b1777759ad11c8e74d8
3
+ metadata.gz: f7599d662e68db61c5e786bf91ee537eb510b9b36a4e825de4d414a2446cff03
4
+ data.tar.gz: 776899b71938f2ded58383037aa2bf35085dd94aa73d488d86faa8af9077cf93
5
5
  SHA512:
6
- metadata.gz: a53608e24e4cabd49d5c426124774e526e1f898f1535615a1bb104384a8088f88197550be8a20f62c714565397d6ce3f82ebe494244c03c0a09971ebd28d63d9
7
- data.tar.gz: 4813fce7da2d850201bfe19e084f7e3371d8e51370be47539d34a239cf6d9a6415d00bb5f78429dc558b28c4ba56e2f549ebb538894bac1c4446a1a6375c55b8
6
+ metadata.gz: ad97c008ba8073427928035f49c1b677841e9d9f9151b255793cd5f93f1752f388ed88acceb1d04798acc9c0f38f1e254d3cc45228ce8cbb63336e77d9fca631
7
+ data.tar.gz: 4c7af151b2335a0a2ff1c028501b264c68369451d6bd97ef8cc46b6e5a18ae49becaa51a00e7d32176c57871f6cfaf9b49af01bad3f8feaba9273d93a80583d7
data/README.md CHANGED
@@ -1,3 +1,6 @@
1
+ [![npm version](https://badge.fury.io/js/moonshot-rails.svg)](https://badge.fury.io/js/moonshot-rails)
2
+ [![Gem Version](https://badge.fury.io/rb/moonshot-rails.svg)](https://badge.fury.io/rb/moonshot-rails)
3
+
1
4
  # Moonshot Rails
2
5
 
3
6
  A collection of Stimulus controllers and other helpers enabling faster building of SaaS applications using modern Rails and Stimulus. Most of these are heavily opinionated.
@@ -22,7 +22,7 @@ export default class extends Controller {
22
22
 
23
23
  if (Object.keys(this.identificationValue).length) {
24
24
  const { id, email, name } = this.identificationValue
25
- posthog.identify(id, { email, name })
25
+ posthog.identify(id.toString(), { email, name })
26
26
  }
27
27
  }
28
28
  }
@@ -4211,7 +4211,7 @@ class PostHogController extends Controller {
4211
4211
  });
4212
4212
  if (Object.keys(this.identificationValue).length) {
4213
4213
  const {id: id, email: email, name: name} = this.identificationValue;
4214
- $r.identify(id, {
4214
+ $r.identify(id.toString(), {
4215
4215
  email: email,
4216
4216
  name: name
4217
4217
  });
@@ -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.4'
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.4
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: 2023-12-22 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