pippipp 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +19 -0
- data/README.md +41 -0
- data/lib/pippipp.rb +7 -3
- data/lib/pippipp/test.rb +7 -0
- data/pippipp.gemspec +3 -3
- data/test/pippipp.rb +2 -3
- metadata +7 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9ab0a443728a5decb720b2f2ab89ece44d13d20f
|
4
|
+
data.tar.gz: 42ff61eb3eb30f7b8e63c7e8cb053ff286eff764
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d726f180efd250cb7dd6ae63855d2c99995f97844eb752f4536783bd35aa0835e0c2403778c6ef3c911b15dca4fee712d7efc75aa68a2df8657efd450f6be5fd
|
7
|
+
data.tar.gz: a04c9c6958216c1f4b93955195d682cfb574abb456d0f8e3638fca1f437bb027e2858a53a4c3257b09d3b9fdece8431a2a0bc5feeeeb67944fcae62c032f5007
|
data/LICENSE
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
Copyright (c) 2014 pippipp.com
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
5
|
+
in the Software without restriction, including without limitation the rights
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
8
|
+
furnished to do so, subject to the following conditions:
|
9
|
+
|
10
|
+
The above copyright notice and this permission notice shall be included in
|
11
|
+
all copies or substantial portions of the Software.
|
12
|
+
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
+
THE SOFTWARE.
|
data/README.md
CHANGED
@@ -0,0 +1,41 @@
|
|
1
|
+
pippipp
|
2
|
+
=======
|
3
|
+
|
4
|
+
[pippipp.com](https://pippipp.com) provides a simple API for posting twitter updates from your application.
|
5
|
+
You can find us on [Heroku](#) or sign up directly at [pippipp.com](https://pippipp.com).
|
6
|
+
|
7
|
+
Installation
|
8
|
+
------------
|
9
|
+
|
10
|
+
$ gem install pippipp
|
11
|
+
|
12
|
+
Usage
|
13
|
+
-----
|
14
|
+
|
15
|
+
When creating your pippipp account you will be provided with an *api_key*. This key
|
16
|
+
will be used to identify your account when publishing tweets using our API.
|
17
|
+
|
18
|
+
To start posting updates, do the following:
|
19
|
+
|
20
|
+
```ruby
|
21
|
+
require "pippipp"
|
22
|
+
|
23
|
+
pipp = Pippipp.new(api_key)
|
24
|
+
|
25
|
+
pipp.status("Let's pipp!")
|
26
|
+
```
|
27
|
+
|
28
|
+
Testing
|
29
|
+
-------
|
30
|
+
|
31
|
+
To test that everything works properly, without publishing any actual tweet or
|
32
|
+
having your local server running, you can do the following:
|
33
|
+
|
34
|
+
```ruby
|
35
|
+
require "pippipp/test"
|
36
|
+
|
37
|
+
pipp = Pippipp.new(api_key)
|
38
|
+
|
39
|
+
pipp.status("Let's pipp!")
|
40
|
+
# => #<Requests::Response:0x007fae53884a60 @status=200, @headers={}, @body="">
|
41
|
+
```
|
data/lib/pippipp.rb
CHANGED
@@ -1,12 +1,16 @@
|
|
1
|
-
require
|
1
|
+
require "requests"
|
2
2
|
|
3
3
|
class Pippipp
|
4
|
-
|
4
|
+
VERSION = "pippipp-1.1.0"
|
5
|
+
|
6
|
+
def initialize(key, url = "https://pippipp.com/status")
|
7
|
+
@key = key
|
5
8
|
@url = url
|
6
9
|
end
|
7
10
|
|
8
11
|
def status(message)
|
9
|
-
Requests.request("POST", @url,
|
12
|
+
return Requests.request("POST", @url,
|
13
|
+
auth: [VERSION, @key],
|
10
14
|
data: { message: message })
|
11
15
|
end
|
12
16
|
end
|
data/lib/pippipp/test.rb
ADDED
data/pippipp.gemspec
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "pippipp"
|
3
|
-
s.version = "1.
|
4
|
-
s.summary = "
|
3
|
+
s.version = "1.1.0"
|
4
|
+
s.summary = "Official Ruby gem for pippip.com"
|
5
5
|
s.description = s.summary
|
6
6
|
s.authors = ["Mayn Kjær", "Michel Martens", "Cecilia Rivero", "Francesco Rodríguez"]
|
7
7
|
s.email = ["mayn.kjaer@gmail.com", "michel@soveran.com", "contact@ceciliarivero.com", "frodsan@me.com"]
|
8
|
-
s.homepage = "https://pippipp.
|
8
|
+
s.homepage = "https://github.com/pippipp/pippipp.ruby"
|
9
9
|
s.license = "MIT"
|
10
10
|
|
11
11
|
s.files = `git ls-files`.split("\n")
|
data/test/pippipp.rb
CHANGED
@@ -1,9 +1,8 @@
|
|
1
|
-
require "requests"
|
2
1
|
require_relative "../lib/pippipp"
|
3
2
|
|
4
3
|
scope do
|
5
|
-
test "
|
6
|
-
pipp = Pippipp.new("http://localhost:9393")
|
4
|
+
test "post new tweet" do
|
5
|
+
pipp = Pippipp.new("pippipp_key", "http://localhost:9393")
|
7
6
|
|
8
7
|
response = pipp.status("This is a status update")
|
9
8
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pippipp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mayn Kjær
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2014-07-
|
14
|
+
date: 2014-07-07 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: requests
|
@@ -41,7 +41,7 @@ dependencies:
|
|
41
41
|
- - ">="
|
42
42
|
- !ruby/object:Gem::Version
|
43
43
|
version: '0'
|
44
|
-
description:
|
44
|
+
description: Official Ruby gem for pippip.com
|
45
45
|
email:
|
46
46
|
- mayn.kjaer@gmail.com
|
47
47
|
- michel@soveran.com
|
@@ -52,11 +52,13 @@ extensions: []
|
|
52
52
|
extra_rdoc_files: []
|
53
53
|
files:
|
54
54
|
- ".gems"
|
55
|
+
- LICENSE
|
55
56
|
- README.md
|
56
57
|
- lib/pippipp.rb
|
58
|
+
- lib/pippipp/test.rb
|
57
59
|
- pippipp.gemspec
|
58
60
|
- test/pippipp.rb
|
59
|
-
homepage: https://pippipp.
|
61
|
+
homepage: https://github.com/pippipp/pippipp.ruby
|
60
62
|
licenses:
|
61
63
|
- MIT
|
62
64
|
metadata: {}
|
@@ -79,5 +81,5 @@ rubyforge_project:
|
|
79
81
|
rubygems_version: 2.3.0
|
80
82
|
signing_key:
|
81
83
|
specification_version: 4
|
82
|
-
summary:
|
84
|
+
summary: Official Ruby gem for pippip.com
|
83
85
|
test_files: []
|