dingtalk-robot 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +8 -0
- data/.rubocop.yml +16 -0
- data/.ruby-version +1 -0
- data/.travis.yml +9 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +16 -0
- data/Gemfile.lock +69 -0
- data/README.md +46 -0
- data/Rakefile +4 -0
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/dingtalk-robot.gemspec +27 -0
- data/lib/dingtalk/robot.rb +11 -0
- data/lib/dingtalk/robot/version.rb +7 -0
- metadata +71 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 5610c1eb754261c791d47dea3e5d27f3f42b51e7865ea250b49a9acf52d919b2
|
4
|
+
data.tar.gz: ab3d436f7ea8acc7ddb1aec8521547845da90c89713671e30222f6b109d15f82
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 80806218ea40567fa48584dd7c5af3b45ba750d00f4bf2d6f47ea2bb185b8c0580c4a58a1ef791c5697a9b444925b8d97bb27123a4f7feb0f5e66959d6dc951d
|
7
|
+
data.tar.gz: b05e185d0d1eefd1588548013bbeafdc44e6c613573c6f028f3bce94cb7718d96f2b8fa7ea23cd5d27e4ed9752a5257b0fd12c842cb2e240be302ebba7b426d5
|
data/.gitignore
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
AllCops:
|
2
|
+
TargetRubyVersion: 2.5
|
3
|
+
Metrics/LineLength:
|
4
|
+
Max: 120
|
5
|
+
Metrics/MethodLength:
|
6
|
+
Max: 30 # default * 3
|
7
|
+
Metrics/AbcSize:
|
8
|
+
Max: 50 # default * 2
|
9
|
+
Metrics/ModuleLength:
|
10
|
+
Exclude:
|
11
|
+
- "**/*_spec.rb"
|
12
|
+
Metrics/BlockLength:
|
13
|
+
Exclude:
|
14
|
+
- "**/*_spec.rb"
|
15
|
+
Style/BlockDelimiters:
|
16
|
+
EnforcedStyle: braces_for_chaining
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.5.1
|
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at pinewong@163.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
source 'https://rubygems.org'
|
4
|
+
|
5
|
+
git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
|
6
|
+
|
7
|
+
# Specify your gem's dependencies in active_notifier.gemspec
|
8
|
+
gemspec
|
9
|
+
|
10
|
+
gem 'bundler', '~> 1.16'
|
11
|
+
gem 'byebug'
|
12
|
+
gem 'codecov', '>= 0.1.10', require: false
|
13
|
+
gem 'rake', '~> 10.0'
|
14
|
+
gem 'rspec', '~> 3.7', require: false
|
15
|
+
gem 'rubocop', '~> 0.58.1', require: false
|
16
|
+
gem 'simplecov', require: false
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,69 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
dingtalk-robot (0.1.0)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
ast (2.4.0)
|
10
|
+
byebug (10.0.2)
|
11
|
+
codecov (0.1.10)
|
12
|
+
json
|
13
|
+
simplecov
|
14
|
+
url
|
15
|
+
diff-lcs (1.3)
|
16
|
+
docile (1.3.1)
|
17
|
+
jaro_winkler (1.5.1)
|
18
|
+
json (2.1.0)
|
19
|
+
parallel (1.12.1)
|
20
|
+
parser (2.5.1.2)
|
21
|
+
ast (~> 2.4.0)
|
22
|
+
powerpack (0.1.2)
|
23
|
+
rainbow (3.0.0)
|
24
|
+
rake (10.5.0)
|
25
|
+
rspec (3.8.0)
|
26
|
+
rspec-core (~> 3.8.0)
|
27
|
+
rspec-expectations (~> 3.8.0)
|
28
|
+
rspec-mocks (~> 3.8.0)
|
29
|
+
rspec-core (3.8.0)
|
30
|
+
rspec-support (~> 3.8.0)
|
31
|
+
rspec-expectations (3.8.1)
|
32
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
33
|
+
rspec-support (~> 3.8.0)
|
34
|
+
rspec-mocks (3.8.0)
|
35
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
36
|
+
rspec-support (~> 3.8.0)
|
37
|
+
rspec-support (3.8.0)
|
38
|
+
rubocop (0.58.2)
|
39
|
+
jaro_winkler (~> 1.5.1)
|
40
|
+
parallel (~> 1.10)
|
41
|
+
parser (>= 2.5, != 2.5.1.1)
|
42
|
+
powerpack (~> 0.1)
|
43
|
+
rainbow (>= 2.2.2, < 4.0)
|
44
|
+
ruby-progressbar (~> 1.7)
|
45
|
+
unicode-display_width (~> 1.0, >= 1.0.1)
|
46
|
+
ruby-progressbar (1.10.0)
|
47
|
+
simplecov (0.16.1)
|
48
|
+
docile (~> 1.1)
|
49
|
+
json (>= 1.8, < 3)
|
50
|
+
simplecov-html (~> 0.10.0)
|
51
|
+
simplecov-html (0.10.2)
|
52
|
+
unicode-display_width (1.4.0)
|
53
|
+
url (0.3.2)
|
54
|
+
|
55
|
+
PLATFORMS
|
56
|
+
ruby
|
57
|
+
|
58
|
+
DEPENDENCIES
|
59
|
+
bundler (~> 1.16)
|
60
|
+
byebug
|
61
|
+
codecov (>= 0.1.10)
|
62
|
+
dingtalk-robot!
|
63
|
+
rake (~> 10.0)
|
64
|
+
rspec (~> 3.7)
|
65
|
+
rubocop (~> 0.58.1)
|
66
|
+
simplecov
|
67
|
+
|
68
|
+
BUNDLED WITH
|
69
|
+
1.16.2
|
data/README.md
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
# Dingtalk::Robot
|
2
|
+
|
3
|
+
A simple wrapper for [DingTalk Group Robot](https://open-doc.dingtalk.com/microapp/serverapi2/qf2nxq).
|
4
|
+
|
5
|
+
[![Gem Version](https://badge.fury.io/rb/dingtalk-robot.svg)](https://rubygems.org/gems/dingtalk-robot)
|
6
|
+
[![Build Status](https://travis-ci.org/pinewong/dingtalk-robot.svg)](https://travis-ci.org/pinewong/dingtalk-robot)
|
7
|
+
[![Test Coverage](https://codecov.io/github/pinewong/dingtalk-robot/coverage.svg?branch=master)](https://codecov.io/github/pinewong/dingtalk-robot?branch=master)
|
8
|
+
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
Add this line to your application's Gemfile:
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
gem 'dingtalk-robot'
|
15
|
+
```
|
16
|
+
|
17
|
+
And then execute:
|
18
|
+
|
19
|
+
|
20
|
+
```shell
|
21
|
+
$ bundle
|
22
|
+
```
|
23
|
+
|
24
|
+
Or install it yourself as:
|
25
|
+
|
26
|
+
```shell
|
27
|
+
$ gem install dingtalk-robot
|
28
|
+
```
|
29
|
+
|
30
|
+
## Usage
|
31
|
+
|
32
|
+
TODO: Write usage instructions here
|
33
|
+
|
34
|
+
## Development
|
35
|
+
|
36
|
+
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
37
|
+
|
38
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
39
|
+
|
40
|
+
## Contributing
|
41
|
+
|
42
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/pinewong/dingtalk-robot. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
43
|
+
|
44
|
+
## Code of Conduct
|
45
|
+
|
46
|
+
Everyone interacting in the Dingtalk::Robot project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/pinewong/dingtalk-robot/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require 'bundler/setup'
|
5
|
+
require 'dingtalk/robot'
|
6
|
+
|
7
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
8
|
+
# with your gem easier. You can also use a different console, if you like.
|
9
|
+
|
10
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
11
|
+
# require 'pry'
|
12
|
+
# Pry.start
|
13
|
+
|
14
|
+
require 'irb'
|
15
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
require 'dingtalk/robot/version'
|
6
|
+
|
7
|
+
Gem::Specification.new do |spec|
|
8
|
+
spec.name = 'dingtalk-robot'
|
9
|
+
spec.version = Dingtalk::Robot::VERSION
|
10
|
+
spec.authors = ['Pine Wong']
|
11
|
+
spec.email = ['pinewong@163.com']
|
12
|
+
|
13
|
+
spec.summary = 'A simple wrapper for DingTalk Group Robot.'
|
14
|
+
spec.description = 'A simple wrapper for DingTalk Group Robot.'
|
15
|
+
spec.homepage = 'https://github.com/pinewong/dingtalk-robot'
|
16
|
+
|
17
|
+
# Specify which files should be added to the gem when it is released.
|
18
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
19
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
20
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
21
|
+
end
|
22
|
+
spec.bindir = 'exe'
|
23
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
|
+
spec.require_paths = ['lib']
|
25
|
+
|
26
|
+
spec.add_development_dependency 'bundler', '~> 1.16'
|
27
|
+
end
|
metadata
ADDED
@@ -0,0 +1,71 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: dingtalk-robot
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Pine Wong
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-09-16 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.16'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.16'
|
27
|
+
description: A simple wrapper for DingTalk Group Robot.
|
28
|
+
email:
|
29
|
+
- pinewong@163.com
|
30
|
+
executables: []
|
31
|
+
extensions: []
|
32
|
+
extra_rdoc_files: []
|
33
|
+
files:
|
34
|
+
- ".gitignore"
|
35
|
+
- ".rubocop.yml"
|
36
|
+
- ".ruby-version"
|
37
|
+
- ".travis.yml"
|
38
|
+
- CODE_OF_CONDUCT.md
|
39
|
+
- Gemfile
|
40
|
+
- Gemfile.lock
|
41
|
+
- README.md
|
42
|
+
- Rakefile
|
43
|
+
- bin/console
|
44
|
+
- bin/setup
|
45
|
+
- dingtalk-robot.gemspec
|
46
|
+
- lib/dingtalk/robot.rb
|
47
|
+
- lib/dingtalk/robot/version.rb
|
48
|
+
homepage: https://github.com/pinewong/dingtalk-robot
|
49
|
+
licenses: []
|
50
|
+
metadata: {}
|
51
|
+
post_install_message:
|
52
|
+
rdoc_options: []
|
53
|
+
require_paths:
|
54
|
+
- lib
|
55
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
56
|
+
requirements:
|
57
|
+
- - ">="
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: '0'
|
60
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
61
|
+
requirements:
|
62
|
+
- - ">="
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: '0'
|
65
|
+
requirements: []
|
66
|
+
rubyforge_project:
|
67
|
+
rubygems_version: 2.7.6
|
68
|
+
signing_key:
|
69
|
+
specification_version: 4
|
70
|
+
summary: A simple wrapper for DingTalk Group Robot.
|
71
|
+
test_files: []
|