rocket_api 0.0.1.2 → 0.0.1.5

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: 5cb81f2bc9a560412bf417b9b470d7815f119dc47adf7c6f97292d339fce7081
4
- data.tar.gz: '08bf18cc0bea116a3b8cd26e9fda39633661c18261b7c3107cbb31e4332769c4'
3
+ metadata.gz: 66e656376317222d804ebacb21b4402571ef5e304f87ca87eb27ec7ef2038b1b
4
+ data.tar.gz: bf4906885176567fe040a2d7d72331f777527ed65b24517ae1f72fc9953cde79
5
5
  SHA512:
6
- metadata.gz: 698f1a860a570343be71fc332ba97998e1532547d59459aced50eeb59f2cd19eca4906739102e57b4a814b335c2a13cde3a39f1e339d8d2d1226114971fe26b1
7
- data.tar.gz: 9e70b1c80171e3d9d2efcc9db12f8615be9362ae7d0af3996b9c26040fe3b6ea8e2ea2672f6883f9a4e87c8c2111f085c04e101b9a8b0ce132ee653f82739fd5
6
+ metadata.gz: 74b87e08dcf1c9de14186e18f6334d87e6bf413502e8fe3529eec79016de1cba56337fe6ff6621bf515d370aed592aa1ac4df847535ad6de624381961d088ecc
7
+ data.tar.gz: de29ccd3ef2489e14b641a0e65adc9e9625cc472b54f0588b0c3671a7079791ef6e0b4b56dc7b5a07b171de3e0db4a76762ed159258876f79e6ff143a92ab430
data/bin/rocket_api CHANGED
@@ -1,8 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require './lib/rocket_api/rocket_commands'
4
- require './lib/rocket_api/constants'
5
- require './lib/rocket_api/errors'
3
+ require "rocket_api"
6
4
 
7
5
  base_command = ARGV[0]
8
6
  sub_command = ARGV[1]
@@ -1,7 +1,6 @@
1
1
  module RocketApi
2
2
  module Commands
3
3
  module Dirs
4
- # ...
5
4
  # @param [Array] dirs
6
5
  def create_repo(dirs)
7
6
  dirs.each do |dir|
@@ -10,7 +9,7 @@ module RocketApi
10
9
  puts "#{CREATE_FAILED} #{e.message}"
11
10
  end
12
11
  end
13
- # ...
12
+
14
13
  # @param [String] dir_name
15
14
  # ...
16
15
  # @raise [StandardError]
@@ -1,17 +1,16 @@
1
1
  module RocketApi
2
2
  module Commands
3
3
  module Files
4
- # ...
5
4
  # @param [String] dir_name
6
5
  def is_exist?(dir_name)
7
6
  File.exist?(dir_name)
8
7
  end
9
- # ...
8
+
10
9
  # @param [String] name
11
10
  def class_name_camel(name)
12
11
  name.split('_').map(&:capitalize).join
13
12
  end
14
- # ...
13
+
15
14
  # @param [String] name
16
15
  # @param [String] text
17
16
  # @param [Hash] options
@@ -1,7 +1,6 @@
1
1
  module RocketApi
2
2
  module Commands
3
3
  module GemsDir
4
- # ...
5
4
  # @param [String] name
6
5
  def init_gems_version!(name)
7
6
  dir_name = "lib/#{name}"
@@ -12,14 +11,14 @@ module RocketApi
12
11
  plain_version_text(class_name_camel(name))
13
12
  )
14
13
  end
15
- # ...
14
+
16
15
  # @param [String] name
17
16
  def init_gems_main_file!(name)
18
17
  file_name = "lib/#{name}.rb"
19
18
  text = "class #{class_name_camel(name)}; end"
20
19
  create_single_file(file_name, text)
21
20
  end
22
- # ...
21
+
23
22
  # @param [String] name
24
23
  def init_gemspec!(name)
25
24
  file_name = "#{name}.gemspec"
@@ -1,16 +1,15 @@
1
1
  module RocketApi
2
- # ...
3
2
  # Dirs map
4
3
  GEM_PROJECTS_DIR = %w[bin lib test].freeze
5
- # ...
4
+
6
5
  # Ping
7
6
  PONG = "PONG".freeze
8
- # ...
7
+
9
8
  # Commands
10
9
  INIT = "init".freeze
11
10
  BASE = "base".freeze
12
11
  GEM = "gem".freeze
13
- # ...
12
+
14
13
  # Answers
15
14
  FOLDER_EXIST = "folder exist:".freeze
16
15
  FILE_EXIST = "file already exist:".freeze
@@ -1,8 +1,7 @@
1
- require './lib/rocket_api/constants'
2
- require './lib/rocket_api/commands/files'
3
- require './lib/rocket_api/commands/dirs'
4
- require './lib/rocket_api/library/gem_repo_plain_text'
5
- require './lib/rocket_api/commands/gems_dir'
1
+ require "rocket_api/commands/files"
2
+ require "rocket_api/commands/dirs"
3
+ require "rocket_api/commands/gems_dir"
4
+ require "rocket_api/library/gem_repo_plain_text"
6
5
 
7
6
  module RocketApi
8
7
  class RocketCommands
@@ -10,7 +9,7 @@ module RocketApi
10
9
  extend RocketApi::Commands::Dirs
11
10
  extend RocketApi::Commands::GemsDir
12
11
  extend RocketApi::Library::GemRepoPlainText
13
- # ...
12
+
14
13
  # @raise [RocketApi::CreateDirError]
15
14
  def self.init_gem_dir
16
15
  create_repo(RocketApi::GEM_PROJECTS_DIR)
@@ -18,7 +17,7 @@ module RocketApi
18
17
  raise RocketApi::CreateDirError,
19
18
  "#{RocketApi::CREATE_FAILED} #{e.message}"
20
19
  end
21
- # ...
20
+
22
21
  # @param [String] project_name
23
22
  # ...
24
23
  # @raise [RocketApi::InitFilesError] error
@@ -1,3 +1,3 @@
1
1
  module RocketApi
2
- VERSION = "0.0.1.2".freeze
2
+ VERSION = "0.0.1.5".freeze
3
3
  end
data/lib/rocket_api.rb CHANGED
@@ -1,7 +1,7 @@
1
- require './rocket_api/constants'
2
-
3
- module RocketApi
4
- def ping
5
- RocketApi::PONG
6
- end
7
- end
1
+ require "rocket_api/rocket_commands"
2
+ require "rocket_api/constants"
3
+ require "rocket_api/errors"
4
+ require "rocket_api/commands/files"
5
+ require "rocket_api/commands/dirs"
6
+ require "rocket_api/commands/gems_dir"
7
+ require "rocket_api/library/gem_repo_plain_text"
@@ -0,0 +1,9 @@
1
+ require 'minitest/autorun'
2
+ require 'rocket_api/version'
3
+
4
+ class TestVersion < Minitest::Test
5
+ include RocketApi
6
+ def test_ping
7
+ assert_equal("0.0.1.5", RocketApi::VERSION)
8
+ end
9
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rocket_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.2
4
+ version: 0.0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ilya Kondratev
@@ -63,7 +63,7 @@ files:
63
63
  - lib/rocket_api/rocket_commands.rb
64
64
  - lib/rocket_api/version.rb
65
65
  - rocket_api.gemspec
66
- - test/test_ping.rb
66
+ - test/test_version.rb
67
67
  homepage: https://github.com/ikondratev/rocket_api
68
68
  licenses:
69
69
  - MIT
data/test/test_ping.rb DELETED
@@ -1,9 +0,0 @@
1
- require 'minitest/autorun'
2
- require 'rocket_api'
3
-
4
- class TestPing < Minitest::Test
5
- include RocketApi
6
- def test_ping
7
- assert_equal("PONG", ping)
8
- end
9
- end