Commit f1d6134259f66110e961fedcd307ba79436a3c23
- Diff rendering mode:
- inline
- side by side
coefficient.rb
(1 / 9)
|   | |||
| 28 | 28 | @@data = "" | |
| 29 | 29 | end | |
| 30 | 30 | @@config = YAML.load_file ENV['HOME'] + "/.coefficient.yml" | |
| 31 | puts "loaded credentials: #{@@config['credentials']['username']}, **********" | ||
| 32 | 31 | end | |
| 33 | 32 | ||
| 34 | 33 | def make_user_link(data) | |
| … | … | ||
| 97 | 97 | end | |
| 98 | 98 | ||
| 99 | 99 | def request_status(origin, id) | |
| 100 | puts "inside request status" | ||
| 101 | |||
| 102 | 100 | api_url = @@sites[origin]['api'].dup | |
| 103 | 101 | api_url.gsub!(/(https?:\/\/)(.+)/, '\1' << | |
| 104 | 102 | @@config['credentials']['username'] << ":" << | |
| … | … | ||
| 261 | 261 | save_timeline(@@data) | |
| 262 | 262 | save_metadata(metadata) | |
| 263 | 263 | @req_status = req_status | |
| 264 | puts "starting erb" | ||
| 265 | myerb = erb :"update.html" | ||
| 266 | puts "erb is over" | ||
| 267 | myerb | ||
| 264 | return erb :"update.html" | ||
| 268 | 265 | end | |
| 269 | 266 | ||
| 270 | 267 | get '/trim' do | |
| … | … | ||
| 301 | 301 | '\2') | |
| 302 | 302 | ||
| 303 | 303 | url << "/statuses/update.json" | |
| 304 | |||
| 305 | puts "url is #{url}" | ||
| 306 | 304 | ||
| 307 | 305 | payload = {} | |
| 308 | 306 | payload[:status] = text |

