motion_yak 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- motion_yak (0.0.5)
4
+ motion_yak (0.0.6)
5
5
  bubble-wrap
6
6
 
7
7
  GEM
@@ -1,27 +1,27 @@
1
1
  module MotionYak
2
2
  module Request
3
- def self.get(url)
3
+ def self.get(url, &proc)
4
4
  BW::HTTP.get(url) do |response|
5
5
  json = BW::JSON.parse(response.body.to_str)
6
- return json
6
+ proc.call(json)
7
7
  end
8
8
  end
9
- def self.put(url, data)
9
+ def self.put(url, data, &proc)
10
10
  BW::HTTP.put(url, {payload: data}) do |response|
11
11
  json = BW::JSON.parse(response.body.to_str)
12
- return json
12
+ proc.call(json)
13
13
  end
14
14
  end
15
- def self.post(url, data)
15
+ def self.post(url, data, &proc)
16
16
  BW::HTTP.post(url, {payload: data}) do |response|
17
17
  json = BW::JSON.parse(response.body.to_str)
18
- return json
18
+ proc.call(json)
19
19
  end
20
20
  end
21
- def self.delete(url)
21
+ def self.delete(url, &proc)
22
22
  BW::HTTP.delete(url) do |response|
23
23
  json = BW::JSON.parse(response.body.to_str)
24
- return json
24
+ proc.call(json)
25
25
  end
26
26
  end
27
27
  end
@@ -1,5 +1,5 @@
1
1
  module MotionYak
2
- VERSION = '0.0.5' unless defined?(MotionYak::VERSION)
2
+ VERSION = '0.0.6' unless defined?(MotionYak::VERSION)
3
3
  MIN_MOTION_VERSION = '1.24'
4
4
 
5
5
  module_function
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motion_yak
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -44,6 +44,7 @@ extra_rdoc_files:
44
44
  - pkg/motion_yak-0.0.2.gem
45
45
  - pkg/motion_yak-0.0.3.gem
46
46
  - pkg/motion_yak-0.0.4.gem
47
+ - pkg/motion_yak-0.0.5.gem
47
48
  files:
48
49
  - Gemfile
49
50
  - Gemfile.lock
@@ -59,6 +60,7 @@ files:
59
60
  - pkg/motion_yak-0.0.2.gem
60
61
  - pkg/motion_yak-0.0.3.gem
61
62
  - pkg/motion_yak-0.0.4.gem
63
+ - pkg/motion_yak-0.0.5.gem
62
64
  homepage: http://github.com/ballantyne/motion_yak
63
65
  licenses: []
64
66
  post_install_message:
@@ -73,7 +75,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
73
75
  version: '0'
74
76
  segments:
75
77
  - 0
76
- hash: 3594700469852565473
78
+ hash: 1424806038868285065
77
79
  required_rubygems_version: !ruby/object:Gem::Requirement
78
80
  none: false
79
81
  requirements:
@@ -82,7 +84,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
82
84
  version: '0'
83
85
  segments:
84
86
  - 0
85
- hash: 3594700469852565473
87
+ hash: 1424806038868285065
86
88
  requirements: []
87
89
  rubyforge_project:
88
90
  rubygems_version: 1.8.21