basics_edit 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 (2) hide show
  1. data/bin/basics_edit +4 -1
  2. metadata +3 -3
data/bin/basics_edit CHANGED
@@ -175,7 +175,9 @@ EOF
175
175
  log "Password?"
176
176
  password = STDIN.readline.chomp
177
177
 
178
- res = Net::HTTP.post_form(URI.parse("http://basics.adit.io/create/"), :category=>category, :title => title, :text => text, :name => name, :password => password, :id => id)
178
+ path = id == -1 ? "insert" : "update"
179
+
180
+ res = Net::HTTP.post_form(URI.parse("http://basics.adit.io/#{path}/"), :category=>category, :title => title, :text => text, :name => name, :password => password, :id => id)
179
181
  puts res.body
180
182
  end
181
183
 
@@ -213,3 +215,4 @@ EOF
213
215
  end
214
216
 
215
217
  Be.new
218
+
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: basics_edit
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Aditya Bhargava