zemax 0.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/HISTORY +4 -0
- data/LICENSE +20 -0
- data/README.rdoc +26 -0
- data/Rakefile +23 -0
- data/VERSION +1 -0
- data/bin/zemax +7 -0
- data/lib/zemax.rb +32 -0
- data/spec/spec.opts +2 -0
- data/spec/spec_helper.rb +18 -0
- data/spec/zemax_spec.rb +7 -0
- data/tasks/common.rake +14 -0
- data/tasks/doc.rake +7 -0
- data/tasks/gem.rake +33 -0
- metadata +102 -0
data/HISTORY
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2010 Arvicco
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
==zemax
|
2
|
+
by: Arvicco
|
3
|
+
url: http://github.com/arvicco/zemax
|
4
|
+
|
5
|
+
== DESCRIPTION:
|
6
|
+
|
7
|
+
FIXME (describe your package)
|
8
|
+
|
9
|
+
== FEATURES/PROBLEMS:
|
10
|
+
|
11
|
+
* FIXME (list of features or problems)
|
12
|
+
|
13
|
+
== SYNOPSIS:
|
14
|
+
|
15
|
+
FIXME (code sample of usage)
|
16
|
+
|
17
|
+
== REQUIREMENTS:
|
18
|
+
|
19
|
+
* FIXME (list of requirements)
|
20
|
+
|
21
|
+
== INSTALL:
|
22
|
+
|
23
|
+
* FIXME (sudo gem install, anything else)
|
24
|
+
|
25
|
+
== LICENSE:
|
26
|
+
Copyright (c) 2010 Arvicco. See LICENSE for details.
|
data/Rakefile
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'pathname'
|
2
|
+
NAME = 'zemax'
|
3
|
+
p BASE_DIR = Pathname.new(__FILE__).dirname
|
4
|
+
p LIB_DIR = BASE_DIR + 'lib'
|
5
|
+
p PKG_DIR = BASE_DIR + 'pkg'
|
6
|
+
|
7
|
+
$LOAD_PATH.unshift LIB_DIR
|
8
|
+
require NAME
|
9
|
+
|
10
|
+
CLASS_NAME = Zemax
|
11
|
+
VERSION = CLASS_NAME::VERSION
|
12
|
+
|
13
|
+
begin
|
14
|
+
require 'rake'
|
15
|
+
rescue LoadError
|
16
|
+
require 'rubygems'
|
17
|
+
gem 'rake', '~> 0.8.3.1'
|
18
|
+
require 'rake'
|
19
|
+
end
|
20
|
+
|
21
|
+
# Load rakefile tasks
|
22
|
+
Dir['tasks/*.rake'].sort.each { |file| load file }
|
23
|
+
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.0.0
|
data/bin/zemax
ADDED
data/lib/zemax.rb
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
module Zemax
|
2
|
+
require 'pathname'
|
3
|
+
|
4
|
+
VERSION_FILE = Pathname.new(__FILE__).dirname + '../VERSION' # :nodoc:
|
5
|
+
VERSION = VERSION_FILE.exist? ? VERSION_FILE.read.strip : nil
|
6
|
+
|
7
|
+
# Require ruby source file(s). Lib should be either file name or glob
|
8
|
+
# Accepts following options:
|
9
|
+
# :file:: Libs are required relative to this file - defaults to __FILE__
|
10
|
+
# :dir:: Required libs are located under this dir name - defaults to gem name
|
11
|
+
#
|
12
|
+
def self.require_lib( lib, opts={} )
|
13
|
+
file = Pathname.new(opts[:file] || __FILE__)
|
14
|
+
name = file.dirname + (opts[:dir] || file.basename('.*')) + lib.gsub(/(?<!.rb)$/, '.rb')
|
15
|
+
Pathname.glob(name.to_s).sort.each {|rb| require rb}
|
16
|
+
end
|
17
|
+
|
18
|
+
# Requires ruby source file(s). Accepts either single name or Array of filenames/globs
|
19
|
+
# Accepts following options:
|
20
|
+
# :file:: Libs are required relative to this file - defaults to __FILE__
|
21
|
+
# :dir:: Required libs are located under this dir name - defaults to gem name
|
22
|
+
#
|
23
|
+
def self.require_libs( libs, opts={} )
|
24
|
+
[libs].flatten.each {|lib| require_lib lib, opts }
|
25
|
+
end
|
26
|
+
|
27
|
+
end # module Zemax
|
28
|
+
|
29
|
+
# Require all ruby source files located under directory lib/zemax
|
30
|
+
# If you need files in specific order, you should specify it here before the glob
|
31
|
+
Zemax.require_libs %W[**/*]
|
32
|
+
|
data/spec/spec.opts
ADDED
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'zemax'
|
2
|
+
require 'spec'
|
3
|
+
require 'spec/autorun'
|
4
|
+
|
5
|
+
Spec::Runner.configure do |config|
|
6
|
+
# == Mock Framework
|
7
|
+
#
|
8
|
+
# RSpec uses it's own mocking framework by default. If you prefer to
|
9
|
+
# use mocha, flexmock or RR, uncomment the appropriate line:
|
10
|
+
#
|
11
|
+
# config.mock_with :mocha
|
12
|
+
# config.mock_with :flexmock
|
13
|
+
# config.mock_with :rr
|
14
|
+
end
|
15
|
+
|
16
|
+
module ZemaxTest
|
17
|
+
|
18
|
+
end # module ZemaxTest
|
data/spec/zemax_spec.rb
ADDED
data/tasks/common.rake
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#task :default => 'test:run'
|
2
|
+
#task 'gem:release' => 'test:run'
|
3
|
+
|
4
|
+
#task :build do
|
5
|
+
# system "gem build zemax.gemspec"
|
6
|
+
#end
|
7
|
+
#
|
8
|
+
#task :install => :build do
|
9
|
+
# system "gem install zemax-#{Zemax::VERSION}"
|
10
|
+
#end
|
11
|
+
#
|
12
|
+
#task :release => :build do
|
13
|
+
# system "gem push zemax-#{Zemax::VERSION}"
|
14
|
+
#end
|
data/tasks/doc.rake
ADDED
data/tasks/gem.rake
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
desc 'Same as gem:release'
|
2
|
+
task :release => 'gem:release'
|
3
|
+
|
4
|
+
namespace :gem do
|
5
|
+
gem_file = "#{NAME}-#{VERSION}.gem"
|
6
|
+
|
7
|
+
desc 'Build gem'
|
8
|
+
task :build do
|
9
|
+
puts "Remove existing gem package"
|
10
|
+
rm_rf PKG_DIR
|
11
|
+
puts "Build new gem package"
|
12
|
+
system "gem build #{NAME}.gemspec"
|
13
|
+
puts "Move built gem to package dir"
|
14
|
+
mkdir_p PKG_DIR
|
15
|
+
mv gem_file, PKG_DIR
|
16
|
+
end
|
17
|
+
|
18
|
+
desc 'Cleanup already installed gem(s)'
|
19
|
+
task :cleanup do
|
20
|
+
puts "Cleaning up installed gem(s)"
|
21
|
+
system "gem cleanup #{NAME}"
|
22
|
+
end
|
23
|
+
|
24
|
+
desc 'Build and install gem'
|
25
|
+
task :install => :build do
|
26
|
+
system "gem install #{PKG_DIR}/#{gem_file}"
|
27
|
+
end
|
28
|
+
|
29
|
+
desc 'Build and push gem to Gemcutter'
|
30
|
+
task :release => :build do
|
31
|
+
system "gem push #{PKG_DIR}/#{gem_file}"
|
32
|
+
end
|
33
|
+
end
|
metadata
ADDED
@@ -0,0 +1,102 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: zemax
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
version: 0.0.0
|
10
|
+
platform: ruby
|
11
|
+
authors:
|
12
|
+
- arvicco
|
13
|
+
autorequire:
|
14
|
+
bindir: bin
|
15
|
+
cert_chain: []
|
16
|
+
|
17
|
+
date: 2010-04-12 00:00:00 +04:00
|
18
|
+
default_executable:
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
name: rspec
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
segments:
|
28
|
+
- 1
|
29
|
+
- 2
|
30
|
+
- 9
|
31
|
+
version: 1.2.9
|
32
|
+
type: :development
|
33
|
+
version_requirements: *id001
|
34
|
+
- !ruby/object:Gem::Dependency
|
35
|
+
name: cucumber
|
36
|
+
prerelease: false
|
37
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
segments:
|
42
|
+
- 0
|
43
|
+
version: "0"
|
44
|
+
type: :development
|
45
|
+
version_requirements: *id002
|
46
|
+
description: Describe package zemax
|
47
|
+
email: arvitallian@gmail.com
|
48
|
+
executables:
|
49
|
+
- zemax
|
50
|
+
extensions: []
|
51
|
+
|
52
|
+
extra_rdoc_files:
|
53
|
+
- LICENSE
|
54
|
+
- README.rdoc
|
55
|
+
files:
|
56
|
+
- bin/zemax
|
57
|
+
- lib/zemax.rb
|
58
|
+
- spec/spec.opts
|
59
|
+
- spec/spec_helper.rb
|
60
|
+
- spec/zemax_spec.rb
|
61
|
+
- tasks/common.rake
|
62
|
+
- tasks/doc.rake
|
63
|
+
- tasks/gem.rake
|
64
|
+
- Rakefile
|
65
|
+
- README.rdoc
|
66
|
+
- LICENSE
|
67
|
+
- VERSION
|
68
|
+
- HISTORY
|
69
|
+
has_rdoc: true
|
70
|
+
homepage: http://github.com/arvicco/zemax
|
71
|
+
licenses: []
|
72
|
+
|
73
|
+
post_install_message:
|
74
|
+
rdoc_options:
|
75
|
+
- --charset=UTF-8
|
76
|
+
require_paths:
|
77
|
+
- lib
|
78
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
segments:
|
83
|
+
- 0
|
84
|
+
version: "0"
|
85
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
segments:
|
90
|
+
- 0
|
91
|
+
version: "0"
|
92
|
+
requirements: []
|
93
|
+
|
94
|
+
rubyforge_project:
|
95
|
+
rubygems_version: 1.3.6
|
96
|
+
signing_key:
|
97
|
+
specification_version: 3
|
98
|
+
summary: Describe package zemax
|
99
|
+
test_files:
|
100
|
+
- spec/spec.opts
|
101
|
+
- spec/spec_helper.rb
|
102
|
+
- spec/zemax_spec.rb
|