motion_yak 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/lib/motion_yak/json.rb +11 -0
- data/lib/motion_yak/request.rb +14 -4
- data/lib/motion_yak/version.rb +1 -1
- data/lib/motion_yak.rb +2 -1
- data/pkg/motion_yak-0.0.2.gem +0 -0
- metadata +7 -3
data/Gemfile.lock
CHANGED
data/lib/motion_yak/request.rb
CHANGED
@@ -2,23 +2,33 @@ module MotionYak
|
|
2
2
|
module Request
|
3
3
|
def self.get(url)
|
4
4
|
BW::HTTP.get(url) do |response|
|
5
|
-
|
5
|
+
json = parse(response)
|
6
|
+
return json
|
6
7
|
end
|
7
8
|
end
|
8
9
|
def self.put(url, data)
|
9
10
|
BW::HTTP.put(url, {payload: data}) do |response|
|
10
|
-
|
11
|
+
json = parse(response)
|
12
|
+
return json
|
11
13
|
end
|
12
14
|
end
|
13
15
|
def self.post(url, data)
|
14
16
|
BW::HTTP.post(url, {payload: data}) do |response|
|
15
|
-
|
17
|
+
json = parse(response)
|
18
|
+
return json
|
16
19
|
end
|
17
20
|
end
|
18
21
|
def self.delete(url)
|
19
22
|
BW::HTTP.delete(url) do |response|
|
20
|
-
|
23
|
+
json = parse(response)
|
24
|
+
return json
|
21
25
|
end
|
22
26
|
end
|
27
|
+
|
28
|
+
def self.parse(string)
|
29
|
+
json = MotionYak::JSON.parse(string)
|
30
|
+
p json
|
31
|
+
json
|
32
|
+
end
|
23
33
|
end
|
24
34
|
end
|
data/lib/motion_yak/version.rb
CHANGED
data/lib/motion_yak.rb
CHANGED
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.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -36,10 +36,12 @@ extra_rdoc_files:
|
|
36
36
|
- lib/motion_yak.rb
|
37
37
|
- lib/motion_yak/config.rb
|
38
38
|
- lib/motion_yak/data/ca-certificate.crt
|
39
|
+
- lib/motion_yak/json.rb
|
39
40
|
- lib/motion_yak/request.rb
|
40
41
|
- lib/motion_yak/version.rb
|
41
42
|
- motion_yak.gemspec
|
42
43
|
- pkg/motion_yak-0.0.1.gem
|
44
|
+
- pkg/motion_yak-0.0.2.gem
|
43
45
|
files:
|
44
46
|
- Gemfile
|
45
47
|
- Gemfile.lock
|
@@ -47,10 +49,12 @@ files:
|
|
47
49
|
- lib/motion_yak.rb
|
48
50
|
- lib/motion_yak/config.rb
|
49
51
|
- lib/motion_yak/data/ca-certificate.crt
|
52
|
+
- lib/motion_yak/json.rb
|
50
53
|
- lib/motion_yak/request.rb
|
51
54
|
- lib/motion_yak/version.rb
|
52
55
|
- motion_yak.gemspec
|
53
56
|
- pkg/motion_yak-0.0.1.gem
|
57
|
+
- pkg/motion_yak-0.0.2.gem
|
54
58
|
homepage: http://github.com/ballantyne/motion_yak
|
55
59
|
licenses: []
|
56
60
|
post_install_message:
|
@@ -65,7 +69,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
65
69
|
version: '0'
|
66
70
|
segments:
|
67
71
|
- 0
|
68
|
-
hash:
|
72
|
+
hash: 1650176847988498001
|
69
73
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
70
74
|
none: false
|
71
75
|
requirements:
|
@@ -74,7 +78,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
74
78
|
version: '0'
|
75
79
|
segments:
|
76
80
|
- 0
|
77
|
-
hash:
|
81
|
+
hash: 1650176847988498001
|
78
82
|
requirements: []
|
79
83
|
rubyforge_project:
|
80
84
|
rubygems_version: 1.8.21
|