xanthus 0.2.0 → 0.2.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2b041aa460e8d8de1945b504ee7527a776d0cb338fe16ab594a3462cece5ef85
4
- data.tar.gz: 167816e4a9725fe18b7b989a21a56adc8b22bab1d50d9032566a28c12027ea0f
3
+ metadata.gz: b68bca4da63a675d577927075d1e8fa1564a20d57fe14e00d83a541e6b6eb933
4
+ data.tar.gz: f402f3eeffeab33da922c72b21192ebac5699cd484e6aadcebcf8646acb8bf37
5
5
  SHA512:
6
- metadata.gz: 7132c95f0535f042b0ebd54df8e1d09076e951fda8903e6cd0e1d447817a7c93b893f2eb15aa736a49b5cd12560b19b951c1d450f4ef53a1ac479578099747e5
7
- data.tar.gz: 46ee72461803cf16f538b7d1625e847dd02023dd1fc42f476c7f37d99779685ecaff9c0f33b80d456cb7da4cc96c5cb0d1042c95734d5c79b62384f7f3ea1475
6
+ metadata.gz: 044b3da1fde72d38abb7ca6c864545ff6d18cd132ebcf283b1851f5ea30f94279083374e598020030aa241a2e8c4c737d17d1a9e443fe9a93d22531ba5e2e9a4
7
+ data.tar.gz: e1fd0f315b26ecffa1a00dcc92665e49764bfc83b89cc3122033ca24fbb3f6ef6435e89d4fee1d212256169945775cfd99091f1457334171d3b14e02ef10642e
data/README.md CHANGED
@@ -181,12 +181,6 @@ The user must provide such a script.
181
181
  In our case, we automatically generate attack scripts using `wget-attack-script-gen.py`.
182
182
  `Xanthus` allows users to provide logic to generate scripts or simply provide scripts to run during the experiment.
183
183
 
184
- ## Xanthus
185
-
186
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/xanthus`. To experiment with that code, run `bin/console` for an interactive prompt.
187
-
188
- TODO: Delete this and the text above, and describe your gem
189
-
190
184
  ### Installation
191
185
 
192
186
  Add this line to your application's Gemfile:
@@ -205,18 +199,41 @@ Or install it yourself as:
205
199
 
206
200
  ### Usage
207
201
 
208
- TODO: Write usage instructions here
202
+ ```
203
+ xanthus version | return Xanthus version number.
204
+ xanthus dependencies | installation instructions for system dependencies.
205
+ xanthus init <project name> | initialize a new project.
206
+ xanthus run | run .xanthus file in the current folder.
207
+ ```
209
208
 
210
209
  ### Development
211
210
 
212
- After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
213
-
214
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
211
+ To add more features in `Xanthus`,
212
+ clone this repository
213
+ ```
214
+ git clone https://github.com/tfjmp/xanthus
215
+ cd xanthus
216
+ ```
217
+ and build the gem by running
218
+ ```
219
+ gem build xanthus
220
+ ```
221
+ To install this gem locally on your machine, you can also run
222
+ ```
223
+ gem install xanthus
224
+ ```
225
+ After you add a new feature (and test it yourself), you can release a new version of `Xanthus`.
226
+ First, please update the version number in `lib/xanthus/version.rb`, tag the repository `git tag -a x.x.x -m 'x.x.x'`, and push the tag `git push --tags`.
227
+ Then you can run
228
+ ```
229
+ gem push xanthus-x.x.x.gem
230
+ ```
231
+ This last step publishes the gem at [https://rubygems.org/gems/xanthus](https://rubygems.org/gems/xanthus).
215
232
 
216
- ### Contributing
233
+ ### Contribution
217
234
 
218
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/xanthus.
235
+ We welcome bug reports and pull requests on GitHub at https://github.com/[USERNAME]/xanthus.
219
236
 
220
237
  ### License
221
238
 
222
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
239
+ This gem is available as an open source project under the [MIT License](https://opensource.org/licenses/MIT).
data/bin/xanthus CHANGED
@@ -12,12 +12,12 @@ elsif (instruction == 'init' && !param1.nil?)
12
12
  elsif (instruction == 'run')
13
13
  load('./.xanthus')
14
14
  elsif (instruction == 'help')
15
- puts 'xanthus version | return version number.'
16
- puts 'xanthus depencies | installation instruction for system dependencies.'
17
- puts 'xanthus init <project name> | inialise a new project.'
18
- puts 'xanthus run | run .xanthus file contained in the current folder.'
15
+ puts 'xanthus version | return Xanthus version number.'
16
+ puts 'xanthus dependencies | installation instructions for system dependencies.'
17
+ puts 'xanthus init <project name> | initialize a new project.'
18
+ puts 'xanthus run | run .xanthus file in the current folder.'
19
19
  elsif (instruction == 'dependencies')
20
- puts 'You need to install the following software on your system for xanthus to run:'
20
+ puts 'You need to install the following software on your system for Xanthus to run:'
21
21
  puts 'git (see https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)'
22
22
  puts 'git lfs (see https://help.github.com/en/articles/installing-git-large-file-storage)'
23
23
  puts 'virtualbox (see https://www.virtualbox.org/wiki/Downloads)'
@@ -117,7 +117,7 @@ json = %Q{
117
117
  f.write(self.dataset_json)
118
118
  end
119
119
  puts "Creating dataverse #{@dataset_name} in #{@repo} at #{@server}..."
120
- output = `curl -H X-Dataverse-key:#{@token} -X POST #{@server}/api/dataverses/#{@repo}/datasets --upload-file dataset.json`
120
+ output = `curl --speed-time 15 --speed-limit 1000 --retry 50 --retry-max-time 0 -H X-Dataverse-key:#{@token} -X POST #{@server}/api/dataverses/#{@repo}/datasets --upload-file dataset.json`
121
121
  puts output # needed to escape curl output
122
122
  parsed = JSON.parse(output)
123
123
  @doi = parsed['data']['persistentId']
@@ -146,7 +146,7 @@ json = %Q{
146
146
  end
147
147
 
148
148
  def add_file_to_dataverse name, description, folder
149
- output = `curl -H X-Dataverse-key:#{@token} -X POST -F "file=@#{name}" -F 'jsonData={"description":"#{description}","directoryLabel":"#{folder}","categories":["Data"], "restrict":"false"}' "#{@server}/api/datasets/:persistentId/add?persistentId=#{@doi}"`
149
+ output = `curl --speed-time 15 --speed-limit 1000 --retry 50 --retry-max-time 0 -H X-Dataverse-key:#{@token} -X POST -F "file=@#{name}" -F 'jsonData={"description":"#{description}","directoryLabel":"#{folder}","categories":["Data"], "restrict":"false"}' "#{@server}/api/datasets/:persistentId/add?persistentId=#{@doi}"`
150
150
  puts output
151
151
  end
152
152
 
data/lib/xanthus/job.rb CHANGED
@@ -45,6 +45,7 @@ module Xanthus
45
45
  File.open('provision.sh', 'w+') do |f|
46
46
  f.write(script)
47
47
  end
48
+ script = 'echo "nothing to do"'
48
49
  script = self.output_script(machine, @outputs[machine]) unless @outputs[machine].nil?
49
50
  File.open('before_halt.sh', 'w+') do |f|
50
51
  f.write(script)
@@ -1,5 +1,5 @@
1
1
  module Xanthus
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
 
4
4
  def self.version
5
5
  puts VERSION
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xanthus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Pasquier
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-04-14 00:00:00.000000000 Z
12
+ date: 2020-04-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json