delphi-compiler 0.0.1

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.
Binary file
@@ -0,0 +1,45 @@
1
+ # encoding: UTF-8
2
+
3
+ require 'test/unit'
4
+ require 'delphi'
5
+
6
+ # Test case for Delphi::Project class
7
+ class ProjectTest < Test::Unit::TestCase
8
+ def setup
9
+ filename = File.join(File.dirname(__FILE__), 'test.dproj')
10
+ @project = Delphi::Project.new(filename)
11
+ end
12
+
13
+ def test_version
14
+ assert_equal(16.0, @project.project_version)
15
+ end
16
+
17
+ def test_configs
18
+ expected = %w(Debug Release)
19
+ configs = @project.configs
20
+ assert_equal(expected.size, configs.size)
21
+ expected.each { |c| assert(configs.include?(c.to_s), "#{c} not found in configs #{configs}") }
22
+ end
23
+
24
+ def test_default_config
25
+ assert_equal('Debug', @project.config)
26
+ end
27
+
28
+ def test_default_platform
29
+ assert_equal('Win32', @project.platform)
30
+ end
31
+
32
+ def test_platforms
33
+ expected = %w(Win32)
34
+ platforms = @project.platforms
35
+ assert_equal(expected.size, platforms.size)
36
+ expected.each { |p| assert(platforms.include?(p.to_s), "#{p} not found in platforms #{platforms}") }
37
+ end
38
+
39
+ def test_output
40
+ dir = File.dirname(@project.dproj)
41
+ exe = File.basename(@project.dproj, '.dproj') + '.exe'
42
+ expected = File.join(dir, @project.platform, @project.config, exe)
43
+ assert_equal(expected, @project.output)
44
+ end
45
+ end
@@ -0,0 +1,3 @@
1
+ # encoding: UTF-8
2
+
3
+ VERSION = '0.0.1'
metadata ADDED
@@ -0,0 +1,64 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: delphi-compiler
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Scott Sedgwick
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-12-04 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: A framework to compile Delphi applications from Rake
14
+ email: scott.sedgwick@gmail.com
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - delphi-compiler.gemspec
20
+ - lib/delphi.rb
21
+ - lib/delphi/compiler.rb
22
+ - lib/delphi/dsl.rb
23
+ - lib/delphi/environment.rb
24
+ - lib/delphi/groupproj.rb
25
+ - lib/delphi/project.rb
26
+ - lib/delphi/resource.rb
27
+ - lib/delphi/versions.rb
28
+ - rakefile.rb
29
+ - test/MyClass.pas
30
+ - test/Test/TestMyClass.pas
31
+ - test/Test/testTests.dpr
32
+ - test/Test/testTests.dproj
33
+ - test/Test/testTests.res
34
+ - test/TestGroup.groupproj
35
+ - test/test.dpr
36
+ - test/test.dproj
37
+ - test/test.res
38
+ - test/test_project.rb
39
+ - version.rb
40
+ homepage: https://github.com/ScottSedgwick/delphi-compiler
41
+ licenses:
42
+ - MIT
43
+ metadata: {}
44
+ post_install_message:
45
+ rdoc_options: []
46
+ require_paths:
47
+ - lib
48
+ required_ruby_version: !ruby/object:Gem::Requirement
49
+ requirements:
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: '0'
53
+ required_rubygems_version: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ version: '0'
58
+ requirements: []
59
+ rubyforge_project:
60
+ rubygems_version: 2.3.0
61
+ signing_key:
62
+ specification_version: 4
63
+ summary: Delphi Compiler
64
+ test_files: []