coderunner 0.13.31 → 0.13.32
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 +4 -4
- data/VERSION +1 -1
- data/coderunner.gemspec +2 -2
- data/lib/coderunner/fortran_namelist.rb +14 -0
- data/lib/coderunner/instance_methods.rb +1 -1
- data/lib/coderunner/run.rb +3 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1be47bdc136d03d6d96fc4144a49e887fb259ea7
|
4
|
+
data.tar.gz: e2656cecd7e642e104d5f43e106619b35ea90d71
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50a9728e726cfa5f58b11f688abdf6bfb4bbc62c6ad482ce8bd63169965349a1915235c2d050ba9757b4a923ca6c0ed5c39ccf391e90316145b7df0e978e8c04
|
7
|
+
data.tar.gz: 504b22920667f66766322e3a3cc8777ed91a28ac5ffca082e5c8d98ddbdb53eec0ee42eb7156749f7c0563be20bde87b628f3fbe8ac98d6277715e877e26d8d0
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.13.
|
1
|
+
0.13.32
|
data/coderunner.gemspec
CHANGED
@@ -2,12 +2,12 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: coderunner 0.13.
|
5
|
+
# stub: coderunner 0.13.32 ruby lib
|
6
6
|
# stub: ext/extconf.rb
|
7
7
|
|
8
8
|
Gem::Specification.new do |s|
|
9
9
|
s.name = "coderunner"
|
10
|
-
s.version = "0.13.
|
10
|
+
s.version = "0.13.32"
|
11
11
|
|
12
12
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
13
13
|
s.require_paths = ["lib"]
|
@@ -755,9 +755,23 @@ def self.update_folder_defaults #updates the defaults file in the current folder
|
|
755
755
|
|
756
756
|
end
|
757
757
|
|
758
|
+
# Makes a new defaults file from the given input file, copies it to the user defaults location and then sets the folder up to use it
|
759
|
+
def self.use_new_defaults_file(name=ARGV[-2], input_file=ARGV[-1])
|
760
|
+
raise "Please specify a name and an input file" if name == "use_new_defaults_file"
|
761
|
+
defaults_filename = "#{name}_defaults.rb"
|
762
|
+
central_defaults_filename = rcp.user_defaults_location + "/" + defaults_filename
|
763
|
+
raise "Defaults file: #{central_defaults_filename} already exists" if FileTest.exist? central_defaults_filename
|
764
|
+
make_new_defaults_file(name, input_file)
|
765
|
+
FileUtils.mv(defaults_filename, central_defaults_filename)
|
766
|
+
#modlet = rcp.modlet? ? rcp.modlet : nil
|
767
|
+
#executable = rcp.executable? ? rcp.executable : CodeRunner::DEFAULT_RUNNER_OPTIONS
|
768
|
+
CodeRunner.fetch_runner(D: name) #(C: rcp.code, m: rcp.modlet, D: name, CodeRunner)
|
769
|
+
end
|
770
|
+
|
758
771
|
# The name is self-explanatory: this method takes an input file and generates a CodeRunner defaults file. The first argument is the name of the new defaults file.
|
759
772
|
|
760
773
|
def self.make_new_defaults_file(name=ARGV[-2], input_file=ARGV[-1])
|
774
|
+
raise "Please specify a name and an input file" if name == "make_new_defaults_file"
|
761
775
|
string = defaults_file_text_from_input_file(input_file)
|
762
776
|
defaults_filename = "#{name}_defaults.rb"
|
763
777
|
raise "This defaults name already exists" if FileTest.exist? defaults_filename
|
@@ -267,7 +267,7 @@ class CodeRunner
|
|
267
267
|
end
|
268
268
|
end
|
269
269
|
|
270
|
-
raise "No default information exists for this folder. If you are running CodeRunner from the commmand line please run again with the -C <code>
|
270
|
+
raise "No default information exists for this folder. If you are running CodeRunner from the commmand line please run again with the -C <code> (and -m <modlet>, if required) flag (you only need to specify these flags once in each folder). Else, please specify :code (and :modlet if required) as options in CodeRunner.new(folder, options)" unless @code
|
271
271
|
end
|
272
272
|
|
273
273
|
# Here we redefine the inspect function p to raise an error if anything is written to standard out
|
data/lib/coderunner/run.rb
CHANGED
@@ -991,7 +991,9 @@ def executable_name
|
|
991
991
|
end
|
992
992
|
|
993
993
|
def executable_location
|
994
|
-
|
994
|
+
@executable||=@runner.executable
|
995
|
+
raise "No executable" unless @executable
|
996
|
+
File.dirname(@executable)
|
995
997
|
end
|
996
998
|
|
997
999
|
def update_in_queue
|