terrestrial-cli 0.6.1.debug → 0.6.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 33b4a8914ad9b9274894f60f7e49908aa2098707
4
- data.tar.gz: 8a0c5b41b0f425bd502b1c4b157362381eef2ad0
3
+ metadata.gz: 4f02546d21647512c846dc00c5bef7517f032193
4
+ data.tar.gz: 09ef62adc956cad318d07aa365fa61c7f2441508
5
5
  SHA512:
6
- metadata.gz: f5859c78be839d1c040fb290afb7932ba8fe330dfb8303c5df9049016a542e10dcf75d809d9cc812cc07d3d42ae1586e6e69513cd36e9ae5481941ef0c9d7790
7
- data.tar.gz: c04ebd295a7243a8ea61330ffaa27d4d2167ee6a0e3bea354045a20ca011de17e902113ac5ffc7b81e459bb49e1e2f636c71ac3580d67e7e054c00c262501464
6
+ metadata.gz: 08e4cc56f181d6de9c2991647c42480055c82c2a721e296762ca10462b561bdc5508268606be2175550d983084346fbad96d128946c7c69fa7afa83432b11e86
7
+ data.tar.gz: 1b60b92d14d21cab1b01259ccd721b4ace5c330f68e2a6a64cada40c1cfbcf7c9c8a9044e7511f7acbd9687b9be655b44c7a92b8f60e0f99d77ea34f01da6fc9
data/bin/terrestrial CHANGED
@@ -3,8 +3,6 @@
3
3
  require 'terrestrial'
4
4
  require 'optparse'
5
5
 
6
- puts "DEBUG: This is a debug version of Terrestrial."
7
-
8
6
  command = ARGV[0]
9
7
  options = {}
10
8
 
@@ -7,8 +7,6 @@ module Terrestrial
7
7
 
8
8
  if files.any? {|f| f.end_with?(".xcodeproj") || f.end_with?(".xcworkspace")}
9
9
  "ios"
10
- elsif files.any? {|f| f.end_with?(".csproj") || f.end_with?(".unity") || f.end_with?(".unityproj")}
11
- "unity"
12
10
  else
13
11
  "android"
14
12
  end
@@ -37,14 +37,8 @@ module Terrestrial
37
37
  end
38
38
 
39
39
  def insert_attribute
40
- puts "DEBUG: Finding node #{@storyboard_id} in file #{@path}"
41
40
  node = find_node
42
41
 
43
- if node.nil?
44
- puts "DEBUG: Was not able to find node!"
45
- abort "Node was not found."
46
- end
47
-
48
42
  # TODO, There was a case when "node" was nil in this point, after
49
43
  # trying to find it by type + ID.
50
44
  #
@@ -50,7 +50,7 @@ module Terrestrial
50
50
  puts "For more information, see http://docs.terrestrial.io or jump on Slack at https://terrestrial-slack.herokuapp.com/ if you have any questions."
51
51
  else
52
52
  puts "Oh snap. There was an error initializing your project."
53
- puts @response.body.inspect
53
+ puts response.body.inspect
54
54
  abort
55
55
  end
56
56
  end
@@ -79,8 +79,6 @@ module Terrestrial
79
79
  Dir[Config[:directory] + "/**/*.strings"].map {|f| relative_path(f) }
80
80
  elsif @platform == "android"
81
81
  Dir[Config[:directory] + "/**/*/res/values/strings.xml"].map {|f| relative_path(f) }
82
- elsif @platform == "unity"
83
- [] # Not tracking files now
84
82
  else
85
83
  raise "Unknown platform #{@platform}"
86
84
  end
@@ -18,17 +18,11 @@ module Terrestrial
18
18
  process_ios
19
19
  when "android"
20
20
  process_android
21
- when "unity"
22
- process_unity
23
21
  else
24
22
  raise "Unknown platform"
25
23
  end
26
24
  end
27
25
 
28
- def process_unity
29
- process_android
30
- end
31
-
32
26
  def process_android
33
27
  translations
34
28
  .reject {|entry| entry["translation"].nil? || entry["translation"].empty? }
@@ -41,8 +41,6 @@ module Terrestrial
41
41
  ios_translation_file_path(language)
42
42
  elsif Config[:platform] == "android"
43
43
  android_translation_file_path(language)
44
- elsif Config[:platform] == "unity"
45
- Config[:directory] + "/Assets/Terrestrial/" + human_readable_language_name(language) + ".xml"
46
44
  end
47
45
  end
48
46
 
@@ -74,9 +72,6 @@ module Terrestrial
74
72
  elsif Config[:platform] == "android"
75
73
  f.write "<!-- Updated by Terrestrial #{Time.now.to_s} -->\n\n"
76
74
  f.write AndroidXmlFormatter.new(translations).format_foreign_translation
77
- elsif Config[:platform] == "unity"
78
- f.write "<!-- Updated by Terrestrial #{Time.now.to_s} -->\n\n"
79
- f.write UnityFormatter.new(translations).format_foreign_translation
80
75
  end
81
76
  end
82
77
  end
@@ -91,10 +86,6 @@ module Terrestrial
91
86
  end
92
87
  end
93
88
 
94
- def human_readable_language_name(language_code)
95
- LanguageName.new(language_code).human_readable_name
96
- end
97
-
98
89
  def fetch_translations
99
90
  @response = web_client.get_translations(Config[:project_id], Config[:app_id])
100
91
  end
@@ -9,8 +9,6 @@ module Terrestrial
9
9
  DotStringsParser.parse_file(Config[:directory] + "/#{file}")
10
10
  elsif Config[:platform] == "android"
11
11
  AndroidXmlParser.parse_file(Config[:directory] + "/#{file}")
12
- elsif Config[:platform] == "unity"
13
- UnityParser.parse_file(Config[:directory] + "/#{file}")
14
12
  end
15
13
  rescue Errno::ENOENT
16
14
  abort "Could not find #{file}. If the file is no longer in your project, remove it from your tracked files in terrestrial.yml."
@@ -1,5 +1,5 @@
1
1
  module Terrestrial
2
2
  module Cli
3
- VERSION = "0.6.1.debug"
3
+ VERSION = "0.6.1"
4
4
  end
5
5
  end
@@ -10,7 +10,6 @@ require "terrestrial/cli/version_checker"
10
10
  require "terrestrial/cli/version"
11
11
  require "terrestrial/cli/variable_normalizer"
12
12
  require "terrestrial/cli/terminal_ui"
13
- require "terrestrial/cli/language_name"
14
13
  require "terrestrial/cli/entry_collection_differ"
15
14
  require "terrestrial/cli/detects_project_type"
16
15
  require "terrestrial/cli/file_picker"
@@ -21,8 +20,6 @@ require "terrestrial/cli/android_xml_parser"
21
20
  require "terrestrial/cli/android_xml_formatter"
22
21
  require "terrestrial/cli/dot_strings_parser"
23
22
  require "terrestrial/cli/dot_strings_formatter"
24
- require "terrestrial/cli/unity_parser"
25
- require "terrestrial/cli/unity_formatter"
26
23
  require "terrestrial/cli/parser"
27
24
  require "terrestrial/cli/editor"
28
25
  require "terrestrial/cli/engine_mapper"
@@ -0,0 +1,9 @@
1
+ module Terrestrial
2
+ module Cli
3
+ class CreatesTerrestrialYml
4
+
5
+ def self.run(project_id, app_id, project_type)
6
+ end
7
+ end
8
+ end
9
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: terrestrial-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1.debug
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Niklas Begley
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-22 00:00:00.000000000 Z
11
+ date: 2016-02-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: terminal-table
@@ -139,7 +139,6 @@ files:
139
139
  - lib/terrestrial/cli/flight/table_workflow.rb
140
140
  - lib/terrestrial/cli/ignite.rb
141
141
  - lib/terrestrial/cli/init.rb
142
- - lib/terrestrial/cli/language_name.rb
143
142
  - lib/terrestrial/cli/mixpanel_client.rb
144
143
  - lib/terrestrial/cli/parser.rb
145
144
  - lib/terrestrial/cli/parser/android_xml.rb
@@ -155,12 +154,11 @@ files:
155
154
  - lib/terrestrial/cli/scan.rb
156
155
  - lib/terrestrial/cli/string_registry.rb
157
156
  - lib/terrestrial/cli/terminal_ui.rb
158
- - lib/terrestrial/cli/unity_formatter.rb
159
- - lib/terrestrial/cli/unity_parser.rb
160
157
  - lib/terrestrial/cli/variable_normalizer.rb
161
158
  - lib/terrestrial/cli/version.rb
162
159
  - lib/terrestrial/cli/version_checker.rb
163
160
  - lib/terrestrial/config.rb
161
+ - lib/terrestrial/creates_terrestrial_yml.rb
164
162
  - lib/terrestrial/web.rb
165
163
  - lib/terrestrial/web/response.rb
166
164
  - lib/terrestrial/yaml_helper.rb
@@ -180,9 +178,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
180
178
  version: '0'
181
179
  required_rubygems_version: !ruby/object:Gem::Requirement
182
180
  requirements:
183
- - - '>'
181
+ - - '>='
184
182
  - !ruby/object:Gem::Version
185
- version: 1.3.1
183
+ version: '0'
186
184
  requirements: []
187
185
  rubyforge_project:
188
186
  rubygems_version: 2.4.8
@@ -1,64 +0,0 @@
1
- module Terrestrial
2
- module Cli
3
- module LanguageName
4
-
5
- LANGUAGES = {
6
- "af" => "Afrikaans",
7
- "ar" => "Arabic",
8
- "eu" => "Basque",
9
- "be" => "Belarusian",
10
- "bg" => "Bulgarian",
11
- "ca" => "Catalan",
12
- "cs" => "Czech",
13
- "da" => "Danish",
14
- "nl" => "Dutch",
15
- "en" => "English",
16
- "et" => "Estonian",
17
- "fo" => "Faroese",
18
- "fi" => "Finnish",
19
- "fr" => "French",
20
- "de" => "German",
21
- "el" => "Greek",
22
- "he" => "Hebrew",
23
- "is" => "Icelandic",
24
- "id" => "Indonesian",
25
- "it" => "Italian",
26
- "ja" => "Japanese",
27
- "ko" => "Korean",
28
- "lv" => "Latvian",
29
- "lt" => "Lithuanian",
30
- "no" => "Norwegian",
31
- "pl" => "Polish",
32
- "pt" => "Portuguese",
33
- "ro" => "Romanian",
34
- "ru" => "Russian",
35
- "sr" => "SerboCroatian",
36
- "sk" => "Slovak",
37
- "sl" => "Slovenian",
38
- "es" => "Spanish",
39
- "sv" => "Swedish",
40
- "th" => "Thai",
41
- "tr" => "Turkish",
42
- "uk" => "Ukrainian",
43
- "vi" => "Vietnamese",
44
- "zh" => "ChineseSimplified",
45
- "zh-tw" => "ChineseTraditional",
46
- "hu" => "Hungarian"
47
- }
48
-
49
- def initialize(language_code)
50
- @code = language_code
51
- end
52
-
53
- def human_readable_name
54
- LANGUAGES.fetch(code) { abort "Unkown language '#{code}' encountered." }
55
- end
56
-
57
- private
58
-
59
- def code
60
- @code
61
- end
62
- end
63
- end
64
- end
@@ -1,20 +0,0 @@
1
- module Terrestrial
2
- module Cli
3
- class UnityFormatter
4
-
5
- def initialize(entries)
6
- @formatter = AndroidXmlFormatter.new(entries)
7
- end
8
-
9
- def format_foreign_translation
10
- formatter.format_foreign_translation
11
- end
12
-
13
- private
14
-
15
- def formatter
16
- @formatter
17
- end
18
- end
19
- end
20
- end
@@ -1,17 +0,0 @@
1
- module Terrestrial
2
- module Cli
3
- class UnityParser
4
-
5
- def self.parse_file(file)
6
- # Same file format as Android, so we delegate directly.
7
- result = AndroidXmlParser.parse_file(file)
8
-
9
- # Map over the results to change the types
10
- # to be unity instead of the Android default.
11
- result.map do |entry|
12
- entry["type"] = "unity"
13
- end
14
- end
15
- end
16
- end
17
- end