zemax 0.0.0 → 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +21 -0
- data/LICENSE +20 -20
- data/README.rdoc +17 -26
- data/Rakefile +57 -23
- data/VERSION +1 -1
- data/features/step_definitions/zemax_steps.rb +0 -0
- data/features/support/env.rb +4 -0
- data/features/zemax.feature +9 -0
- data/lib/zemax.rb +1 -32
- data/spec/spec.opts +1 -2
- data/spec/spec_helper.rb +9 -18
- data/spec/zemax_spec.rb +7 -7
- data/zemax.gemspec +61 -0
- metadata +27 -40
- data/HISTORY +0 -4
- data/bin/zemax +0 -7
- data/tasks/common.rake +0 -14
- data/tasks/doc.rake +0 -7
- data/tasks/gem.rake +0 -33
data/.document
ADDED
data/.gitignore
ADDED
data/LICENSE
CHANGED
@@ -1,20 +1,20 @@
|
|
1
|
-
Copyright (c)
|
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.
|
1
|
+
Copyright (c) 2009 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
CHANGED
@@ -1,26 +1,17 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
==
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
*
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
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.
|
1
|
+
= zemax
|
2
|
+
|
3
|
+
Description goes here.
|
4
|
+
|
5
|
+
== Note on Patches/Pull Requests
|
6
|
+
|
7
|
+
* Fork the project.
|
8
|
+
* Make your feature addition or bug fix.
|
9
|
+
* Add tests for it. This is important so I don't break it in a
|
10
|
+
future version unintentionally.
|
11
|
+
* Commit, do not mess with rakefile, version, or history.
|
12
|
+
(if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
|
13
|
+
* Send me a pull request. Bonus points for topic branches.
|
14
|
+
|
15
|
+
== Copyright
|
16
|
+
|
17
|
+
Copyright (c) 2010 arvicco. See LICENSE for details.
|
data/Rakefile
CHANGED
@@ -1,23 +1,57 @@
|
|
1
|
-
require '
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'jeweler'
|
6
|
+
Jeweler::Tasks.new do |gem|
|
7
|
+
gem.name = "zemax"
|
8
|
+
gem.summary = %Q{Zemax test gem}
|
9
|
+
gem.description = %Q{Zemax - does nothing, for testing purposes only}
|
10
|
+
gem.email = "arvitallian@gmail.com"
|
11
|
+
gem.homepage = "http://github.com/arvicco/zemax"
|
12
|
+
gem.authors = ["arvicco"]
|
13
|
+
gem.add_development_dependency "rspec", ">= 1.2.9"
|
14
|
+
gem.add_development_dependency "cucumber", ">= 0"
|
15
|
+
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
16
|
+
end
|
17
|
+
Jeweler::GemcutterTasks.new
|
18
|
+
rescue LoadError
|
19
|
+
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
20
|
+
end
|
21
|
+
|
22
|
+
require 'spec/rake/spectask'
|
23
|
+
Spec::Rake::SpecTask.new(:spec) do |spec|
|
24
|
+
spec.libs << 'lib' << 'spec'
|
25
|
+
spec.spec_files = FileList['spec/**/*_spec.rb']
|
26
|
+
end
|
27
|
+
|
28
|
+
Spec::Rake::SpecTask.new(:rcov) do |spec|
|
29
|
+
spec.libs << 'lib' << 'spec'
|
30
|
+
spec.pattern = 'spec/**/*_spec.rb'
|
31
|
+
spec.rcov = true
|
32
|
+
end
|
33
|
+
|
34
|
+
task :spec => :check_dependencies
|
35
|
+
|
36
|
+
begin
|
37
|
+
require 'cucumber/rake/task'
|
38
|
+
Cucumber::Rake::Task.new(:features)
|
39
|
+
|
40
|
+
task :features => :check_dependencies
|
41
|
+
rescue LoadError
|
42
|
+
task :features do
|
43
|
+
abort "Cucumber is not available. In order to run features, you must: sudo gem install cucumber"
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
task :default => :spec
|
48
|
+
|
49
|
+
require 'rake/rdoctask'
|
50
|
+
Rake::RDocTask.new do |rdoc|
|
51
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
52
|
+
|
53
|
+
rdoc.rdoc_dir = 'rdoc'
|
54
|
+
rdoc.title = "zemax #{version}"
|
55
|
+
rdoc.rdoc_files.include('README*')
|
56
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
57
|
+
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.1
|
File without changes
|
data/lib/zemax.rb
CHANGED
@@ -1,32 +1 @@
|
|
1
|
-
|
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
|
-
|
1
|
+
p 'boo'
|
data/spec/spec.opts
CHANGED
@@ -1,2 +1 @@
|
|
1
|
-
--color
|
2
|
-
--format nested
|
1
|
+
--color
|
data/spec/spec_helper.rb
CHANGED
@@ -1,18 +1,9 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
require '
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
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
|
1
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
2
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
3
|
+
require 'zemax'
|
4
|
+
require 'spec'
|
5
|
+
require 'spec/autorun'
|
6
|
+
|
7
|
+
Spec::Runner.configure do |config|
|
8
|
+
|
9
|
+
end
|
data/spec/zemax_spec.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
end
|
7
|
-
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
2
|
+
|
3
|
+
describe "Zemax" do
|
4
|
+
it "fails" do
|
5
|
+
fail "hey buddy, you should probably rename this file and start specing for real"
|
6
|
+
end
|
7
|
+
end
|
data/zemax.gemspec
ADDED
@@ -0,0 +1,61 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in rakefile, and run the gemspec command
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{zemax}
|
8
|
+
s.version = "0.0.1"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["arvicco"]
|
12
|
+
s.date = %q{2010-01-07}
|
13
|
+
s.description = %q{Zemax - does nothing, for testing purposes only}
|
14
|
+
s.email = %q{arvitallian@gmail.com}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE",
|
17
|
+
"README.rdoc"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".document",
|
21
|
+
".gitignore",
|
22
|
+
"LICENSE",
|
23
|
+
"README.rdoc",
|
24
|
+
"Rakefile",
|
25
|
+
"VERSION",
|
26
|
+
"features/step_definitions/zemax_steps.rb",
|
27
|
+
"features/support/env.rb",
|
28
|
+
"features/zemax.feature",
|
29
|
+
"lib/zemax.rb",
|
30
|
+
"spec/spec.opts",
|
31
|
+
"spec/spec_helper.rb",
|
32
|
+
"spec/zemax_spec.rb",
|
33
|
+
"zemax.gemspec"
|
34
|
+
]
|
35
|
+
s.homepage = %q{http://github.com/arvicco/zemax}
|
36
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
37
|
+
s.require_paths = ["lib"]
|
38
|
+
s.rubygems_version = %q{1.3.5}
|
39
|
+
s.summary = %q{Zemax test gem}
|
40
|
+
s.test_files = [
|
41
|
+
"spec/spec_helper.rb",
|
42
|
+
"spec/zemax_spec.rb"
|
43
|
+
]
|
44
|
+
|
45
|
+
if s.respond_to? :specification_version then
|
46
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
47
|
+
s.specification_version = 3
|
48
|
+
|
49
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
50
|
+
s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
|
51
|
+
s.add_development_dependency(%q<cucumber>, [">= 0"])
|
52
|
+
else
|
53
|
+
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
54
|
+
s.add_dependency(%q<cucumber>, [">= 0"])
|
55
|
+
end
|
56
|
+
else
|
57
|
+
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
58
|
+
s.add_dependency(%q<cucumber>, [">= 0"])
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
metadata
CHANGED
@@ -1,12 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zemax
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
segments:
|
6
|
-
- 0
|
7
|
-
- 0
|
8
|
-
- 0
|
9
|
-
version: 0.0.0
|
4
|
+
version: 0.0.1
|
10
5
|
platform: ruby
|
11
6
|
authors:
|
12
7
|
- arvicco
|
@@ -14,58 +9,53 @@ autorequire:
|
|
14
9
|
bindir: bin
|
15
10
|
cert_chain: []
|
16
11
|
|
17
|
-
date: 2010-
|
12
|
+
date: 2010-01-07 00:00:00 +03:00
|
18
13
|
default_executable:
|
19
14
|
dependencies:
|
20
15
|
- !ruby/object:Gem::Dependency
|
21
16
|
name: rspec
|
22
|
-
|
23
|
-
|
17
|
+
type: :development
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
20
|
requirements:
|
25
21
|
- - ">="
|
26
22
|
- !ruby/object:Gem::Version
|
27
|
-
segments:
|
28
|
-
- 1
|
29
|
-
- 2
|
30
|
-
- 9
|
31
23
|
version: 1.2.9
|
32
|
-
|
33
|
-
version_requirements: *id001
|
24
|
+
version:
|
34
25
|
- !ruby/object:Gem::Dependency
|
35
26
|
name: cucumber
|
36
|
-
|
37
|
-
|
27
|
+
type: :development
|
28
|
+
version_requirement:
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
30
|
requirements:
|
39
31
|
- - ">="
|
40
32
|
- !ruby/object:Gem::Version
|
41
|
-
segments:
|
42
|
-
- 0
|
43
33
|
version: "0"
|
44
|
-
|
45
|
-
|
46
|
-
description: Describe package zemax
|
34
|
+
version:
|
35
|
+
description: Zemax - does nothing, for testing purposes only
|
47
36
|
email: arvitallian@gmail.com
|
48
|
-
executables:
|
49
|
-
|
37
|
+
executables: []
|
38
|
+
|
50
39
|
extensions: []
|
51
40
|
|
52
41
|
extra_rdoc_files:
|
53
42
|
- LICENSE
|
54
43
|
- README.rdoc
|
55
44
|
files:
|
56
|
-
-
|
45
|
+
- .document
|
46
|
+
- .gitignore
|
47
|
+
- LICENSE
|
48
|
+
- README.rdoc
|
49
|
+
- Rakefile
|
50
|
+
- VERSION
|
51
|
+
- features/step_definitions/zemax_steps.rb
|
52
|
+
- features/support/env.rb
|
53
|
+
- features/zemax.feature
|
57
54
|
- lib/zemax.rb
|
58
55
|
- spec/spec.opts
|
59
56
|
- spec/spec_helper.rb
|
60
57
|
- spec/zemax_spec.rb
|
61
|
-
-
|
62
|
-
- tasks/doc.rake
|
63
|
-
- tasks/gem.rake
|
64
|
-
- Rakefile
|
65
|
-
- README.rdoc
|
66
|
-
- LICENSE
|
67
|
-
- VERSION
|
68
|
-
- HISTORY
|
58
|
+
- zemax.gemspec
|
69
59
|
has_rdoc: true
|
70
60
|
homepage: http://github.com/arvicco/zemax
|
71
61
|
licenses: []
|
@@ -79,24 +69,21 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
79
69
|
requirements:
|
80
70
|
- - ">="
|
81
71
|
- !ruby/object:Gem::Version
|
82
|
-
segments:
|
83
|
-
- 0
|
84
72
|
version: "0"
|
73
|
+
version:
|
85
74
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
86
75
|
requirements:
|
87
76
|
- - ">="
|
88
77
|
- !ruby/object:Gem::Version
|
89
|
-
segments:
|
90
|
-
- 0
|
91
78
|
version: "0"
|
79
|
+
version:
|
92
80
|
requirements: []
|
93
81
|
|
94
82
|
rubyforge_project:
|
95
|
-
rubygems_version: 1.3.
|
83
|
+
rubygems_version: 1.3.5
|
96
84
|
signing_key:
|
97
85
|
specification_version: 3
|
98
|
-
summary:
|
86
|
+
summary: Zemax test gem
|
99
87
|
test_files:
|
100
|
-
- spec/spec.opts
|
101
88
|
- spec/spec_helper.rb
|
102
89
|
- spec/zemax_spec.rb
|
data/HISTORY
DELETED
data/bin/zemax
DELETED
data/tasks/common.rake
DELETED
@@ -1,14 +0,0 @@
|
|
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
DELETED
data/tasks/gem.rake
DELETED
@@ -1,33 +0,0 @@
|
|
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
|