mesa_script 0.1.1 → 0.1.2

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mesa_script.rb +5 -2
  3. metadata +11 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 55896301a082301610d80908f4c961af244e4a73
4
- data.tar.gz: efd7bc215b3b3d2a856159695952c2e24654ea6f
3
+ metadata.gz: 4825bb6f1d2a1b6dcb3b4dbc7daf67235b177b98
4
+ data.tar.gz: 338994544043aa2f860e76fe96fb38c7bbb5a702
5
5
  SHA512:
6
- metadata.gz: f279cea9e1082ef5b5066854e2377214e725a5cff6f53ede2802bbc3d4762875d4c5339d99054fde80c7b2690bda64e8cb596ad10aa12a64084ec5f29720c79c
7
- data.tar.gz: 49da8ec75ef95dc5878f6cd8c9b42d6dfce1585a2761c32934e05c9a1224d92e35cadfb99b23330c9f56287f4d3b2d801d2c0d8a8425aee0e66c75757be2e2a7
6
+ metadata.gz: a72fdf26c9703a5e7e158d5d525cafe7a34107afefa607789953b3ed40ed4a065c232f85f7c4ee778541b850dbb94bc6aa68695148c2e90f475b72592122f575
7
+ data.tar.gz: 80a2945a09ae31dc6bf664bd7d5f57d9ed1bb94de755b9ddc920a6823371ac5a3984042ef71973910617a6c0d87db7e563cc0689bde8a015deb9555f6401fba7
data/lib/mesa_script.rb CHANGED
@@ -240,8 +240,8 @@ class Inlist
240
240
  puts "WARNING: 'type' values are currently unsupported (regarding #{name}) because your humble author has no idea what they look like in an inlist. You should tell him what to do at wmwolf@physics.ucsb.edu. Your input, #{value}, has been passed through to your inlist verbatim."
241
241
  return value.to_s
242
242
  else
243
- raise "Error parsing value for namelist item #{name}: #{value}. Expected "
244
- "type was #{type}."
243
+ raise "Error parsing value for namelist item #{name}: #{value}." +
244
+ " Expected type was #{type}."
245
245
  end
246
246
  end
247
247
 
@@ -424,6 +424,9 @@ class Inlist
424
424
  is_arr = true
425
425
  num_indices = name.count('!') + 1
426
426
  name.sub!(/\(.*\)/, '')
427
+ elsif pair[0] =~ /dimension\((.*)\)/
428
+ is_arr = true
429
+ num_indices = $1.count(",") + 1
427
430
  end
428
431
  type_default = {:bool => false, :string => '', :float => 0.0,
429
432
  :int => 0}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mesa_script
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Wolf
@@ -10,8 +10,13 @@ bindir: bin
10
10
  cert_chain: []
11
11
  date: 2014-11-21 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description: MesaScript - a DSL for making dynamic inlists for the MESA stellar evolution
14
- code.
13
+ description: " MesaScript is a domain specific language (DSL) that allows the user
14
+ to write\n inlists for MESA that include variables, loops, conditionals, etc.
15
+ For more\n detailed instructions, see the readme on the github page at \n\n https://github.com/wmwolf/MesaScript\n\n
16
+ \ This software requires a relatively modern installation of MESA (version >\n
17
+ \ 5596). It has been tested on Ruby versions > 1.9, but there is no guarantee\n
18
+ \ it will work on older (or newer!) versions. Any bugs or requests should be\n
19
+ \ sent to the author, Bill Wolf, at wmwolf@physics.ucsb.edu.\n"
15
20
  email: wmwolf@physics.ucsb.edu
16
21
  executables:
17
22
  - inlist2mesascript
@@ -41,14 +46,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
41
46
  version: '0'
42
47
  requirements: []
43
48
  rubyforge_project:
44
- rubygems_version: 2.2.2
49
+ rubygems_version: 2.4.2
45
50
  signing_key:
46
51
  specification_version: 4
47
- summary: MesaScript is a domain specific language (DSL) that allows the user to write
48
- inlists for MESA that include variables, loops, conditionals, etc. For more detailed
49
- instructions, see the readme on the github page at https://github.com/wmwolf/MesaScript This
50
- software requires a relatively modern installation of MESA (version > 5596). It
51
- has been tested on Ruby versions > 1.9, but there is no guarantee it will work on
52
- older (or newer!) versions. Any bugs or requests should be sent to the author, Bill
53
- Wolf, at wmwolf@physics.ucsb.edu.
52
+ summary: MesaScript - a DSL for making dynamic inlists for the MESA stellar evolution
53
+ code.
54
54
  test_files: []