rucola 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,6 +5,14 @@ class RubiGen::Commands::Create
5
5
  # so change to the destination_root and create the symlink.
6
6
  Dir.chdir(destination_root) { File.symlink relative_source, relative_destination }
7
7
  end
8
+
9
+ require 'iconv'
10
+ def template_with_big_endian_utf16_encoding(relative_source, relative_destination, template_options = {})
11
+ template(relative_source, relative_destination, template_options = {})
12
+
13
+ data = File.read(destination_path(relative_destination))
14
+ File.open(destination_path(relative_destination), 'w') { |f| f << Iconv.new('utf-16', 'utf-8').iconv(data) }
15
+ end
8
16
  end
9
17
 
10
18
  class RucolaGenerator < RubiGen::Base
@@ -48,8 +56,9 @@ class RucolaGenerator < RubiGen::Base
48
56
  m.template "misc/rb_main.rb.erb", "misc/rb_main.rb"
49
57
 
50
58
  # TODO - allow alternate default languages
51
- m.template "misc/English.lproj/InfoPlist.strings.erb", "misc/English.lproj/InfoPlist.strings"
52
59
  m.file_copy_each %w[classes.nib info.nib keyedobjects.nib], "misc/English.lproj/MainMenu.nib"
60
+ #m.template "misc/English.lproj/InfoPlist.strings.erb", "misc/English.lproj/InfoPlist.strings"
61
+ m.template_with_big_endian_utf16_encoding "misc/English.lproj/InfoPlist.strings.erb", "misc/English.lproj/InfoPlist.strings"
53
62
 
54
63
  # xocde project
55
64
  m.directory "#{@project}.xcodeproj"
@@ -2,7 +2,7 @@ module Rucola #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 5
5
- TINY = 0
5
+ TINY = 1
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
@@ -64,10 +64,11 @@ class TestRucolaGenerator < Test::Unit::TestCase
64
64
 
65
65
  assert_generated_file "misc/main.m"
66
66
  assert_generated_file "misc/rb_main.rb"
67
- assert_generated_file "misc/English.lproj/InfoPlist.strings"
68
67
  assert_generated_file "misc/English.lproj/MainMenu.nib/classes.nib"
69
68
  assert_generated_file "misc/English.lproj/MainMenu.nib/info.nib"
70
69
  assert_generated_file "misc/English.lproj/MainMenu.nib/keyedobjects.nib"
70
+ assert_generated_file "misc/English.lproj/InfoPlist.strings"
71
+ assert `file #{File.expand_path('../tmp/myproject/misc/English.lproj/InfoPlist.strings', __FILE__)}`.include?('Big-endian UTF-16')
71
72
 
72
73
  assert_directory_exists "myproject.xcodeproj"
73
74
  assert_generated_file "myproject.xcodeproj/project.pbxproj"
@@ -33,7 +33,7 @@
33
33
  <h1>rucola</h1>
34
34
  <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/rucola"; return false'>
35
35
  <p>Get Version</p>
36
- <a href="http://rubyforge.org/projects/rucola" class="numbers">0.5.0</a>
36
+ <a href="http://rubyforge.org/projects/rucola" class="numbers">0.5.1</a>
37
37
  </div>
38
38
  <h1>&#x2192; &#8216;rucola&#8217;</h1>
39
39
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rucola
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eloy Duran
@@ -12,7 +12,7 @@ autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
14
 
15
- date: 2008-07-11 00:00:00 +02:00
15
+ date: 2008-09-01 00:00:00 +02:00
16
16
  default_executable:
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency