orthoses-fiddle 0.1.1 → 0.2.0

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: 13619c139e5548c9f30377fad9fd7709a55d66ade3bd330b983bf117d2fd697d
4
- data.tar.gz: f51d5ffdaea0db81ec577792b4fee0dff244b794e9a968429e0c67d9f8dccbcd
3
+ metadata.gz: 384b9bee1f9c1a609784df991623095857d98c1d7c7baf8adff24d5cc06de9f0
4
+ data.tar.gz: 9353ac7c08598443ecd8ae5053e074e8be4f849a01d001467d79383a9a122c1f
5
5
  SHA512:
6
- metadata.gz: 961d34d443c4a4f0b6148edaafc5dc61b078259d0694d4b8b1ecd85214d1dc763d5c2c2e08333eb50b3f725ecf33b897bd0ec679516faec2c4d057073c169669
7
- data.tar.gz: e6582ab2c3bdfcde6a1a77f6c5a89f7b97e88d025b8537d0d4b945af148a7df3c36051a226f333c90b113438539f93ce6942caa4db1002bb9ab1be5a31c38cd1
6
+ metadata.gz: 77fb107d95d661f8e207f10cec7ea622f7fae2fe844058d3cb56a2dbae81ef145498c673f60f94be65913c3b81821de46f8125e7c3ef076aac87b6179618de92
7
+ data.tar.gz: 4509423043ce0055dfca81a9a65bab5962a6b506f526b1c990f6755e5004a600e34e8b674c574783c6ac1f2a4bb8bc26fe10f076c41cde452e9ba32ec7be46ce
data/README.md CHANGED
@@ -21,15 +21,13 @@ end
21
21
 
22
22
  ## Installation
23
23
 
24
- 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.
25
-
26
24
  Install the gem and add to the application's Gemfile by executing:
27
25
 
28
- $ bundle add UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
26
+ $ bundle add orthoses-fiddle
29
27
 
30
28
  If bundler is not being used to manage dependencies, install the gem by executing:
31
29
 
32
- $ gem install UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
30
+ $ gem install orthoses-fiddle
33
31
 
34
32
  ## Usage
35
33
 
@@ -1,20 +1,22 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'fiddle/import'
4
+
3
5
  module Orthoses
4
6
  module Fiddle
5
7
  class Importer
8
+ include ::Fiddle::Types
9
+
6
10
  def initialize(loader)
7
11
  @loader = loader
8
12
  end
9
13
 
10
14
  def call
11
- extern = CallTracer::Lazy.new
12
- store = extern.trace('Fiddle::Importer#extern') do
15
+ extern = CallTracer.new
16
+ store = extern.trace(::Fiddle::Importer.instance_method(:extern)) do
13
17
  @loader.call
14
18
  end
15
19
 
16
- self.class.include ::Fiddle::Types
17
-
18
20
  extern.captures.each do |capture|
19
21
  base_name = Utils.module_name(capture.method.receiver) or next
20
22
  signature = capture.argument[:signature]
@@ -45,7 +47,7 @@ module Orthoses
45
47
  'String'
46
48
  when VARIADIC
47
49
  unless before
48
- return Orthoses.logger.error("Found unexpected signature")
50
+ raise "Found unexpected signature"
49
51
  end
50
52
  "*#{fiddle_to_rbs(before)}"
51
53
  else
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Orthoses
4
4
  module Fiddle
5
- VERSION = "0.1.1"
5
+ VERSION = "0.2.0"
6
6
  end
7
7
  end
@@ -1,6 +1,14 @@
1
1
  module Orthoses
2
2
  module Fiddle
3
3
  VERSION: String
4
- # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ class Importer
5
+ @loader: Orthoses::_Call
6
+ def initialize: (Orthoses::_Call loader) -> void
7
+ def call: () -> Orthoses::store
8
+
9
+ private
10
+
11
+ def fiddle_to_rbs: (Integer fiddle_type, ?before: Integer?) -> String
12
+ end
5
13
  end
6
14
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: orthoses-fiddle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ksss