assimp-ruby 1.0.0

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.
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "rubygems"
4
+
5
+ gem "assimp-ruby"
6
+ require "assimp"
7
+
8
+ smoke_home = File.realpath(ENV.fetch("ASSIMP_RUBY_SMOKE_HOME"))
9
+ loaded_gem = File.realpath(Gem.loaded_specs.fetch("assimp-ruby").full_gem_path)
10
+ unless loaded_gem.start_with?("#{smoke_home}#{File::SEPARATOR}")
11
+ raise "loaded assimp-ruby from #{loaded_gem}, expected an installation under #{smoke_home}"
12
+ end
13
+
14
+ obj = <<~OBJ
15
+ v 0 0 0
16
+ v 1 0 0
17
+ v 0 1 0
18
+ f 1 2 3
19
+ OBJ
20
+ scene = Assimp.import(obj, hint: "obj", process: :fast)
21
+ mesh = scene.meshes.fetch(0)
22
+ raise "packaged import returned #{mesh.vertex_count} vertices" unless mesh.vertex_count == 3
23
+ raise "packaged import returned unexpected indices" unless mesh.indices.unpack("L<*") == [0, 1, 2]
24
+
25
+ puts "loaded #{File.basename(loaded_gem)} with Assimp #{Assimp.native_version.join(".")}"
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "rubygems/package"
4
+
5
+ directory, tag = ARGV
6
+ abort "usage: #{$PROGRAM_NAME} GEM_DIRECTORY vVERSION" unless directory && tag
7
+ abort "release tag must have the form v1.2.3" unless tag.match?(/\Av\d+\.\d+\.\d+\z/)
8
+
9
+ version = tag.delete_prefix("v")
10
+ expected_platforms = %w[
11
+ ruby
12
+ x86_64-linux
13
+ aarch64-linux
14
+ arm64-darwin
15
+ x86_64-darwin
16
+ x64-mingw-ucrt
17
+ ].sort
18
+ gem_paths = Dir[File.join(directory, "*.gem")].sort
19
+ specifications = gem_paths.map { |path| Gem::Package.new(path).spec }
20
+
21
+ abort "expected #{expected_platforms.length} gems, found #{specifications.length}" unless
22
+ specifications.length == expected_platforms.length
23
+ abort "release directory contains a gem other than assimp-ruby" unless
24
+ specifications.all? { |specification| specification.name == "assimp-ruby" }
25
+ abort "release gem version does not match tag #{tag}" unless
26
+ specifications.all? { |specification| specification.version.to_s == version }
27
+
28
+ actual_platforms = specifications.map { |specification| specification.platform.to_s }.sort
29
+ unless actual_platforms == expected_platforms
30
+ abort "expected platforms #{expected_platforms.join(", ")}, found #{actual_platforms.join(", ")}"
31
+ end
32
+
33
+ puts "verified assimp-ruby #{version} for #{actual_platforms.join(", ")}"
metadata ADDED
@@ -0,0 +1,90 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: assimp-ruby
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Yudai Takada
8
+ bindir: bin
9
+ cert_chain: []
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
+ dependencies:
12
+ - !ruby/object:Gem::Dependency
13
+ name: ffi
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - "~>"
17
+ - !ruby/object:Gem::Version
18
+ version: '1.17'
19
+ type: :runtime
20
+ prerelease: false
21
+ version_requirements: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - "~>"
24
+ - !ruby/object:Gem::Version
25
+ version: '1.17'
26
+ description: A Ruby-friendly 3D asset import API backed by Assimp 5.x and FFI.
27
+ email:
28
+ - t.yudai92@gmail.com
29
+ executables: []
30
+ extensions: []
31
+ extra_rdoc_files: []
32
+ files:
33
+ - LICENSE.txt
34
+ - README.md
35
+ - Rakefile
36
+ - generator/generate.rb
37
+ - generator/layout_probe.c
38
+ - generator/verify_layout.rb
39
+ - lib/assimp.rb
40
+ - lib/assimp/animation.rb
41
+ - lib/assimp/animation_copier.rb
42
+ - lib/assimp/embedded_texture.rb
43
+ - lib/assimp/errors.rb
44
+ - lib/assimp/import_source.rb
45
+ - lib/assimp/importer.rb
46
+ - lib/assimp/material.rb
47
+ - lib/assimp/material_copier.rb
48
+ - lib/assimp/math.rb
49
+ - lib/assimp/mesh.rb
50
+ - lib/assimp/mesh_copier.rb
51
+ - lib/assimp/native.rb
52
+ - lib/assimp/native/generated.rb
53
+ - lib/assimp/native/platform.rb
54
+ - lib/assimp/native/types.rb
55
+ - lib/assimp/native_reader.rb
56
+ - lib/assimp/node.rb
57
+ - lib/assimp/post_process.rb
58
+ - lib/assimp/raw_scene.rb
59
+ - lib/assimp/scene.rb
60
+ - lib/assimp/scene_copier.rb
61
+ - lib/assimp/texture_copier.rb
62
+ - lib/assimp/version.rb
63
+ - rakelib/native_package.rake
64
+ - script/smoke_gem.rb
65
+ - script/verify_release.rb
66
+ homepage: https://github.com/ydah/assimp-ruby
67
+ licenses:
68
+ - MIT
69
+ metadata:
70
+ homepage_uri: https://github.com/ydah/assimp-ruby
71
+ source_code_uri: https://github.com/ydah/assimp-ruby/tree/main
72
+ rubygems_mfa_required: 'true'
73
+ rdoc_options: []
74
+ require_paths:
75
+ - lib
76
+ required_ruby_version: !ruby/object:Gem::Requirement
77
+ requirements:
78
+ - - ">="
79
+ - !ruby/object:Gem::Version
80
+ version: 3.2.0
81
+ required_rubygems_version: !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - ">="
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ requirements: []
87
+ rubygems_version: 4.0.6
88
+ specification_version: 4
89
+ summary: Ruby bindings for the Assimp asset import library
90
+ test_files: []