fusuma-plugin-sendkey 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 707d75db2c999853574d86dc395d0b95fdef3ca57a734bc50dbafedb02170eb5
4
- data.tar.gz: 8842a7e50e1e20ac502a46da93b30d67449e0073cc4e31483db1eaa248119b52
3
+ metadata.gz: cdbd450a3576a7faf3c331d4a79aa78e9d3d806ac91e884adf83828d479af826
4
+ data.tar.gz: faf882164080733d4c019590dff0052d4dcbb42780870fb616e3714ef29cfc19
5
5
  SHA512:
6
- metadata.gz: 0c484ac88ad76c780c2a9f5eb4c787c121f3c5078aae3dc8167ffed1b369cd97e63105d14e5a192fda1a3bf0c000abf9edcf4c0457bdee8358b7350545b722c3
7
- data.tar.gz: 5c02dea7596324a16efc5010c25bbeb3cab7188d0e2065b78fa429419035246d8a2cd4b238de78a12cf6537f59e8329743c8abc30e8d8013fcd1a78af6700332
6
+ metadata.gz: f78dde78d718f38b385f96301eaa23923d3225581473e4e523f93622142a33a64c24b228549c6b906a12917d7824b5162ed868e681c50e4fd7ca4143d6aea2d3
7
+ data.tar.gz: a3e6dcf360a8303faa9bbf89b7e3122571231fa614ef965189fd0a4b62de05a90fd6d826e74c2acc94aaed3de8d151c578d3eaee31bece54144f131492e7634c
@@ -16,10 +16,8 @@ Gem::Specification.new do |spec|
16
16
  spec.license = 'MIT'
17
17
 
18
18
  # Specify which files should be added to the gem when it is released.
19
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
20
- spec.files = Dir.chdir(File.expand_path(__dir__)) do
21
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
22
- end
19
+ spec.files = Dir['{bin,lib,exe}/**/*', 'LICENSE*', 'README*', '*.gemspec']
20
+ spec.test_files = Dir['{test,spec,features}/**/*']
23
21
  spec.bindir = 'exe'
24
22
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
25
23
  spec.require_paths = ['lib']
@@ -3,7 +3,7 @@
3
3
  module Fusuma
4
4
  module Plugin
5
5
  module Sendkey
6
- VERSION = '0.6.0'
6
+ VERSION = '0.6.1'
7
7
  end
8
8
  end
9
9
  end
@@ -0,0 +1,151 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ require 'fusuma/plugin/executors/executor'
6
+ require 'fusuma/plugin/events/event'
7
+ require 'fusuma/plugin/events/records/index_record'
8
+
9
+ require './lib/fusuma/plugin/executors/sendkey_executor'
10
+
11
+ module Fusuma
12
+ module Plugin
13
+ module Executors
14
+ RSpec.describe SendkeyExecutor do
15
+ around do |example|
16
+ ConfigHelper.load_config_yml = <<~CONFIG
17
+ dummy:
18
+ 1:
19
+ direction:
20
+ sendkey: KEY_CODE
21
+ keypress:
22
+ LEFTSHIFT:
23
+ sendkey: KEY_CODE_WITH_KEYPRESS
24
+
25
+ plugin:
26
+ executors:
27
+ sendkey_executor:
28
+ device_name: dummy
29
+ CONFIG
30
+
31
+ example.run
32
+
33
+ Config.custom_path = nil
34
+ end
35
+
36
+ before do
37
+ index = Config::Index.new([:dummy, 1, :direction])
38
+ record = Events::Records::IndexRecord.new(index: index)
39
+ @event = Events::Event.new(tag: 'dummy_detector', record: record)
40
+ @executor = SendkeyExecutor.new
41
+
42
+ @keyboard = double(Sendkey::Keyboard)
43
+
44
+ allow(@executor).to receive(:keyboard).and_return @keyboard
45
+ end
46
+
47
+ describe '#execute' do
48
+ before do
49
+ allow(Process).to receive(:daemon).with(true)
50
+ allow(Process).to receive(:detach).with(anything)
51
+ end
52
+ it 'fork' do
53
+ expect(@executor).to receive(:fork).and_yield do |block_context|
54
+ expect(block_context).to receive(:_execute).with(@event)
55
+ end
56
+
57
+ @executor.execute(@event)
58
+ end
59
+ end
60
+
61
+ describe '#_execute' do
62
+ after do
63
+ @executor._execute(@event)
64
+ end
65
+ it 'send KEY_CODE message to keybard' do
66
+ expect(@executor).to receive(:search_param).with(@event).and_return('KEY_CODE')
67
+ expect(@executor).to receive(:search_keypress).with(@event).and_return(nil)
68
+ expect(@keyboard).to receive(:type).with(param: 'KEY_CODE', keep: nil)
69
+ end
70
+
71
+ context 'with keypress' do
72
+ before do
73
+ index_with_keypress = Config::Index.new(
74
+ [:dummy, 1, :direction, :keypress, :LEFTSHIFT]
75
+ )
76
+ record = Events::Records::IndexRecord.new(index: index_with_keypress)
77
+ @event = Events::Event.new(tag: 'dummy_detector', record: record)
78
+ end
79
+ it 'send KEY_CODE_WITH_KEYPRESS message to keybard' do
80
+ expect(@keyboard).to receive(:type)
81
+ .with(param: 'KEY_CODE_WITH_KEYPRESS', keep: 'LEFTSHIFT')
82
+ end
83
+ end
84
+ end
85
+
86
+ describe '#executable?' do
87
+ before do
88
+ allow(@keyboard).to receive(:valid?).with(param: 'MODIFIER_CODE+KEY_CODE')
89
+ .and_return true
90
+ allow(@keyboard).to receive(:valid?).with(param: 'KEY_CODE')
91
+ .and_return true
92
+ allow(@keyboard).to receive(:valid?).with(param: 'INVALID_CODE')
93
+ .and_return false
94
+ end
95
+ context 'when given valid event tagged as xxxx_detector' do
96
+ it { expect(@executor.executable?(@event)).to be_truthy }
97
+ end
98
+
99
+ context 'when given INVALID event tagged as invalid_tag' do
100
+ before do
101
+ @event.tag = 'invalid_tag'
102
+ end
103
+ it { expect(@executor.executable?(@event)).to be_falsey }
104
+ end
105
+
106
+ context "when sendkey: 'MODIFIER_CODE+KEY_CODE'" do
107
+ around do |example|
108
+ ConfigHelper.load_config_yml = <<~CONFIG
109
+ dummy:
110
+ 1:
111
+ direction:
112
+ sendkey: 'MODIFIER_CODE+KEY_CODE'
113
+ plugin:
114
+ executors:
115
+ sendkey_executor:
116
+ device_name: dummy
117
+ CONFIG
118
+
119
+ example.run
120
+
121
+ Config.custom_path = nil
122
+ end
123
+
124
+ it 'should return true' do
125
+ expect(@executor.executable?(@event)).to be_truthy
126
+ end
127
+ end
128
+
129
+ context "when sendkey: 'INVALID_CODE'" do
130
+ around do |example|
131
+ ConfigHelper.load_config_yml = <<~CONFIG
132
+ dummy:
133
+ 1:
134
+ direction:
135
+ sendkey: 'INVALID_CODE'
136
+ plugin:
137
+ executors:
138
+ sendkey_executor:
139
+ device_name: dummy
140
+ CONFIG
141
+
142
+ example.run
143
+
144
+ Config.custom_path = nil
145
+ end
146
+ end
147
+ end
148
+ end
149
+ end
150
+ end
151
+ end
@@ -0,0 +1,204 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ require './lib/fusuma/plugin/sendkey/keyboard'
6
+
7
+ module Fusuma
8
+ module Plugin
9
+ module Sendkey
10
+ RSpec.describe Keyboard do
11
+ describe '#new' do
12
+ context 'keyboard is found' do
13
+ before do
14
+ dummy_keyboard = Fusuma::Device.new(name: 'dummy keyboard')
15
+ allow_any_instance_of(Sendkey::Keyboard)
16
+ .to receive(:find_device)
17
+ .and_return(dummy_keyboard)
18
+ allow(Sendkey::Device).to receive(:new).and_return('dummy')
19
+ end
20
+
21
+ it 'should not raise error' do
22
+ expect { Keyboard.new }.not_to raise_error
23
+ end
24
+ end
25
+
26
+ context 'keyboard is not found' do
27
+ before do
28
+ allow_any_instance_of(Sendkey::Keyboard)
29
+ .to receive(:find_device)
30
+ .and_return(nil)
31
+ end
32
+
33
+ it 'should not raise error' do
34
+ expect { Keyboard.new }.to raise_error SystemExit
35
+ end
36
+ end
37
+
38
+ context 'detected device name is Keyboard (Capitarized)' do
39
+ before do
40
+ other_device = Fusuma::Device.new(name: 'Keyboard', id: 'dummy')
41
+
42
+ allow_any_instance_of(Sendkey::Keyboard)
43
+ .to receive(:find_device)
44
+ .and_return(other_device)
45
+ allow(Sendkey::Device).to receive(:new).and_return('dummy')
46
+ end
47
+
48
+ it 'should not raise error' do
49
+ expect { Keyboard.new }.not_to raise_error
50
+ end
51
+ end
52
+
53
+ context 'detected device name is KEYBOARD (Upper case)' do
54
+ before do
55
+ other_device = Fusuma::Device.new(name: 'KEYBOARD', id: 'dummy')
56
+ allow_any_instance_of(Sendkey::Keyboard)
57
+ .to receive(:find_device)
58
+ .and_return(other_device)
59
+ allow(Sendkey::Device).to receive(:new).and_return('dummy')
60
+ end
61
+
62
+ it 'should not raise error' do
63
+ expect { Keyboard.new }.not_to raise_error
64
+ end
65
+ end
66
+
67
+ context 'given name pattern' do
68
+ before do
69
+ specified_device = Fusuma::Device.new(
70
+ name: 'Awesome KEY/BOARD input device',
71
+ id: 'dummy'
72
+ )
73
+ allow(Fusuma::Device).to receive(:all).and_return([specified_device])
74
+ allow(Sendkey::Device).to receive(:new).and_return('dummy')
75
+ end
76
+
77
+ it 'should not raise error' do
78
+ expect { Keyboard.new(name_pattern: 'Awesome KEY/BOARD') }.not_to raise_error
79
+ end
80
+ end
81
+
82
+ context 'not given name pattern (use default)' do
83
+ subject { -> { Keyboard.new(name_pattern: nil) } }
84
+ before do
85
+ allow(Sendkey::Device).to receive(:new).and_return('dummy')
86
+ end
87
+
88
+ context 'exist device named keyboard' do
89
+ before do
90
+ specified_device = Fusuma::Device.new(
91
+ name: 'keyboard',
92
+ id: 'dummy'
93
+ )
94
+ allow(Fusuma::Device).to receive(:all).and_return([specified_device])
95
+ end
96
+
97
+ it { is_expected.not_to raise_error }
98
+ end
99
+
100
+ context 'exist device named Keyboard' do
101
+ before do
102
+ specified_device = Fusuma::Device.new(
103
+ name: 'Keyboard',
104
+ id: 'dummy'
105
+ )
106
+ allow(Fusuma::Device).to receive(:all).and_return([specified_device])
107
+ end
108
+
109
+ it { is_expected.not_to raise_error }
110
+ end
111
+
112
+ context 'exist device named KEYBOARD' do
113
+ before do
114
+ specified_device = Fusuma::Device.new(
115
+ name: 'KEYBOARD',
116
+ id: 'dummy'
117
+ )
118
+ allow(Fusuma::Device).to receive(:all).and_return([specified_device])
119
+ end
120
+
121
+ it { is_expected.not_to raise_error }
122
+ end
123
+
124
+ context 'exist no device named keyboard|Keyboard|KEYBOARD' do
125
+ before do
126
+ specified_device = Fusuma::Device.new(
127
+ name: 'KEY-BOARD',
128
+ id: 'dummy'
129
+ )
130
+ allow(Fusuma::Device).to receive(:all).and_return([specified_device])
131
+ end
132
+
133
+ it { is_expected.to raise_error(SystemExit) }
134
+ end
135
+ end
136
+ end
137
+
138
+ describe '#type' do
139
+ before do
140
+ allow_any_instance_of(Sendkey::Keyboard)
141
+ .to receive(:find_device)
142
+ .and_return(Fusuma::Device.new(name: 'dummy keyboard'))
143
+
144
+ @device = double(Sendkey::Device)
145
+ allow(@device).to receive(:write_event).with(anything)
146
+ # allow(@device).to receive(:valid?).with(param: 'KEY_A')
147
+
148
+ allow(Sendkey::Device).to receive(:new).and_return(@device)
149
+
150
+ @keyboard = Keyboard.new
151
+ end
152
+
153
+ it 'should press key KEY_A and release KEY_A' do
154
+ expect(@keyboard).to receive(:clear_modifiers).ordered
155
+ expect(@keyboard).to receive(:key_event).with(keycode: 'KEY_A', press: true).ordered
156
+ expect(@keyboard).to receive(:key_event).with(keycode: 'KEY_A', press: false).ordered
157
+ @keyboard.type(param: 'A')
158
+ end
159
+
160
+ context 'with modifier keys' do
161
+ before do
162
+ @keys = 'LEFTSHIFT+A'
163
+ end
164
+
165
+ it 'should type AB' do
166
+ expect(@keyboard).to receive(:clear_modifiers).ordered
167
+ expect(@keyboard).to receive(:key_event).with(keycode: 'KEY_LEFTSHIFT', press: true).ordered
168
+ expect(@keyboard).to receive(:key_event).with(keycode: 'KEY_A', press: true).ordered
169
+ expect(@keyboard).to receive(:key_event).with(keycode: 'KEY_A', press: false).ordered
170
+ expect(@keyboard).to receive(:key_event).with(keycode: 'KEY_LEFTSHIFT', press: false).ordered
171
+ @keyboard.type(param: @keys)
172
+ end
173
+ end
174
+ context 'with multiple keys' do
175
+ before do
176
+ @keys = 'A+B'
177
+ end
178
+
179
+ it 'should type AB' do
180
+ expect(@keyboard).to receive(:clear_modifiers).ordered
181
+ expect(@keyboard).to receive(:key_event).with(keycode: 'KEY_A', press: true).ordered
182
+ expect(@keyboard).to receive(:key_event).with(keycode: 'KEY_B', press: true).ordered
183
+ expect(@keyboard).to receive(:key_event).with(keycode: 'KEY_B', press: false).ordered
184
+ expect(@keyboard).to receive(:key_event).with(keycode: 'KEY_A', press: false).ordered
185
+ @keyboard.type(param: @keys)
186
+ end
187
+ end
188
+ context 'with keypress' do
189
+ before do
190
+ @keys = 'LEFTSHIFT+A'
191
+ @keypress_keys = 'LEFTSHIFT'
192
+ end
193
+ it 'should type A (without LEFTSHIFT key pressing by user)' do
194
+ expect(@keyboard).to receive(:clear_modifiers).ordered
195
+ expect(@keyboard).to receive(:key_event).with(keycode: 'KEY_A', press: true).ordered
196
+ expect(@keyboard).to receive(:key_event).with(keycode: 'KEY_A', press: false).ordered
197
+ @keyboard.type(param: @keys, keep: @keypress_keys)
198
+ end
199
+ end
200
+ end
201
+ end
202
+ end
203
+ end
204
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ RSpec.describe Fusuma::Plugin::Sendkey do
4
+ it 'has a version number' do
5
+ expect(Fusuma::Plugin::Sendkey::VERSION).not_to be nil
6
+ end
7
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'tempfile'
4
+ require 'fusuma/config.rb'
5
+
6
+ module Fusuma
7
+ module ConfigHelper
8
+ module_function
9
+
10
+ def load_config_yml=(string)
11
+ Config.custom_path = Tempfile.open do |temp_file|
12
+ temp_file.tap { |f| f.write(string) }
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/setup'
4
+ require 'helpers/config_helper.rb'
5
+
6
+ RSpec.configure do |config|
7
+ # Enable flags like --only-failures and --next-failure
8
+ config.example_status_persistence_file_path = '.rspec_status'
9
+
10
+ # Disable RSpec exposing methods globally on `Module` and `main`
11
+ config.disable_monkey_patching!
12
+
13
+ config.expect_with :rspec do |c|
14
+ c.syntax = :expect
15
+ end
16
+
17
+ config.include(Fusuma::ConfigHelper)
18
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fusuma-plugin-sendkey
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - iberianpig
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-04-12 00:00:00.000000000 Z
11
+ date: 2021-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fusuma
@@ -46,26 +46,22 @@ executables:
46
46
  extensions: []
47
47
  extra_rdoc_files: []
48
48
  files:
49
- - ".gitignore"
50
- - ".rspec"
51
- - ".rubocop.yml"
52
- - ".travis.yml"
53
- - CHANGELOG.md
54
- - CODE_OF_CONDUCT.md
55
- - Gemfile
56
49
  - LICENSE.txt
57
50
  - README.md
58
- - Rakefile
59
51
  - bin/console
60
52
  - bin/setup
61
53
  - exe/fusuma-sendkey
62
54
  - fusuma-plugin-sendkey.gemspec
63
- - lefthook.yml
64
55
  - lib/fusuma/plugin/executors/sendkey_executor.rb
65
56
  - lib/fusuma/plugin/sendkey.rb
66
57
  - lib/fusuma/plugin/sendkey/device.rb
67
58
  - lib/fusuma/plugin/sendkey/keyboard.rb
68
59
  - lib/fusuma/plugin/sendkey/version.rb
60
+ - spec/fusuma/plugin/executors/sendkey_executor_spec.rb
61
+ - spec/fusuma/plugin/sendkey/keyboard_spec.rb
62
+ - spec/fusuma/plugin/sendkey_spec.rb
63
+ - spec/helpers/config_helper.rb
64
+ - spec/spec_helper.rb
69
65
  homepage: https://github.com/iberianpig/fusuma-plugin-sendkey
70
66
  licenses:
71
67
  - MIT
@@ -89,4 +85,9 @@ rubygems_version: 3.1.4
89
85
  signing_key:
90
86
  specification_version: 4
91
87
  summary: Fusuma plugin to send keyboard events
92
- test_files: []
88
+ test_files:
89
+ - spec/fusuma/plugin/sendkey_spec.rb
90
+ - spec/fusuma/plugin/sendkey/keyboard_spec.rb
91
+ - spec/fusuma/plugin/executors/sendkey_executor_spec.rb
92
+ - spec/helpers/config_helper.rb
93
+ - spec/spec_helper.rb
data/.gitignore DELETED
@@ -1,13 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /Gemfile.lock
4
- /_yardoc/
5
- /coverage/
6
- /doc/
7
- /pkg/
8
- /spec/reports/
9
- /tmp/
10
-
11
- # rspec failure tracking
12
- .rspec_status
13
- .ruby-version
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --format documentation
2
- --color
3
- --require spec_helper
data/.rubocop.yml DELETED
@@ -1,25 +0,0 @@
1
- AllCops:
2
- TargetRubyVersion: 2.4
3
- NewCops: enable
4
-
5
- Metrics/ModuleLength:
6
- Exclude:
7
- - "**/*_spec.rb"
8
-
9
- Metrics/BlockLength:
10
- Exclude:
11
- - "**/*_spec.rb"
12
- - "fusuma-plugin-*.gemspec"
13
-
14
- Layout/LineLength:
15
- Max: 100
16
- Exclude:
17
- - "**/*_spec.rb"
18
- - "fusuma-plugin-*.gemspec"
19
-
20
- Style/HashEachMethods:
21
- Enabled: true
22
- Style/HashTransformKeys:
23
- Enabled: true
24
- Style/HashTransformValues:
25
- Enabled: true
data/.travis.yml DELETED
@@ -1,9 +0,0 @@
1
- ---
2
- sudo: false
3
- language: ruby
4
- cache: bundler
5
- rvm:
6
- - 2.6.1
7
- before_install:
8
- - gem install bundler -v 2.0.1
9
- - sudo apt-get -y install libevdev-dev
data/CHANGELOG.md DELETED
@@ -1,29 +0,0 @@
1
- # Changelog
2
-
3
- ## [v0.2.1](https://github.com/iberianpig/fusuma-plugin-keypress/tree/v0.2.1) (2020-04-15)
4
-
5
- [Full Changelog](https://github.com/iberianpig/fusuma-plugin-keypress/compare/v0.2.0...v0.2.1)
6
-
7
- **Closed issues:**
8
-
9
- - Only 'LEFTMETA' keycode works on KDE Plasma [\#2](https://github.com/iberianpig/fusuma-plugin-keypress/issues/2)
10
-
11
- ## [v0.2.0](https://github.com/iberianpig/fusuma-plugin-keypress/tree/v0.2.0) (2020-03-18)
12
-
13
- [Full Changelog](https://github.com/iberianpig/fusuma-plugin-keypress/compare/v0.1.1...v0.2.0)
14
-
15
- **Closed issues:**
16
-
17
- - Trigger a command multiple times while keeping the key pressed [\#1](https://github.com/iberianpig/fusuma-plugin-keypress/issues/1)
18
-
19
- ## [v0.1.1](https://github.com/iberianpig/fusuma-plugin-keypress/tree/v0.1.1) (2020-02-18)
20
-
21
- [Full Changelog](https://github.com/iberianpig/fusuma-plugin-keypress/compare/v0.1.0...v0.1.1)
22
-
23
- ## [v0.1.0](https://github.com/iberianpig/fusuma-plugin-keypress/tree/v0.1.0) (2019-11-12)
24
-
25
- [Full Changelog](https://github.com/iberianpig/fusuma-plugin-keypress/compare/fb8d8ccfc3828e487607706335f670ae5392f08d...v0.1.0)
26
-
27
-
28
-
29
- \* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
data/CODE_OF_CONDUCT.md DELETED
@@ -1,74 +0,0 @@
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 yhkyky@gmail.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 DELETED
@@ -1,16 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- # Specify your gem's dependencies in fusuma-plugin-sendkey.gemspec
4
- gemspec
5
-
6
- gem 'bundler'
7
- gem 'github_changelog_generator', '~> 1.14'
8
- gem 'lefthook'
9
- gem 'pry-byebug', '~> 3.4'
10
- gem 'pry-doc'
11
- gem 'pry-inline'
12
- gem 'rake', '~> 13.0'
13
- gem 'reek'
14
- gem 'rspec', '~> 3.0'
15
- gem 'rubocop'
16
- gem 'yard'
data/Rakefile DELETED
@@ -1,15 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'bundler/gem_tasks'
4
- require 'rspec/core/rake_task'
5
-
6
- RSpec::Core::RakeTask.new(:spec)
7
-
8
- task default: :spec
9
-
10
- require 'github_changelog_generator/task'
11
-
12
- GitHubChangelogGenerator::RakeTask.new :changelog do |config|
13
- config.user = 'iberianpig'
14
- config.project = 'fusuma-plugin-keypress'
15
- end
data/lefthook.yml DELETED
@@ -1,29 +0,0 @@
1
- # EXAMPLE USAGE
2
- # Refer for explanation to following link:
3
- # https://github.com/Arkweid/lefthook/blob/master/docs/full_guide.md
4
-
5
- # pre-push:
6
- # commands:
7
- # packages-audit:
8
- # tags: frontend security
9
- # run: yarn audit
10
- # gems-audit:
11
- # tags: backend security
12
- # run: bundle audit
13
-
14
- pre-commit:
15
- parallel: true
16
- commands:
17
- # eslint:
18
- # glob: "*.{js,ts}"
19
- # run: yarn eslint {staged_files}
20
- rubocop:
21
- tags: backend style
22
- glob: "*.rb"
23
- # exclude: "application.rb|routes.rb"
24
- run: bundle exec rubocop --force-exclusion {staged_files}
25
- # scripts:
26
- # "hello.js":
27
- # runner: node
28
- # "any.go":
29
- # runner: go run