translate2code 0.1.0 → 0.2.0

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: 71c81bef2120e155929aa3c14de67482b82f1d54
4
- data.tar.gz: 0b4ab14de64781232ae81e6be2b6f294a40e974a
3
+ metadata.gz: 2eb8cbdab249b77b7046f1f38f7c7c7a40726b49
4
+ data.tar.gz: 5f75714145240c6b6fa98fcb446e25e852ff588a
5
5
  SHA512:
6
- metadata.gz: 70d107b50f92d2684b6fe6cff1bd168745df0fbe6d7a2aea39bf086956efba6653d222bbfe36f65da7e5e6ca308dbc3a7e9b05f9e7b7297e882838f6f17f5312
7
- data.tar.gz: e1fef2b2ca8e875288eae7dde743ec0a710938a27c422338dae9618b5e433ef98259a96862dee7d4c54553664ac25819fb2383e04095bdb296dd9716211a9c73
6
+ metadata.gz: ee53b1d2f2ea352493441a3e66ef90367f1e04d84a5cfdd247203385316779a63e84ee27b1123967d7fa7225a7793bb1adee878ddcf5a831b778996976a6641e
7
+ data.tar.gz: 2f7bbdff4bec1ab57cbe50011b788180a59da866619c37e52607d7ae4f72bfe364da0803cc6d464bbccbdbf7ed072422a497a07af558c002a8b5631ebb76ae19
@@ -1,6 +1,26 @@
1
- require "translate2code/version"
1
+ require_relative 'translateUtil'
2
+ require_relative 'translate2language'
3
+ def startTranslateJson(jsonFilePath)
4
+ jsonClass = JSONClass.new
5
+ jsonClass.parseJson(jsonFilePath)
6
+ pp jsonClass
7
+ end
8
+
9
+ def startTranlate2Code(jsonFilePath,codeGenerateModel)
10
+ codeGenerateModel.startTranslate(jsonFilePath)
11
+ end
12
+
13
+ # 代码生成器
14
+ codeType = ARGV[-1]
15
+ codeGenerateModel = ModelDefinition.getModelDefinition(codeType)
16
+ if(codeGenerateModel)
17
+ jsonFilePaths = ARGV[0,ARGV.size-1]
18
+ # 遍历所有的json配置文件路径
19
+ jsonFilePaths.each do |jsonFilePath|
20
+ # 代码转换
21
+ startTranlate2Code(jsonFilePath,codeGenerateModel)
22
+ end
23
+ else
24
+ puts("没有选择对应平台的语言,请重试")
2
25
 
3
- module Translate2code
4
- class Error < StandardError; end
5
- # Your code goes here...
6
26
  end
@@ -1,3 +1,3 @@
1
1
  module Translate2code
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -15,16 +15,6 @@ Gem::Specification.new do |spec|
15
15
 
16
16
  # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
17
17
  # to allow pushing to a single host or delete this section to allow pushing to any host.
18
- # if spec.respond_to?(:metadata)
19
- # spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
20
-
21
- # spec.metadata["homepage_uri"] = spec.homepage
22
- # spec.metadata["source_code_uri"] = "TODO: Put your gem's public repo URL here."
23
- # spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
24
- # else
25
- # raise "RubyGems 2.0 or newer is required to protect against " \
26
- # "public gem pushes."
27
- # end
28
18
 
29
19
  # Specify which files should be added to the gem when it is released.
30
20
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: translate2code
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - starsi