ruboty-wandbox 0.0.1 → 0.0.1.1

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: 4994579d60bd9935875d140a2eb07875315adc91
4
- data.tar.gz: 2f3c5d4082a7c1ee10cc370cd612d8da424892bc
3
+ metadata.gz: 07d43b7672043afc75eef06b5e01e3e51efe8371
4
+ data.tar.gz: 326ab0a934c2f4019707738d617f8df007ed6408
5
5
  SHA512:
6
- metadata.gz: 6f3acce49b48908aa4e9c1aeee00f23abfa45389d6e0f6890dec56ef4c97903814d1b456db2a52f9573994fc6e6707f07123ebf986c9c23140a13d50b0e08820
7
- data.tar.gz: 0548dc7ffdaa8e932eadbf711689815e2efdf3408d4f3a0074a0052304a6167d81bd8ad88e0a4d97846287ae49ca365f69f65156711d11e928b1d94eb9773e9e
6
+ metadata.gz: 8e681642e8c78fecf3d49b4dc8ec76fd70ec7ab6989edee1fe8e95c3d12fb11226991027cfe8e021f2bf57d16d1fe64894eaee478261d4f982642cb1479e9f4d
7
+ data.tar.gz: 26ab21ef01105c8db8c2c95bd983de357c08bbbbd7d2f290dd57a566f2184a231377205a33fbd149e9ee6a7be5ef300ff1b37301d4fba7d3a6c7c5dc937cb42f
@@ -39,7 +39,7 @@ module Ruboty
39
39
  on /wandbox list/, name: 'languages', description: 'show compiler list'
40
40
  on /wandbox setinput ?(?<input_uri>\S*)/, name: 'setinput', description: 'set input'
41
41
  on /wandbox submit (?<language>\S+) (?<source_uri>\S+) ?(?<input_uri>\S*)/, name: 'submit', description: 'send code via uri'
42
- on /ideone view ?(?<id>\w*)/, name: 'view', description: 'view submission'
42
+ on /wandbox view ?(?<id>\w*)/, name: 'view', description: 'view submission'
43
43
  def languages(message)
44
44
  message.reply get_compiler_list.map{|k,v|k+': '+v*','+"\n"}.join
45
45
  end
@@ -80,12 +80,14 @@ module Ruboty
80
80
  resp=http.post(uri.path,JSON.generate(json),{
81
81
  'Content-Type'=>'application/json',
82
82
  })
83
- #p JSON.parse(resp.body)
84
- message.reply process(JSON.parse(resp.body))
83
+ json=JSON.parse(resp.body)
84
+ #p json
85
+ #@current_submission=json['permlink']
86
+ message.reply process(json)
85
87
  }
86
88
  end
87
89
  def view(message)
88
- #id: wandbox ID(空文字列なら直前のsubmitで返されたIDを使用)
90
+ #id: wandbox ID(空文字列なら直前のsubmitで返されたIDを使用 ※現在permlinkを保存しない設定なので特に意味は無い)
89
91
  submission=message[:id]&&!message[:id].empty? ? message[:id] : @current_submission
90
92
  resp=JSON.parse Net::HTTP.get URI.parse @base_uri+'api/permlink/'+submission
91
93
  message.reply process(resp['result'])
@@ -1,5 +1,5 @@
1
1
  module Ruboty
2
2
  module Wandbox
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruboty-wandbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - cielavenir