mogu 0.5.0 → 0.6.0

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: 2db47b44f542a88efc8a2bf123276264957d905fc299bc0fc87662090d139464
4
- data.tar.gz: 39e544f5a42fcec266d1c410b415382679b1e7d92bafc8fbf8a717b7a80446f2
3
+ metadata.gz: 5043094005d94e801e049d1a6a03689deee2ded40a10703feb2b1dbb5cda5df0
4
+ data.tar.gz: 3bc7f43bc271f0a32bbd3cf282020e6dbae6c6970975d3569ca796b379ea0757
5
5
  SHA512:
6
- metadata.gz: ec71aa0276b7f96d7df1720c662cbf704f40c68e11351eb7fda301843be180772be15d48bc454f7002d0a93c4cd61dbfa429b449463017c03afde7f0dc41027c
7
- data.tar.gz: 8fd8fc23a60b048820dc65a30b1d5da88d87ab47f4a0e40f3f15231f316df835d228582472b2cacfacabfcf83518a9620f06f6b67e71a194286383cf330dfbaf
6
+ metadata.gz: 07de320e8f7c9c8fdb96f85c78b69a8089711474f0727648701906d2f8e4dcf8959136a063058e835999e2541008c3577a18fee4a1db62a8b148eb3855ca874e
7
+ data.tar.gz: 00a5c8bd2bba6b3ad8c75b6df01f0f9088d9ea10807b8798a7d043d5e2553eaee40295ff17405cd5bdf2349c5c549e35ed7c9e12f959b79e37d035d8d912beff
@@ -0,0 +1,39 @@
1
+ // For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2
+ // https://github.com/microsoft/vscode-dev-containers/tree/v0.231.2/containers/docker-existing-docker-compose
3
+ // If you want to run as a non-root user in the container, see .devcontainer/docker-compose.yml.
4
+ {
5
+ "name": "Existing Docker Compose (Extend)",
6
+
7
+ // Update the 'dockerComposeFile' list if you have more compose files or use different names.
8
+ // The .devcontainer/docker-compose.yml file contains any overrides you need/want to make.
9
+ "dockerComposeFile": ["../compose.yaml", "docker-compose.yml"],
10
+
11
+ // The 'service' property is the name of the service for the container that VS Code should
12
+ // use. Update this value and .devcontainer/docker-compose.yml to the real service name.
13
+ "service": "ruby",
14
+
15
+ // The optional 'workspaceFolder' property is the path VS Code should open by default when
16
+ // connected. This is typically a file mount in .devcontainer/docker-compose.yml
17
+ "workspaceFolder": "/workspace",
18
+
19
+ // Set *default* container specific settings.json values on container create.
20
+ "settings": {},
21
+
22
+ // Add the IDs of extensions you want installed when the container is created.
23
+ "extensions": ["castwide.solargraph"]
24
+
25
+ // Use 'forwardPorts' to make a list of ports inside the container available locally.
26
+ // "forwardPorts": [],
27
+
28
+ // Uncomment the next line if you want start specific services in your Docker Compose config.
29
+ // "runServices": [],
30
+
31
+ // Uncomment the next line if you want to keep your containers running after VS Code shuts down.
32
+ // "shutdownAction": "none",
33
+
34
+ // Uncomment the next line to run commands after the container is created - for example installing curl.
35
+ // "postCreateCommand": "apt-get update && apt-get install -y curl",
36
+
37
+ // Uncomment to connect as a non-root user if you've added one. See https://aka.ms/vscode-remote/containers/non-root.
38
+ // "remoteUser": "vscode"
39
+ }
@@ -0,0 +1,38 @@
1
+ version: '3.8'
2
+ services:
3
+ # Update this to the name of the service you want to work with in your docker-compose.yml file
4
+ ruby:
5
+ # If you want add a non-root user to your Dockerfile, you can use the "remoteUser"
6
+ # property in devcontainer.json to cause VS Code its sub-processes (terminals, tasks,
7
+ # debugging) to execute as the user. Uncomment the next line if you want the entire
8
+ # container to run as this user instead. Note that, on Linux, you may need to
9
+ # ensure the UID and GID of the container user you create matches your local user.
10
+ # See https://aka.ms/vscode-remote/containers/non-root for details.
11
+ #
12
+ # user: vscode
13
+
14
+ # Uncomment if you want to override the service's Dockerfile to one in the .devcontainer
15
+ # folder. Note that the path of the Dockerfile and context is relative to the *primary*
16
+ # docker-compose.yml file (the first in the devcontainer.json "dockerComposeFile"
17
+ # array). The sample below assumes your primary file is in the root of your project.
18
+ #
19
+ # build:
20
+ # context: .
21
+ # dockerfile: .devcontainer/Dockerfile
22
+
23
+ volumes:
24
+ # Update this to wherever you want VS Code to mount the folder of your project
25
+ - .:/workspace:cached
26
+
27
+ # Uncomment the next line to use Docker from inside the container. See https://aka.ms/vscode-remote/samples/docker-from-docker-compose for details.
28
+ # - /var/run/docker.sock:/var/run/docker.sock
29
+
30
+ # Uncomment the next four lines if you will use a ptrace-based debugger like C++, Go, and Rust.
31
+ # cap_add:
32
+ # - SYS_PTRACE
33
+ # security_opt:
34
+ # - seccomp:unconfined
35
+
36
+ # Overrides default command so things don't shut down after the process ends.
37
+ command: /bin/sh -c "while sleep 1000; do :; done"
38
+
data/.gitignore CHANGED
@@ -12,3 +12,5 @@
12
12
 
13
13
  /Gemfile.lock
14
14
  /*.gem
15
+
16
+ /compose.override.yaml
data/README.md CHANGED
@@ -29,6 +29,8 @@ mogu
29
29
  ```bash
30
30
  Please input app path
31
31
 
32
+ Do you want api mode? (y/N)
33
+
32
34
  Choose customizes
33
35
  > ⬡ database (Default: sqlite3)
34
36
  ⬡ javascript (Default: importmap)
@@ -1,14 +1,10 @@
1
- version: "3.9"
2
-
3
1
  services:
4
2
  ruby:
5
3
  image: ruby
6
4
  volumes:
7
5
  - .:/workspace
8
- - gem-credentials-data:/root/.local/share/gem
9
6
  - gem-data:/usr/local/bundle
10
7
  working_dir: /workspace
11
8
 
12
9
  volumes:
13
- gem-credentials-data:
14
10
  gem-data:
data/lib/mogu/cli.rb CHANGED
@@ -1,23 +1,21 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'optparse'
4
3
  require 'rails/command'
4
+ require 'thor'
5
5
 
6
6
  module Mogu
7
- class CLI
8
- class << self
9
- def start
10
- params = OptionParser.getopts(ARGV, 'v')
7
+ class CLI < Thor
8
+ desc 'new', 'Create rails projects interactively'
9
+ def new
10
+ prompt = Mogu::Prompt.new
11
+ prompt.run
11
12
 
12
- if params['v']
13
- puts "mogu #{Mogu::VERSION}"
14
- else
15
- prompt = Mogu::Prompt.new
16
- prompt.run
13
+ Rails::Command.invoke :application, ['new', *prompt.to_opt]
14
+ end
17
15
 
18
- Rails::Command.invoke :application, ['new', *prompt.to_opt]
19
- end
20
- end
16
+ desc 'version', 'Display mogu version'
17
+ def version
18
+ puts Mogu::VERSION
21
19
  end
22
20
  end
23
21
  end
data/lib/mogu/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Mogu
4
- VERSION = '0.5.0'
4
+ VERSION = '0.6.0'
5
5
  end
data/mogu.gemspec CHANGED
@@ -33,6 +33,7 @@ Gem::Specification.new do |spec|
33
33
 
34
34
  # Uncomment to register a new dependency of your gem
35
35
  spec.add_dependency 'railties', '~> 7.0'
36
+ spec.add_dependency 'thor', '~> 1.0'
36
37
  spec.add_dependency 'tty-prompt', '~> 0.23'
37
38
 
38
39
  # For more information and examples about making a new gem, checkout our
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mogu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - MoguraStore
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-03-24 00:00:00.000000000 Z
11
+ date: 2022-04-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '7.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: thor
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.0'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: tty-prompt
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -46,6 +60,8 @@ executables:
46
60
  extensions: []
47
61
  extra_rdoc_files: []
48
62
  files:
63
+ - ".devcontainer/devcontainer.json"
64
+ - ".devcontainer/docker-compose.yml"
49
65
  - ".github/workflows/ci.yml"
50
66
  - ".gitignore"
51
67
  - ".rspec"
@@ -57,7 +73,7 @@ files:
57
73
  - Rakefile
58
74
  - bin/console
59
75
  - bin/setup
60
- - docker-compose.yml
76
+ - compose.yaml
61
77
  - exe/mogu
62
78
  - lib/mogu.rb
63
79
  - lib/mogu/cli.rb
@@ -87,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
87
103
  - !ruby/object:Gem::Version
88
104
  version: '0'
89
105
  requirements: []
90
- rubygems_version: 3.2.22
106
+ rubygems_version: 3.3.7
91
107
  signing_key:
92
108
  specification_version: 4
93
109
  summary: CLI to create rails projects interactively.