magro 0.5.1 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/LICENSE.txt +1 -1
- data/README.md +2 -2
- data/ext/magro/extconf.rb +7 -31
- data/ext/magro/magro.c +455 -2
- data/ext/magro/magro.h +41 -1
- data/lib/magro/io.rb +1 -1
- data/lib/magro/version.rb +1 -1
- metadata +6 -22
- data/.clang-format +0 -149
- data/.coveralls.yml +0 -1
- data/.github/workflows/build.yml +0 -23
- data/.github/workflows/coverage.yml +0 -29
- data/.gitignore +0 -22
- data/.rspec +0 -3
- data/CODE_OF_CONDUCT.md +0 -74
- data/Gemfile +0 -13
- data/Rakefile +0 -14
- data/Steepfile +0 -20
- data/bin/console +0 -14
- data/bin/setup +0 -8
- data/ext/magro/imgrw.c +0 -410
- data/ext/magro/imgrw.h +0 -20
- data/magro.gemspec +0 -39
- data/sig/patch.rbs +0 -90
data/.clang-format
DELETED
@@ -1,149 +0,0 @@
|
|
1
|
-
---
|
2
|
-
Language: Cpp
|
3
|
-
# BasedOnStyle: LLVM
|
4
|
-
AccessModifierOffset: -2
|
5
|
-
AlignAfterOpenBracket: Align
|
6
|
-
AlignConsecutiveMacros: false
|
7
|
-
AlignConsecutiveAssignments: false
|
8
|
-
AlignConsecutiveBitFields: false
|
9
|
-
AlignConsecutiveDeclarations: false
|
10
|
-
AlignEscapedNewlines: Right
|
11
|
-
AlignOperands: Align
|
12
|
-
AlignTrailingComments: true
|
13
|
-
AllowAllArgumentsOnNextLine: true
|
14
|
-
AllowAllConstructorInitializersOnNextLine: true
|
15
|
-
AllowAllParametersOfDeclarationOnNextLine: true
|
16
|
-
AllowShortEnumsOnASingleLine: true
|
17
|
-
AllowShortBlocksOnASingleLine: Never
|
18
|
-
AllowShortCaseLabelsOnASingleLine: false
|
19
|
-
AllowShortFunctionsOnASingleLine: All
|
20
|
-
AllowShortLambdasOnASingleLine: All
|
21
|
-
AllowShortIfStatementsOnASingleLine: Never
|
22
|
-
AllowShortLoopsOnASingleLine: false
|
23
|
-
AlwaysBreakAfterDefinitionReturnType: None
|
24
|
-
AlwaysBreakAfterReturnType: None
|
25
|
-
AlwaysBreakBeforeMultilineStrings: false
|
26
|
-
AlwaysBreakTemplateDeclarations: MultiLine
|
27
|
-
BinPackArguments: true
|
28
|
-
BinPackParameters: true
|
29
|
-
BraceWrapping:
|
30
|
-
AfterCaseLabel: false
|
31
|
-
AfterClass: false
|
32
|
-
AfterControlStatement: Never
|
33
|
-
AfterEnum: false
|
34
|
-
AfterFunction: false
|
35
|
-
AfterNamespace: false
|
36
|
-
AfterObjCDeclaration: false
|
37
|
-
AfterStruct: false
|
38
|
-
AfterUnion: false
|
39
|
-
AfterExternBlock: false
|
40
|
-
BeforeCatch: false
|
41
|
-
BeforeElse: false
|
42
|
-
BeforeLambdaBody: false
|
43
|
-
BeforeWhile: false
|
44
|
-
IndentBraces: false
|
45
|
-
SplitEmptyFunction: true
|
46
|
-
SplitEmptyRecord: true
|
47
|
-
SplitEmptyNamespace: true
|
48
|
-
BreakBeforeBinaryOperators: None
|
49
|
-
BreakBeforeBraces: Attach
|
50
|
-
BreakBeforeInheritanceComma: false
|
51
|
-
BreakInheritanceList: BeforeColon
|
52
|
-
BreakBeforeTernaryOperators: true
|
53
|
-
BreakConstructorInitializersBeforeComma: false
|
54
|
-
BreakConstructorInitializers: BeforeColon
|
55
|
-
BreakAfterJavaFieldAnnotations: false
|
56
|
-
BreakStringLiterals: true
|
57
|
-
ColumnLimit: 128
|
58
|
-
CommentPragmas: '^ IWYU pragma:'
|
59
|
-
CompactNamespaces: false
|
60
|
-
ConstructorInitializerAllOnOneLineOrOnePerLine: false
|
61
|
-
ConstructorInitializerIndentWidth: 4
|
62
|
-
ContinuationIndentWidth: 4
|
63
|
-
Cpp11BracedListStyle: true
|
64
|
-
DeriveLineEnding: true
|
65
|
-
DerivePointerAlignment: false
|
66
|
-
DisableFormat: false
|
67
|
-
ExperimentalAutoDetectBinPacking: false
|
68
|
-
FixNamespaceComments: true
|
69
|
-
ForEachMacros:
|
70
|
-
- foreach
|
71
|
-
- Q_FOREACH
|
72
|
-
- BOOST_FOREACH
|
73
|
-
IncludeBlocks: Preserve
|
74
|
-
IncludeCategories:
|
75
|
-
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
|
76
|
-
Priority: 2
|
77
|
-
SortPriority: 0
|
78
|
-
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
|
79
|
-
Priority: 3
|
80
|
-
SortPriority: 0
|
81
|
-
- Regex: '.*'
|
82
|
-
Priority: 1
|
83
|
-
SortPriority: 0
|
84
|
-
IncludeIsMainRegex: '(Test)?$'
|
85
|
-
IncludeIsMainSourceRegex: ''
|
86
|
-
IndentCaseLabels: false
|
87
|
-
IndentCaseBlocks: false
|
88
|
-
IndentGotoLabels: true
|
89
|
-
IndentPPDirectives: None
|
90
|
-
IndentExternBlock: AfterExternBlock
|
91
|
-
IndentWidth: 2
|
92
|
-
IndentWrappedFunctionNames: false
|
93
|
-
InsertTrailingCommas: None
|
94
|
-
JavaScriptQuotes: Leave
|
95
|
-
JavaScriptWrapImports: true
|
96
|
-
KeepEmptyLinesAtTheStartOfBlocks: true
|
97
|
-
MacroBlockBegin: ''
|
98
|
-
MacroBlockEnd: ''
|
99
|
-
MaxEmptyLinesToKeep: 1
|
100
|
-
NamespaceIndentation: None
|
101
|
-
ObjCBinPackProtocolList: Auto
|
102
|
-
ObjCBlockIndentWidth: 2
|
103
|
-
ObjCBreakBeforeNestedBlockParam: true
|
104
|
-
ObjCSpaceAfterProperty: false
|
105
|
-
ObjCSpaceBeforeProtocolList: true
|
106
|
-
PenaltyBreakAssignment: 2
|
107
|
-
PenaltyBreakBeforeFirstCallParameter: 19
|
108
|
-
PenaltyBreakComment: 300
|
109
|
-
PenaltyBreakFirstLessLess: 120
|
110
|
-
PenaltyBreakString: 1000
|
111
|
-
PenaltyBreakTemplateDeclaration: 10
|
112
|
-
PenaltyExcessCharacter: 1000000
|
113
|
-
PenaltyReturnTypeOnItsOwnLine: 60
|
114
|
-
PointerAlignment: Left
|
115
|
-
ReflowComments: true
|
116
|
-
SortIncludes: true
|
117
|
-
SortUsingDeclarations: true
|
118
|
-
SpaceAfterCStyleCast: false
|
119
|
-
SpaceAfterLogicalNot: false
|
120
|
-
SpaceAfterTemplateKeyword: true
|
121
|
-
SpaceBeforeAssignmentOperators: true
|
122
|
-
SpaceBeforeCpp11BracedList: false
|
123
|
-
SpaceBeforeCtorInitializerColon: true
|
124
|
-
SpaceBeforeInheritanceColon: true
|
125
|
-
SpaceBeforeParens: ControlStatements
|
126
|
-
SpaceBeforeRangeBasedForLoopColon: true
|
127
|
-
SpaceInEmptyBlock: false
|
128
|
-
SpaceInEmptyParentheses: false
|
129
|
-
SpacesBeforeTrailingComments: 1
|
130
|
-
SpacesInAngles: false
|
131
|
-
SpacesInConditionalStatement: false
|
132
|
-
SpacesInContainerLiterals: true
|
133
|
-
SpacesInCStyleCastParentheses: false
|
134
|
-
SpacesInParentheses: false
|
135
|
-
SpacesInSquareBrackets: false
|
136
|
-
SpaceBeforeSquareBrackets: false
|
137
|
-
Standard: Latest
|
138
|
-
StatementMacros:
|
139
|
-
- Q_UNUSED
|
140
|
-
- QT_REQUIRE_VERSION
|
141
|
-
TabWidth: 8
|
142
|
-
UseCRLF: false
|
143
|
-
UseTab: Never
|
144
|
-
WhitespaceSensitiveMacros:
|
145
|
-
- STRINGIZE
|
146
|
-
- PP_STRINGIZE
|
147
|
-
- BOOST_PP_STRINGIZE
|
148
|
-
...
|
149
|
-
|
data/.coveralls.yml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
service_name: github-ci
|
data/.github/workflows/build.yml
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
name: build
|
2
|
-
|
3
|
-
on: [push, pull_request]
|
4
|
-
|
5
|
-
jobs:
|
6
|
-
build:
|
7
|
-
runs-on: ubuntu-20.04
|
8
|
-
strategy:
|
9
|
-
matrix:
|
10
|
-
ruby: [ '2.6', '2.7', '3.0' ]
|
11
|
-
steps:
|
12
|
-
- uses: actions/checkout@v2
|
13
|
-
- name: Install libpng and libjpeg
|
14
|
-
run: sudo apt-get install -y libpng-dev libjpeg-dev
|
15
|
-
- name: Set up Ruby ${{ matrix.ruby }}
|
16
|
-
uses: actions/setup-ruby@v1
|
17
|
-
with:
|
18
|
-
ruby-version: ${{ matrix.ruby }}
|
19
|
-
- name: Build and test with Rake
|
20
|
-
run: |
|
21
|
-
gem install --no-document bundler
|
22
|
-
bundle install --jobs 4 --retry 3
|
23
|
-
bundle exec rake
|
@@ -1,29 +0,0 @@
|
|
1
|
-
name: coverage
|
2
|
-
|
3
|
-
on:
|
4
|
-
push:
|
5
|
-
branches: [ main ]
|
6
|
-
pull_request:
|
7
|
-
branches: [ main ]
|
8
|
-
|
9
|
-
jobs:
|
10
|
-
coverage:
|
11
|
-
runs-on: ubuntu-20.04
|
12
|
-
steps:
|
13
|
-
- uses: actions/checkout@v2
|
14
|
-
- name: Install libpng and libjpeg
|
15
|
-
run: sudo apt-get install -y libpng-dev libjpeg-dev
|
16
|
-
- uses: actions/checkout@v2
|
17
|
-
- name: Set up Ruby 2.7
|
18
|
-
uses: actions/setup-ruby@v1
|
19
|
-
with:
|
20
|
-
ruby-version: '2.7'
|
21
|
-
- name: Build and test with Rake
|
22
|
-
run: |
|
23
|
-
gem install bundler
|
24
|
-
bundle install
|
25
|
-
bundle exec rake
|
26
|
-
- name: Coveralls GitHub Action
|
27
|
-
uses: coverallsapp/github-action@v1.1.2
|
28
|
-
with:
|
29
|
-
github-token: ${{ secrets.GITHUB_TOKEN }}
|
data/.gitignore
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
/.bundle/
|
2
|
-
/.yardoc
|
3
|
-
/Gemfile.lock
|
4
|
-
/_yardoc/
|
5
|
-
/coverage/
|
6
|
-
/doc/
|
7
|
-
/pkg/
|
8
|
-
/spec/reports/
|
9
|
-
/tmp/
|
10
|
-
/spec/files/tmp.jpeg
|
11
|
-
/spec/files/tmp.png
|
12
|
-
/spec/files/tmp_UC.JPEG
|
13
|
-
/spec/files/tmp_UC.PNG
|
14
|
-
|
15
|
-
# rspec failure tracking
|
16
|
-
.rspec_status
|
17
|
-
|
18
|
-
*.swp
|
19
|
-
*.bundle
|
20
|
-
tags
|
21
|
-
.DS_Store
|
22
|
-
.ruby-version
|
data/.rspec
DELETED
data/CODE_OF_CONDUCT.md
DELETED
@@ -1,74 +0,0 @@
|
|
1
|
-
# Contributor Covenant Code of Conduct
|
2
|
-
|
3
|
-
## Our Pledge
|
4
|
-
|
5
|
-
In the interest of fostering an open and welcoming environment, we as
|
6
|
-
contributors and maintainers pledge to making participation in our project and
|
7
|
-
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
-
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
-
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
-
orientation.
|
11
|
-
|
12
|
-
## Our Standards
|
13
|
-
|
14
|
-
Examples of behavior that contributes to creating a positive environment
|
15
|
-
include:
|
16
|
-
|
17
|
-
* Using welcoming and inclusive language
|
18
|
-
* Being respectful of differing viewpoints and experiences
|
19
|
-
* Gracefully accepting constructive criticism
|
20
|
-
* Focusing on what is best for the community
|
21
|
-
* Showing empathy towards other community members
|
22
|
-
|
23
|
-
Examples of unacceptable behavior by participants include:
|
24
|
-
|
25
|
-
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
-
advances
|
27
|
-
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
-
* Public or private harassment
|
29
|
-
* Publishing others' private information, such as a physical or electronic
|
30
|
-
address, without explicit permission
|
31
|
-
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
-
professional setting
|
33
|
-
|
34
|
-
## Our Responsibilities
|
35
|
-
|
36
|
-
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
-
behavior and are expected to take appropriate and fair corrective action in
|
38
|
-
response to any instances of unacceptable behavior.
|
39
|
-
|
40
|
-
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
-
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
-
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
-
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
-
threatening, offensive, or harmful.
|
45
|
-
|
46
|
-
## Scope
|
47
|
-
|
48
|
-
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
-
when an individual is representing the project or its community. Examples of
|
50
|
-
representing a project or community include using an official project e-mail
|
51
|
-
address, posting via an official social media account, or acting as an appointed
|
52
|
-
representative at an online or offline event. Representation of a project may be
|
53
|
-
further defined and clarified by project maintainers.
|
54
|
-
|
55
|
-
## Enforcement
|
56
|
-
|
57
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
-
reported by contacting the project team at yoshoku@outlook.com. All
|
59
|
-
complaints will be reviewed and investigated and will result in a response that
|
60
|
-
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
-
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
-
Further details of specific enforcement policies may be posted separately.
|
63
|
-
|
64
|
-
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
-
faith may face temporary or permanent repercussions as determined by other
|
66
|
-
members of the project's leadership.
|
67
|
-
|
68
|
-
## Attribution
|
69
|
-
|
70
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
-
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
-
|
73
|
-
[homepage]: http://contributor-covenant.org
|
74
|
-
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
source 'https://rubygems.org'
|
2
|
-
|
3
|
-
# Specify your gem's dependencies in magro.gemspec
|
4
|
-
gemspec
|
5
|
-
|
6
|
-
gem 'bundler', '~> 2.0'
|
7
|
-
gem 'rake', '~> 13.0'
|
8
|
-
gem 'rake-compiler', '~> 1.0'
|
9
|
-
gem 'rspec', '~> 3.0'
|
10
|
-
gem 'simplecov', '~> 0.19'
|
11
|
-
gem 'simplecov-lcov', '~> 0.8'
|
12
|
-
gem 'rbs', '~> 1.2'
|
13
|
-
gem 'steep', '~> 0.44'
|
data/Rakefile
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
require 'bundler/gem_tasks'
|
2
|
-
require 'rspec/core/rake_task'
|
3
|
-
|
4
|
-
RSpec::Core::RakeTask.new(:spec)
|
5
|
-
|
6
|
-
require 'rake/extensiontask'
|
7
|
-
|
8
|
-
task build: :compile
|
9
|
-
|
10
|
-
Rake::ExtensionTask.new('magro') do |ext|
|
11
|
-
ext.lib_dir = 'lib/magro'
|
12
|
-
end
|
13
|
-
|
14
|
-
task default: %i[clobber compile spec]
|
data/Steepfile
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
target :lib do
|
2
|
-
signature "sig"
|
3
|
-
#
|
4
|
-
check "lib" # Directory name
|
5
|
-
# check "Gemfile" # File name
|
6
|
-
# check "app/models/**/*.rb" # Glob
|
7
|
-
# # ignore "lib/templates/*.rb"
|
8
|
-
#
|
9
|
-
# # library "pathname", "set" # Standard libraries
|
10
|
-
# # library "strong_json" # Gems
|
11
|
-
end
|
12
|
-
|
13
|
-
# target :spec do
|
14
|
-
# signature "sig", "sig-private"
|
15
|
-
#
|
16
|
-
# check "spec"
|
17
|
-
#
|
18
|
-
# # library "pathname", "set" # Standard libraries
|
19
|
-
# # library "rspec"
|
20
|
-
# end
|
data/bin/console
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require "bundler/setup"
|
4
|
-
require "magro"
|
5
|
-
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
8
|
-
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
-
# require "pry"
|
11
|
-
# Pry.start
|
12
|
-
|
13
|
-
require "irb"
|
14
|
-
IRB.start(__FILE__)
|