tapioca 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0f8af6316243d26a0446636e00af5c9210296f5e5ac1f6065506af426d72c066
4
- data.tar.gz: 7124feeb9e7ecc16c2de3897ae9dd2bd3a432be6295d66ab5c440c4377f6d1e1
3
+ metadata.gz: 84e15e603201e0f40e523b14dc5e0ea4c66da5ed2e03cc998db97fdd863301f1
4
+ data.tar.gz: 741d932e96a9e808c7d76a18966a2d3279b540c9fd2cc93e31e3f847d5a6ef58
5
5
  SHA512:
6
- metadata.gz: 720a2022478adcffea11b8a52b486dec808544611c9792c8508224c8565a3a4aaaed9f0a512bf51417da1259275ba6dbbd09b318f5e8e438544ae54558e0e028
7
- data.tar.gz: 8b5148ed02e2105b0c44134b98c99cb0e2c03144e8eca2293c8cf558b8dcff3141a5812141cb369e83cd830acb847a540f14303d2472ba7877518d4de55545ca
6
+ metadata.gz: 325d314605ed88fb95e61ba1ed56d9f9a8caadd94aceb7e5a9780449aa58551fedbf50278750e72074bd587ef568e2cc71c801875208751744384463d94b38fa
7
+ data.tar.gz: 3338fde8604ab0d39e9bbf7561dd933be108289e237e92d70349d0830dee946c9647b91e580db5ffaca5d896a7742df04a273c130d4975054a25ec11d9aae34f
@@ -84,10 +84,10 @@ module Tapioca
84
84
 
85
85
  sig { override.returns(T::Enumerable[Module]) }
86
86
  def gather_constants
87
- all_classes.select do |c|
88
- c < ::SmartProperties
89
- end.reject do |c|
90
- name_of(c).nil? || c == ::SmartProperties::Validations::Ancestor
87
+ all_modules.select do |c|
88
+ name_of(c) &&
89
+ c != ::SmartProperties::Validations::Ancestor &&
90
+ c < ::SmartProperties && ::SmartProperties::ClassMethods === c
91
91
  end
92
92
  end
93
93
 
@@ -73,7 +73,7 @@ module Tapioca
73
73
  say("Done", :green)
74
74
 
75
75
  say("All requires from this application have been written to #{name}.", [:green, :bold])
76
- cmd = set_color("#{Config::DEFAULT_COMMAND} sync", :yellow, :bold)
76
+ cmd = set_color("#{Config::DEFAULT_COMMAND} gem", :yellow, :bold)
77
77
  say("Please review changes and commit them, then run `#{cmd}`.", [:green, :bold])
78
78
  end
79
79
 
@@ -537,7 +537,7 @@ module Tapioca
537
537
  rbi_body_content = compiler.compile(gem)
538
538
  content = String.new
539
539
  content << rbi_header(
540
- "#{Config::DEFAULT_COMMAND} sync",
540
+ "#{Config::DEFAULT_COMMAND} gem #{gem.name}",
541
541
  reason: "types exported from the `#{gem.name}` gem",
542
542
  strictness: strictness
543
543
  )
@@ -670,7 +670,7 @@ module Tapioca
670
670
  diff[filename] = gem_rbi_exists?(gem_name) ? :changed : :added
671
671
  end
672
672
 
673
- report_diff_and_exit_if_out_of_date(diff, "sync")
673
+ report_diff_and_exit_if_out_of_date(diff, "gem")
674
674
  end
675
675
 
676
676
  sig { params(diff: T::Hash[String, Symbol], command: String).void }
@@ -3,7 +3,6 @@
3
3
 
4
4
  require "tapioca"
5
5
  require "tapioca/loader"
6
- require "tapioca/constant_locator"
7
6
  require "tapioca/sorbet_ext/generic_name_patch"
8
7
  require "tapioca/sorbet_ext/fixed_hash_patch"
9
8
  require "tapioca/generic_type_registry"
@@ -9,10 +9,10 @@ module Tapioca
9
9
  def load_bundle(gemfile, initialize_file, require_file)
10
10
  require_helper(initialize_file)
11
11
 
12
- gemfile.require_bundle
13
-
14
12
  load_rails_application
15
13
 
14
+ gemfile.require_bundle
15
+
16
16
  require_helper(require_file)
17
17
 
18
18
  load_rails_engines
@@ -2,5 +2,5 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Tapioca
5
- VERSION = "0.5.1"
5
+ VERSION = "0.5.2"
6
6
  end
data/lib/tapioca.rb CHANGED
@@ -18,6 +18,7 @@ module Tapioca
18
18
  end
19
19
 
20
20
  require "tapioca/reflection"
21
+ require "tapioca/constant_locator"
21
22
  require "tapioca/compilers/dsl/base"
22
23
  require "tapioca/helpers/active_record_column_type_helper"
23
24
  require "tapioca/version"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tapioca
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ufuk Kayserilioglu
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: exe
13
13
  cert_chain: []
14
- date: 2021-09-08 00:00:00.000000000 Z
14
+ date: 2021-09-16 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bundler