opendatakit 0.0.1 → 0.0.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/opendatakit.rb +8 -2
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2aa145b5fbb7cea1a3fce14f9fbe55b24a8f44c3
4
- data.tar.gz: 408ec2f1e9a349a06aebc022795996f6941379a3
3
+ metadata.gz: d5bd13e9f36c32c40330ac4d04c107397dd8c8c9
4
+ data.tar.gz: ee33088cee8df395501ce708fc25225f1b0e9bea
5
5
  SHA512:
6
- metadata.gz: 0d3c8c67500203a4e4394477cfa5e2af1ca95272434b60a9d3a4b72074f86d3bd9c1999db57537b01d67ed99700b5bd9b0953e61ba7196077e0e5c720953d084
7
- data.tar.gz: 4e073027e3b73a2cfc9264376a6847fba4f0016970657b29984cbbb83c25fe40a6c7287c41fadd8e025f15857e2108c7be07c91baff028ceb26f563e8fc7c625
6
+ metadata.gz: 86bd8d742e02f783d73aa8810ecbc1930d099fed3145b3b791c378e34b5f4a676240e649c630450c6d3374d2a3313111dad15944be83ac8a3e62a36191ddaf70
7
+ data.tar.gz: a66fbf25df83cdacf00ea1a8e23a70efd4e63cdb414957b81636a5212ea90e50667fe8aa26e85d83123e72adc7b7f007ffab295b924a8f28c7005288251fae7e
data/lib/opendatakit.rb CHANGED
@@ -32,9 +32,15 @@ attr_accessor:url
32
32
  params = { :form_def_file => File.open(form_xml)}
33
33
  doc = REXML::Document.new(File.open(form_xml))
34
34
  title = REXML::XPath.first( doc, "//h:title" )
35
- #form_post_url.query = URI.encode_www_form( params )
36
35
  http = HTTPClient.new
37
- #httpresults = http.post(form_post_url,params)
36
+ httpresults = http.post(form_post_url,params)
38
37
  puts title.text
39
38
  end
39
+ def addSubmissions(submission_data,media_files)
40
+ submission_post_url = URI.join(@url,"submission")
41
+ params = { :xml_submission_file => File.open(submission_data)}
42
+ http = HTTPClient.new
43
+ httpresults = http.post(submission_post_url,params)
44
+ puts httpresults.content
45
+ end
40
46
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opendatakit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jude Mwenda