smartling_rails 0.0.7 → 0.0.9

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: 82d5e6986da0ca41df9f8f6f00d4671ce40ec92c
4
- data.tar.gz: 03ef9ed1735b02db0e04f9e95f402994d648c182
3
+ metadata.gz: a04f810e2a6ec749972f35b89f18f9f2d933c5a1
4
+ data.tar.gz: ee2de26466dc506be0adea8ac8e419d3985c1b08
5
5
  SHA512:
6
- metadata.gz: 0ba98e6de6a08e885b3e66891fad9cb6a19d21e9709fd10baf4b91919ee1fc378b8ed1d72053e4c671a7ba9cd5424dcfa9bb100a9c7fdc6eaa6779eb80fbdd74
7
- data.tar.gz: 1841825530d247fce72af930d0cbc43349335555728ca8a6bcaa681e98d98fe5315bdf44cb72c20c1a867321db8cf3aa175daccaee7bd47e44819592a703f730
6
+ metadata.gz: d59cacf6199a64d1ec43ac3ce6a33bf0459126c4e828ec0d0d4d3a7f7f503c5b9bb3d1e05f0d9da5580a5064402bc36940e3e11c78ccb388c1de2680666f7a3b
7
+ data.tar.gz: 1473e021757bd5181696d4b5f685a2236ab9bcb921373295616f42edf31ffe5dd7bdf15789ff8c00ffd3c1f56f4e22e7a749abdfa45cddff5dbf37acad0f1af1
@@ -0,0 +1,10 @@
1
+ Version History
2
+ ====
3
+ * All Version bumps are required to update this file as well!!
4
+ ----
5
+
6
+ * 0.0.9 adding code climate reporting, cleaning up some of the ruby code
7
+ * 0.0.8 cleaning up project for official open source release
8
+ * 0.0.7 fixing a reference problem pulling EN-US only down for all locales, now it pulls the locale you expect
9
+ * 0.0.6 locales configured from yaml
10
+ * 0.0.5 call cleanup and documentation
@@ -0,0 +1,18 @@
1
+ # Contributing to smartling rails project
2
+ We'd love for you to contribute to our source code and to make it even better than it is currently!
3
+
4
+ # Reporting an issue
5
+ If you find a bug in the source code or a mistake in the documentation, you can help us by submitting an issue to our GitHub Repository. Even better you can submit a Pull Request with a fix.
6
+
7
+ # Requesting a feature
8
+ You can request a new feature by submitting an issue to our GitHub Repository. If you would like to implement a new feature then consider what kind of change it is:
9
+
10
+ * **Major Changes** that you wish to contribute to the project should be discussed first so that we can better coordinate our efforts, prevent duplication of work, and help you to craft the change so that it is successfully accepted into the
11
+ project. The best way to start this discussion is by opening an issue on our github repository.
12
+ * **Small Changes** can be crafted and submitted to the gitHub repository as a Pull Request.
13
+
14
+ # How code gets into the project
15
+
16
+ 1. Always open a pull request
17
+ 2. All pull request must come with coresponding tests
18
+ 3. All pull requests will be peer reviewed (dont just accept them please :) )
data/README.md CHANGED
@@ -1,8 +1,12 @@
1
1
  # Welcome to Smartling Rails
2
+ [![Code Climate](https://codeclimate.com/repos/55f99e9b6956802d07000250/badges/b041b1a94ba97adc7619/gpa.svg)](https://codeclimate.com/repos/55f99e9b6956802d07000250/feed)
3
+ [![Test Coverage](https://codeclimate.com/repos/55f99e9b6956802d07000250/badges/b041b1a94ba97adc7619/coverage.svg)](https://codeclimate.com/repos/55f99e9b6956802d07000250/coverage)
2
4
  SmartlingRails is a gem making localization with the [smartling](www.smartling.com) localization service easier in a ruby on rails environment. The Gem simplifies the uploading, status checking, and retrieval of information from smartling into a rails app that uses I18N localization.
3
5
 
4
6
  Communication with smartling is done via their APIs and leverages the [smartling gem](https://rubygems.org/gems/smartling).
5
7
 
8
+ If you are interested in helping out / contributing to this project please read [CONTRIBUTING guide](https://github.com/careerbuilder/smartling-rails/blob/master/CONTRIBUTING.md)
9
+
6
10
  ## overview
7
11
  The uploading of [rials I18N](http://guides.rubyonrails.org/i18n.html) files to smartling, monitoring their translation status, and pulling them all back down into your `config/localization` folder is a very manual process.
8
12
 
@@ -1,10 +1,19 @@
1
+ # Copyright 2015 CareerBuilder, LLC
2
+ # Licensed under the Apache License, Version 2.0 (the "License");
3
+ # you may not use this file except in compliance with the License.
4
+ # You may obtain a copy of the License at
5
+ #
6
+ # http://www.apache.org/licenses/LICENSE-2.0
7
+ # Unless required by applicable law or agreed to in writing, software
8
+ # distributed under the License is distributed on an "AS IS" BASIS,
9
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ # See the License for the specific language governing permissions and limitations under the License.
1
11
  require 'smartling'
2
12
  require 'yaml'
3
13
 
4
14
  Dir[File.dirname(__FILE__) + '/smartling_rails/**/*.rb'].each { |file| require file }
5
15
 
6
16
  module SmartlingRails
7
-
8
17
  def self.configure
9
18
  yield configuration
10
19
  end
@@ -28,5 +37,4 @@ module SmartlingRails
28
37
  def self.processor
29
38
  @processor ||= SmartlingRails::SmartlingProcessor.new
30
39
  end
31
-
32
40
  end
@@ -1,28 +1,37 @@
1
+ # Copyright 2015 CareerBuilder, LLC
2
+ # Licensed under the Apache License, Version 2.0 (the "License");
3
+ # you may not use this file except in compliance with the License.
4
+ # You may obtain a copy of the License at
5
+ #
6
+ # http://www.apache.org/licenses/LICENSE-2.0
7
+ # Unless required by applicable law or agreed to in writing, software
8
+ # distributed under the License is distributed on an "AS IS" BASIS,
9
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ # See the License for the specific language governing permissions and limitations under the License.
1
11
  module SmartlingRails
2
12
  class Config
3
13
  attr_accessor :api_key, :project_id, :rails_app_name, :locales
4
14
 
5
15
  def initialize
6
16
  load_locales_from_yaml
7
- import_env_variables()
17
+ import_env_variables
8
18
  end
9
19
 
10
20
  def load_locales_from_yaml
11
21
  config_file_path = 'config/smartling_rails.yml'
12
22
  throw "Localization File Missing '/config/smartling_rails.yml'" unless File.exist?(config_file_path)
13
- @locales = YAML::load_file(config_file_path)['locales']
23
+ @locales = YAML.load_file(config_file_path)['locales']
14
24
  end
15
25
 
16
26
  def import_env_variables
17
- File.open(".env", "rb") do |f|
27
+ File.open('.env', 'rb') do |f|
18
28
  f.each_line do |line|
19
- key_val = line.split("=")
29
+ key_val = line.split('=')
20
30
  @api_key = key_val[1].strip if key_val[0] == 'SMARTLING_API_KEY'
21
31
  @project_id = key_val[1].strip if key_val[0] == 'SMARTLING_PROJECT_ID'
22
32
  @rails_app_name = key_val[1].strip if key_val[0] == 'SMARTLING_APP_NAME'
23
33
  end
24
- end unless !File.exist?('.env')
34
+ end if File.exist?('.env')
25
35
  end
26
-
27
36
  end
28
37
  end
@@ -1,20 +1,29 @@
1
+ # Copyright 2015 CareerBuilder, LLC
2
+ # Licensed under the Apache License, Version 2.0 (the "License");
3
+ # you may not use this file except in compliance with the License.
4
+ # You may obtain a copy of the License at
5
+ #
6
+ # http://www.apache.org/licenses/LICENSE-2.0
7
+ # Unless required by applicable law or agreed to in writing, software
8
+ # distributed under the License is distributed on an "AS IS" BASIS,
9
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ # See the License for the specific language governing permissions and limitations under the License.
1
11
  module SmartlingRails
2
- #def self.command_aliases
12
+ # def self.command_aliases
3
13
  # {
4
14
  # "s" => "status",
5
15
  # "g" => "get",
6
16
  # "p" => "put",
7
17
  # "h" => "--help"
8
18
  # }
9
- #end
19
+ # end
10
20
 
11
21
  def self.print_msg(msg, padding = false)
12
22
  puts if padding
13
23
  puts msg
14
24
  end
15
25
 
16
- #def self.command_is(value)
26
+ # def self.command_is(value)
17
27
  # return @command == command_aliases[value]
18
- #end
19
-
28
+ # end
20
29
  end
@@ -1,3 +1,13 @@
1
+ # Copyright 2015 CareerBuilder, LLC
2
+ # Licensed under the Apache License, Version 2.0 (the "License");
3
+ # you may not use this file except in compliance with the License.
4
+ # You may obtain a copy of the License at
5
+ #
6
+ # http://www.apache.org/licenses/LICENSE-2.0
7
+ # Unless required by applicable law or agreed to in writing, software
8
+ # distributed under the License is distributed on an "AS IS" BASIS,
9
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ # See the License for the specific language governing permissions and limitations under the License.
1
11
  module SmartlingRails
2
12
  class SmartlingFile
3
13
  attr_accessor :file_contents, :locale_codes
@@ -9,12 +19,12 @@ module SmartlingRails
9
19
 
10
20
  def fix_file_issues
11
21
  puts 'Fixing Issues:'
12
- fix_tab_size()
13
- fix_space_after_tree_node()
14
- fix_first_line_dashes()
15
- fix_locale_root_node()
22
+ fix_tab_size
23
+ fix_space_after_tree_node
24
+ fix_first_line_dashes
25
+ fix_locale_root_node
16
26
  end
17
-
27
+
18
28
  def fix_tab_size
19
29
  puts ' fixing tabs from 4 spaces to 2 space'
20
30
  @file_contents.gsub!(' ', ' ')
@@ -22,23 +32,21 @@ module SmartlingRails
22
32
 
23
33
  def fix_space_after_tree_node
24
34
  puts ' removing space after branch root : \\n to :\\n'
25
- @file_contents.gsub!(/: \n/,":\n")
35
+ @file_contents.gsub!(/: \n/, ":\n")
26
36
  end
27
37
 
28
38
  def fix_first_line_dashes
39
+ return unless @file_contents.lines.first.match(/---\n/)
29
40
  puts ' remove "---" from first line'
30
- if @file_contents.lines.first.match(/---\n/)
31
- @file_contents.sub!(/---\n/,"")
32
- puts ' yes, replaced dashes'
33
- end
34
-
41
+ @file_contents.sub!(/---\n/, '')
42
+ puts ' yes, replaced dashes'
35
43
  end
36
-
44
+
37
45
  def fix_locale_root_node
38
46
  puts " converting smartling locale code to CB locale code from #{locale_codes['smartling']} to #{locale_codes['custom']}"
39
- @file_contents.sub!(locale_codes['smartling'],locale_codes['custom'])
47
+ @file_contents.sub!(locale_codes['smartling'], locale_codes['custom'])
40
48
  end
41
-
49
+
42
50
  def print_contents
43
51
  puts @file_contents
44
52
  end
@@ -1,18 +1,25 @@
1
+ # Copyright 2015 CareerBuilder, LLC
2
+ # Licensed under the Apache License, Version 2.0 (the "License");
3
+ # you may not use this file except in compliance with the License.
4
+ # You may obtain a copy of the License at
5
+ # http://www.apache.org/licenses/LICENSE-2.0
6
+ # Unless required by applicable law or agreed to in writing, software
7
+ # distributed under the License is distributed on an "AS IS" BASIS,
8
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9
+ # See the License for the specific language governing permissions and limitations under the License.
1
10
  module SmartlingRails
2
11
  class SmartlingProcessor
3
12
  attr_accessor :my_smartling
4
13
 
5
- def initialize()
6
- @my_smartling = Smartling::File.new(:apiKey => SmartlingRails.api_key, :projectId => SmartlingRails.project_id)
7
- #@my_smartling = Smartling::File.sandbox(:apiKey => @@api_key, :projectId => @@project_id)
8
- #puts @my_smartling.list
9
- SmartlingRails.print_msg "You are working with this remote file on smartling: #{upload_file_path}", true
10
- SmartlingRails.print_msg "Smartling Ruby client #{Smartling::VERSION}"
14
+ def initialize
15
+ @my_smartling = Smartling::File.new(apiKey: SmartlingRails.api_key, projectId: SmartlingRails.project_id)
16
+ SmartlingRails.print_msg "You are working with this remote file on smartling: #{ upload_file_path }", true
17
+ SmartlingRails.print_msg "Smartling Ruby client #{ Smartling::VERSION }"
11
18
  end
12
19
 
13
- def get_file_statuses
14
- SmartlingRails.print_msg("Checking status for #{supported_locales}", true)
15
- SmartlingRails.locales.each do |language, codes|
20
+ def file_statuses
21
+ SmartlingRails.print_msg("Checking status for #{ supported_locales }", true)
22
+ SmartlingRails.locales.each do | _language, codes |
16
23
  check_file_status(codes['smartling'])
17
24
  end
18
25
  end
@@ -22,54 +29,52 @@ module SmartlingRails
22
29
  end
23
30
 
24
31
  def check_file_status(language_code)
25
- begin
26
- res = @my_smartling.status(upload_file_path, :locale => language_code)
27
- total_strings = res['stringCount'].to_i
28
- completed_strings = res['completedStringCount'].to_i
29
- file_complete = completed_strings >= total_strings
30
- SmartlingRails.print_msg "#{language_code} completed: #{file_complete} (#{completed_strings} / #{total_strings})"
31
- rescue Exception => e
32
- puts e.message
33
- end
32
+ res = @my_smartling.status(upload_file_path, locale: language_code)
33
+ total_strings = res['stringCount'].to_i
34
+ completed_strings = res['completedStringCount'].to_i
35
+ file_complete = completed_strings >= total_strings
36
+ SmartlingRails.print_msg "#{language_code} completed: #{ file_complete } (#{ completed_strings } / #{ total_strings })"
37
+ rescue Exception => e
38
+ puts e.message
34
39
  end
35
40
 
36
41
  def put_files
37
- SmartlingRails.print_msg "Uploading the english file to smartling to process:", true
38
- upload_english_file()
42
+ SmartlingRails.print_msg('Uploading the english file to smartling to process:', true)
43
+ upload_english_file
39
44
  end
40
45
 
41
- def upload_english_file()
42
- SmartlingRails.print_msg "uploading #{local_file_path_for_locale('en-us')} to #{upload_file_path}"
46
+ def upload_english_file
47
+ SmartlingRails.print_msg("uploading #{ local_file_path_for_locale('en-us') } to #{ upload_file_path }")
43
48
  @my_smartling.upload(local_file_path_for_locale('en-us'), upload_file_path, 'YAML')
44
49
  end
45
50
 
46
51
  def local_file_path_for_locale(cb_locale)
47
- "config/locales/#{cb_locale}.yml"
52
+ "config/locales/#{ cb_locale }.yml"
48
53
  end
49
54
 
50
- def upload_file_path()
51
- "/files/[#{SmartlingRails.configuration.rails_app_name || 'app'}]-[#{get_current_branch}]-en-us.yml"
55
+ def upload_file_path
56
+ "/files/[#{ SmartlingRails.configuration.rails_app_name || 'app' }]-[#{ current_branch }]-en-us.yml"
52
57
  end
53
58
 
54
- def get_files
55
- SmartlingRails.print_msg("Checking status for #{supported_locales}", true)
56
- SmartlingRails.locales.each do |language, locale_codes|
59
+ def files
60
+ SmartlingRails.print_msg("Checking status for #{ supported_locales }", true)
61
+ SmartlingRails.locales.each do | _language, locale_codes |
57
62
  fetch_fix_and_save_file_for_locale(locale_codes)
58
63
  end
59
64
  end
60
65
 
61
66
  def fetch_fix_and_save_file_for_locale(locale_codes)
62
67
  smartling_file = get_file_for_locale(locale_codes)
63
- smartling_file.fix_file_issues()
68
+ smartling_file.fix_file_issues
64
69
  save_to_local_file(smartling_file.file_contents, locale_codes['custom'])
65
70
  end
66
71
 
67
72
  def get_file_for_locale(locale_codes)
68
73
  smartling_file = SmartlingFile.new('', locale_codes)
69
- SmartlingRails.print_msg "Downloading #{locale_codes['smartling']}:", true
74
+ SmartlingRails.print_msg "Downloading #{ locale_codes['smartling'] }:", true
70
75
  begin
71
- smartling_file.file_contents = @my_smartling.download(upload_file_path, :locale => locale_codes['smartling'])
72
- SmartlingRails.print_msg "file loaded..."
76
+ smartling_file.file_contents = @my_smartling.download(upload_file_path, locale: locale_codes['smartling'])
77
+ SmartlingRails.print_msg 'file loaded...'
73
78
  rescue Exception => e
74
79
  SmartlingRails.print_msg e
75
80
  end
@@ -80,9 +85,9 @@ module SmartlingRails
80
85
  File.open(local_file_path_for_locale(cb_locale), 'w') { |file| file.write(file_contents) }
81
86
  end
82
87
 
83
- def get_current_branch
84
- b = `git branch`.split("\n").delete_if { |i| i[0] != "*" }
85
- b.first.gsub("* ","")
88
+ def current_branch
89
+ b = `git branch`.split("\n").delete_if { |i| i[0] != '*' }
90
+ b.first.gsub('* ', '')
86
91
  end
87
92
  end
88
93
  end
@@ -1,3 +1,13 @@
1
+ # Copyright 2015 CareerBuilder, LLC
2
+ # Licensed under the Apache License, Version 2.0 (the "License");
3
+ # you may not use this file except in compliance with the License.
4
+ # You may obtain a copy of the License at
5
+ #
6
+ # http://www.apache.org/licenses/LICENSE-2.0
7
+ # Unless required by applicable law or agreed to in writing, software
8
+ # distributed under the License is distributed on an "AS IS" BASIS,
9
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ # See the License for the specific language governing permissions and limitations under the License.
1
11
  module SmartlingRails
2
- VERSION = '0.0.7'
12
+ VERSION = '0.0.9'
3
13
  end
@@ -1,20 +1,30 @@
1
+ # Copyright 2015 CareerBuilder, LLC
2
+ # Licensed under the Apache License, Version 2.0 (the "License");
3
+ # you may not use this file except in compliance with the License.
4
+ # You may obtain a copy of the License at
5
+ #
6
+ # http://www.apache.org/licenses/LICENSE-2.0
7
+ # Unless required by applicable law or agreed to in writing, software
8
+ # distributed under the License is distributed on an "AS IS" BASIS,
9
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ # See the License for the specific language governing permissions and limitations under the License.
1
11
  require 'smartling_rails'
2
- namespace :smartling do
3
- desc "check statuses"
12
+ namespace :smartling do
13
+ desc 'check statuses'
4
14
  task :status do
5
- puts "Attempting to get translation statuses:"
6
- SmartlingRails.processor.get_file_statuses
15
+ puts 'Attempting to get translation statuses:'
16
+ SmartlingRails.processor.file_statuses
7
17
  end
8
18
 
9
- desc "upload the en-us.yml file to smartling"
19
+ desc 'upload the en-us.yml file to smartling'
10
20
  task :put do
11
- puts "Attempting to upload file to smartling:"
21
+ puts 'Attempting to upload file to smartling:'
12
22
  SmartlingRails.processor.put_files
13
23
  end
14
24
 
15
- desc "download the translations from smartling, fix and save"
25
+ desc 'download the translations from smartling, fix and save'
16
26
  task :get do
17
- puts "Attempting to download files from smartling:"
18
- SmartlingRails.processor.get_files
27
+ puts 'Attempting to download files from smartling:'
28
+ SmartlingRails.processor.files
19
29
  end
20
30
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smartling_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - The CareerBuilder.com Consumer Development teams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-25 00:00:00.000000000 Z
11
+ date: 2015-09-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: smartling
@@ -106,23 +106,53 @@ dependencies:
106
106
  - - ~>
107
107
  - !ruby/object:Gem::Version
108
108
  version: '0.9'
109
+ - !ruby/object:Gem::Dependency
110
+ name: codeclimate-test-reporter
111
+ requirement: !ruby/object:Gem::Requirement
112
+ requirements:
113
+ - - '>='
114
+ - !ruby/object:Gem::Version
115
+ version: '0'
116
+ type: :development
117
+ prerelease: false
118
+ version_requirements: !ruby/object:Gem::Requirement
119
+ requirements:
120
+ - - '>='
121
+ - !ruby/object:Gem::Version
122
+ version: '0'
123
+ - !ruby/object:Gem::Dependency
124
+ name: webmock
125
+ requirement: !ruby/object:Gem::Requirement
126
+ requirements:
127
+ - - ~>
128
+ - !ruby/object:Gem::Version
129
+ version: '1.21'
130
+ type: :development
131
+ prerelease: false
132
+ version_requirements: !ruby/object:Gem::Requirement
133
+ requirements:
134
+ - - ~>
135
+ - !ruby/object:Gem::Version
136
+ version: '1.21'
109
137
  description: Smartling support library for automation of rails platforms using I18N
110
- email: ConsumerDevelopment@careerbuilder.com
138
+ email: opensource@careerbuilder.com
111
139
  executables: []
112
140
  extensions: []
113
141
  extra_rdoc_files: []
114
142
  files:
115
- - lib/localizer.rb
143
+ - CHANGELOG.md
144
+ - CONTRIBUTING.md
145
+ - README.md
146
+ - lib/smartling_rails.rb
116
147
  - lib/smartling_rails/config.rb
117
148
  - lib/smartling_rails/helpers/localizer_helpers.rb
118
149
  - lib/smartling_rails/models/smartling_file.rb
119
150
  - lib/smartling_rails/smartling_processor.rb
120
151
  - lib/smartling_rails/version.rb
121
- - lib/smartling_rails.rb
122
- - README.md
123
152
  - lib/tasks/smartling_rails.rake
124
- homepage: http://m.careerbuilder.com
125
- licenses: []
153
+ homepage: https://github.com/careerbuilder/smartling-rails
154
+ licenses:
155
+ - Apache-2.0
126
156
  metadata: {}
127
157
  post_install_message:
128
158
  rdoc_options: []
@@ -140,7 +170,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
140
170
  version: '0'
141
171
  requirements: []
142
172
  rubyforge_project:
143
- rubygems_version: 2.0.14
173
+ rubygems_version: 2.4.8
144
174
  signing_key:
145
175
  specification_version: 4
146
176
  summary: Smartling support library for automation of rails platforms using I18N
@@ -1,42 +0,0 @@
1
- =begin
2
- require 'rubygems'
3
- require 'smartling'
4
- load 'localizer_files/cb_smartling.rb'
5
- load 'localizer_files/localizer_helpers.rb'
6
-
7
- ARGV << "--help" if ARGV.empty?
8
-
9
- @command = ARGV.shift
10
- @command = @command_aliases[@command] || @command
11
- @my_smartling = nil
12
-
13
- def make_my_smartling
14
- @my_smartling ||= CBSmartling.new()
15
- end
16
-
17
- def print_help
18
- print_msg("Localizer Help:", true)
19
- @command_aliases.each do |command_alias, command|
20
- print_msg(" #{command} or #{command_alias} does.....")
21
- end
22
- end
23
-
24
- def execute_command
25
- if command_is('h')
26
- print_help()
27
- elsif command_is('s')
28
- @my_smartling.get_status()
29
- elsif command_is('g')
30
- @my_smartling.get_files()
31
- elsif command_is('p')
32
- @my_smartling.put_files()
33
- end
34
- end
35
-
36
- def startup()
37
- make_my_smartling()
38
- execute_command()
39
- end
40
-
41
- startup()
42
- =end