line_notify 0.1.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +62 -1
- data/Guardfile +48 -0
- data/README.md +46 -2
- data/lib/line_notify/client.rb +2 -2
- data/lib/line_notify/version.rb +1 -1
- data/line_notify.gemspec +7 -0
- metadata +101 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2c66d0a57211bbdd908d645a08d54e1cc3620626df2f52f73875faa6a60f998
|
4
|
+
data.tar.gz: 9962d8e1863a7ed8679b2747532356d92b822c4cc94f0e8bd5fb4ccc617f2f6e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a93b68f1caf2a4c7109bb6bfc97b2474202ef49469cfafebcd16da567b2d7add583f8d2c31c1299f5686e5a5bba1acfa3337d30693fd814bd54bceda54933446
|
7
|
+
data.tar.gz: e83c81b6d3baea0d5d5df9ee8f379865714d4cb6f0dcea4a11dfd18bc346229baf6d0cb46a533fcc0462d1f22dee1f21b5bf2f67cce8b43599bc5650d1cdff65
|
data/Gemfile.lock
CHANGED
@@ -1,13 +1,54 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
line_notify (
|
4
|
+
line_notify (1.0.0)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
|
+
coderay (1.1.2)
|
10
|
+
coveralls (0.8.21)
|
11
|
+
json (>= 1.8, < 3)
|
12
|
+
simplecov (~> 0.14.1)
|
13
|
+
term-ansicolor (~> 1.3)
|
14
|
+
thor (~> 0.19.4)
|
15
|
+
tins (~> 1.6)
|
9
16
|
diff-lcs (1.3)
|
17
|
+
docile (1.1.5)
|
18
|
+
ffi (1.9.18)
|
19
|
+
formatador (0.2.5)
|
20
|
+
guard (2.14.2)
|
21
|
+
formatador (>= 0.2.4)
|
22
|
+
listen (>= 2.7, < 4.0)
|
23
|
+
lumberjack (>= 1.0.12, < 2.0)
|
24
|
+
nenv (~> 0.1)
|
25
|
+
notiffany (~> 0.0)
|
26
|
+
pry (>= 0.9.12)
|
27
|
+
shellany (~> 0.0)
|
28
|
+
thor (>= 0.18.1)
|
29
|
+
guard-compat (1.2.1)
|
30
|
+
guard-rspec (4.7.3)
|
31
|
+
guard (~> 2.1)
|
32
|
+
guard-compat (~> 1.1)
|
33
|
+
rspec (>= 2.99.0, < 4.0)
|
34
|
+
json (2.1.0)
|
35
|
+
listen (3.1.5)
|
36
|
+
rb-fsevent (~> 0.9, >= 0.9.4)
|
37
|
+
rb-inotify (~> 0.9, >= 0.9.7)
|
38
|
+
ruby_dep (~> 1.2)
|
39
|
+
lumberjack (1.0.12)
|
40
|
+
method_source (0.9.0)
|
41
|
+
nenv (0.3.0)
|
42
|
+
notiffany (0.1.1)
|
43
|
+
nenv (~> 0.1)
|
44
|
+
shellany (~> 0.0)
|
45
|
+
pry (0.11.3)
|
46
|
+
coderay (~> 1.1.0)
|
47
|
+
method_source (~> 0.9.0)
|
10
48
|
rake (10.5.0)
|
49
|
+
rb-fsevent (0.10.2)
|
50
|
+
rb-inotify (0.9.10)
|
51
|
+
ffi (>= 0.5.0, < 2)
|
11
52
|
rspec (3.7.0)
|
12
53
|
rspec-core (~> 3.7.0)
|
13
54
|
rspec-expectations (~> 3.7.0)
|
@@ -21,15 +62,35 @@ GEM
|
|
21
62
|
diff-lcs (>= 1.2.0, < 2.0)
|
22
63
|
rspec-support (~> 3.7.0)
|
23
64
|
rspec-support (3.7.1)
|
65
|
+
ruby_dep (1.5.0)
|
66
|
+
shellany (0.0.1)
|
67
|
+
simplecov (0.14.1)
|
68
|
+
docile (~> 1.1.0)
|
69
|
+
json (>= 1.8, < 3)
|
70
|
+
simplecov-html (~> 0.10.0)
|
71
|
+
simplecov-html (0.10.2)
|
72
|
+
term-ansicolor (1.6.0)
|
73
|
+
tins (~> 1.0)
|
74
|
+
terminal-notifier (2.0.0)
|
75
|
+
terminal-notifier-guard (1.7.0)
|
76
|
+
thor (0.19.4)
|
77
|
+
tins (1.16.3)
|
24
78
|
|
25
79
|
PLATFORMS
|
26
80
|
ruby
|
27
81
|
|
28
82
|
DEPENDENCIES
|
29
83
|
bundler (~> 1.16)
|
84
|
+
coveralls
|
85
|
+
ffi (= 1.9.18)
|
86
|
+
guard
|
87
|
+
guard-rspec
|
30
88
|
line_notify!
|
89
|
+
pry
|
31
90
|
rake (~> 10.0)
|
32
91
|
rspec (~> 3.0)
|
92
|
+
terminal-notifier
|
93
|
+
terminal-notifier-guard
|
33
94
|
|
34
95
|
BUNDLED WITH
|
35
96
|
1.16.0
|
data/Guardfile
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
# A sample Guardfile
|
2
|
+
# More info at https://github.com/guard/guard#readme
|
3
|
+
|
4
|
+
## Uncomment and set this to only include directories you want to watch
|
5
|
+
# directories %w(app lib config test spec features) \
|
6
|
+
# .select{|d| Dir.exists?(d) ? d : UI.warning("Directory #{d} does not exist")}
|
7
|
+
|
8
|
+
## Note: if you are using the `directories` clause above and you are not
|
9
|
+
## watching the project directory ('.'), then you will want to move
|
10
|
+
## the Guardfile to a watched dir and symlink it back, e.g.
|
11
|
+
#
|
12
|
+
# $ mkdir config
|
13
|
+
# $ mv Guardfile config/
|
14
|
+
# $ ln -s config/Guardfile .
|
15
|
+
#
|
16
|
+
# and, you'll have to watch "config/Guardfile" instead of "Guardfile"
|
17
|
+
|
18
|
+
# Note: The cmd option is now required due to the increasing number of ways
|
19
|
+
# rspec may be run, below are examples of the most common uses.
|
20
|
+
# * bundler: 'bundle exec rspec'
|
21
|
+
# * bundler binstubs: 'bin/rspec'
|
22
|
+
# * spring: 'bin/rspec' (This will use spring if running and you have
|
23
|
+
# installed the spring binstubs per the docs)
|
24
|
+
# * zeus: 'zeus rspec' (requires the server to be started separately)
|
25
|
+
# * 'just' rspec: 'rspec'
|
26
|
+
|
27
|
+
guard :rspec, cmd: "bundle exec rspec" do
|
28
|
+
require "guard/rspec/dsl"
|
29
|
+
dsl = Guard::RSpec::Dsl.new(self)
|
30
|
+
|
31
|
+
# Feel free to open issues for suggestions and improvements
|
32
|
+
|
33
|
+
# RSpec files
|
34
|
+
rspec = dsl.rspec
|
35
|
+
watch(rspec.spec_helper) { rspec.spec_dir }
|
36
|
+
watch(rspec.spec_support) { rspec.spec_dir }
|
37
|
+
watch(rspec.spec_files)
|
38
|
+
|
39
|
+
# Ruby files
|
40
|
+
ruby = dsl.ruby
|
41
|
+
dsl.watch_spec_files_for(ruby.lib_files)
|
42
|
+
|
43
|
+
# Turnip features and steps
|
44
|
+
watch(%r{^spec/acceptance/(.+)\.feature$})
|
45
|
+
watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) do |m|
|
46
|
+
Dir[File.join("**/#{m[1]}.feature")][0] || "spec/acceptance"
|
47
|
+
end
|
48
|
+
end
|
data/README.md
CHANGED
@@ -1,8 +1,14 @@
|
|
1
1
|
# LineNotify
|
2
2
|
|
3
|
+
[![Gem Version](https://img.shields.io/gem/v/line_notify.svg?style=flat)](http://badge.fury.io/rb/line_notify)
|
4
|
+
[![Build Status](https://travis-ci.org/YuzuruS/line_notify.svg?branch=master)](https://travis-ci.org/YuzuruS/line_notify)
|
5
|
+
[![Maintainability](https://api.codeclimate.com/v1/badges/d74bc622ab27e20bafa9/maintainability)](https://codeclimate.com/github/YuzuruS/line_notify/maintainability)
|
6
|
+
[![Coverage Status](https://coveralls.io/repos/github/YuzuruS/line_notify/badge.svg?branch=master)](https://coveralls.io/github/YuzuruS/line_notify?branch=master)
|
7
|
+
[![Dependency Status](https://beta.gemnasium.com/badges/github.com/YuzuruS/line_notify.svg)](https://beta.gemnasium.com/projects/github.com/YuzuruS/line_notify)
|
8
|
+
|
3
9
|
Ruby Client for the LINE notify API
|
4
10
|
|
5
|
-
https://notify-bot.line.me/
|
11
|
+
https://notify-bot.line.me/ja/
|
6
12
|
|
7
13
|
## Installation
|
8
14
|
|
@@ -22,6 +28,7 @@ Or install it yourself as:
|
|
22
28
|
|
23
29
|
## Usage
|
24
30
|
|
31
|
+
|
25
32
|
```ruby
|
26
33
|
line_notify = LineNotify.new(YOUR_LINE_TOKEN)
|
27
34
|
options = {message: 'hoge', stickerPackageId: 1, stickerId: 113}
|
@@ -31,10 +38,47 @@ line_notify.send(options)
|
|
31
38
|
|
32
39
|
![2018-02-15 22 49 39](https://user-images.githubusercontent.com/1485195/36259741-8f132972-12a2-11e8-9469-b205310709b3.png)
|
33
40
|
|
34
|
-
|
35
41
|
sticker id list
|
36
42
|
https://devdocs.line.me/files/sticker_list.pdf
|
37
43
|
|
44
|
+
```ruby
|
45
|
+
line_notify = LineNotify.new(YOUR_LINE_TOKEN)
|
46
|
+
options = {
|
47
|
+
message: '可愛い画像',
|
48
|
+
imageFullsize: "https://www.pakutaso.com/shared/img/thumb/SAYAPAKU5347_TP_V4.jpg",
|
49
|
+
imageThumbnail: "https://www.pakutaso.com/shared/img/thumb/SAYAPAKU5347_TP_V.jpg"
|
50
|
+
}
|
51
|
+
line_notify.send(options)
|
52
|
+
```
|
53
|
+
|
54
|
+
![2018-02-16 0 53 38](https://user-images.githubusercontent.com/1485195/36266096-0ece0310-12b4-11e8-9b7e-67af11dadf9f.png)
|
55
|
+
|
56
|
+
|
57
|
+
detail
|
58
|
+
https://notify-bot.line.me/doc/ja/
|
59
|
+
|
60
|
+
## Issue of access token
|
61
|
+
|
62
|
+
https://notify-bot.line.me/ja/
|
63
|
+
|
64
|
+
---
|
65
|
+
|
66
|
+
![1](https://user-images.githubusercontent.com/1485195/36305805-83e19c4e-1358-11e8-810f-8d351e5091d0.jpg)
|
67
|
+
|
68
|
+
---
|
69
|
+
|
70
|
+
![2](https://user-images.githubusercontent.com/1485195/36305804-83bdcee0-1358-11e8-841e-f0354b35fe6a.jpg)
|
71
|
+
|
72
|
+
---
|
73
|
+
|
74
|
+
![4](https://user-images.githubusercontent.com/1485195/36305803-838a0df8-1358-11e8-85f1-e6fbf164c4a3.jpg)
|
75
|
+
|
76
|
+
---
|
77
|
+
|
78
|
+
![5](https://user-images.githubusercontent.com/1485195/36305806-8403a44c-1358-11e8-8432-a85fc7ae5436.jpg)
|
79
|
+
|
80
|
+
---
|
81
|
+
|
38
82
|
## Development
|
39
83
|
|
40
84
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
data/lib/line_notify/client.rb
CHANGED
@@ -6,7 +6,7 @@ module LineNotify
|
|
6
6
|
URI = URI.parse("https://notify-api.line.me/api/notify")
|
7
7
|
|
8
8
|
def initialize(access_token)
|
9
|
-
@access_token = (ENV['LINE_ACCESS_TOKEN']
|
9
|
+
@access_token = (access_token || ENV['LINE_ACCESS_TOKEN'])
|
10
10
|
end
|
11
11
|
|
12
12
|
def send(options)
|
@@ -24,4 +24,4 @@ module LineNotify
|
|
24
24
|
request
|
25
25
|
end
|
26
26
|
end
|
27
|
-
end
|
27
|
+
end
|
data/lib/line_notify/version.rb
CHANGED
data/line_notify.gemspec
CHANGED
@@ -24,4 +24,11 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.add_development_dependency "bundler", "~> 1.16"
|
25
25
|
spec.add_development_dependency "rake", "~> 10.0"
|
26
26
|
spec.add_development_dependency "rspec", "~> 3.0"
|
27
|
+
spec.add_development_dependency 'pry'
|
28
|
+
spec.add_development_dependency "guard-rspec"
|
29
|
+
spec.add_development_dependency "guard"
|
30
|
+
spec.add_development_dependency "terminal-notifier"
|
31
|
+
spec.add_development_dependency "terminal-notifier-guard"
|
32
|
+
spec.add_development_dependency 'coveralls'
|
33
|
+
spec.add_development_dependency 'ffi', '1.9.18'
|
27
34
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: line_notify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- YuzuruS
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-02-
|
11
|
+
date: 2018-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -52,6 +52,104 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: pry
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: guard-rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: guard
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: terminal-notifier
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: terminal-notifier-guard
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: coveralls
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: ffi
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - '='
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: 1.9.18
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - '='
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: 1.9.18
|
55
153
|
description: Client for the LINE notify API
|
56
154
|
email:
|
57
155
|
- navitima@gmail.com
|
@@ -65,6 +163,7 @@ files:
|
|
65
163
|
- CODE_OF_CONDUCT.md
|
66
164
|
- Gemfile
|
67
165
|
- Gemfile.lock
|
166
|
+
- Guardfile
|
68
167
|
- LICENSE.txt
|
69
168
|
- README.md
|
70
169
|
- Rakefile
|