slack-client 0.0.1
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 +7 -0
- data/.gitignore +70 -0
- data/.rubocop.yml +91 -0
- data/Gemfile +3 -0
- data/LICENSE +22 -0
- data/README.md +31 -0
- data/Rakefile +1 -0
- data/bin/slack +7 -0
- data/lib/slack-client.rb +1 -0
- data/lib/slack/api.rb +5 -0
- data/lib/slack/api/base.rb +27 -0
- data/lib/slack/api/channels.rb +21 -0
- data/lib/slack/api/im.rb +15 -0
- data/lib/slack/api/users.rb +9 -0
- data/lib/slack/cli.rb +9 -0
- data/lib/slack/cli/app.rb +53 -0
- data/lib/slack/cli/base.rb +39 -0
- data/lib/slack/cli/channels.rb +20 -0
- data/lib/slack/cli/config.rb +17 -0
- data/lib/slack/cli/im.rb +15 -0
- data/lib/slack/cli/users.rb +19 -0
- data/lib/slack/client.rb +16 -0
- data/lib/slack/utils.rb +25 -0
- data/lib/slack/version.rb +3 -0
- data/slack-client.gemspec +30 -0
- metadata +181 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 4d77e9fa969018d6cf1751745c0594566473f29a
|
4
|
+
data.tar.gz: 816b9e9e0d3ce9e10efe7a23aa75cfc84615aba0
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 2d4068089b12380475d786ec17a7fa10af43fc00597491d5f40aeee28cefdee1ebd2d4673517f090d23eab096d7984512d438e1cbfbab0a6c916009e6065ff6d
|
7
|
+
data.tar.gz: 072e07949e095385cd3a4c84f196d24a2d15dd60d93958ff121500ce183563ee9fb7b20e89faebbf35a1a43d32b55d222549be9e6b8f24acad77c53edb03e65a
|
data/.gitignore
ADDED
@@ -0,0 +1,70 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
*.bundle
|
4
|
+
*.so
|
5
|
+
*.o
|
6
|
+
*.a
|
7
|
+
mkmf.log
|
8
|
+
/.config
|
9
|
+
/coverage/
|
10
|
+
/InstalledFiles
|
11
|
+
/pkg/
|
12
|
+
/spec/reports/
|
13
|
+
/test/tmp/
|
14
|
+
/test/version_tmp/
|
15
|
+
/tmp/
|
16
|
+
|
17
|
+
## Documentation cache and generated files:
|
18
|
+
/.yardoc/
|
19
|
+
/_yardoc/
|
20
|
+
/doc/
|
21
|
+
/rdoc/
|
22
|
+
|
23
|
+
## Environment normalisation:
|
24
|
+
/.bundle/
|
25
|
+
/lib/bundler/man/
|
26
|
+
|
27
|
+
## Specific to Gems/Libraries:
|
28
|
+
Gemfile.lock
|
29
|
+
.ruby-version
|
30
|
+
.ruby-gemset
|
31
|
+
/.rvmrc
|
32
|
+
|
33
|
+
## Specific to RubyMotion:
|
34
|
+
.dat*
|
35
|
+
.repl_history
|
36
|
+
build/
|
37
|
+
|
38
|
+
## Specific to Vim:
|
39
|
+
[._]*.s[a-w][a-z]
|
40
|
+
[._]s[a-w][a-z]
|
41
|
+
*.un~
|
42
|
+
Session.vim
|
43
|
+
.netrwhist
|
44
|
+
*~
|
45
|
+
|
46
|
+
## Specific to Sublime Text:
|
47
|
+
# cache files for sublime text
|
48
|
+
*.tmlanguage.cache
|
49
|
+
*.tmPreferences.cache
|
50
|
+
*.stTheme.cache
|
51
|
+
|
52
|
+
# workspace files are user-specific
|
53
|
+
*.sublime-workspace
|
54
|
+
|
55
|
+
# project files should be checked into the repository, unless a significant
|
56
|
+
# proportion of contributors will probably not be using SublimeText
|
57
|
+
# *.sublime-project
|
58
|
+
|
59
|
+
# sftp configuration file
|
60
|
+
sftp-config.json
|
61
|
+
|
62
|
+
## Specific to TextMate:
|
63
|
+
*.tmproj
|
64
|
+
*.tmproject
|
65
|
+
tmtags
|
66
|
+
|
67
|
+
## Specific to OS X:
|
68
|
+
.DS_Store
|
69
|
+
.AppleDouble
|
70
|
+
.LSOverride
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,91 @@
|
|
1
|
+
AllCops:
|
2
|
+
Includes:
|
3
|
+
- 'Gemfile'
|
4
|
+
- 'slack-client.gemspec'
|
5
|
+
|
6
|
+
# Avoid long parameter lists
|
7
|
+
ParameterLists:
|
8
|
+
Max: 5
|
9
|
+
CountKeywordArgs: true
|
10
|
+
|
11
|
+
MethodLength:
|
12
|
+
CountComments: false
|
13
|
+
Max: 15
|
14
|
+
|
15
|
+
# Avoid more than `Max` levels of nesting.
|
16
|
+
BlockNesting:
|
17
|
+
Max: 4
|
18
|
+
|
19
|
+
# Align with the style guide.
|
20
|
+
CollectionMethods:
|
21
|
+
PreferredMethods:
|
22
|
+
collect: 'map'
|
23
|
+
collect!: 'map!'
|
24
|
+
inject: 'reduce'
|
25
|
+
detect: 'find'
|
26
|
+
find_all: 'select'
|
27
|
+
|
28
|
+
# Limit line length
|
29
|
+
LineLength:
|
30
|
+
Enabled: true
|
31
|
+
|
32
|
+
# Disable documentation checking until a class needs to be documented once
|
33
|
+
Documentation:
|
34
|
+
Enabled: false
|
35
|
+
|
36
|
+
# Enforce Ruby 1.8-compatible hash syntax
|
37
|
+
HashSyntax:
|
38
|
+
EnforcedStyle: ruby19
|
39
|
+
|
40
|
+
# No spaces inside hash literals
|
41
|
+
SpaceInsideHashLiteralBraces:
|
42
|
+
EnforcedStyle: space
|
43
|
+
EnforcedStyleForEmptyBraces: no_space
|
44
|
+
|
45
|
+
# Allow dots at the end of lines
|
46
|
+
DotPosition:
|
47
|
+
Enabled: false
|
48
|
+
|
49
|
+
# Don't require magic comment at the top of every file
|
50
|
+
Encoding:
|
51
|
+
Enabled: false
|
52
|
+
|
53
|
+
# Enforce outdenting of access modifiers (i.e. public, private, protected)
|
54
|
+
AccessModifierIndentation:
|
55
|
+
EnforcedStyle: indent
|
56
|
+
|
57
|
+
EmptyLinesAroundAccessModifier:
|
58
|
+
Enabled: true
|
59
|
+
|
60
|
+
# Align ends correctly
|
61
|
+
EndAlignment:
|
62
|
+
AlignWith: variable
|
63
|
+
|
64
|
+
AlignParameters:
|
65
|
+
EnforcedStyle: with_fixed_indentation
|
66
|
+
|
67
|
+
# Indentation of when/else
|
68
|
+
CaseIndentation:
|
69
|
+
IndentWhenRelativeTo: end
|
70
|
+
IndentOneStep: false
|
71
|
+
|
72
|
+
DoubleNegation:
|
73
|
+
Enabled: false
|
74
|
+
|
75
|
+
PercentLiteralDelimiters:
|
76
|
+
PreferredDelimiters:
|
77
|
+
'%': '{}'
|
78
|
+
'%i': '{}'
|
79
|
+
'%q': '{}'
|
80
|
+
'%Q': '{}'
|
81
|
+
'%r': '{}'
|
82
|
+
'%s': '{}'
|
83
|
+
'%w': '[]'
|
84
|
+
'%W': '[]'
|
85
|
+
'%x': '{}'
|
86
|
+
|
87
|
+
RegexpLiteral:
|
88
|
+
MaxSlashes: 0
|
89
|
+
|
90
|
+
StringLiterals:
|
91
|
+
EnforcedStyle: single_quotes
|
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 CodeUnion, Inc.
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# Slack::Client
|
2
|
+
|
3
|
+
TODO: Write a gem description
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'slack-client'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install slack-client
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
TODO: Write usage instructions here
|
24
|
+
|
25
|
+
## Contributing
|
26
|
+
|
27
|
+
1. Fork it ( https://github.com/[my-github-username]/slack-client/fork )
|
28
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
29
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
30
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
31
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'bundler/gem_tasks'
|
data/bin/slack
ADDED
data/lib/slack-client.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'slack/client'
|
data/lib/slack/api.rb
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'faraday'
|
2
|
+
require 'addressable/template'
|
3
|
+
|
4
|
+
module Slack
|
5
|
+
module API
|
6
|
+
class Base
|
7
|
+
attr_reader :default_args
|
8
|
+
|
9
|
+
def initialize(default_args = {})
|
10
|
+
@default_args = default_args
|
11
|
+
end
|
12
|
+
|
13
|
+
def get(endpoint, args = {})
|
14
|
+
Faraday.get(api_url(endpoint, default_args.merge(args))).body
|
15
|
+
end
|
16
|
+
|
17
|
+
private
|
18
|
+
|
19
|
+
URL_TEMPLATE =
|
20
|
+
Addressable::Template.new('https://slack.com/api/{endpoint}{?args*}')
|
21
|
+
|
22
|
+
def api_url(endpoint, args = {})
|
23
|
+
URL_TEMPLATE.expand(endpoint: endpoint, args: args)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Slack
|
2
|
+
module API
|
3
|
+
class Channels < Slack::API::Base
|
4
|
+
def info(args = {})
|
5
|
+
fail ArgumentError, 'channel is required' unless args.key?(:channel)
|
6
|
+
|
7
|
+
get('channels.list', args)
|
8
|
+
end
|
9
|
+
|
10
|
+
def history(args = {})
|
11
|
+
fail ArgumentError, 'channel is required' unless args.key?(:channel)
|
12
|
+
|
13
|
+
get('channels.history', args)
|
14
|
+
end
|
15
|
+
|
16
|
+
def list(args = {})
|
17
|
+
get('channels.list', args)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
data/lib/slack/api/im.rb
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
module Slack
|
2
|
+
module API
|
3
|
+
class IM < Slack::API::Base
|
4
|
+
def history(args = {})
|
5
|
+
fail ArgumentError, 'channel is required' unless args.key?(:channel)
|
6
|
+
|
7
|
+
get('im.history', args)
|
8
|
+
end
|
9
|
+
|
10
|
+
def list(args = {})
|
11
|
+
get('im.list', args)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
data/lib/slack/cli.rb
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
module Slack
|
2
|
+
module CLI
|
3
|
+
class App < Slack::CLI::Base
|
4
|
+
desc 'channels SUBCOMMAND ...ARGS', 'Channel-related commands'
|
5
|
+
subcommand 'channels', Slack::CLI::Channels
|
6
|
+
|
7
|
+
desc 'im SUBCOMMAND ...ARGS', 'IM-related commands'
|
8
|
+
subcommand 'im', Slack::CLI::IM
|
9
|
+
|
10
|
+
desc 'users SUBCOMMAND ...ARGS', 'User-related commands'
|
11
|
+
subcommand 'users', Slack::CLI::Users
|
12
|
+
|
13
|
+
desc 'config SUBCOMMAND ...ARGS', 'Configuration-related commands'
|
14
|
+
subcommand 'config', Slack::CLI::Config
|
15
|
+
|
16
|
+
method_option :oldest,
|
17
|
+
aliases: '-o',
|
18
|
+
type: 'string',
|
19
|
+
desc: 'Slack timestamp of the oldest message to export'
|
20
|
+
method_option :latest,
|
21
|
+
aliases: '-l',
|
22
|
+
type: 'string',
|
23
|
+
desc: 'Slack timestamp of the latest message to export'
|
24
|
+
method_option :count,
|
25
|
+
aliases: '-c',
|
26
|
+
type: 'numeric',
|
27
|
+
desc: 'Maximum number of messages to export'
|
28
|
+
|
29
|
+
desc 'export <channel-id> [OPTIONS]',
|
30
|
+
'Export Slack data from <channel-id>.'
|
31
|
+
def export(channel_id)
|
32
|
+
args = options.merge(channel: channel_id)
|
33
|
+
|
34
|
+
if args.key?(:oldest)
|
35
|
+
parse_slack_timestamp(args[:oldest])
|
36
|
+
end
|
37
|
+
|
38
|
+
if args.key?(:latest)
|
39
|
+
args[:latest] = parse_slack_timestamp(args[:latest])
|
40
|
+
end
|
41
|
+
|
42
|
+
case channel_id
|
43
|
+
when /^C/
|
44
|
+
puts client.channels.history(args)
|
45
|
+
when /^D/
|
46
|
+
puts client.im.history(args)
|
47
|
+
else
|
48
|
+
fail ArgumentError, "Unknown channel format (got `#{channel_id}')"
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
require 'slack/client'
|
2
|
+
|
3
|
+
require 'thor'
|
4
|
+
require 'multi_json'
|
5
|
+
|
6
|
+
module Slack
|
7
|
+
module CLI
|
8
|
+
CONFIG_DIR = File.join(Dir.home, '.slack-client')
|
9
|
+
CONFIG_FILE = File.join(CONFIG_DIR, 'config')
|
10
|
+
|
11
|
+
class Base < Thor
|
12
|
+
class_option :token,
|
13
|
+
aliases: '-t',
|
14
|
+
desc: 'Your Slack API token'
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
def dump_json(obj)
|
19
|
+
MultiJson.dump(obj)
|
20
|
+
end
|
21
|
+
|
22
|
+
def load_json(json)
|
23
|
+
MultiJson.load(json)
|
24
|
+
end
|
25
|
+
|
26
|
+
def wrap_json(json)
|
27
|
+
dump_json(yield(load_json(json)))
|
28
|
+
end
|
29
|
+
|
30
|
+
def client
|
31
|
+
@client ||= Slack::Client.new(token: client_token)
|
32
|
+
end
|
33
|
+
|
34
|
+
def client_token
|
35
|
+
options[:token] || ENV['SLACK_TOKEN']
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Slack
|
2
|
+
module CLI
|
3
|
+
class Channels < Slack::CLI::Base
|
4
|
+
desc 'list', 'List all channels'
|
5
|
+
def list
|
6
|
+
puts client.channels.list
|
7
|
+
end
|
8
|
+
|
9
|
+
desc 'history <channel-id>', 'Print channel history for <channel-id>'
|
10
|
+
def history(channel_id)
|
11
|
+
puts client.channels.history(channel: channel_id)
|
12
|
+
end
|
13
|
+
|
14
|
+
desc 'info <channel-id>', 'Print channel info for <channel-id>'
|
15
|
+
def info(channel_id)
|
16
|
+
puts client.channels.history(channel: channel_id)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module Slack
|
2
|
+
module CLI
|
3
|
+
class Config < Slack::CLI::Base
|
4
|
+
desc 'set <OPTION="value" ...>',
|
5
|
+
"Update settings #{Slack::CLI::CONFIG_FILE}"
|
6
|
+
def set(*args)
|
7
|
+
unless Dir.exist?(Slack::CLI::CONFIG_DIR)
|
8
|
+
Dir.mkdir(Slack::CLI::CONFIG_DIR)
|
9
|
+
end
|
10
|
+
|
11
|
+
File.open(Slack::CLI::CONFIG_FILE, 'w') do |f|
|
12
|
+
f.puts args
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
data/lib/slack/cli/im.rb
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
module Slack
|
2
|
+
module CLI
|
3
|
+
class IM < Slack::CLI::Base
|
4
|
+
desc 'list', 'List all IMs'
|
5
|
+
def list
|
6
|
+
puts client.im.list
|
7
|
+
end
|
8
|
+
|
9
|
+
desc 'history <channel-id>', 'Display IM history for <channel-id>'
|
10
|
+
def history(channel_id)
|
11
|
+
puts client.channels.history(channel: channel_id)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module Slack
|
2
|
+
module CLI
|
3
|
+
class Users < Slack::CLI::Base
|
4
|
+
desc 'list', 'List all Slack users'
|
5
|
+
def list
|
6
|
+
puts client.users.list
|
7
|
+
end
|
8
|
+
|
9
|
+
desc 'info <user-id>', 'Display user info for <user-id>'
|
10
|
+
def info(user_id)
|
11
|
+
results = wrap_json(client.users.list) do |data|
|
12
|
+
data['members'].find { |m| m['id'] == user_id }
|
13
|
+
end
|
14
|
+
|
15
|
+
puts results
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
data/lib/slack/client.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'slack/api'
|
2
|
+
|
3
|
+
module Slack
|
4
|
+
class Client
|
5
|
+
attr_accessor :token
|
6
|
+
attr_reader :channels, :im, :users
|
7
|
+
|
8
|
+
def initialize(args = {})
|
9
|
+
@token = args[:token]
|
10
|
+
|
11
|
+
@channels = Slack::API::Channels.new(token: @token)
|
12
|
+
@im = Slack::API::IM.new(token: @token)
|
13
|
+
@users = Slack::API::Users.new(token: @token)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/lib/slack/utils.rb
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
module Slack
|
2
|
+
module Utils
|
3
|
+
module_function
|
4
|
+
|
5
|
+
# Public: Extracts the timestamp information encoded in a Slack-style
|
6
|
+
# timestamp (e.g., "p1409120227001488").
|
7
|
+
#
|
8
|
+
# slack_ts - The Slack-tyle timestamp, e.g., "p1409120227001488"
|
9
|
+
#
|
10
|
+
# Returns a Float containing the timestamp in UNIX time w/ milliseconds.
|
11
|
+
#
|
12
|
+
# Examples
|
13
|
+
#
|
14
|
+
# parse_slack_timestamp("p1409120227001488") # => 1409120227.001488
|
15
|
+
# parse_slack_timestamp("s1409192267000101") # => 1409192267.000101
|
16
|
+
def self.parse_slack_timestamp(slack_ts)
|
17
|
+
if match = slack_ts.match(/\A[a-z](\d+)\z/i)
|
18
|
+
match[1].to_f / 10**6
|
19
|
+
else
|
20
|
+
fail ArgumentError,
|
21
|
+
"argument does not look like a Slack timestamp (got `#{slack_s}')"
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'slack/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'slack-client'
|
8
|
+
spec.version = Slack::VERSION
|
9
|
+
spec.authors = ['Jesse Farmer']
|
10
|
+
spec.email = ['jesse@codeunion.io']
|
11
|
+
spec.summary = 'Ruby Slack API gem'
|
12
|
+
spec.description = 'A Ruby client for the Slack API.'
|
13
|
+
spec.homepage = 'http://github.com/codeunion/slack-client'
|
14
|
+
spec.license = 'MIT'
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ['lib']
|
20
|
+
|
21
|
+
spec.add_runtime_dependency 'faraday', '~> 0.9'
|
22
|
+
spec.add_runtime_dependency 'addressable', '~> 2.3'
|
23
|
+
spec.add_runtime_dependency 'thor', '~> 0.19'
|
24
|
+
spec.add_runtime_dependency 'multi_json', '~> 1.10'
|
25
|
+
spec.add_runtime_dependency 'dotenv', '~> 0.11'
|
26
|
+
|
27
|
+
spec.add_development_dependency 'bundler', '~> 1.6'
|
28
|
+
spec.add_development_dependency 'rubocop', '~> 0.25'
|
29
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
30
|
+
end
|
metadata
ADDED
@@ -0,0 +1,181 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: slack-client
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Jesse Farmer
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-09-28 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: faraday
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.9'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0.9'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: addressable
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '2.3'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '2.3'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: thor
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0.19'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0.19'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: multi_json
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.10'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.10'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: dotenv
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0.11'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0.11'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: bundler
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '1.6'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '1.6'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rubocop
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0.25'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0.25'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rake
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '10.0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '10.0'
|
125
|
+
description: A Ruby client for the Slack API.
|
126
|
+
email:
|
127
|
+
- jesse@codeunion.io
|
128
|
+
executables:
|
129
|
+
- slack
|
130
|
+
extensions: []
|
131
|
+
extra_rdoc_files: []
|
132
|
+
files:
|
133
|
+
- ".gitignore"
|
134
|
+
- ".rubocop.yml"
|
135
|
+
- Gemfile
|
136
|
+
- LICENSE
|
137
|
+
- README.md
|
138
|
+
- Rakefile
|
139
|
+
- bin/slack
|
140
|
+
- lib/slack-client.rb
|
141
|
+
- lib/slack/api.rb
|
142
|
+
- lib/slack/api/base.rb
|
143
|
+
- lib/slack/api/channels.rb
|
144
|
+
- lib/slack/api/im.rb
|
145
|
+
- lib/slack/api/users.rb
|
146
|
+
- lib/slack/cli.rb
|
147
|
+
- lib/slack/cli/app.rb
|
148
|
+
- lib/slack/cli/base.rb
|
149
|
+
- lib/slack/cli/channels.rb
|
150
|
+
- lib/slack/cli/config.rb
|
151
|
+
- lib/slack/cli/im.rb
|
152
|
+
- lib/slack/cli/users.rb
|
153
|
+
- lib/slack/client.rb
|
154
|
+
- lib/slack/utils.rb
|
155
|
+
- lib/slack/version.rb
|
156
|
+
- slack-client.gemspec
|
157
|
+
homepage: http://github.com/codeunion/slack-client
|
158
|
+
licenses:
|
159
|
+
- MIT
|
160
|
+
metadata: {}
|
161
|
+
post_install_message:
|
162
|
+
rdoc_options: []
|
163
|
+
require_paths:
|
164
|
+
- lib
|
165
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
166
|
+
requirements:
|
167
|
+
- - ">="
|
168
|
+
- !ruby/object:Gem::Version
|
169
|
+
version: '0'
|
170
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
171
|
+
requirements:
|
172
|
+
- - ">="
|
173
|
+
- !ruby/object:Gem::Version
|
174
|
+
version: '0'
|
175
|
+
requirements: []
|
176
|
+
rubyforge_project:
|
177
|
+
rubygems_version: 2.2.2
|
178
|
+
signing_key:
|
179
|
+
specification_version: 4
|
180
|
+
summary: Ruby Slack API gem
|
181
|
+
test_files: []
|