mittsu 0.2.2 → 0.2.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 777d37e66478390707be4af3e544d08cf65dde56
4
- data.tar.gz: ec7d9a490810352ccaa678becd3c41a601063486
2
+ SHA256:
3
+ metadata.gz: 48e91f3f5d995fce4f48d1ecc53ca8f1d6049e0e4553f95cf59d75840b8f3e2f
4
+ data.tar.gz: 7458897098e4b97dd6a84510c2d17ae38e993f9acf6ab0093a23c6632dc86d3c
5
5
  SHA512:
6
- metadata.gz: 2c3d12b4844ad8b69effd00066f419492d65551ac06476362597db9cdcef146c1bb47eadfd0e5896b8b566e506f30f443a62829d607e937158e4a4831d6fc23a
7
- data.tar.gz: 02f66db10339722a29a27248a021188c945a51cc9e0b2f0f3412da3038b941bac94bbfaeac135a889f76a09e059ce739b305dd8747d0ff565ea7ef809a17bdbc
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
@@ -3,7 +3,7 @@ rvm:
3
3
  2.4.0
4
4
 
5
5
  env:
6
- - MITTSU_LIBGLFW_PATH=/usr/local/lib MITTSU_LIBGLFW_FILE=libglfw.so MINITEST_REPORTER=JUnit
6
+ - MITTSU_LIBGLFW_PATH=/usr/local/lib MITTSU_LIBGLFW_FILE=libglfw.so MINITEST_REPORTER=JUnitReporter
7
7
 
8
8
  addons:
9
9
  apt:
@@ -4,6 +4,14 @@ module Mittsu
4
4
  def self.debug?
5
5
  DEBUG
6
6
  end
7
+
8
+ def self.env
9
+ ENV["MITTSU_ENV"]
10
+ end
11
+
12
+ def self.test?
13
+ env == 'test'
14
+ end
7
15
  end
8
16
 
9
17
  require "mittsu/version"
@@ -8,7 +8,7 @@ module Mittsu
8
8
  end
9
9
 
10
10
  def [](key)
11
- if key.is_a? Fixnum
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? Fixnum
19
+ if key.is_a? Integer
20
20
  @array[key] = value
21
21
  else
22
22
  @hash[key] = value
@@ -28,12 +28,12 @@ module Mittsu
28
28
  case value
29
29
  when Color
30
30
  self.copy(value)
31
- when Fixnum
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, Fixnum or String"
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
- 'libglfw3.dylib'
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
 
@@ -1,4 +1,4 @@
1
1
  module Mittsu
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  REVISION = "71"
4
4
  end
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.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: 2017-10-02 00:00:00.000000000 Z
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.13
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/