rake-delphi 0.0.14 → 0.0.15

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8a0f101f1a96214f373fe0c1335c90a17dc85b36
4
- data.tar.gz: a5c30492fdcb33075969c33715a2f5d7b224367c
3
+ metadata.gz: 3d30171a3216bfeb302fbb9726822d42d188d7e9
4
+ data.tar.gz: bf6a445410c43ad323741d99daba4834d48b90e6
5
5
  SHA512:
6
- metadata.gz: d78bdd4f177aa5219e924c727accf424bb97a1b4b7094fa465559627b824b7b71b2f77aa47b667c23c78af29c809a4528db51367a73ef660077549e83fd55f05
7
- data.tar.gz: 6180f8c5863c3458416e27c3e38b1a1a4d91d0560be720d2098d91bb366ee0f08afa32e918265a1c3fe10d69e9c38ad9649d9f64c7b73b4e1faed11a6f3b1d45
6
+ metadata.gz: 864baa63a25a053a866354018d541db9016a9f13aa71e629ad43fbb4683067ac8384240eee9d698deed1969eda9b1ce33bf6dfd5b7890c1ad10d10dad04c251a
7
+ data.tar.gz: 523a8f8b63b99ef7f7c4d2ae36d03f293ed4cbb7c242d1bfc6404bb6b24e0dde769c3022c065627bde421f2338b991e69535efb14d962ae2e02754ae7f484257
data/Gemfile.lock ADDED
@@ -0,0 +1,26 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ rake-delphi (0.0.14)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ apktools (0.6.0)
10
+ rubyzip
11
+ inifile (3.0.0)
12
+ rake (10.0.4)
13
+ rubyzip (0.9.9)
14
+ xml-simple (1.1.4)
15
+
16
+ PLATFORMS
17
+ ruby
18
+
19
+ DEPENDENCIES
20
+ apktools
21
+ bundler (~> 1.3)
22
+ inifile
23
+ rake (~> 10.0.4)
24
+ rake-delphi!
25
+ rubyzip (~> 0.9.9)
26
+ xml-simple
@@ -91,7 +91,7 @@ module Rake
91
91
  # enable appropriate PAClientTask
92
92
  application[name + ':post'].needed = post_needed
93
93
  # for XE and above set default aliases and namespaces
94
- if ENV['DELPHI_VERSION'].to_i >= 14
94
+ if EnvVariables.delphi_version >= DELPHI_VERSION_XE
95
95
  @aliases = 'Generics.Collections=System.Generics.Collections;Generics.Defaults=System.Generics.Defaults;WinTypes=Winapi.Windows;WinProcs=Winapi.Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE'
96
96
  @namespaces = 'Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;System;Xml;Data;Datasnap;Web;Soap'
97
97
  Logger.trace(Logger::TRACE, 'Aliases and namespaces are set for Delphi XE')
@@ -129,6 +129,7 @@ module Rake
129
129
 
130
130
  def implicitpaths
131
131
  ipaths = ['.', '..']
132
+ Logger.trace(Logger::TRACE, 'Using library paths? %s' + (@uselibrarypath ? 'YES' : 'NO'))
132
133
  ipaths |= delphilibs if @uselibrarypath
133
134
  _paths(ipaths)
134
135
  end
@@ -26,7 +26,7 @@ module Rake
26
26
 
27
27
  def readLibraryPaths(platform, platform_stripped)
28
28
  Logger.trace(Logger::TRACE, 'Reading library paths for platform: ' + platform.to_s)
29
- warn "WARNING! You are using Delphi XE or above but no platform defined!" if ENV['DELPHI_VERSION'].to_i >= 14 && ! platform
29
+ warn "WARNING! You are using Delphi XE or above but no platform defined!" if ENV['DELPHI_VERSION'].to_i >= DELPHI_VERSION_XE && ! platform
30
30
 
31
31
  platform = platform.to_s != '' ? '\\' + platform : ''
32
32
  # platform not used for old Delphis 'SearchPath'
@@ -5,7 +5,7 @@ module Rake
5
5
  module Delphi
6
6
  class EnvVariables < ::Hash
7
7
  def self.delphi_version
8
- ENV['DELPHI_VERSION']
8
+ ENV['DELPHI_VERSION'].to_i
9
9
  end
10
10
 
11
11
  def initialize(regpath, delphidir)
@@ -42,7 +42,7 @@ module Rake
42
42
 
43
43
  def init(module_name, rake_file, vars, level = 1)
44
44
  @level = level
45
- module_name = module_name.dup.pop.to_s
45
+ module_name = module_name.dup.shift.to_s
46
46
  self[:projectlabel] = eval("#{module_name}::PROJECT_NAME")
47
47
  projectfile = eval("#{module_name}::PROJECT_FILE")
48
48
  self[:projectfile] = File.dirname2(rake_file) + File.separator + projectfile
@@ -7,6 +7,11 @@ require 'rake/delphi/envvariables'
7
7
 
8
8
  module Rake
9
9
  module Delphi
10
+ DELPHI_VERSION_7 = 9
11
+ DELPHI_VERSION_2006 = 11
12
+ DELPHI_VERSION_2010 = 13
13
+ DELPHI_VERSION_XE = 14
14
+ DELPHI_VERSION_XE5 = 18
10
15
  class CustomDelphiTool < CustomExec
11
16
  DelphiRegRoot = 'SOFTWARE\\Borland\\Delphi'
12
17
  BDSRegRoot = 'SOFTWARE\\Borland\\BDS'
@@ -44,9 +49,9 @@ module Rake
44
49
  end
45
50
 
46
51
  def versionInfoClass
47
- return @@version.to_f < 11 ? BDSVersionInfo : \
48
- @@version.to_f < 13 ? RAD2007VersionInfo : \
49
- @@version.to_f < 14 ? RAD2010VersionInfo : XEVersionInfo
52
+ return @@version.to_f < DELPHI_VERSION_2006 ? BDSVersionInfo : \
53
+ @@version.to_f < DELPHI_VERSION_2010 ? RAD2007VersionInfo : \
54
+ @@version.to_f < DELPHI_VERSION_XE ? RAD2010VersionInfo : XEVersionInfo
50
55
  end
51
56
 
52
57
  def self.readUserOption(key, name, ver)
@@ -73,7 +78,7 @@ module Rake
73
78
  end
74
79
 
75
80
  def self.version4version(version)
76
- if version.to_f >= 9
81
+ if version.to_f >= DELPHI_VERSION_7
77
82
  version = format('%.1f', version.to_f - 6)
78
83
  end
79
84
  if !version["."]
@@ -83,12 +88,12 @@ module Rake
83
88
  end
84
89
 
85
90
  def self.rootForVersion(version)
86
- if version.to_f < 9
91
+ if version.to_f < DELPHI_VERSION_7
87
92
  regRoot = DelphiRegRoot
88
93
  else
89
- if version.to_f < 12
94
+ if version.to_f <= DELPHI_VERSION_2006
90
95
  regRoot = BDSRegRoot
91
- elsif version.to_f < 14
96
+ elsif version.to_f < DELPHI_VERSION_XE
92
97
  regRoot = EDSRegRoot
93
98
  else
94
99
  regRoot = EmbarcaderoRegRoot
@@ -124,7 +129,7 @@ module Rake
124
129
  end
125
130
 
126
131
  def self.find(failIfNotFound = false)
127
- v = EnvVariables.delphi_version
132
+ v = EnvVariables.delphi_version.to_s
128
133
  if ENV['DELPHI_DIR']
129
134
  Logger.trace(Logger::DEBUG, 'DELPHI_DIR is set: ' + ENV['DELPHI_DIR'])
130
135
  # append trailing path delimiter
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Rake
4
4
  module Delphi
5
- VERSION = '0.0.14'
5
+ VERSION = '0.0.15'
6
6
  end
7
7
  end
@@ -22,7 +22,7 @@ class TestVerInfo < Test::Unit::TestCase
22
22
 
23
23
  protected
24
24
  def delphi_version
25
- return Rake::Delphi::EnvVariables.delphi_version
25
+ return Rake::Delphi::EnvVariables.delphi_version.to_s
26
26
  end
27
27
 
28
28
  def prepare_ver_info_file?
@@ -39,7 +39,7 @@ protected
39
39
 
40
40
  public
41
41
  def setup
42
- @saved_delphi_version = Rake::Delphi::EnvVariables.delphi_version
42
+ @saved_delphi_version = Rake::Delphi::EnvVariables.delphi_version.to_s
43
43
  ENV['DELPHI_VERSION'] = delphi_version
44
44
 
45
45
  template_ext = DPROJ_VERSIONS[delphi_version]
@@ -32,7 +32,7 @@ namespace :test do
32
32
  _task = Rake::Task['test:compile']
33
33
  dpr = Rake.application.define_task(Rake::Delphi::Project, (_task.name + ':delphi').to_sym)
34
34
  dpr[:resources_additional] = 'resources' if opts[:useresources]
35
- if ENV['DELPHI_VERSION'].to_i >= 14
35
+ if Rake::Delphi::EnvVariables.delphi_version >= Rake::Delphi::DELPHI_VERSION_XE
36
36
  dpr[:platform] = 'Win32'
37
37
  end
38
38
  options = opts[:options] || {}
@@ -26,7 +26,7 @@ module TestAndroidModule
26
26
 
27
27
  desc 'Preparation'
28
28
  task :prepare, :useresources, :options do |t, opts|
29
- fail 'Cannot compile this project with Delphi below XE5' if ENV['DELPHI_VERSION'].to_i < 18
29
+ fail 'Cannot compile this project with Delphi below XE5' if Rake::Delphi::EnvVariables.delphi_version < Rake::Delphi::DELPHI_VERSION_XE5
30
30
  _task = Rake::Task['test_android:compile']
31
31
  dpr = Rake.application.define_task(Rake::Delphi::Project, (_task.name + ':delphi').to_sym)
32
32
  dpr[:resources_additional] = 'resources' if opts[:useresources]
@@ -5,6 +5,7 @@ require 'rake'
5
5
  require 'fileutils'
6
6
  require 'test/unit'
7
7
  require 'rake/delphi/dccaarmtool'
8
+ require 'rake/delphi/envvariables'
8
9
  require 'rake/helpers/unittest'
9
10
  require 'rake/helpers/raketask'
10
11
  require 'helpers/consts'
@@ -100,7 +101,7 @@ module DelphiAndroidTests
100
101
 
101
102
  public
102
103
  def setup
103
- fail 'Cannot compile this project with Delphi below XE5' if ENV['DELPHI_VERSION'].to_i < 18
104
+ fail 'Cannot compile this project with Delphi below XE5' if Rake::Delphi::EnvVariables.delphi_version < Rake::Delphi::DELPHI_VERSION_XE5
104
105
  Rake::Delphi::DccARMTool.reinit
105
106
  ENV['DELPHI_DIR'] = nil
106
107
  super
data/test/test-git.rb CHANGED
@@ -84,7 +84,7 @@ public
84
84
  def test_changelog_last
85
85
  Rake::Delphi::ChDir.new(@rake_task, @test_git_dir) do
86
86
  chlog = Rake::Delphi::GitChangelog.new(@rake_task, nil)
87
- assert_equal [], chlog.changelog, 'Changelog'
87
+ assert_equal ["line two added message", "file content added", "first commit"], chlog.changelog, 'Changelog'
88
88
  assert_equal [], chlog.processed, 'Processed'
89
89
  end
90
90
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rake-delphi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.14
4
+ version: 0.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexey Shumkin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-20 00:00:00.000000000 Z
11
+ date: 2014-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -88,6 +88,7 @@ extensions: []
88
88
  extra_rdoc_files: []
89
89
  files:
90
90
  - Gemfile
91
+ - Gemfile.lock
91
92
  - LICENSE.txt
92
93
  - Messages.txt
93
94
  - README.md