runch 0.0.2 → 0.0.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: 9442b5886d11aec6f51dd01cb13d352bdf1f57d2
4
- data.tar.gz: a6212bb16c16effa9468b97faad1089b937ee941
3
+ metadata.gz: 0d516bf652a7de016436d10ecf2d4e670003bc5c
4
+ data.tar.gz: 8529ec0a17efd639189e8ce52dd69a39184e6f80
5
5
  SHA512:
6
- metadata.gz: 9af738a8a6db99a6e2e9bb95f0f61f948fb33d5ecec1596338a7500677540971f403fba1c44bc13b4e0bc415517c95ff42be6ff2d2abcd7ab3680431959bcdab
7
- data.tar.gz: b0abbccf2d26edfc0c8f0804a297fa5eeb755b67219bf9eae465e39618f1cc6730a81ca347d75c07b4655b7479745b51fad8af2fca0f6b6913c813d87d713d24
6
+ metadata.gz: 69b3f5c486e93d1f702c359164039e8cd9a23bf807b9393be37517d2da21c80f11487448b8b0cc8d014ba98511770a2c5800994afef52c4bc870a95d2f8a2b45
7
+ data.tar.gz: 3708e703a5d698f97bdf5587ee0acb75ff1a2ef8bff1625089c554f5baf06bcbfc8fa5bb3cedbb1c5ad0d62d1020c4701e84bb28b2e70d77d0cea407696b3fa0
data/NEWS.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # NEWS
2
2
 
3
+ ## 0.0.3: 2013-07-31
4
+
5
+ ### Changes
6
+
7
+ * Improvements
8
+ * Supported C++.
9
+ * extentions: .cc, .cp, .cpp, .cxx
10
+
3
11
  ## 0.0.2: 2013-07-22
4
12
 
5
13
  Java supported release!
@@ -1,4 +1,5 @@
1
1
  require "runch/language/c"
2
+ require "runch/language/cc"
2
3
  require "runch/language/java"
3
4
 
4
5
  module Runch
@@ -6,7 +7,11 @@ module Runch
6
7
  module_function
7
8
  def create(main_source, *files)
8
9
  extname = File.extname(main_source)[1..-1]
9
- const_get(extname.capitalize).new(main_source, files)
10
+ if /\A(cc|cp|cpp|cxx)\z/ =~ extname
11
+ CC.new(main_source, files)
12
+ else
13
+ const_get(extname.capitalize).new(main_source, files)
14
+ end
10
15
  end
11
16
  end
12
17
  end
@@ -0,0 +1,18 @@
1
+ require "runch/language/base"
2
+
3
+ module Runch
4
+ module Language
5
+ class CC
6
+ include Base
7
+
8
+ def compile(tmpdir)
9
+ basename = File.basename(@main_source, ".*")
10
+ filename = File.basename(@main_source)
11
+ main_source = File.join(tmpdir, filename)
12
+ executable = File.join(tmpdir, basename)
13
+ system("g++", "-o", executable, main_source)
14
+ executable
15
+ end
16
+ end
17
+ end
18
+ end
@@ -1,3 +1,3 @@
1
1
  module Runch
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -0,0 +1,8 @@
1
+ #include <iostream>
2
+
3
+ int
4
+ main()
5
+ {
6
+ std::cout << "Hello World!\n";
7
+ return 0;
8
+ }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masafumi Yokoyama
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-22 00:00:00.000000000 Z
11
+ date: 2013-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -58,11 +58,13 @@ files:
58
58
  - lib/runch/language.rb
59
59
  - lib/runch/language/base.rb
60
60
  - lib/runch/language/c.rb
61
+ - lib/runch/language/cc.rb
61
62
  - lib/runch/language/java.rb
62
63
  - lib/runch/version.rb
63
64
  - runch.gemspec
64
65
  - sample/Hello.java
65
66
  - sample/hello.c
67
+ - sample/hello.cc
66
68
  homepage: https://github.com/myokoym/runch
67
69
  licenses:
68
70
  - MIT