Skip to content
This repository was archived by the owner on Mar 15, 2022. It is now read-only.

Commit d998fe8

Browse files
committed
Add license headers and fix gemspec to include all files.
1 parent 643e0cb commit d998fe8

12 files changed

+135
-3
lines changed

Rakefile

+12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
# Licensed under the Apache License, Version 2.0 (the "License");
2+
# you may not use this file except in compliance with the License.
3+
# You may obtain a copy of the License at
4+
#
5+
# http:#www.apache.org/licenses/LICENSE-2.0
6+
#
7+
# Unless required by applicable law or agreed to in writing, software
8+
# distributed under the License is distributed on an "AS IS" BASIS,
9+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
# See the License for the specific language governing permissions and
11+
# limitations under the License.
12+
113
require 'rake'
214
require 'rake/testtask'
315

atomic.gemspec

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Gem::Specification.new do |s|
44
s.name = %q{atomic}
5-
s.version = "1.0.0"
5+
s.version = "1.0.1"
66
s.authors = ["Charles Oliver Nutter", "MenTaLguY"]
77
s.date = Time.now.strftime('%Y-%m-%d')
88
s.description = "An atomic reference implementation for JRuby, Rubinius, and MRI"
@@ -12,10 +12,10 @@ Gem::Specification.new do |s|
1212
s.summary = "An atomic reference implementation for JRuby, Rubinius, and MRI"
1313
s.test_files = Dir["test/test*.rb"]
1414
if defined?(JRUBY_VERSION)
15-
s.files = Dir['{lib,examples,test}/**/*'] + Dir['{*.txt,*.gemspec,Rakefile}']
15+
s.files = Dir['lib/atomic_reference.jar']
1616
s.platform = 'java'
1717
else
18-
s.files = Dir['{lib,examples,test,ext}/**/*'] + Dir['{*.txt,*.gemspec,Rakefile}']
1918
s.extensions = 'ext/extconf.rb'
2019
end
20+
s.files += `git ls-files`.lines.map(&:chomp)
2121
end

examples/atomic_example.rb

+12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
# Licensed under the Apache License, Version 2.0 (the "License");
2+
# you may not use this file except in compliance with the License.
3+
# You may obtain a copy of the License at
4+
#
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
#
7+
# Unless required by applicable law or agreed to in writing, software
8+
# distributed under the License is distributed on an "AS IS" BASIS,
9+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
# See the License for the specific language governing permissions and
11+
# limitations under the License.
12+
113
require 'atomic'
214

315
my_atomic = Atomic.new(0)

examples/bench_atomic.rb

+12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
# Licensed under the Apache License, Version 2.0 (the "License");
2+
# you may not use this file except in compliance with the License.
3+
# You may obtain a copy of the License at
4+
#
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
#
7+
# Unless required by applicable law or agreed to in writing, software
8+
# distributed under the License is distributed on an "AS IS" BASIS,
9+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
# See the License for the specific language governing permissions and
11+
# limitations under the License.
12+
113
require 'benchmark'
214
require 'atomic'
315
require 'thread'

examples/bench_atomic_1.rb

+11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
#!/usr/bin/env ruby
22

3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
314
$: << File.expand_path('../../lib', __FILE__)
415

516
require 'optparse'

examples/graph_atomic_bench.rb

+13
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
11
#!/usr/bin/env ruby
2+
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
215
require 'optparse'
316

417
conf = {

ext/AtomicReferenceService.java

+12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
// Licensed under the Apache License, Version 2.0 (the "License");
2+
// you may not use this file except in compliance with the License.
3+
// You may obtain a copy of the License at
4+
//
5+
// http://www.apache.org/licenses/LICENSE-2.0
6+
//
7+
// Unless required by applicable law or agreed to in writing, software
8+
// distributed under the License is distributed on an "AS IS" BASIS,
9+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
// See the License for the specific language governing permissions and
11+
// limitations under the License.
12+
113
import java.io.IOException;
214

315
import org.jruby.Ruby;

ext/atomic_reference.c

+12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
// Licensed under the Apache License, Version 2.0 (the "License");
2+
// you may not use this file except in compliance with the License.
3+
// You may obtain a copy of the License at
4+
//
5+
// http://www.apache.org/licenses/LICENSE-2.0
6+
//
7+
// Unless required by applicable law or agreed to in writing, software
8+
// distributed under the License is distributed on an "AS IS" BASIS,
9+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
// See the License for the specific language governing permissions and
11+
// limitations under the License.
12+
113
#include <ruby.h>
214

315
static void ir_mark(void *value) {

ext/extconf.rb

+12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
# Licensed under the Apache License, Version 2.0 (the "License");
2+
# you may not use this file except in compliance with the License.
3+
# You may obtain a copy of the License at
4+
#
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
#
7+
# Unless required by applicable law or agreed to in writing, software
8+
# distributed under the License is distributed on an "AS IS" BASIS,
9+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
# See the License for the specific language governing permissions and
11+
# limitations under the License.
12+
113
require 'mkmf'
214
extension_name = 'atomic_reference'
315
dir_config(extension_name)

ext/org/jruby/ext/atomic/AtomicReferenceLibrary.java

+12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
// Licensed under the Apache License, Version 2.0 (the "License");
2+
// you may not use this file except in compliance with the License.
3+
// You may obtain a copy of the License at
4+
//
5+
// http://www.apache.org/licenses/LICENSE-2.0
6+
//
7+
// Unless required by applicable law or agreed to in writing, software
8+
// distributed under the License is distributed on an "AS IS" BASIS,
9+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
// See the License for the specific language governing permissions and
11+
// limitations under the License.
12+
113
package org.jruby.ext.atomic;
214

315
import java.io.IOException;

lib/atomic.rb

+12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
# Licensed under the Apache License, Version 2.0 (the "License");
2+
# you may not use this file except in compliance with the License.
3+
# You may obtain a copy of the License at
4+
#
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
#
7+
# Unless required by applicable law or agreed to in writing, software
8+
# distributed under the License is distributed on an "AS IS" BASIS,
9+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
# See the License for the specific language governing permissions and
11+
# limitations under the License.
12+
113
require 'thread'
214

315
class Atomic

test/test_atomic.rb

+12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
# Licensed under the Apache License, Version 2.0 (the "License");
2+
# you may not use this file except in compliance with the License.
3+
# You may obtain a copy of the License at
4+
#
5+
# http:#www.apache.org/licenses/LICENSE-2.0
6+
#
7+
# Unless required by applicable law or agreed to in writing, software
8+
# distributed under the License is distributed on an "AS IS" BASIS,
9+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
# See the License for the specific language governing permissions and
11+
# limitations under the License.
12+
113
require 'test/unit'
214
require 'atomic'
315

0 commit comments

Comments
 (0)