chatspry 0.0.1.pre3 → 0.0.1.pre4

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.
data/README.md CHANGED
@@ -1,29 +1,68 @@
1
1
  # Chatspry
2
2
 
3
- TODO: Write a gem description
3
+ API wrapper for Chatspry to be used from any ruby **1.9**, **2.0**
4
+ or **2.1** application. Dependent on the following libraries:
5
+
6
+ - [Faraday](https://github.com/lostisland/faraday)
7
+ - [Hashie](https://github.com/intridea/hashie)
4
8
 
5
9
  ## Installation
6
10
 
7
- Add this line to your application's Gemfile:
11
+ Add this line to your project Gemfile:
8
12
 
9
- gem 'chatspry'
13
+ ```ruby
14
+ gem "chatspry", "~> 0.0.1.pre3"
15
+ ```
10
16
 
11
- And then execute:
17
+ Then execute this in a command line from your project directory:
12
18
 
13
- $ bundle
19
+ ```bash
20
+ $ bundle
21
+ ```
14
22
 
15
- Or install it yourself as:
23
+ Or install it on it's own with RubyGems:
16
24
 
17
- $ gem install chatspry
25
+ ```bash
26
+ $ gem install chatspry
27
+ ```
18
28
 
19
29
  ## Usage
20
30
 
21
- TODO: Write usage instructions here
31
+ ### Basic usage
32
+
33
+ ```ruby
34
+ require "chatspry"
35
+
36
+ client = Chatspry::Client.new
37
+ client.access_token = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
38
+
39
+ user = client.get("/v1/user")
40
+ # => { "user" => { "id"=>"...", "handle"=>"zeeraw", "name"=>"Philip Vieira", "updated_at"=>1403036249, "created_at"=>1403036249 } }
41
+
42
+ user.handle
43
+ # => "zeeraw"
44
+ ```
22
45
 
23
46
  ## Contributing
24
47
 
25
- 1. Fork it ( https://github.com/[my-github-username]/chatspry/fork )
26
- 2. Create your feature branch (`git checkout -b my-new-feature`)
27
- 3. Commit your changes (`git commit -am 'Add some feature'`)
28
- 4. Push to the branch (`git push origin my-new-feature`)
29
- 5. Create a new Pull Request
48
+ #### 1. Fork it at https://github.com/chatspry/chatspry.rb/fork
49
+
50
+ #### 2. Create your feature branch nested under `feature/`
51
+
52
+ ```bash
53
+ $ git checkout -b feature/my-important-change
54
+ ```
55
+
56
+ #### 3. Commit your changes
57
+
58
+ ```bash
59
+ $ git commit -am 'The gem now behaves this way, because reasons'
60
+ ```
61
+
62
+ #### 4. Push to the branch
63
+
64
+ ```bash
65
+ $ git push origin feature/my-important-change
66
+ ```
67
+
68
+ #### 5. Create a new Pull Request
@@ -25,7 +25,7 @@ module Chatspry
25
25
  end
26
26
 
27
27
  def inspect
28
- string = ["<Chatspry::Client:"]
28
+ string = ["<Chatspry::Client"]
29
29
  string << "identifier: #{ @identifier }" if @identifier
30
30
  string << "passphrase: #{ "*******" }" if @passphrase
31
31
  string << "access_token: #{'*'*56}#{@access_token[56..-1] }" if @access_token
@@ -1,3 +1,3 @@
1
1
  module Chatspry
2
- VERSION = "0.0.1.pre3"
2
+ VERSION = "0.0.1.pre4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chatspry
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.pre3
4
+ version: 0.0.1.pre4
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors: