coderunner 0.16.15 → 0.16.16

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: 0d2b92a9760279ae362325ec7aa2bd7805040f73
4
- data.tar.gz: d4696663958023e1c1b67810d085647609785fea
3
+ metadata.gz: bcacf0cd0ab5c2b02e10fcba1b63b748fac10468
4
+ data.tar.gz: 5a8b25d8aac82aeda833ed4d5830bae72616769f
5
5
  SHA512:
6
- metadata.gz: 9cd5eab55adcf53541dc406a0a628b0335eaf1a98f5c5b8b6099e1d87c19297c1ab8fc357b1966eafd637bc8de336388ada0bda15ee95587603493b5750f1d8d
7
- data.tar.gz: 7f86c6a1731386b3f1d9364febf5f212aeb8a5efc460776773e68593fe8b700c9a910f6bdd22f3b2bab350718118eef2f55af9dbdd0f4b46a5e71bb0880c5537
6
+ metadata.gz: cb07dd4609a73ff95fb7c49be65bcbc97266eac74ac2113e5a26daf2cf005deaad388a05cde43c4c1f91fd81447e5b8b940e17c1a74ed0267c448f7bfed167a5
7
+ data.tar.gz: 08c9be1698ddc24436e42ba22b53918383333bdc922c9e52409c656888a1ec495b21ca12c02578511132d7574e1bf3069240569405a0d05c791a0c8f848770eb
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.16.15
1
+ 0.16.16
data/coderunner.gemspec CHANGED
@@ -2,17 +2,17 @@
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.16.15 ruby lib
5
+ # stub: coderunner 0.16.16 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.16.15"
10
+ s.version = "0.16.16"
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"]
14
14
  s.authors = ["Edmund Highcock"]
15
- s.date = "2015-07-18"
15
+ s.date = "2015-07-20"
16
16
  s.description = "CodeRunner is a framework for the automated running and analysis of simulations. It automatically generates any necessary input files, organises the output data and analyses it. Because it is a modular system, it can easily be customised to work with any system and any simulation code. One of its greatest strengths is that it is independent of any one simulation code; thus it can easily plot and compare the data from different codes."
17
17
  s.email = "edmundhighcock@sourceforge.net"
18
18
  s.executables = ["coderunner", "coderunnerrepo"]
@@ -58,8 +58,8 @@ class CodeRunner
58
58
  if folder =~ /\.git$/
59
59
  raise "Please do not add '.git' to the end of #{folder}. Two repositories will be created: a bare repo ending in .cr.git and a clone of this bare repo"
60
60
  end
61
- super(folder + '.cr.git', bare: true)
62
- repo = simple_clone(folder + '.cr.git', folder)
61
+ super(bflocal = folder + '.cr.git', bare: true, repository: bflocal)
62
+ repo = simple_clone(bflocal, folder)
63
63
  repo.init_metadata
64
64
  repo.init_readme
65
65
  repo.init_defaults_folder
@@ -70,7 +70,7 @@ class CodeRunner
70
70
  def clone(url, name)
71
71
  namehost, folder, _barefolder = split_url(url)
72
72
  try_system %[ssh #{namehost} "cd #{folder} && git push origin"]
73
- simple_clone(url, bflocal=name+'.cr.git', bare: true)
73
+ simple_clone(url, bflocal=name+'.cr.git', bare: true, repository: bflocal)
74
74
  return simple_clone(bflocal, name)
75
75
  end
76
76
  end
@@ -84,7 +84,7 @@ class CodeRunner
84
84
  Dir.entries(f2).include?('.code_runner_repo_metadata'))
85
85
  f2 = File.expand_path(f2 + '/..')
86
86
  (f2=nil; break) if f2 == '/'
87
- #p 'f2 is ', f2
87
+ p 'f2 is ', f2
88
88
  end
89
89
  return f2
90
90
  end
@@ -99,7 +99,8 @@ class CodeRunner
99
99
  # Returns a Git::Base object referring to the bare twin
100
100
  # repository.
101
101
  def bare_repo
102
- @bare_repo ||= Git::Base.open(dir.to_s + '.cr.git')
102
+ #puts 'bare_repo', dir.to_s + '.cr.git'
103
+ @bare_repo ||= Git::Base.bare(dir.to_s + '.cr.git')
103
104
  end
104
105
  def relative_path(folder=Dir.pwd)
105
106
  File.expand_path(folder).sub(File.expand_path(dir.to_s) + '/', '')
@@ -264,7 +265,7 @@ EOF
264
265
  def pull(remote)
265
266
  namehost, folder, _barefolder = split_url(remote.name)
266
267
  try_system %[ssh #{namehost} "cd #{folder} && git push origin"]
267
- bare_repo.pull(remote)
268
+ bare_repo.fetch(remote)
268
269
  simple_pull(remote('origin'))
269
270
  end
270
271
  # A simple git push... does not try to push to local
@@ -281,7 +282,9 @@ EOF
281
282
  # remote bare repos.
282
283
  def push(remote)
283
284
  namehost, folder, _barefolder = split_url(remote.name)
285
+ puts 'simple_push'
284
286
  simple_push(remote('origin'))
287
+ puts 'bare_repo.push'
285
288
  bare_repo.push(remote)
286
289
  try_system %[ssh #{namehost} "cd #{folder} && git pull origin"]
287
290
  end
@@ -120,7 +120,7 @@ class CodeRunner
120
120
  def bare_repo_command(comm, copts)
121
121
  Dir.chdir(copts[:Y]) do
122
122
  repo = Repository.open_in_subfolder(Dir.pwd)
123
- Dir.chdir(repo.bare_repo.dir.to_s) do
123
+ Dir.chdir(repo.bare_repo.repo.to_s) do
124
124
  system comm
125
125
  end
126
126
  end
@@ -175,12 +175,15 @@ class CodeRunner
175
175
  end
176
176
  def push_repository(copts)
177
177
  Dir.chdir(copts[:Y]){
178
+ puts 'opening repo'
178
179
  repo = Repository.open_in_subfolder(Dir.pwd)
179
180
  if copts[:r]
181
+ puts 'mapping'
180
182
  rems = copts[:r].split(/,/).map{|rname| repo.bare_repo.remote(rname)}
181
183
  else
182
184
  rems = repo.bare_repo.remotes
183
185
  end
186
+ puts 'pusing'
184
187
  rems.each{|r| repo.push(r)}
185
188
  }
186
189
  end
@@ -1,4 +1,4 @@
1
- if true
1
+ if false
2
2
  require 'helper'
3
3
  require 'rbconfig'
4
4
  CodeRunner::RemoteCodeRunner::DISPLAY_REMOTE_INVOCATION = true
@@ -38,6 +38,7 @@ class TestCreate < MiniTest::Test
38
38
  Dir.chdir(tfolder) {
39
39
 
40
40
  assert_system("#$coderunnerrepo_command init myrepo")
41
+ #exit
41
42
  assert_system("#$coderunnerrepo_command adrm local ssh://#{ENV['USER']}@localhost/#{Dir.pwd}/remote.cr.git -Y myrepo")
42
43
  #assert_system("#$coderunnerrepo_command adrm local ssh://#{ENV['USER']}@#{`hostname`.chomp}.local/#{Dir.pwd}/remote.git -Y myrepo")
43
44
  assert_system("#$coderunnerrepo_command adrm dummy ssh://dummyuser@nohost/#{Dir.pwd}/remote.cr.git -Y myrepo")
@@ -97,6 +98,8 @@ class TestCreate < MiniTest::Test
97
98
  #CodeRunner::RepositoryManager.remote_synchronize_down('local', 'myrepo/sims', {})
98
99
  FileUtils.makedirs('testclone')
99
100
  assert_system("#$coderunnerrepo_command clone ssh://#{ENV['USER']}@localhost/#{Dir.pwd}/remote.cr.git myclone -Y testclone")
101
+ #assert_system("#$coderunnerrepo_command push -r origin -Y testclone/myclone")
102
+ CodeRunner::RepositoryManager.push_repository(r: 'origin', Y: 'testclone/myclone')
100
103
  }
101
104
  end
102
105
  def teardown
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coderunner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.15
4
+ version: 0.16.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Edmund Highcock
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-18 00:00:00.000000000 Z
11
+ date: 2015-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: graphkit