officepod 0.1.4 → 0.1.5
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/README.md +29 -2
- data/lib/officepod/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7bb207257a2e40c00facab6b1fe6debea39fb0e4
|
4
|
+
data.tar.gz: 15d54e805a635848025cea92a2751ec238a86496
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89a8b2ff30c293492fad666d449d1cf8615de7b5d7b9888f5bd1298b100a959735154628dd091df88c0dac7b2f45f83549db93534a901ebc5f44157a2153eb66
|
7
|
+
data.tar.gz: 328514bf33dc35dbb3baeb33df944319e381d04a09de2b7ea36873cabef8c2a4aa139e0272d07fa8f90d5d4d40ed8dc665656bd2b880ca8ee9c7d9bf3d53b9e7
|
data/README.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# [Officepod](https://github.com/seoyoochan/officepod/) [](https://travis-ci.org/seoyoochan/officepod)
|
2
2
|
|
3
|
+
This gem helps separate concerns of the complicating Officepod logics.
|
4
|
+
All of Officepod-specific logics happens behind the scenes.
|
5
|
+
You just cast the spell on your place!
|
6
|
+
|
3
7
|
## Install
|
4
8
|
|
5
9
|
Add this line to your application's Gemfile:
|
@@ -24,11 +28,34 @@ Or install it yourself as:
|
|
24
28
|
|
25
29
|
## Usage
|
26
30
|
|
27
|
-
|
31
|
+
```ruby
|
32
|
+
class Api::UsersController < ApplicationController
|
33
|
+
include Officepod
|
34
|
+
before_filter :user_params
|
35
|
+
|
36
|
+
def login
|
37
|
+
response = officepod({command: "login", body: params[:user]})
|
38
|
+
respond_to do |format|
|
39
|
+
format.json { render json: response, status: 200 }
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
def logout
|
44
|
+
response = officepod({command: "logout"})
|
45
|
+
respond_to do |format|
|
46
|
+
format.json { render json: response, status: 200 }
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
private
|
51
|
+
def user_params
|
52
|
+
params.require(:user).permit!
|
53
|
+
end
|
54
|
+
end
|
55
|
+
```
|
28
56
|
|
29
57
|
## Help and Docs
|
30
58
|
|
31
|
-
* [Docs](docs/)
|
32
59
|
* supergnee@gmail.com
|
33
60
|
|
34
61
|
## Development
|
data/lib/officepod/version.rb
CHANGED