ree 1.0.32 → 1.0.33

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -1
  3. data/Gemfile.lock +1 -1
  4. data/lib/ree/args.rb +1 -1
  5. data/lib/ree/cli.rb +1 -1
  6. data/lib/ree/container.rb +2 -2
  7. data/lib/ree/contracts.rb +1 -1
  8. data/lib/ree/core/link_validator.rb +2 -2
  9. data/lib/ree/core/object.rb +2 -2
  10. data/lib/ree/core/object_error.rb +2 -2
  11. data/lib/ree/core/object_link.rb +2 -2
  12. data/lib/ree/core/object_schema.rb +1 -1
  13. data/lib/ree/core/object_schema_builder.rb +1 -1
  14. data/lib/ree/core/package.rb +1 -1
  15. data/lib/ree/core/package_dep.rb +2 -2
  16. data/lib/ree/core/package_env_var.rb +1 -1
  17. data/lib/ree/core/package_loader.rb +1 -1
  18. data/lib/ree/core/package_schema.rb +1 -1
  19. data/lib/ree/core/package_schema_builder.rb +2 -2
  20. data/lib/ree/core/package_schema_loader.rb +1 -1
  21. data/lib/ree/core/packages_detector.rb +1 -1
  22. data/lib/ree/core/packages_schema.rb +1 -1
  23. data/lib/ree/core/packages_schema_builder.rb +2 -2
  24. data/lib/ree/core/packages_schema_loader.rb +1 -1
  25. data/lib/ree/core/packages_schema_locator.rb +2 -2
  26. data/lib/ree/core/packages_store.rb +3 -3
  27. data/lib/ree/core/path_helper.rb +1 -1
  28. data/lib/ree/dsl/build_package_dsl.rb +1 -1
  29. data/lib/ree/dsl/domain_error.rb +1 -1
  30. data/lib/ree/dsl/error_dsl.rb +1 -1
  31. data/lib/ree/dsl/import_dsl.rb +1 -1
  32. data/lib/ree/dsl/link_import_builder.rb +1 -1
  33. data/lib/ree/dsl/object_dsl.rb +1 -1
  34. data/lib/ree/error.rb +1 -1
  35. data/lib/ree/facades/packages_facade.rb +1 -1
  36. data/lib/ree/gen/init.rb +2 -2
  37. data/lib/ree/gen/package.rb +4 -4
  38. data/lib/ree/gen.rb +1 -1
  39. data/lib/ree/handlers/template_handler.rb +2 -2
  40. data/lib/ree/object_compiler.rb +1 -1
  41. data/lib/ree/package_dsl.rb +1 -1
  42. data/lib/ree/spec_runner/command_generator.rb +1 -1
  43. data/lib/ree/spec_runner/command_params.rb +1 -1
  44. data/lib/ree/spec_runner/runner.rb +2 -2
  45. data/lib/ree/spec_runner/spec_filename_matcher.rb +1 -1
  46. data/lib/ree/spec_runner/view.rb +1 -1
  47. data/lib/ree/spec_runner.rb +1 -1
  48. data/lib/ree/utils/render_utils.rb +1 -1
  49. data/lib/ree/utils/string_utils.rb +3 -3
  50. data/lib/ree/version.rb +1 -1
  51. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f2836e04cba8e6942d7b1d6660fdd872f0a9b6233919bad3e87592673321fc6c
4
- data.tar.gz: fda73fb60e710b25658b616fbfa98d7bd80e82ef5c9d51a765ee764b22b79abd
3
+ metadata.gz: '09586eb785fd38368397c8efb62868470727384ec63e019b8d17935d2753fda6'
4
+ data.tar.gz: a8b0c37b358cde7f7fc88c28d467be2e9d100532d72d7edc1f8026ae6a1e6855
5
5
  SHA512:
6
- metadata.gz: 2e45e344621a2063e3cc7c5353c5188dd656dae7104d7ab05b96042e5373a932d873fd501fe4992b942d11300f7f653c5f24d47f9147a3ff1e5130c4e71a2801
7
- data.tar.gz: d454e90199e1f9e7a6907645b2c2e7760b08a1b504259969bbd8309a867e32828c32d2df13f7d36f11d84dd911c2514aaa9e5b67e46795209f0b1299f2a979c9
6
+ metadata.gz: 371a03b77b41e1d0f2498ea0fb8bad09bd291ccb8fea6020483055c8e47e34fca40f1d2a242ab97b4f86534db1dadc2a72ff1ff51c111e099639f789a1ec22df
7
+ data.tar.gz: 648c79fcebe724e5bc61f7964c90f382c0a7201ceba58654679e1c225c5dd2c5d6740ba9ad95d413b7daadfdd11d1705f31cbe843da0412da0e8873a3476dbd6
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.1.2
1
+ 3.2.0
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ree (1.0.32)
4
+ ree (1.0.33)
5
5
  commander (~> 4.6.0)
6
6
 
7
7
  GEM
data/lib/ree/args.rb CHANGED
@@ -1,4 +1,4 @@
1
- # frozen_string_literal = true
1
+ # frozen_string_literal: true
2
2
 
3
3
  module Ree::Args
4
4
  def check_arg(value, name, klass)
data/lib/ree/cli.rb CHANGED
@@ -1,4 +1,4 @@
1
- # frozen_string_literal = true
1
+ # frozen_string_literal: true
2
2
 
3
3
  module Ree
4
4
  module CLI
data/lib/ree/container.rb CHANGED
@@ -1,4 +1,4 @@
1
- # frozen_string_literal = true
1
+ # frozen_string_literal: true
2
2
 
3
3
  require 'pathname'
4
4
 
@@ -55,7 +55,7 @@ class Ree::Container
55
55
 
56
56
  @packages_facade.get_loaded_package(package_name)
57
57
  @packages_facade.load_package_object(package_name, name)
58
-
58
+
59
59
  @object_compiler.call(package_name, name)
60
60
  end
61
61
 
data/lib/ree/contracts.rb CHANGED
@@ -1,4 +1,4 @@
1
- # frozen_string_literal = true
1
+ # frozen_string_literal: true
2
2
 
3
3
  require 'securerandom'
4
4
  require 'forwardable'
@@ -1,10 +1,10 @@
1
- # frozen_string_literal = true
1
+ # frozen_string_literal: true
2
2
 
3
3
  class Ree::LinkValidator
4
4
  def initialize(packages_facade)
5
5
  @packages_facade = packages_facade
6
6
  end
7
-
7
+
8
8
  # Validates existance and uniqueness of linked object
9
9
  # @param [Ree::Object] object
10
10
  # @param [Ree::ObjectLink] link
@@ -1,4 +1,4 @@
1
- # frozen_string_literal = true
1
+ # frozen_string_literal: true
2
2
 
3
3
  class Ree::Object
4
4
  attr_reader :name, :rpath, :schema_rpath, :package_name, :klass,
@@ -6,7 +6,7 @@ class Ree::Object
6
6
  :class_name, :links, :mount_as, :freeze,
7
7
  :errors, :linked_const_list, :compiled_frozen,
8
8
  :singleton, :tags
9
-
9
+
10
10
  # @param [Symbol] name Object name
11
11
  # @param [String] schema_rpath Object schema path relative to project root dir
12
12
  # @param [String] rpath Object source file path relative to project root dir
@@ -1,8 +1,8 @@
1
- # frozen_string_literal = true
1
+ # frozen_string_literal: true
2
2
 
3
3
  class Ree::ObjectError
4
4
  attr_reader :class_name
5
-
5
+
6
6
  def initialize(class_name)
7
7
  @class_name = class_name
8
8
  end
@@ -1,8 +1,8 @@
1
- # frozen_string_literal = true
1
+ # frozen_string_literal: true
2
2
 
3
3
  class Ree::ObjectLink
4
4
  attr_reader :object_name, :package_name, :as, :constants
5
-
5
+
6
6
  # @param [Symbol] object_name Linked object name
7
7
  # @param [Symbol] package_name Linked object package
8
8
  # @param [Symbol] as Linked object alias name
@@ -1,4 +1,4 @@
1
- # frozen_string_literal = true
1
+ # frozen_string_literal: true
2
2
 
3
3
  module Ree::ObjectSchema
4
4
  SCHEMA_VERSION_NUMBER = '1.1'
@@ -1,4 +1,4 @@
1
- # frozen_string_literal = true
1
+ # frozen_string_literal: true
2
2
 
3
3
  class Ree::ObjectSchemaBuilder
4
4
  Schema = Ree::ObjectSchema
@@ -1,4 +1,4 @@
1
- # frozen_string_literal = true
1
+ # frozen_string_literal: true
2
2
 
3
3
  require 'pathname'
4
4
 
@@ -1,8 +1,8 @@
1
- # frozen_string_literal = true
1
+ # frozen_string_literal: true
2
2
 
3
3
  class Ree::PackageDep
4
4
  attr_reader :name
5
-
5
+
6
6
  def initialize(name)
7
7
  @name = name
8
8
  end
@@ -1,4 +1,4 @@
1
- # frozen_string_literal = true
1
+ # frozen_string_literal: true
2
2
 
3
3
  class Ree::PackageEnvVar
4
4
  attr_reader :name, :doc
@@ -1,4 +1,4 @@
1
- # frozen_string_literal = true
1
+ # frozen_string_literal: true
2
2
 
3
3
  require 'set'
4
4
  require 'pathname'
@@ -1,4 +1,4 @@
1
- # frozen_string_literal = true
1
+ # frozen_string_literal: true
2
2
 
3
3
  module Ree::PackageSchema
4
4
  SCHEMA_VERSION_NUMBER = '1.1'
@@ -1,4 +1,4 @@
1
- # frozen_string_literal = true
1
+ # frozen_string_literal: true
2
2
 
3
3
  require 'pathname'
4
4
  require 'json'
@@ -14,7 +14,7 @@ class Ree::PackageSchemaBuilder
14
14
  if !package.loaded?
15
15
  raise Ree::Error.new("package schema should be loaded", :invalid_schema)
16
16
  end
17
-
17
+
18
18
  data = {
19
19
  Schema::SCHEMA_TYPE => Schema::PACKAGE,
20
20
  Schema::SCHEMA_VERSION => Schema::SCHEMA_VERSION_NUMBER,
@@ -1,4 +1,4 @@
1
- # frozen_string_literal = true
1
+ # frozen_string_literal: true
2
2
 
3
3
  require 'json'
4
4
  require 'pathname'
@@ -1,4 +1,4 @@
1
- # frozen_string_literal = true
1
+ # frozen_string_literal: true
2
2
 
3
3
  require 'pathname'
4
4
 
@@ -1,4 +1,4 @@
1
- # frozen_string_literal = true
1
+ # frozen_string_literal: true
2
2
 
3
3
  module Ree::PackagesSchema
4
4
  SCHEMA_VERSION_NUMBER = '1.0'
@@ -1,4 +1,4 @@
1
- # frozen_string_literal = true
1
+ # frozen_string_literal: true
2
2
 
3
3
  require 'pathname'
4
4
  require 'json'
@@ -36,7 +36,7 @@ class Ree::PackagesSchemaBuilder
36
36
  }
37
37
  },
38
38
  }
39
-
39
+
40
40
  result
41
41
  end
42
42
  end
@@ -1,4 +1,4 @@
1
- # frozen_string_literal = true
1
+ # frozen_string_literal: true
2
2
 
3
3
  require 'json'
4
4
 
@@ -1,4 +1,4 @@
1
- # frozen_string_literal = true
1
+ # frozen_string_literal: true
2
2
 
3
3
  class Ree::PackagesSchemaLocator
4
4
  def call(path)
@@ -13,7 +13,7 @@ class Ree::PackagesSchemaLocator
13
13
  raise Ree::Error.new("#{Ree::PACKAGES_SCHEMA_FILE} not found", :packages_json_not_found) if some_path == '/'
14
14
 
15
15
  return potential_file(some_path) if present?(some_path)
16
-
16
+
17
17
  find_source_path_in_hierarchy(File.dirname(some_path))
18
18
  end
19
19
 
@@ -1,8 +1,8 @@
1
- # frozen_string_literal = true
1
+ # frozen_string_literal: true
2
2
 
3
3
  class Ree::PackagesStore
4
4
  attr_reader :ree_version
5
-
5
+
6
6
  def initialize(ree_version = Ree::VERSION)
7
7
  @ree_version = ree_version
8
8
  @store = {}
@@ -26,7 +26,7 @@ class Ree::PackagesStore
26
26
  def add_package(package)
27
27
  existing = get(package.name)
28
28
  return existing if existing
29
-
29
+
30
30
  @store[package.name] = package
31
31
  end
32
32
  end
@@ -1,4 +1,4 @@
1
- # frozen_string_literal = true
1
+ # frozen_string_literal: true
2
2
 
3
3
  require 'pathname'
4
4
 
@@ -1,4 +1,4 @@
1
- # frozen_string_literal = true
1
+ # frozen_string_literal: true
2
2
 
3
3
  class Ree::BuildPackageDsl
4
4
  include Ree::Args
@@ -1,4 +1,4 @@
1
- # frozen_string_literal = true
1
+ # frozen_string_literal: true
2
2
 
3
3
  class Ree::DomainError < StandardError
4
4
  end
@@ -1,4 +1,4 @@
1
- # frozen_string_literal = true
1
+ # frozen_string_literal: true
2
2
 
3
3
  class Ree::ErrorDsl
4
4
  def execute(klass, &proc)
@@ -1,4 +1,4 @@
1
- # frozen_string_literal = true
1
+ # frozen_string_literal: true
2
2
 
3
3
  class Ree::ImportDsl
4
4
  def initialize
@@ -1,4 +1,4 @@
1
- # frozen_string_literal = true
1
+ # frozen_string_literal: true
2
2
 
3
3
  class Ree::LinkImportBuilder
4
4
  def initialize(packages_facade)
@@ -1,4 +1,4 @@
1
- # frozen_string_literal = true
1
+ # frozen_string_literal: true
2
2
 
3
3
  require 'pathname'
4
4
 
data/lib/ree/error.rb CHANGED
@@ -1,4 +1,4 @@
1
- # frozen_string_literal = true
1
+ # frozen_string_literal: true
2
2
 
3
3
  class Ree::Error < StandardError
4
4
  attr_reader :code, :type
@@ -1,4 +1,4 @@
1
- # frozen_string_literal = true
1
+ # frozen_string_literal: true
2
2
 
3
3
  class Ree::PackagesFacade
4
4
  include Ree::Args
data/lib/ree/gen/init.rb CHANGED
@@ -1,4 +1,4 @@
1
- # frozen_string_literal = true
1
+ # frozen_string_literal: true
2
2
 
3
3
  require 'fileutils'
4
4
  require 'pathname'
@@ -45,7 +45,7 @@ module Ree
45
45
  )
46
46
 
47
47
  FileUtils.mkdir_p(local_templates_path)
48
-
48
+
49
49
  FileUtils.cp_r(
50
50
  @template_detector.gem_template_folder('package'),
51
51
  File.dirname(@template_detector.project_template_folder('package'))
@@ -1,4 +1,4 @@
1
- # frozen_string_literal = true
1
+ # frozen_string_literal: true
2
2
 
3
3
  require 'fileutils'
4
4
  require 'pathname'
@@ -24,15 +24,15 @@ module Ree
24
24
 
25
25
  def create
26
26
  if Dir.exist?(File.join(Ree.root_dir, @local_path))
27
- raise Ree::Error.new("Package directory #{@local_path} already exists")
27
+ raise Ree::Error.new("Package directory #{@local_path} already exists")
28
28
  end
29
29
 
30
30
  if @package_name.nil? || @package_name.empty?
31
- raise Ree::Error.new('Package name was not specified')
31
+ raise Ree::Error.new('Package name was not specified')
32
32
  end
33
33
 
34
34
  if @schema.packages.map(&:name).include?(@package_name)
35
- raise Ree::Error.new('Package already exists')
35
+ raise Ree::Error.new('Package already exists')
36
36
  end
37
37
 
38
38
  generated_files = Ree::TemplateHandler.generate(
data/lib/ree/gen.rb CHANGED
@@ -1,4 +1,4 @@
1
- # frozen_string_literal = true
1
+ # frozen_string_literal: true
2
2
 
3
3
  module Ree
4
4
  module Gen
@@ -1,4 +1,4 @@
1
- # frozen_string_literal = true
1
+ # frozen_string_literal: true
2
2
 
3
3
  require 'pathname'
4
4
  require 'fileutils'
@@ -8,7 +8,7 @@ class Ree::TemplateHandler
8
8
  NOT_HANDLED_TEMPLATES_EXT = %W(.erb)
9
9
 
10
10
  class << self
11
- def generate(template_name:, local_path:, project_path:, locals: {},
11
+ def generate(template_name:, local_path:, project_path:, locals: {},
12
12
  stdout: STDOUT, stdin: STDIN)
13
13
 
14
14
  Ree::TemplateHandler.new(
@@ -1,4 +1,4 @@
1
- # frozen_string_literal = true
1
+ # frozen_string_literal: true
2
2
 
3
3
  class Ree::ObjectCompiler
4
4
  def initialize(packages_facade)
@@ -1,4 +1,4 @@
1
- # frozen_string_literal = true
1
+ # frozen_string_literal: true
2
2
 
3
3
  module Ree::PackageDSL
4
4
  def self.included(base)
@@ -1,4 +1,4 @@
1
- # frozen_string_literal = true
1
+ # frozen_string_literal: true
2
2
 
3
3
  class Ree::SpecRunner::CommandGenerator
4
4
  attr_accessor :package_name, :package_path, :spec_matcher, :spec_string_number
@@ -1,4 +1,4 @@
1
- # frozen_string_literal = true
1
+ # frozen_string_literal: true
2
2
 
3
3
  class Ree::SpecRunner::CommandParams
4
4
  attr_accessor :package_name, :package_path, :spec_matcher, :spec_count, :command, :exitstatus
@@ -1,4 +1,4 @@
1
- # frozen_string_literal = true
1
+ # frozen_string_literal: true
2
2
 
3
3
  class Ree::SpecRunner::Runner
4
4
  attr_accessor :no_specs_packages
@@ -73,7 +73,7 @@ class Ree::SpecRunner::Runner
73
73
  selected = prepared_command_params.detect do |cmd_params|
74
74
  cmd_params.package_name == package_name
75
75
  end
76
-
76
+
77
77
  prepare_commands_for_packages([selected])
78
78
  end
79
79
 
@@ -1,4 +1,4 @@
1
- # frozen_string_literal = true
1
+ # frozen_string_literal: true
2
2
 
3
3
  class Ree::SpecRunner::SpecFilenameMatcher
4
4
  class << self
@@ -1,4 +1,4 @@
1
- # frozen_string_literal = true
1
+ # frozen_string_literal: true
2
2
 
3
3
  class Ree::SpecRunner::View
4
4
  def packages_menu(prepared_command_params)
@@ -1,4 +1,4 @@
1
- # frozen_string_literal = true
1
+ # frozen_string_literal: true
2
2
 
3
3
  module Ree
4
4
  module SpecRunner
@@ -1,4 +1,4 @@
1
- # frozen_string_literal = true
1
+ # frozen_string_literal: true
2
2
 
3
3
  require 'erb'
4
4
 
@@ -1,11 +1,11 @@
1
- # frozen_string_literal = true
1
+ # frozen_string_literal: true
2
2
 
3
3
  class Ree::StringUtils
4
4
  class << self
5
5
  def truncate(str, limit = 80)
6
6
  str.length > limit ? "#{str[0..limit]}..." : str
7
7
  end
8
-
8
+
9
9
  def underscore(camel_cased_word)
10
10
  return camel_cased_word unless /[A-Z-]|::/.match?(camel_cased_word)
11
11
  word = camel_cased_word.to_s.gsub("::".freeze, "/".freeze)
@@ -22,7 +22,7 @@ class Ree::StringUtils
22
22
  else
23
23
  string = string.sub(/^(?:(?=\b|[A-Z_])|\w)/) { |match| match.downcase }
24
24
  end
25
-
25
+
26
26
  string.gsub(/(?:_|(\/))([a-z\d]*)/) { "#{$1}#{$2.capitalize}" }.gsub("/", "::")
27
27
  end
28
28
  end
data/lib/ree/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ree
4
- VERSION = "1.0.32"
4
+ VERSION = "1.0.33"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ree
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.32
4
+ version: 1.0.33
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ruslan Gatiyatov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-08-30 00:00:00.000000000 Z
11
+ date: 2024-01-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: commander
@@ -212,7 +212,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
212
212
  - !ruby/object:Gem::Version
213
213
  version: '0'
214
214
  requirements: []
215
- rubygems_version: 3.3.24
215
+ rubygems_version: 3.4.1
216
216
  signing_key:
217
217
  specification_version: 4
218
218
  summary: Ruby framework to create modular applications