funky-simplehttp 0.4.2 → 0.4.3
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +77 -13
- data/Rakefile +1 -1
- data/funky-simplehttp.gemspec +1 -1
- data/lib/simplehttp.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6e52ba4e83e1a05e17ecdcd09e508fb1f41730e9
|
4
|
+
data.tar.gz: 218d7308a8f3860bb3a0d4010dafd9afa907554a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bed26a69ec8ec19be86eaea5ac54c6f76cf562b7e6721a8cedd3f4d0f3c68ecfdb1a9308332ee94e13a44bf923c87048da7630c279b295cc83c23356a38bd6b5
|
7
|
+
data.tar.gz: 12d44609abe5440c83d59ebe08b87cba9cb822ca1c709fbd845f03d6717de4c87020d4295e1c6add21fda11c8c37bb556f8149421d01d2ea6d0eb4e58e1165e5
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,20 +1,84 @@
|
|
1
|
-
# SimpleHttp Class for
|
1
|
+
# SimpleHttp Class for MRuby
|
2
2
|
|
3
|
-
|
3
|
+
Our goal at [CloudWalk][1] is to provide you with the
|
4
|
+
necessary tools to build Point Of Sales (POS) applications
|
5
|
+
in an easy and innovative way. To do so, we've developed
|
6
|
+
a setup for MRuby programs that allows you to build and
|
7
|
+
ship modern day applications to all of your terminals
|
8
|
+
instantaneously.
|
4
9
|
|
5
|
-
|
10
|
+
With that objective, we've developed the necessary classes
|
11
|
+
for you to use http or http connections from your Ruby POS
|
12
|
+
application using a pure-ruby implementation.
|
6
13
|
|
7
|
-
|
14
|
+
## Index
|
8
15
|
|
9
|
-
|
16
|
+
- [Index](#index)
|
17
|
+
- [What do I have here?](#what-do-i-have-here)
|
18
|
+
- [How do I use this?](#how-do-i-use-this)
|
19
|
+
- [I would like to contribute](#i-would-like-to-contribute)
|
10
20
|
|
11
|
-
|
12
|
-
2. Create your feature branch (`git checkout -b my-new-feature`)
|
13
|
-
3. Commit your changes (`git commit -am 'Added some feature'`)
|
14
|
-
4. Push to the branch (`git push origin my-new-feature`)
|
15
|
-
5. Create new Pull Request
|
21
|
+
## What do I have here?
|
16
22
|
|
17
|
-
|
18
|
-
under the MIT License:
|
23
|
+
Here you have our pure-ruby implementation of the http and https classes. The structure goes as follows:
|
19
24
|
|
20
|
-
|
25
|
+
- A `lib` directory, which holds the main source code of our network classes.
|
26
|
+
- An `out`directory, which has a previous generated binary of this project. All builds target this directory.
|
27
|
+
- Also a Gemfile, a Rakefile and a `simplehttp.gemspec` file in order to provide this project as a Ruby Gem.
|
28
|
+
|
29
|
+
## How do I use this?
|
30
|
+
|
31
|
+
Simply `require "simplehttp"` in your project and make use of the `SimpleHttp` class.
|
32
|
+
This class has the following methods:
|
33
|
+
|
34
|
+
- `get` to make HTTP GET requests.
|
35
|
+
- `post` to make HTTP POST requests.
|
36
|
+
- `request` to make any HTTP request.
|
37
|
+
|
38
|
+
So to use them, first:
|
39
|
+
|
40
|
+
```ruby
|
41
|
+
require "simplehttp"
|
42
|
+
http = SimpleHttp.new(schema, "http://echo.cloudwalk.io", "8000")
|
43
|
+
response = http.post("/somepath", { 'message' => "Hello World" })
|
44
|
+
```
|
45
|
+
|
46
|
+
## I would like to contribute
|
47
|
+
|
48
|
+
So, you want to propose changes to our skeleton??!! Thank you sir! We appreciate it :bowtie:
|
49
|
+
|
50
|
+
Please follow the instructions:
|
51
|
+
|
52
|
+
1. Fork it under your github account!
|
53
|
+
2. Create your feature branch `git checkout -b my-new-feature`
|
54
|
+
3. Commit your changes `git commit -am 'Added some feature'`
|
55
|
+
4. Push to the branch `git push origin my-new-feature`
|
56
|
+
5. Create a new Pull Request!
|
57
|
+
|
58
|
+
## License
|
59
|
+
|
60
|
+
```
|
61
|
+
The MIT License (MIT)
|
62
|
+
|
63
|
+
Copyright (c) 2015 CloudWalk, Inc.
|
64
|
+
|
65
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
66
|
+
of this software and associated documentation files (the "Software"), to deal
|
67
|
+
in the Software without restriction, including without limitation the rights
|
68
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
69
|
+
copies of the Software, and to permit persons to whom the Software is
|
70
|
+
furnished to do so, subject to the following conditions:
|
71
|
+
|
72
|
+
The above copyright notice and this permission notice shall be included in all
|
73
|
+
copies or substantial portions of the Software.
|
74
|
+
|
75
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
76
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
77
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
78
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
79
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
80
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
81
|
+
SOFTWARE.
|
82
|
+
```
|
83
|
+
|
84
|
+
[1]: https://www.cloudwalk.io
|
data/Rakefile
CHANGED
@@ -2,7 +2,7 @@ require 'rake'
|
|
2
2
|
#require "bundler/gem_tasks"
|
3
3
|
|
4
4
|
SIMPLEHTTP_ROOT = File.dirname(File.expand_path(__FILE__))
|
5
|
-
SIMPLEHTTP_OUT = File.join(SIMPLEHTTP_ROOT, "out", "simplehttp.mrb")
|
5
|
+
SIMPLEHTTP_OUT = File.join(SIMPLEHTTP_ROOT, "out", "funky-simplehttp.mrb")
|
6
6
|
|
7
7
|
task :default => :build
|
8
8
|
|
data/funky-simplehttp.gemspec
CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
|
|
12
12
|
spec.description = "Minimal HTTP implementation"
|
13
13
|
spec.homepage = "http://github.com/cloudwalkio/funky-simplehttp"
|
14
14
|
spec.license = "MIT"
|
15
|
-
spec.files = `git ls-files -z`.split("\x0") << "out/simplehttp.mrb"
|
15
|
+
spec.files = `git ls-files -z`.split("\x0") << "out/funky-simplehttp.mrb"
|
16
16
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
17
17
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
18
|
spec.require_paths = ["lib"]
|
data/lib/simplehttp.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: funky-simplehttp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thiago Scalone
|
@@ -52,7 +52,7 @@ files:
|
|
52
52
|
- Rakefile
|
53
53
|
- funky-simplehttp.gemspec
|
54
54
|
- lib/simplehttp.rb
|
55
|
-
- out/simplehttp.mrb
|
55
|
+
- out/funky-simplehttp.mrb
|
56
56
|
homepage: http://github.com/cloudwalkio/funky-simplehttp
|
57
57
|
licenses:
|
58
58
|
- MIT
|