chatwork 0.0.3 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -1
- data/chatwork.gemspec +1 -1
- data/lib/chatwork.rb +1 -0
- data/lib/chatwork/me.rb +13 -0
- data/lib/chatwork/operations.rb +9 -0
- data/lib/chatwork/version.rb +1 -1
- metadata +18 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a1723fbfb198e843e9b5c80567a1964228fe0965
|
4
|
+
data.tar.gz: ac436cace863cdea5bbd088275dbc70f8fd42521
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7eebcff2d1a78d415605ef1ae15a0c0c19bf55d5a6d11382fc86862086c545d2b075ce24dd7bc985c17f6f6638f219c2d0f7d5673ee0d55502402826ff61bcc
|
7
|
+
data.tar.gz: 45e5b7f05457aa03c6f9c22a79a394135e5e875972f7dac62ba9d80e7a95534a39280ab82fbd7bb094a4c707049e3222fea0b135680ec48d7c742ea2952925ff
|
data/README.md
CHANGED
@@ -18,7 +18,13 @@ Or install it yourself as:
|
|
18
18
|
|
19
19
|
## Usage
|
20
20
|
|
21
|
-
|
21
|
+
```
|
22
|
+
require "chatwork"
|
23
|
+
|
24
|
+
# Create message
|
25
|
+
ChatWork.api_key = "XXX"
|
26
|
+
ChatWork::Message.create(room_id: 1234, body: "Hello, ChatWork!")
|
27
|
+
```
|
22
28
|
|
23
29
|
## Contributing
|
24
30
|
|
data/chatwork.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_dependency
|
21
|
+
spec.add_dependency "faraday", "~> 0.9.0"
|
22
22
|
|
23
23
|
spec.add_development_dependency "bundler", "~> 1.3"
|
24
24
|
spec.add_development_dependency "rake"
|
data/lib/chatwork.rb
CHANGED
data/lib/chatwork/me.rb
ADDED
data/lib/chatwork/operations.rb
CHANGED
@@ -2,6 +2,15 @@ module ChatWork
|
|
2
2
|
module Operations
|
3
3
|
def install_class_operations(*operations)
|
4
4
|
define_create if operations.include?(:create)
|
5
|
+
define_get if operations.include?(:get)
|
6
|
+
end
|
7
|
+
|
8
|
+
def define_get
|
9
|
+
instance_eval do
|
10
|
+
def get(params = {})
|
11
|
+
convert(ChatWork.client.get(path, params))
|
12
|
+
end
|
13
|
+
end
|
5
14
|
end
|
6
15
|
|
7
16
|
def define_create
|
data/lib/chatwork/version.rb
CHANGED
metadata
CHANGED
@@ -1,69 +1,69 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chatwork
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- asonas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.9.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.9.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '1.3'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1.3'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - ~>
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: 2.14.0
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - ~>
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 2.14.0
|
69
69
|
description: ChatWork is cloud-based business chat tool
|
@@ -73,7 +73,7 @@ executables: []
|
|
73
73
|
extensions: []
|
74
74
|
extra_rdoc_files: []
|
75
75
|
files:
|
76
|
-
- .gitignore
|
76
|
+
- ".gitignore"
|
77
77
|
- Gemfile
|
78
78
|
- LICENSE.txt
|
79
79
|
- README.md
|
@@ -83,6 +83,7 @@ files:
|
|
83
83
|
- lib/chatwork/chatwork_error.rb
|
84
84
|
- lib/chatwork/client.rb
|
85
85
|
- lib/chatwork/entity.rb
|
86
|
+
- lib/chatwork/me.rb
|
86
87
|
- lib/chatwork/message.rb
|
87
88
|
- lib/chatwork/operations.rb
|
88
89
|
- lib/chatwork/room.rb
|
@@ -99,20 +100,21 @@ require_paths:
|
|
99
100
|
- lib
|
100
101
|
required_ruby_version: !ruby/object:Gem::Requirement
|
101
102
|
requirements:
|
102
|
-
- -
|
103
|
+
- - ">="
|
103
104
|
- !ruby/object:Gem::Version
|
104
105
|
version: '0'
|
105
106
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
106
107
|
requirements:
|
107
|
-
- -
|
108
|
+
- - ">="
|
108
109
|
- !ruby/object:Gem::Version
|
109
110
|
version: '0'
|
110
111
|
requirements: []
|
111
112
|
rubyforge_project:
|
112
|
-
rubygems_version: 2.
|
113
|
+
rubygems_version: 2.2.2
|
113
114
|
signing_key:
|
114
115
|
specification_version: 4
|
115
116
|
summary: Ruby bindings of Chatwork API
|
116
117
|
test_files:
|
117
118
|
- spec/lib/chatwork_spec.rb
|
118
119
|
- spec/spec_helper.rb
|
120
|
+
has_rdoc:
|