buildify 0.0.3 → 0.0.5

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.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- N2IxMjJkNjRiNTYyN2YwZDQ5NzkxNGVlN2E1OThlZWRlZjBjZWNmMA==
4
+ MzJiYTUxMTMyZDgyOWEyMjc0Y2IyMGQ1M2QyM2E1ZGFkNzUwNzJhZg==
5
5
  data.tar.gz: !binary |-
6
- ZWExZjQ1YTdhODg5ZmRmNGM0YzdhOWE1NWVjNGVlZjY5MzkwZmJmMw==
6
+ ZWJkYWQ3M2U1YjcyZTY5NTYwZjRlMzZmOGRiZDkzOTE5ZTU2MGQzNw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZmUyMDdmYWFkMGY0MmQ3Yjc3ZGVkZDlkOWMyZmE3YmIwN2UyOGNlMzczOWEz
10
- YWQzY2QwYjE0NjQzOWExNGUxYzllNTFiNDA3ZWExODc3NDMzNGM0YjExYWMw
11
- MWQ1MDAxYmI3MTNjMjM0NjQ3MTJiYjk1YzMwYTdhNmU4MDY5YTc=
9
+ M2QyNTEyYjc1OGYwN2VkMmQ2NTA2ODliOGIyMTAyMGIzMDMwMmI2NzRkYzU3
10
+ ZDlkOWUyNDZhMDQ1MTk5MzE0YTY4MWQyNTIxNzQ2N2FiYzA4MDJkZWExYTI5
11
+ YzNiNGQ4ZGJjNTJkOWFkMTg0OGZlMzEyMWZmOWJjZTcxOTc1YzY=
12
12
  data.tar.gz: !binary |-
13
- NmU4YTAzOGMyOWY3ZmJjMDEwNjQ0ZGFhOTcwYzFmNjUxNjVhODM1ZmZiNDg3
14
- ZjYwNWEzY2ZkZjVjMmE1ODZkNWM2YmNmMWFkNTc0NmRhNTk1ZWFkMzhkNmZm
15
- NDkyYmI4NmRlOWE2ZjVmOGU3YWQzZGQ1ZjY0YTlkMzdjNTkzMjg=
13
+ YmU4NGMwNjU0M2E3NGVmNmY4ZWQzM2UxYTIyZjU4NzNiZTY3ZjFlY2M1NDIy
14
+ MGZjZWQ3MzRhYzg4YWYxZTgwNGRiYjg5NGM5M2E2ZTRhMzI0ODg4ZjBmOGQ4
15
+ NWFlY2Y5N2VlZjI5NGI4YjIwNmI0ZDg4MTg2NzhiZTgyODRmOTg=
@@ -1,7 +1,9 @@
1
+ require 'rake'
1
2
  require 'albacore'
2
3
 
3
4
  module Buildify
4
5
  class AssemblyVersion
6
+ include Rake::DSL
5
7
 
6
8
  def initialize(opts = {})
7
9
  @options = opts
@@ -9,23 +11,31 @@ module Buildify
9
11
 
10
12
  def version_assemblies()
11
13
  @options[:paths].each do |path|
14
+ if path.include? '.vb'
15
+ File.open(path, 'w') do |f|
16
+ f.puts "Imports System.Reflection"
17
+ f.puts "Imports System.Runtime.InteropServices"
18
+ f.puts "<assembly: AssemblyCompany(\"" + @options[:company_name] + "\")>"
19
+ f.puts "<assembly: AssemblyProduct(\"" + @options[:product_name] + "\")>"
20
+ f.puts "<assembly: AssemblyCopyright(\"Copyright " + Time.now.year.to_s + " " + @options[:company_name] + "\")>"
21
+ f.puts "<assembly: AssemblyVersion(\"" + @options[:version] + "\")>"
22
+ f.puts "<assembly: AssemblyFileVersion(\"" + @options[:version] + "\")>"
23
+ end
24
+ end
12
25
 
13
- assemblyinfo :assemblies do |asm|
14
- asm.version = @options[:version]
15
- asm.file_version = @options[:version]
16
- if path.endswith('.vb')
17
- asm.language = "VB.Net"
26
+ if path.include? '.cs'
27
+ File.open(path, 'w') do |f|
28
+ f.puts "using System.Reflection;"
29
+ f.puts "using System.Runtime.InteropServices;"
30
+ f.puts "[assembly: AssemblyCompany(\"" + @options[:company_name] + "\")]"
31
+ f.puts "[assembly: AssemblyProduct(\"" + @options[:product_name] + "\")]"
32
+ f.puts "[assembly: AssemblyCopyright(\"Copyright " + Time.now.strftime("%Y") + " " + @options[:company_name] + "\")]"
33
+ f.puts "[assembly: AssemblyVersion(\"" + @options[:version] + "\")]"
34
+ f.puts "[assembly: AssemblyFileVersion(\"" + @options[:version] + "\")]"
18
35
  end
19
- asm.company_name = @options[:company_name]
20
- asm.product_name = @options[:product_name]
21
- asm.copyright = "Copyright " + @options[:build_time].year + " " + @options[:company_name]
22
- asm.output_file = path
23
36
  end
24
37
 
25
38
  end
26
-
27
-
28
-
29
39
  end
30
40
 
31
41
  end
@@ -1,3 +1,3 @@
1
1
  module Buildify
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: buildify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - j4m355