mittsu 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.circleci/config.yml +44 -0
- data/.travis.yml +1 -1
- data/lib/mittsu.rb +8 -0
- data/lib/mittsu/core/hash_array.rb +2 -2
- data/lib/mittsu/math/color.rb +2 -2
- data/lib/mittsu/renderers/glfw_lib.rb +2 -1
- data/lib/mittsu/renderers/glfw_window.rb +1 -1
- data/lib/mittsu/version.rb +1 -1
- metadata +4 -4
- data/circle.yml +0 -25
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 48e91f3f5d995fce4f48d1ecc53ca8f1d6049e0e4553f95cf59d75840b8f3e2f
|
4
|
+
data.tar.gz: 7458897098e4b97dd6a84510c2d17ae38e993f9acf6ab0093a23c6632dc86d3c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d5b7457d633e2cf32ff516f003509ff29b671c3b029ddf7e731f1fd3ee9e5120fbd7871ba3c26d047deb4cdd29c496d91c1b88ef2c5c771c8303292312d4351
|
7
|
+
data.tar.gz: 7efc8ac6edc4ad531609114a43a6d6e7986f1e451395840a4b5fcf019c8351b71bf60ba9af39a7cf4828afeadc393f7df495834ce377ded07480a66d631656d5
|
@@ -0,0 +1,44 @@
|
|
1
|
+
version: 2
|
2
|
+
jobs:
|
3
|
+
build:
|
4
|
+
macos:
|
5
|
+
xcode: "9.4.1"
|
6
|
+
working_directory: ~/mittsu
|
7
|
+
steps:
|
8
|
+
## SETUP
|
9
|
+
- checkout
|
10
|
+
|
11
|
+
- restore_cache:
|
12
|
+
keys:
|
13
|
+
- mittsu-brew-v1-{{ .Branch }}
|
14
|
+
- mittsu-brew-v1-
|
15
|
+
- run: brew install glfw
|
16
|
+
- save_cache:
|
17
|
+
key: mittsu-brew-v1-{{ .Branch }}
|
18
|
+
paths:
|
19
|
+
- /usr/local/Homebrew
|
20
|
+
|
21
|
+
- restore_cache:
|
22
|
+
keys:
|
23
|
+
- mittsu-bundler-v1-{{ .Branch }}-{{ checksum "Gemfile" }}-{{ checksum "mittsu.gemspec" }}
|
24
|
+
- mittsu-bundler-v1-{{ .Branch }}-
|
25
|
+
- mittsu-bundler-v1-
|
26
|
+
- run: bundle install --path vendor/bundle
|
27
|
+
- save_cache:
|
28
|
+
key: mittsu-bundler-v1-{{ .Branch }}-{{ checksum "Gemfile" }}-{{ checksum "mittsu.gemspec" }}
|
29
|
+
paths:
|
30
|
+
- vendor/bundle
|
31
|
+
|
32
|
+
## TEST
|
33
|
+
- run:
|
34
|
+
name: Run tests
|
35
|
+
command: bundle exec rake test
|
36
|
+
environment:
|
37
|
+
MITTSU_LIBGLFW_PATH: /usr/local/lib
|
38
|
+
MITTSU_LIBGLFW_FILE: libglfw.dylib
|
39
|
+
MINITEST_REPORTER: JUnitReporter
|
40
|
+
|
41
|
+
## COLLECT RESULTS
|
42
|
+
- run: bundle exec codeclimate-test-reporter
|
43
|
+
- store_test_results:
|
44
|
+
path: test/reports
|
data/.travis.yml
CHANGED
data/lib/mittsu.rb
CHANGED
@@ -8,7 +8,7 @@ module Mittsu
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def [](key)
|
11
|
-
if key.is_a?
|
11
|
+
if key.is_a? Integer
|
12
12
|
@array[key]
|
13
13
|
else
|
14
14
|
@hash[key]
|
@@ -16,7 +16,7 @@ module Mittsu
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def []=(key, value)
|
19
|
-
if key.is_a?
|
19
|
+
if key.is_a? Integer
|
20
20
|
@array[key] = value
|
21
21
|
else
|
22
22
|
@hash[key] = value
|
data/lib/mittsu/math/color.rb
CHANGED
@@ -28,12 +28,12 @@ module Mittsu
|
|
28
28
|
case value
|
29
29
|
when Color
|
30
30
|
self.copy(value)
|
31
|
-
when
|
31
|
+
when Integer
|
32
32
|
self.set_hex(value)
|
33
33
|
when String
|
34
34
|
self.set_style(value)
|
35
35
|
else
|
36
|
-
raise ArgumentError, "Arguments must be Color,
|
36
|
+
raise ArgumentError, "Arguments must be Color, Integer or String"
|
37
37
|
end
|
38
38
|
self
|
39
39
|
end
|
@@ -33,7 +33,8 @@ module Mittsu
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def file
|
36
|
-
'
|
36
|
+
matches = Dir.glob('/usr/local/lib/libglfw*.dylib').map { |path| File.basename(path) }
|
37
|
+
return matches.find('libglfw3.dylib') || matches.find('libglfw.3.dylib') || matches.first
|
37
38
|
end
|
38
39
|
end
|
39
40
|
end
|
@@ -4,7 +4,7 @@ require 'glfw'
|
|
4
4
|
require 'mittsu'
|
5
5
|
require 'mittsu/renderers/glfw_lib'
|
6
6
|
glfw_lib = Mittsu::GLFWLib.discover
|
7
|
-
GLFW.load_lib(ENV["MITTSU_LIBGLFW_FILE"] || glfw_lib.file, ENV["MITTSU_LIBGLFW_PATH"] || glfw_lib.path)
|
7
|
+
GLFW.load_lib(ENV["MITTSU_LIBGLFW_FILE"] || glfw_lib.file, ENV["MITTSU_LIBGLFW_PATH"] || glfw_lib.path) unless Mittsu.test?
|
8
8
|
|
9
9
|
include GLFW
|
10
10
|
|
data/lib/mittsu/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mittsu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Smith
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-07-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opengl-bindings
|
@@ -146,6 +146,7 @@ executables: []
|
|
146
146
|
extensions: []
|
147
147
|
extra_rdoc_files: []
|
148
148
|
files:
|
149
|
+
- ".circleci/config.yml"
|
149
150
|
- ".codeclimate.yml"
|
150
151
|
- ".gitignore"
|
151
152
|
- ".rubocop.yml"
|
@@ -158,7 +159,6 @@ files:
|
|
158
159
|
- appveyor.yml
|
159
160
|
- bin/console
|
160
161
|
- bin/setup
|
161
|
-
- circle.yml
|
162
162
|
- install_glfw.ps1
|
163
163
|
- lib/mittsu.rb
|
164
164
|
- lib/mittsu/cameras.rb
|
@@ -399,7 +399,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
399
399
|
requirements:
|
400
400
|
- OpenGL 3.3+ capable hardware and drivers
|
401
401
|
rubyforge_project:
|
402
|
-
rubygems_version: 2.6
|
402
|
+
rubygems_version: 2.7.6
|
403
403
|
signing_key:
|
404
404
|
specification_version: 4
|
405
405
|
summary: 3D Graphics Library for Ruby
|
data/circle.yml
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
## Customize the test machine
|
2
|
-
machine:
|
3
|
-
xcode:
|
4
|
-
version: 8.2
|
5
|
-
|
6
|
-
environment:
|
7
|
-
MITTSU_LIBGLFW_PATH: /usr/local/lib
|
8
|
-
MITTSU_LIBGLFW_FILE: libglfw.dylib
|
9
|
-
MINITEST_REPORTER: JUnit
|
10
|
-
|
11
|
-
# Version of ruby to use
|
12
|
-
ruby:
|
13
|
-
version:
|
14
|
-
2.0.0
|
15
|
-
|
16
|
-
## Customize dependencies
|
17
|
-
dependencies:
|
18
|
-
pre:
|
19
|
-
- brew install glfw
|
20
|
-
|
21
|
-
test:
|
22
|
-
post:
|
23
|
-
- bundle exec codeclimate-test-reporter
|
24
|
-
- mkdir -p $CIRCLE_TEST_REPORTS/minitest/
|
25
|
-
- cp -r test/reports/*.xml $CIRCLE_TEST_REPORTS/minitest/
|