gupl 0.0.1 → 0.0.2

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
  SHA256:
3
- metadata.gz: c45aa6b40e206a3f180aa706a266c782f30fac9ab567b383078e6197b3963162
4
- data.tar.gz: 0bf1c389098b8a04619f6ce8ba0b7665b95d6973726c4b4cc5840e584fcbecc7
3
+ metadata.gz: c8237c2d99ff38fa9feabc27078538637530864290c72a2e27b6ddb2e048d704
4
+ data.tar.gz: b4a274932e9e8b71f02e959858e36ff2e4dea40d96682475e8bfb45bf82aefea
5
5
  SHA512:
6
- metadata.gz: b83931baeed1285c5030017ff3817faeace9d0c325e6cb769ef5a524fa25bcc8982fc294c5c1d68b53b76bc9f9c7cd4b212e2d9a0341dbcdd92a6834f3852825
7
- data.tar.gz: 214919b5713d57e626018a4b9739b0e4fb63c8bc6a78dc3e2157440380da0d5299df2524d8a8efca081c635cae425ab1aef68990786cb10e85ddb9281ed7693d
6
+ metadata.gz: e0e9ec7bb5ea027e2b5d0fc1e853aaf8a36c96619a9d4db585de03650a981920bcca034843d81b6549add076591667c0dd155ec07681d7d4977a839f67800c24
7
+ data.tar.gz: 606355e32a7537d23a5469d92977c440938c172af7fccc8142a655a0e60015099bb2b78f2d517fba69d28b3bad343f317bfed4e5554b7b3cabd2490dfcd5cdea
data/README.md CHANGED
@@ -14,7 +14,15 @@ If bundler is not being used to manage dependencies, install the gem by executin
14
14
 
15
15
  ## Usage
16
16
 
17
- TODO: Write usage instructions here
17
+ ```
18
+ ruby gupl.rb gupl-source
19
+ ```
20
+
21
+ For example,
22
+
23
+ ```
24
+ ruby gupl.rb example/sendrecv.gupl
25
+ ```
18
26
 
19
27
  ## Development
20
28
 
@@ -30,10 +38,4 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/e-tree
30
38
 
31
39
  Everyone interacting in the Gupl project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/e-trees/gupl/blob/master/CODE_OF_CONDUCT.md).
32
40
 
33
- ## Getting started
34
-
35
- ```
36
- ruby gupl.rb example/sendrecv.gupl
37
- ```
38
-
39
41
  ## Syntax
data/exe/gupl CHANGED
@@ -3,6 +3,13 @@
3
3
  require 'gupl'
4
4
 
5
5
  # main
6
+
7
+ if ARGV.size == 0
8
+ puts("Usage: #{__FILE__} gupl-sources")
9
+ puts(" examples of gupl-source are available in https://github.com/e-trees/gupl/tree/main/example")
10
+ end
11
+
12
+
6
13
  ARGV.each{|argv|
7
14
  entity = nil
8
15
  version = nil
@@ -10,13 +17,21 @@ ARGV.each{|argv|
10
17
  str = f.read()
11
18
  version, entity = Gupl.main(str)
12
19
  }
13
- exit(0) if entity == nil
14
- exit(0) if version == nil
20
+ if entity == nil
21
+ puts "ERROR: entity is undefined in #{argv}"
22
+ next
23
+ end
24
+ if version == nil
25
+ puts "ERROR: version is undefined in #{argv}"
26
+ next
27
+ end
15
28
 
16
29
  dirname = File.dirname(argv)
17
- open("#{dirname}/#{entity.name}.vhd", "w"){|dst|
30
+ destination = "#{dirname}/#{entity.name}.vhd"
31
+ open("#{destination}", "w"){|dst|
18
32
  buf = StringIO.new("", "w")
19
33
  entity.generate(buf)
20
34
  dst.puts(buf.string())
21
35
  }
36
+ puts("generate #{destination}")
22
37
  }
data/lib/gupl/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Gupl
4
- VERSION = "0.0.1"
4
+ VERSION = "0.0.2"
5
5
  end
data/lib/gupl.rb CHANGED
@@ -786,8 +786,6 @@ module Gupl
786
786
  end
787
787
  end
788
788
 
789
- puts "ERROR: entity is undefined" if entity == nil
790
- puts "ERROR: version is undefined" if version == nil
791
789
  return version, entity
792
790
  end
793
791
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gupl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takefumi MIYOSHI