ctlst 0.1.1 → 0.1.4
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/README.md +4 -0
- data/templates/component/index.js.erb +1 -1
- data/templates/component/index.test.js.erb +3 -1
- data/templates/component.rb +1 -1
- data/templates/domain/index.test.js.erb +3 -1
- data/templates/domain.rb +1 -1
- data/templates/gateway/index.test.js.erb +3 -1
- data/templates/gateway.rb +1 -1
- data/templates/help.rb +4 -4
- data/templates/new/Makefile.erb +9 -2
- data/templates/new.rb +1 -1
- data/templates/usecase/index.js.erb +6 -0
- data/templates/usecase/index.test.js.erb +3 -1
- data/templates/usecase.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7700cd2537587c97c48f218a566bdd92a949c516960f6d8c0c87177d0a4b19dc
|
4
|
+
data.tar.gz: 0cc0c1bb8627e97bda2ea53b3f1a98758683b077615fc5b5fd430825bd973e4f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89902a121d8d1349750c282c5d6aad533ee4a263a1c613e68ce1525fa2005b88dd38e8123e8c7e52b08efef9958aaa8b9603dc5c1fdcadc96181e1c1158c49ad
|
7
|
+
data.tar.gz: 7439c96f0e09d2d81311d97cf92d1985646cdd396720d0252be0cf06280ac45043ae02f1e5fb314b6c10c8215a71724a7c8b5d870a011e3118905d62a1bc54f3
|
data/README.md
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
# Ctlst
|
2
2
|
Ctlst (pronounced 'Catalyst') is a tool similar to the Rails CLI. It provides simple commands to build React project that takes advantage of clean architecture, test driven development and containerisation. This folder must be added to your PATH.
|
3
3
|
|
4
|
+
### Installation
|
5
|
+
`gem install ctlst`
|
6
|
+
|
4
7
|
### Examples
|
5
8
|
`ctlst new my_react_app`
|
6
9
|
`ctlst domain ApiKey`
|
@@ -9,6 +12,7 @@ Ctlst (pronounced 'Catalyst') is a tool similar to the Rails CLI. It provides si
|
|
9
12
|
`ctlst component AccessStatus`
|
10
13
|
|
11
14
|
### Dependencies
|
15
|
+
- Ruby
|
12
16
|
- NPM
|
13
17
|
- Docker
|
14
18
|
- Docker-compose
|
@@ -2,6 +2,8 @@ import React from "react";
|
|
2
2
|
import <%= @component_class_name %> from ".";
|
3
3
|
import { mount } from "enzyme";
|
4
4
|
|
5
|
-
describe(<%= @component_class_name
|
5
|
+
describe("<%= @component_class_name %>", () => {
|
6
|
+
it("tests functionality", async () => {
|
6
7
|
|
8
|
+
});
|
7
9
|
});
|
data/templates/component.rb
CHANGED
data/templates/domain.rb
CHANGED
data/templates/gateway.rb
CHANGED
data/templates/help.rb
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
require_relative '../lib/templates'
|
2
2
|
module Template
|
3
3
|
def self.short_help
|
4
|
-
'help'
|
4
|
+
'help - Displays this help message'
|
5
5
|
end
|
6
6
|
|
7
7
|
def self.main(*_args)
|
8
|
-
print "
|
9
|
-
print
|
8
|
+
print "Usage: ctlst <command> [<arguments>]\n"
|
9
|
+
print ' ' + short_help + "\n"
|
10
10
|
|
11
11
|
Dir.glob(__dir__ + '/*').select { |f| File.file?(f) && f != __FILE__ }.each do |template|
|
12
12
|
require_relative template
|
13
|
-
print
|
13
|
+
print ' ' + Template.short_help + "\n"
|
14
14
|
end
|
15
15
|
end
|
16
16
|
end
|
data/templates/new/Makefile.erb
CHANGED
@@ -1,15 +1,22 @@
|
|
1
|
+
.PHONY: serve
|
1
2
|
serve: docker-up
|
2
3
|
|
4
|
+
.PHONY: docker-up
|
3
5
|
docker-up: docker-down docker-build
|
4
6
|
docker-compose up --build
|
5
7
|
|
8
|
+
.PHONY: docker-down
|
6
9
|
docker-down:
|
7
10
|
docker-compose down
|
8
11
|
|
12
|
+
.PHONY: docker-build
|
9
13
|
docker-build:
|
10
14
|
docker-compose build
|
11
15
|
|
12
|
-
|
13
|
-
|
16
|
+
.PHONY: shell
|
14
17
|
shell:
|
15
18
|
docker exec -ti <%= @project_name %>-app bash
|
19
|
+
|
20
|
+
.PHONY: test
|
21
|
+
test: docker-down docker-build
|
22
|
+
docker-compose run --rm <%= @project_name %>-app npm test
|
data/templates/new.rb
CHANGED
data/templates/usecase.rb
CHANGED