runa 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 0a644cf437951c516a29f5c014f909dd97aa2dc29e3ab955dd66964b43eb1e32
4
+ data.tar.gz: 80ec546ad6eda45bfc4b52f78cb4103b93d08dd93a417670dc28a8999dfdc6f5
5
+ SHA512:
6
+ metadata.gz: cb5fcbc25e03d3a5c896c73cc363ddb1e4ecfdc0df52e44fe6404f04e3601ffa6ab127ffa8d0c8a557fe9fc1ac695201f6eb7f8ac950e3bef8206e2f9eba301e
7
+ data.tar.gz: f69d6620ce222401370c20b3bb70eb1857cbee9843d97eb00eecf015464d1b2fc219f4112bd29a78334baff4d66f5c911034026d766b35f26de700ff576ce00b
data/.standard.yml ADDED
@@ -0,0 +1,3 @@
1
+ # For available configuration options, see:
2
+ # https://github.com/testdouble/standard
3
+ ruby_version: 2.6
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.0] - 2023-05-16
4
+
5
+ - Initial release
data/Gemfile ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in runa.gemspec
6
+ gemspec
7
+
8
+ gem "rake", "~> 13.0"
9
+
10
+ gem "test-unit", "~> 3.0"
11
+
12
+ gem "standard", "~> 1.3"
data/Gemfile.lock ADDED
@@ -0,0 +1,64 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ runa (0.1.0)
5
+ thor
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ ast (2.4.2)
11
+ json (2.6.3)
12
+ language_server-protocol (3.17.0.3)
13
+ lint_roller (1.0.0)
14
+ parallel (1.23.0)
15
+ parser (3.2.2.1)
16
+ ast (~> 2.4.1)
17
+ power_assert (2.0.3)
18
+ rainbow (3.1.1)
19
+ rake (13.0.6)
20
+ regexp_parser (2.8.0)
21
+ rexml (3.2.5)
22
+ rubocop (1.50.2)
23
+ json (~> 2.3)
24
+ parallel (~> 1.10)
25
+ parser (>= 3.2.0.0)
26
+ rainbow (>= 2.2.2, < 4.0)
27
+ regexp_parser (>= 1.8, < 3.0)
28
+ rexml (>= 3.2.5, < 4.0)
29
+ rubocop-ast (>= 1.28.0, < 2.0)
30
+ ruby-progressbar (~> 1.7)
31
+ unicode-display_width (>= 2.4.0, < 3.0)
32
+ rubocop-ast (1.28.1)
33
+ parser (>= 3.2.1.0)
34
+ rubocop-performance (1.16.0)
35
+ rubocop (>= 1.7.0, < 2.0)
36
+ rubocop-ast (>= 0.4.0)
37
+ ruby-progressbar (1.13.0)
38
+ standard (1.28.2)
39
+ language_server-protocol (~> 3.17.0.2)
40
+ lint_roller (~> 1.0)
41
+ rubocop (~> 1.50.2)
42
+ standard-custom (~> 1.0.0)
43
+ standard-performance (~> 1.0.1)
44
+ standard-custom (1.0.0)
45
+ lint_roller (~> 1.0)
46
+ standard-performance (1.0.1)
47
+ lint_roller (~> 1.0)
48
+ rubocop-performance (~> 1.16.0)
49
+ test-unit (3.5.8)
50
+ power_assert
51
+ thor (1.2.2)
52
+ unicode-display_width (2.4.2)
53
+
54
+ PLATFORMS
55
+ x64-mingw-ucrt
56
+
57
+ DEPENDENCIES
58
+ rake (~> 13.0)
59
+ runa!
60
+ standard (~> 1.3)
61
+ test-unit (~> 3.0)
62
+
63
+ BUNDLED WITH
64
+ 2.4.10
data/README.md ADDED
@@ -0,0 +1,31 @@
1
+ # Runa
2
+
3
+ TODO: Delete this and the text below, and describe your gem
4
+
5
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/runa`. To experiment with that code, run `bin/console` for an interactive prompt.
6
+
7
+ ## Installation
8
+
9
+ TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
10
+
11
+ Install the gem and add to the application's Gemfile by executing:
12
+
13
+ $ bundle add UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
14
+
15
+ If bundler is not being used to manage dependencies, install the gem by executing:
16
+
17
+ $ gem install UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
18
+
19
+ ## Usage
20
+
21
+ TODO: Write usage instructions here
22
+
23
+ ## Development
24
+
25
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test-unit` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
26
+
27
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
28
+
29
+ ## Contributing
30
+
31
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/runa.
data/Rakefile ADDED
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rake/testtask"
5
+
6
+ Rake::TestTask.new(:test) do |t|
7
+ t.libs << "test"
8
+ t.libs << "lib"
9
+ t.test_files = FileList["test/**/*_test.rb"]
10
+ end
11
+
12
+ require "standard/rake"
13
+
14
+ task default: %i[test standard]
data/exe/runa ADDED
@@ -0,0 +1,45 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "runa"
4
+ require "thor"
5
+ require "fileutils"
6
+
7
+ class RunaCli < Thor
8
+ def self.exit_on_failure?
9
+ true
10
+ end
11
+
12
+ desc "new NAME", "Create a new application"
13
+ def new(name)
14
+ if FileTest.exist?(name)
15
+ raise Thor::Error, "ERROR: '#{File.absolute_path(name)}' already exists"
16
+ end
17
+
18
+ module_name = name.split("_").map { |e| e.capitalize }.join
19
+
20
+ FileUtils.mkdir_p(name)
21
+ Dir.chdir(name) do
22
+ FileUtils.mkdir_p(".bundle")
23
+ File.write(".bundle/config", "---\nBUNDLE_PATH: \"vendor/bundle\"\n")
24
+ FileUtils.mkdir_p("lib/#{name}")
25
+ File.write("lib/#{name}.rb", "require \"#{name}/lib\"\n")
26
+ File.write("lib/#{name}/lib.rb", "module #{module_name}\nend\n")
27
+ File.write(".gitignore", "/vendor\n")
28
+ File.write("Gemfile", "# frozen_string_literal: true\n\nsource \"https://rubygems.org\"\n\n# gem \"rails\"\n")
29
+ File.write("main.rb", "require \"#{name}\"\n\nputs \"Hello, world!\"")
30
+ end
31
+ end
32
+
33
+ desc "install", "Install gems"
34
+ def install
35
+ system("bundle install")
36
+ end
37
+
38
+ desc "run [ARGS]", "Run application with arguments"
39
+ def run_command(*args)
40
+ system("bundle exec ruby -Ilib main.rb #{args.join(" ")}")
41
+ end
42
+ map "run" => "run_command"
43
+ end
44
+
45
+ RunaCli.start(ARGV)
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Runa
4
+ VERSION = "0.1.0"
5
+ end
data/lib/runa.rb ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "runa/version"
4
+
5
+ module Runa
6
+ class Error < StandardError; end
7
+ # Your code goes here...
8
+ end
data/sig/runa.rbs ADDED
@@ -0,0 +1,4 @@
1
+ module Runa
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
metadata ADDED
@@ -0,0 +1,70 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: runa
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - ongaeshi
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2023-05-15 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: thor
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ description: Runa is a command line interface for easily creating Ruby applications.
28
+ email:
29
+ - ongaeshi0621@gmail.com
30
+ executables:
31
+ - runa
32
+ extensions: []
33
+ extra_rdoc_files: []
34
+ files:
35
+ - ".standard.yml"
36
+ - CHANGELOG.md
37
+ - Gemfile
38
+ - Gemfile.lock
39
+ - README.md
40
+ - Rakefile
41
+ - exe/runa
42
+ - lib/runa.rb
43
+ - lib/runa/version.rb
44
+ - sig/runa.rbs
45
+ homepage: https://github.com/ongaeshi/runa
46
+ licenses: []
47
+ metadata:
48
+ homepage_uri: https://github.com/ongaeshi/runa
49
+ source_code_uri: https://github.com/ongaeshi/runa
50
+ changelog_uri: https://github.com/ongaeshi/runa/blob/master/CHANGELOG.md
51
+ post_install_message:
52
+ rdoc_options: []
53
+ require_paths:
54
+ - lib
55
+ required_ruby_version: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ version: 2.6.0
60
+ required_rubygems_version: !ruby/object:Gem::Requirement
61
+ requirements:
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ version: '0'
65
+ requirements: []
66
+ rubygems_version: 3.4.10
67
+ signing_key:
68
+ specification_version: 4
69
+ summary: Runa is a command line interface for easily creating Ruby applications.
70
+ test_files: []