casual_helper 0.0.12 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module CasualHelper
2
- VERSION = "0.0.12"
2
+ VERSION = "0.0.13"
3
3
  end
data/lib/casual_helper.rb CHANGED
@@ -87,7 +87,12 @@ module CasualHelper
87
87
  #return if are_invalid_mongo_key tap_id
88
88
  get "#{@api_server.to_s}/v0/taps/#{tap_id}"
89
89
  end
90
-
90
+
91
+ def update_tap(tap_id, options)
92
+ return if are_invalid options
93
+ put "#{@api_server.to_s}/v0/taps/#{tap_id}", options
94
+ end
95
+
91
96
  #
92
97
  # == Description
93
98
  #
@@ -117,6 +122,11 @@ module CasualHelper
117
122
  return if are_invalid tap_id, options
118
123
  post "#{@api_server.to_s}/v0/taps/#{tap_id.to_s}/drops", options
119
124
  end
125
+
126
+ def update_drop(tap_id, drop_id, options)
127
+ return if are_invalid tap_id, options
128
+ put "#{@api_server.to_s}/v0/taps/#{tap_id.to_s}/drops/#{drop_id.to_s}", options
129
+ end
120
130
 
121
131
  # authenticates the user with the API and returns their Casual profile
122
132
  def auth_user(auth)
@@ -220,6 +230,11 @@ module CasualHelper
220
230
  false
221
231
  end
222
232
  end
233
+
234
+ def create_alias
235
+ base64_charaters = ('a'..'z').to_a + ('A'..'Z').to_a + ('0'..'9').to_a
236
+ (0..5).map{base64_charaters.shuffle[0]}.join
237
+ end
223
238
 
224
239
  # TODO broken
225
240
  =begin
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 12
9
- version: 0.0.12
8
+ - 13
9
+ version: 0.0.13
10
10
  platform: ruby
11
11
  authors:
12
12
  - matthewspivey
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2012-10-08 00:00:00 -04:00
17
+ date: 2012-10-18 00:00:00 -04:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency