mogu 0.8.0 → 0.8.3

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: ff62aaa44ea6ba8a4fa79cc8453cf5ac54bfe142b06d95d5512d80ea6e644540
4
- data.tar.gz: 7ce4af13262e1cad5baf01e1c258a9d8d46918c8dc6f7b222f090d249c92d11e
3
+ metadata.gz: 481138caa6fa2899ae1114e60600faa7151087ae20c428afe8c27c53ef29a6b1
4
+ data.tar.gz: f7b31b101ca72dddd7d96ab96516d4e52ba44c53e54b68d65ccdd1c74a192315
5
5
  SHA512:
6
- metadata.gz: 7f7552ae5a1531d8bc61d7b0df6dfaaa867ee26d6e9a091a12c650b63aa5afb04725a9cebca260f8f9b4aa20fe52541db02c10e710a333b1e22b883af29f922b
7
- data.tar.gz: f9cf99602a0ad431399e55dcf76f84a29f6e5f7adc3ce8a2fe26bee759c4de62dfbfc11cd5654fdc637dc4faceeb0af75def7f165a11a57b305ccfbbd9cdcfa3
6
+ metadata.gz: 7e840695a6ce710b2b938865cd3438a6c913e3730c915f867b3b5c4fa4fd036684a20e04af69125112d4d391d6f58f672d73eed6dc2cbc81fee7886530d2a1b0
7
+ data.tar.gz: d2c47b96fb8a97854ea150ec90a53b6a3ddbed943af7ff2025f9d0fcd38df15e5f30e2d20b9e685b1e3431746a2b5fae0c3fa797865ffcf3d7ef0a8fe25a009a
@@ -20,7 +20,7 @@
20
20
  "settings": {},
21
21
 
22
22
  // Add the IDs of extensions you want installed when the container is created.
23
- "extensions": ["castwide.solargraph"]
23
+ "extensions": ["castwide.solargraph", "soutaro.steep-vscode"]
24
24
 
25
25
  // Use 'forwardPorts' to make a list of ports inside the container available locally.
26
26
  // "forwardPorts": [],
@@ -16,5 +16,5 @@ jobs:
16
16
  with:
17
17
  ruby-version: 2.7
18
18
  bundler-cache: true
19
- - name: Run rubocop and spec
20
- run: bundle exec rake rubocop spec
19
+ - name: Run rake task
20
+ run: bundle exec rake
@@ -2,6 +2,7 @@
2
2
  "[ruby]": {
3
3
  "editor.defaultFormatter": "castwide.solargraph"
4
4
  },
5
+ "solargraph.completion": false,
5
6
  "solargraph.diagnostics": true,
6
7
  "solargraph.formatting": true,
7
8
  "solargraph.useBundler": true
data/Gemfile CHANGED
@@ -16,3 +16,5 @@ gem 'rubocop-rake', '~> 0.6.0'
16
16
  gem 'rubocop-rspec', '~> 2.9'
17
17
 
18
18
  gem 'solargraph', '~> 0.44.3'
19
+
20
+ gem 'steep', '~> 0.52.0'
data/Rakefile CHANGED
@@ -7,4 +7,13 @@ require 'rubocop/rake_task'
7
7
  RSpec::Core::RakeTask.new(:spec)
8
8
  RuboCop::RakeTask.new(:rubocop)
9
9
 
10
- task default: %i[rubocop spec]
10
+ desc 'Run Steep check'
11
+ task :steep do
12
+ require 'steep'
13
+ require 'steep/cli'
14
+
15
+ result = Steep::CLI.new(argv: ['check'], stdout: $stdout, stderr: $stderr, stdin: $stdin).run
16
+ abort 'Steep check failed' if result.nonzero?
17
+ end
18
+
19
+ task default: %i[rubocop steep spec]
data/Steepfile ADDED
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ target :lib do
4
+ signature 'sig'
5
+
6
+ check 'lib'
7
+
8
+ library 'erb', 'tempfile'
9
+ end
@@ -8,7 +8,7 @@ require 'tempfile'
8
8
  module Mogu
9
9
  class GemCommand
10
10
  def run
11
- erb = ERB.new File.read(File.expand_path('templates/gem.erb', __dir__))
11
+ erb = ERB.new File.read(File.expand_path('templates/gem.erb', __dir__.to_s))
12
12
  template = Tempfile.new
13
13
 
14
14
  gems = ask_gems
@@ -9,6 +9,10 @@
9
9
 
10
10
  <% if gems.include? 'rubocop' %>
11
11
  gem 'rubocop-rails', group: :development, require: false
12
+
13
+ <% if gems.include? 'rspec' %>
14
+ gem 'rubocop-rspec', group: :development, require: false
15
+ <% end %>
12
16
  <% end %>
13
17
 
14
18
  <% if gems.include? 'solargraph' %>
@@ -19,6 +23,9 @@
19
23
  create_file '.rubocop.yml', <<~YML
20
24
  require:
21
25
  - rubocop-rails
26
+ <% if gems.include? 'rspec' %>
27
+ - rubocop-rspec
28
+ <% end %>
22
29
 
23
30
  AllCops:
24
31
  NewCops: enable
@@ -28,7 +35,7 @@
28
35
  YML
29
36
  <% end %>
30
37
 
31
- run 'bundle install'
38
+ Bundler.original_system 'bundle install'
32
39
 
33
40
  <% if gems.include? 'rspec' %>
34
41
  generate 'rspec:install'
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.8.0'
4
+ VERSION = '0.8.3'
5
5
  end
data/sig/mogu/cli.rbs ADDED
@@ -0,0 +1,10 @@
1
+ # TypeProf 0.21.2
2
+
3
+ # Classes
4
+ module Mogu
5
+ class CLI < Thor
6
+ def gem: -> void
7
+ def new: -> void
8
+ def version: -> void
9
+ end
10
+ end
@@ -0,0 +1,11 @@
1
+ # TypeProf 0.21.2
2
+
3
+ # Classes
4
+ module Mogu
5
+ class GemCommand
6
+ def run: -> void
7
+
8
+ private
9
+ def ask_gems: -> Array[String]
10
+ end
11
+ end
@@ -0,0 +1,25 @@
1
+ # TypeProf 0.21.2
2
+
3
+ # Classes
4
+ module Mogu
5
+ class NewCommand
6
+ @app_path: String
7
+ @is_api: bool
8
+ @database: Array[String]
9
+ @javascript: Array[String]
10
+ @css: Array[String]
11
+ @skips: Array[String]
12
+
13
+ def run: -> void
14
+
15
+ private
16
+ def ask_app_path: -> String
17
+ def confirm_is_api: -> bool
18
+ def ask_customizes: -> Array[String]
19
+ def ask_database: -> Array[String]
20
+ def ask_javascript: -> Array[String]
21
+ def ask_css: -> Array[String]
22
+ def ask_skips: -> Array[String]
23
+ def to_opt: -> Array[String]
24
+ end
25
+ end
@@ -0,0 +1,6 @@
1
+ # TypeProf 0.21.2
2
+
3
+ # Classes
4
+ module Mogu
5
+ VERSION: String
6
+ end
data/sig/patch.rbs ADDED
@@ -0,0 +1,19 @@
1
+ # Classes
2
+ module CLI
3
+ module UI
4
+ class Prompt
5
+ def self.ask: (String, ?allow_empty: bool, ?multiple: bool, ?options: Array[String]) ?{ (untyped) -> void } -> untyped
6
+ def self.confirm: (String, ?default: bool) -> bool
7
+ end
8
+ end
9
+ end
10
+
11
+ module Rails
12
+ class Command
13
+ def self.invoke: (String | Symbol, ?Array[String]) -> void
14
+ end
15
+ end
16
+
17
+ class Thor
18
+ def self.desc: (String, String) -> void
19
+ end
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.8.0
4
+ version: 0.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - MoguraStore
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-04-12 00:00:00.000000000 Z
11
+ date: 2022-08-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cli-ui
@@ -71,6 +71,7 @@ files:
71
71
  - LICENSE.txt
72
72
  - README.md
73
73
  - Rakefile
74
+ - Steepfile
74
75
  - bin/console
75
76
  - bin/setup
76
77
  - compose.yaml
@@ -82,6 +83,11 @@ files:
82
83
  - lib/mogu/templates/gem.erb
83
84
  - lib/mogu/version.rb
84
85
  - mogu.gemspec
86
+ - sig/mogu/cli.rbs
87
+ - sig/mogu/gem_command.rbs
88
+ - sig/mogu/new_command.rbs
89
+ - sig/mogu/version.rbs
90
+ - sig/patch.rbs
85
91
  homepage: https://github.com/mogurastore/mogu
86
92
  licenses:
87
93
  - MIT