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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3f1280302af611e8e7fc671badb99f3b4fc1e69b
4
- data.tar.gz: 1dfe3082ee41f3d939ec2d0259007c4e8099f13e
3
+ metadata.gz: 9ab0a443728a5decb720b2f2ab89ece44d13d20f
4
+ data.tar.gz: 42ff61eb3eb30f7b8e63c7e8cb053ff286eff764
5
5
  SHA512:
6
- metadata.gz: 299fb06bb6b54300fd0864c0c50c42d2dd4ca0c18e004e73828d422f2091c81b5f788ede8218f0780a2e2d7c7bc6c4c471ab980e8f5f23ae9ef2c07f1ba719da
7
- data.tar.gz: 89d270b672556d0db254d7f3834f15dc9c03fb1a18bf22c3f46c110133e353e5f918c71921c9d470d5ccd15aa9638b45a6b4102474cf585d720303b7b24d5841
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 'requests'
1
+ require "requests"
2
2
 
3
3
  class Pippipp
4
- def initialize(url)
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
@@ -0,0 +1,7 @@
1
+ require "requests"
2
+
3
+ class Pippipp
4
+ def status(message)
5
+ return Requests::Response.new(200, {}, "")
6
+ end
7
+ end
data/pippipp.gemspec CHANGED
@@ -1,11 +1,11 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "pippipp"
3
- s.version = "1.0.0"
4
- s.summary = "Gem for Pippipp"
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.com"
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 "Post new tweet" do
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.0.0
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-06 00:00:00.000000000 Z
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: Gem for Pippipp
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.com
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: Gem for Pippipp
84
+ summary: Official Ruby gem for pippip.com
83
85
  test_files: []