xcmultilingual 0.2.2 → 0.2.3

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: 27d4c23a1a1afede386c92189266cec48ca9ca25
4
- data.tar.gz: 1b36ece95f29d585bc1e153d4958227ed4265aa5
3
+ metadata.gz: d902db51daac9d760ac81be7fabcd3c062b52a01
4
+ data.tar.gz: 96a0db28af23dbd9ff7d9f6bda5735e84501f965
5
5
  SHA512:
6
- metadata.gz: ad5985dd406244fc6e2475ff738885237725e539c98baf6ff2601b894653dfc7789879085f75c949961957c4abb8aaabf41e3a5ee7f1e0152a167c48b55a0819
7
- data.tar.gz: 68d4278b1bf885f5bbffeb1c95ec893b0b086562098f1f60f349701c7d1030a0e2ea32c61721ce747a89309f1a31707e874ad7c10ba3e5d327ec4680f777a6cb
6
+ metadata.gz: 9af0edd430e9a40bdbe670056d34ef412794b02d458ba2bae2410838b9e28bbd1a138945b137cd2f7d6be2e17ab9d9807d55711f0bd03197b576a10ac14bcbca
7
+ data.tar.gz: a9b15493efa486210c7ab99bbc06406d28057b76a714c201d9450d2b6c06fea35bba027e473c36a5ad4d28f709bd47f165c299c859900cf74d85a3b6e1be2ce3
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- xcmultilingual (0.2.2)
4
+ xcmultilingual (0.2.3)
5
5
  thor
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -75,7 +75,7 @@ struct Multilingual {
75
75
  case MONKEY = "MONKEY"
76
76
 
77
77
  func string() -> String {
78
- return NSLocalizedString(rawValue, tableName: "Animal", bundle: NSBundle.mainBundle(), value: "\(rawValue)", comment: "")
78
+ return NSLocalizedString(rawValue, tableName: Animal.name, bundle: NSBundle.mainBundle(), value: rawValue, comment: "")
79
79
  }
80
80
 
81
81
  static let name = "Animal"
@@ -83,6 +83,7 @@ struct Multilingual {
83
83
  static var keys: [String] {
84
84
  return ["CAT", "DOG", "BEAR", "DEER", "SQUIRREL", "ELEPHANT", "GIRAFFE", "TIGER", "LION", "RABBIT", "RHINOCEROS", "GORILLA", "MONKEY"]
85
85
  }
86
+
86
87
  static var localizations: [String] {
87
88
  return Animal.keys.map { Animal(rawValue: $0)!.string() }
88
89
  }
@@ -92,7 +93,7 @@ struct Multilingual {
92
93
  case SAMPLE = "SAMPLE"
93
94
 
94
95
  func string() -> String {
95
- return NSLocalizedString(rawValue, tableName: "Sample", bundle: Multilingual.bundle("sample.bundle"), value: "\(rawValue)", comment: "")
96
+ return NSLocalizedString(rawValue, tableName: SampleSample.name, bundle: Multilingual.bundle("sample.bundle"), value: rawValue, comment: "")
96
97
  }
97
98
 
98
99
  static let name = "Sample"
@@ -100,11 +101,13 @@ struct Multilingual {
100
101
  static var keys: [String] {
101
102
  return ["SAMPLE"]
102
103
  }
104
+
103
105
  static var localizations: [String] {
104
106
  return SampleSample.keys.map { SampleSample(rawValue: $0)!.string() }
105
107
  }
106
108
  }
107
109
 
110
+
108
111
  private static func bundle(relativePath: String) -> NSBundle {
109
112
  var components = (__FILE__ as String).pathComponents
110
113
  components.removeLast()
data/bin/rspec ADDED
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'rspec' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('rspec-core', 'rspec')
File without changes
@@ -1,3 +1,3 @@
1
1
  module Xcmultilingual
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
@@ -15,7 +15,8 @@ Gem::Specification.new do |spec|
15
15
  spec.license = "MIT"
16
16
 
17
17
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.bindir = "exe"
19
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
20
  spec.require_paths = ["lib"]
20
21
 
21
22
  spec.add_dependency 'thor'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xcmultilingual
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Naoki Morita
8
8
  autorequire:
9
- bindir: bin
9
+ bindir: exe
10
10
  cert_chain: []
11
- date: 2015-07-14 00:00:00.000000000 Z
11
+ date: 2015-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -71,8 +71,6 @@ description: 'Command line tool for Swift localizations: It parses localization
71
71
  email:
72
72
  - namorit@gmail.com
73
73
  executables:
74
- - console
75
- - setup
76
74
  - xcmultilingual
77
75
  extensions: []
78
76
  extra_rdoc_files: []
@@ -141,8 +139,9 @@ files:
141
139
  - README.md
142
140
  - Rakefile
143
141
  - bin/console
142
+ - bin/rspec
144
143
  - bin/setup
145
- - bin/xcmultilingual
144
+ - exe/xcmultilingual
146
145
  - lib/xcmultilingual.rb
147
146
  - lib/xcmultilingual/bundle.rb
148
147
  - lib/xcmultilingual/cli.rb