playground-client 0.0.1

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 4ecfab68ca87c6759ee29dd4cd0282e4e7a5914d
4
+ data.tar.gz: 42ffc15bbf03366c6ca82c5d0c3f1ec544aab7bc
5
+ SHA512:
6
+ metadata.gz: 900670c84a44c2cab0d3505449e00c8fb4bca050a772ee2534c4f6c45d0b5c28fe832ce8323e8579c9795e6f6f56dcd0a6f54e48bf450b08e6a815cad18f524b
7
+ data.tar.gz: 332c0e33cf5bea4c6f1139a56d901f6153545b8662a7acff712f836c15d5a1995ae3b6e0a74018dd1e0e1eff7512e1212db29103d7f4bd522b8999b480cc93f3
File without changes
@@ -0,0 +1,5 @@
1
+ $:.unshift(File.dirname(__FILE__))
2
+
3
+ module PlaygroundClient
4
+ autoload :API, "playground_client/api"
5
+ end
@@ -0,0 +1,28 @@
1
+ require 'httparty'
2
+
3
+ module PlaygroundClient
4
+ class API
5
+ include HTTParty
6
+ base_uri 'http://localhost:3000/api/v1'
7
+
8
+
9
+ def user_register(fields)
10
+
11
+ user = { :user => fields }
12
+
13
+
14
+ p post('/users/register', user)
15
+ end
16
+
17
+ private
18
+
19
+ def post(url, obj)
20
+ self.class.post(url, :body => obj.to_json, :headers => {
21
+ 'Content-Type' => 'application/json',
22
+ 'Accept' => 'application/json'
23
+ })
24
+ end
25
+
26
+
27
+ end
28
+ end
@@ -0,0 +1,3 @@
1
+ module PlaygroundClient
2
+ VERSION = "0.0.1"
3
+ end
metadata ADDED
@@ -0,0 +1,68 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: playground-client
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Jason Frame
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-01-08 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: httparty
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '0.13'
20
+ - - '>='
21
+ - !ruby/object:Gem::Version
22
+ version: 0.13.1
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: '0.13'
30
+ - - '>='
31
+ - !ruby/object:Gem::Version
32
+ version: 0.13.1
33
+ description: A client for the playground service
34
+ email:
35
+ - jason@onehackoranother.com
36
+ executables: []
37
+ extensions: []
38
+ extra_rdoc_files: []
39
+ files:
40
+ - README.md
41
+ - lib/playground_client.rb
42
+ - lib/playground_client/api.rb
43
+ - lib/playground_client/version.rb
44
+ homepage:
45
+ licenses:
46
+ - MIT
47
+ metadata: {}
48
+ post_install_message:
49
+ rdoc_options: []
50
+ require_paths:
51
+ - lib
52
+ required_ruby_version: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - '>='
55
+ - !ruby/object:Gem::Version
56
+ version: '0'
57
+ required_rubygems_version: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ requirements: []
63
+ rubyforge_project:
64
+ rubygems_version: 2.2.1
65
+ signing_key:
66
+ specification_version: 4
67
+ summary: playground API client
68
+ test_files: []