ctlst 0.1.1 → 0.1.4

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: 258ae040f12a07e26c9c578abbca2c1dd6787661ec643dfc56edb9301235e8ed
4
- data.tar.gz: 7396f08f07cbf9e6898def88b1648acbeebdd95b39788dec6ccd46f56e9af20a
3
+ metadata.gz: 7700cd2537587c97c48f218a566bdd92a949c516960f6d8c0c87177d0a4b19dc
4
+ data.tar.gz: 0cc0c1bb8627e97bda2ea53b3f1a98758683b077615fc5b5fd430825bd973e4f
5
5
  SHA512:
6
- metadata.gz: ecb74669054cc38db7479dfb18ccd89bfbbe272a7fcf8b9ee42fd370626929d63dfc47c6fcc824387d0ba74c5509839d8e9f2fdb2e52d8130748a8dd29b7b2ce
7
- data.tar.gz: 3679735da58fcf7968e3246d40f7caea1aa469ad12913572a5a05564ae105cd796cd14decc907fb3b8780a20eec4245d1be8a6822ff7449fc63e640f7ed060ef
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
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  export default class <%= @component_class_name %> extends React.Component {
3
3
  render() {
4
- return null;
4
+
5
5
  }
6
6
  };
@@ -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
  });
@@ -2,7 +2,7 @@ require_relative '../lib/templates'
2
2
 
3
3
  module Template
4
4
  def self.short_help
5
- 'component'
5
+ 'component [name] - Creates a component in src/Component (with tests & stories)'
6
6
  end
7
7
 
8
8
  def self.main(*args)
@@ -1,5 +1,7 @@
1
1
  import <%= @domain_class_name %> from ".";
2
2
 
3
- describe(<%= @domain_class_name %>, () => {
3
+ describe("<%= @domain_class_name %>", () => {
4
+ it("tests functionality", async () => {
4
5
 
6
+ });
5
7
  });
data/templates/domain.rb CHANGED
@@ -2,7 +2,7 @@ require_relative '../lib/templates'
2
2
 
3
3
  module Template
4
4
  def self.short_help
5
- 'domain'
5
+ 'domain [name] - Creates a domain in src/Domain (with tests)'
6
6
  end
7
7
 
8
8
  def self.main(*args)
@@ -1,5 +1,7 @@
1
1
  import <%= @gateway_class_name %> from ".";
2
2
 
3
- describe(<%= @gateway_class_name %>, () => {
3
+ describe("<%= @gateway_class_name %>", () => {
4
+ it("tests functionality", async () => {
4
5
 
6
+ });
5
7
  });
data/templates/gateway.rb CHANGED
@@ -2,7 +2,7 @@ require_relative '../lib/templates'
2
2
 
3
3
  module Template
4
4
  def self.short_help
5
- 'gateway'
5
+ 'gateway [name] - Creates a gateway in src/Gateway (with tests)'
6
6
  end
7
7
 
8
8
  def self.main(*args)
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 "Help:\n"
9
- print "\t" + short_help + "\n"
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 "\t" + Template.short_help + "\n"
13
+ print ' ' + Template.short_help + "\n"
14
14
  end
15
15
  end
16
16
  end
@@ -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
- setup: docker-build
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
@@ -1,7 +1,7 @@
1
1
  require_relative '../lib/templates'
2
2
  module Template
3
3
  def self.short_help
4
- 'new'
4
+ 'new [name] - Create a new React.js app with a full development environment'
5
5
  end
6
6
 
7
7
  def self.main(*args)
@@ -1,3 +1,9 @@
1
1
  export default class <%= @component_class_name %> extends React.Component {
2
+ constructor() {
2
3
 
4
+ }
5
+
6
+ async execute() {
7
+
8
+ }
3
9
  };
@@ -1,5 +1,7 @@
1
1
  import <%= @usecase_class_name %> from ".";
2
2
 
3
- describe(<%= @usecase_class_name %>, () => {
3
+ describe("<%= @usecase_class_name %>", () => {
4
+ it("tests functionality", async () => {
4
5
 
6
+ });
5
7
  });
data/templates/usecase.rb CHANGED
@@ -2,7 +2,7 @@ require_relative '../lib/templates'
2
2
 
3
3
  module Template
4
4
  def self.short_help
5
- 'usecase'
5
+ 'usecase [name] - Creates a usecase in src/Usecase (with tests)'
6
6
  end
7
7
 
8
8
  def self.main(*args)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ctlst
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Faissal Bensefia