fusic-cli-ruby 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 +12 -0
- data/.rspec +3 -0
- data/.rubocop.yml +23 -0
- data/.travis.yml +6 -0
- data/Gemfile +16 -0
- data/Gemfile.lock +157 -0
- data/README.md +36 -0
- data/Rakefile +8 -0
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/exe/fusic +6 -0
- data/fusic-cli-ruby.gemspec +29 -0
- data/lib/fusic_cli_ruby/cli.rb +46 -0
- data/lib/fusic_cli_ruby/version.rb +9 -0
- data/lib/fusic_cli_ruby/web_site.rb +20 -0
- data/lib/fusic_cli_ruby.rb +9 -0
- metadata +90 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 9e4eab60b9ec13cae3b82f4e121d06bc7424bbb126507974e7f6f06c31088cd6
|
4
|
+
data.tar.gz: be6b62d20c6ff2fbd4e5817a5dc5444e5c436cc3c47b58d0ea7516448a37bcc3
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 7c2a87426fa6579c271876234bac7d080913d65e0ac4f8078eff15169b3cd3c51e11638afb202156633e39d9e1c0856632c36715dd1f6c4cfd75226789cf7ec0
|
7
|
+
data.tar.gz: 27e91c1e3b21b7dc86e66a0cffb3364092d15452ceffb24fc313795d59dfcad6003dc49e09011d8075f1bbcb30398090b0203a8ad69996d1d9faf6f2df8058d1
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# The behavior of RuboCop can be controlled via the .rubocop.yml
|
2
|
+
# configuration file. It makes it possible to enable/disable
|
3
|
+
# certain cops (checks) and to alter their behavior if they accept
|
4
|
+
# any parameters. The file can be placed either in your home
|
5
|
+
# directory or in some project directory.
|
6
|
+
#
|
7
|
+
# RuboCop will start looking for the configuration file in the directory
|
8
|
+
# where the inspected file is and continue its way up to the root directory.
|
9
|
+
#
|
10
|
+
# See https://docs.rubocop.org/rubocop/configuration
|
11
|
+
require:
|
12
|
+
- rubocop-rspec
|
13
|
+
- rubocop-rake
|
14
|
+
|
15
|
+
AllCops:
|
16
|
+
NewCops: enable
|
17
|
+
TargetRubyVersion: 2.7
|
18
|
+
|
19
|
+
Style/Documentation:
|
20
|
+
Enabled: false
|
21
|
+
|
22
|
+
RSpec/MessageSpies:
|
23
|
+
EnforcedStyle: receive
|
data/.travis.yml
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
source 'https://rubygems.org'
|
4
|
+
|
5
|
+
# Specify your gem's dependencies in fusic-cli-ruby.gemspec
|
6
|
+
gemspec
|
7
|
+
|
8
|
+
gem 'aruba', '~> 2.0.0'
|
9
|
+
gem 'guard-rspec'
|
10
|
+
gem 'guard-rubocop'
|
11
|
+
gem 'pry'
|
12
|
+
gem 'rake', '~> 12.0'
|
13
|
+
gem 'rspec', '~> 3.0'
|
14
|
+
gem 'rubocop'
|
15
|
+
gem 'rubocop-rake'
|
16
|
+
gem 'rubocop-rspec'
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,157 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
fusic-cli-ruby (0.1.0)
|
5
|
+
launchy (~> 2.5.0)
|
6
|
+
thor (~> 1.1.0)
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
addressable (2.8.0)
|
12
|
+
public_suffix (>= 2.0.2, < 5.0)
|
13
|
+
aruba (2.0.0)
|
14
|
+
bundler (>= 1.17, < 3.0)
|
15
|
+
childprocess (>= 2.0, < 5.0)
|
16
|
+
contracts (>= 0.16.0, < 0.18.0)
|
17
|
+
cucumber (>= 4.0, < 8.0)
|
18
|
+
rspec-expectations (~> 3.4)
|
19
|
+
thor (~> 1.0)
|
20
|
+
ast (2.4.2)
|
21
|
+
builder (3.2.4)
|
22
|
+
childprocess (4.1.0)
|
23
|
+
coderay (1.1.3)
|
24
|
+
contracts (0.16.1)
|
25
|
+
cucumber (7.0.0)
|
26
|
+
builder (~> 3.2, >= 3.2.4)
|
27
|
+
cucumber-core (~> 10.0, >= 10.0.1)
|
28
|
+
cucumber-create-meta (~> 6.0, >= 6.0.1)
|
29
|
+
cucumber-cucumber-expressions (~> 12.1, >= 12.1.1)
|
30
|
+
cucumber-gherkin (~> 20.0, >= 20.0.1)
|
31
|
+
cucumber-html-formatter (~> 16.0, >= 16.0.1)
|
32
|
+
cucumber-messages (~> 17.0, >= 17.0.1)
|
33
|
+
cucumber-wire (~> 6.0, >= 6.0.1)
|
34
|
+
diff-lcs (~> 1.4, >= 1.4.4)
|
35
|
+
mime-types (~> 3.3, >= 3.3.1)
|
36
|
+
multi_test (~> 0.1, >= 0.1.2)
|
37
|
+
sys-uname (~> 1.2, >= 1.2.2)
|
38
|
+
cucumber-core (10.0.1)
|
39
|
+
cucumber-gherkin (~> 20.0, >= 20.0.1)
|
40
|
+
cucumber-messages (~> 17.0, >= 17.0.1)
|
41
|
+
cucumber-tag-expressions (~> 3.0, >= 3.0.1)
|
42
|
+
cucumber-create-meta (6.0.1)
|
43
|
+
cucumber-messages (~> 17.0, >= 17.0.1)
|
44
|
+
sys-uname (~> 1.2, >= 1.2.2)
|
45
|
+
cucumber-cucumber-expressions (12.1.3)
|
46
|
+
cucumber-gherkin (20.0.1)
|
47
|
+
cucumber-messages (~> 17.0, >= 17.0.1)
|
48
|
+
cucumber-html-formatter (16.0.1)
|
49
|
+
cucumber-messages (~> 17.0, >= 17.0.1)
|
50
|
+
cucumber-messages (17.1.0)
|
51
|
+
cucumber-tag-expressions (3.0.1)
|
52
|
+
cucumber-wire (6.1.1)
|
53
|
+
cucumber-core (~> 10.0, >= 10.0.1)
|
54
|
+
cucumber-cucumber-expressions (~> 12.1, >= 12.1.2)
|
55
|
+
cucumber-messages (~> 17.0, >= 17.0.1)
|
56
|
+
diff-lcs (1.4.4)
|
57
|
+
ffi (1.15.4)
|
58
|
+
formatador (0.3.0)
|
59
|
+
guard (2.18.0)
|
60
|
+
formatador (>= 0.2.4)
|
61
|
+
listen (>= 2.7, < 4.0)
|
62
|
+
lumberjack (>= 1.0.12, < 2.0)
|
63
|
+
nenv (~> 0.1)
|
64
|
+
notiffany (~> 0.0)
|
65
|
+
pry (>= 0.13.0)
|
66
|
+
shellany (~> 0.0)
|
67
|
+
thor (>= 0.18.1)
|
68
|
+
guard-compat (1.2.1)
|
69
|
+
guard-rspec (4.7.3)
|
70
|
+
guard (~> 2.1)
|
71
|
+
guard-compat (~> 1.1)
|
72
|
+
rspec (>= 2.99.0, < 4.0)
|
73
|
+
guard-rubocop (1.5.0)
|
74
|
+
guard (~> 2.0)
|
75
|
+
rubocop (< 2.0)
|
76
|
+
launchy (2.5.0)
|
77
|
+
addressable (~> 2.7)
|
78
|
+
listen (3.7.0)
|
79
|
+
rb-fsevent (~> 0.10, >= 0.10.3)
|
80
|
+
rb-inotify (~> 0.9, >= 0.9.10)
|
81
|
+
lumberjack (1.2.8)
|
82
|
+
method_source (1.0.0)
|
83
|
+
mime-types (3.3.1)
|
84
|
+
mime-types-data (~> 3.2015)
|
85
|
+
mime-types-data (3.2021.0901)
|
86
|
+
multi_test (0.1.2)
|
87
|
+
nenv (0.3.0)
|
88
|
+
notiffany (0.1.3)
|
89
|
+
nenv (~> 0.1)
|
90
|
+
shellany (~> 0.0)
|
91
|
+
parallel (1.20.1)
|
92
|
+
parser (3.0.2.0)
|
93
|
+
ast (~> 2.4.1)
|
94
|
+
pry (0.14.1)
|
95
|
+
coderay (~> 1.1)
|
96
|
+
method_source (~> 1.0)
|
97
|
+
public_suffix (4.0.6)
|
98
|
+
rainbow (3.0.0)
|
99
|
+
rake (12.3.3)
|
100
|
+
rb-fsevent (0.11.0)
|
101
|
+
rb-inotify (0.10.1)
|
102
|
+
ffi (~> 1.0)
|
103
|
+
regexp_parser (2.1.1)
|
104
|
+
rexml (3.2.5)
|
105
|
+
rspec (3.10.0)
|
106
|
+
rspec-core (~> 3.10.0)
|
107
|
+
rspec-expectations (~> 3.10.0)
|
108
|
+
rspec-mocks (~> 3.10.0)
|
109
|
+
rspec-core (3.10.1)
|
110
|
+
rspec-support (~> 3.10.0)
|
111
|
+
rspec-expectations (3.10.1)
|
112
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
113
|
+
rspec-support (~> 3.10.0)
|
114
|
+
rspec-mocks (3.10.2)
|
115
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
116
|
+
rspec-support (~> 3.10.0)
|
117
|
+
rspec-support (3.10.2)
|
118
|
+
rubocop (1.20.0)
|
119
|
+
parallel (~> 1.10)
|
120
|
+
parser (>= 3.0.0.0)
|
121
|
+
rainbow (>= 2.2.2, < 4.0)
|
122
|
+
regexp_parser (>= 1.8, < 3.0)
|
123
|
+
rexml
|
124
|
+
rubocop-ast (>= 1.9.1, < 2.0)
|
125
|
+
ruby-progressbar (~> 1.7)
|
126
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
127
|
+
rubocop-ast (1.11.0)
|
128
|
+
parser (>= 3.0.1.1)
|
129
|
+
rubocop-rake (0.6.0)
|
130
|
+
rubocop (~> 1.0)
|
131
|
+
rubocop-rspec (2.4.0)
|
132
|
+
rubocop (~> 1.0)
|
133
|
+
rubocop-ast (>= 1.1.0)
|
134
|
+
ruby-progressbar (1.11.0)
|
135
|
+
shellany (0.0.1)
|
136
|
+
sys-uname (1.2.2)
|
137
|
+
ffi (~> 1.1)
|
138
|
+
thor (1.1.0)
|
139
|
+
unicode-display_width (2.0.0)
|
140
|
+
|
141
|
+
PLATFORMS
|
142
|
+
ruby
|
143
|
+
|
144
|
+
DEPENDENCIES
|
145
|
+
aruba (~> 2.0.0)
|
146
|
+
fusic-cli-ruby!
|
147
|
+
guard-rspec
|
148
|
+
guard-rubocop
|
149
|
+
pry
|
150
|
+
rake (~> 12.0)
|
151
|
+
rspec (~> 3.0)
|
152
|
+
rubocop
|
153
|
+
rubocop-rake
|
154
|
+
rubocop-rspec
|
155
|
+
|
156
|
+
BUNDLED WITH
|
157
|
+
2.1.4
|
data/README.md
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
# Fusic::Cli::Ruby
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/fusic/cli/ruby`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'fusic-cli-ruby'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle install
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install fusic-cli-ruby
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
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.
|
30
|
+
|
31
|
+
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).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/fusic-cli-ruby.
|
36
|
+
|
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 'fusic/cli/ruby'
|
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
data/exe/fusic
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'lib/fusic_cli_ruby/version'
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = 'fusic-cli-ruby'
|
7
|
+
spec.version = Fusic::Cli::Ruby::VERSION
|
8
|
+
spec.authors = ['Yuhei Okazaki']
|
9
|
+
spec.email = ['okazaki@fusic.co.jp']
|
10
|
+
|
11
|
+
spec.summary = 'This is Fusic CLI.'
|
12
|
+
spec.description = 'git@github.com:fusic/fusic-cli-ruby.git'
|
13
|
+
spec.homepage = 'https://github.com/fusic/fusic-cli-ruby'
|
14
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 2.7.0')
|
15
|
+
|
16
|
+
spec.metadata['homepage_uri'] = spec.homepage
|
17
|
+
spec.metadata['source_code_uri'] = 'https://github.com/fusic/fusic-cli-ruby'
|
18
|
+
spec.metadata['changelog_uri'] = 'https://github.com/fusic/fusic-cli-ruby/blob/master/CHANGELOG.md'
|
19
|
+
|
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
|
23
|
+
spec.bindir = 'exe'
|
24
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
25
|
+
spec.require_paths = ['lib']
|
26
|
+
|
27
|
+
spec.add_dependency 'launchy', '~> 2.5.0'
|
28
|
+
spec.add_dependency 'thor', '~> 1.1.0'
|
29
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'thor'
|
4
|
+
require 'pry'
|
5
|
+
require 'launchy'
|
6
|
+
require 'fusic_cli_ruby'
|
7
|
+
|
8
|
+
module FusicCliRuby
|
9
|
+
class CLI < Thor
|
10
|
+
class_option :help, type: :boolean, aliases: '-h', desc: 'help message.'
|
11
|
+
class_option :version, type: :boolean, aliases: '-v', desc: 'print version.'
|
12
|
+
class_option :debug, type: :boolean, aliases: '-d', desc: 'debug mode'
|
13
|
+
|
14
|
+
desc 'top', 'Open top page.'
|
15
|
+
def top
|
16
|
+
WebSite.new(Launchy).top
|
17
|
+
exit
|
18
|
+
rescue StandardError => e
|
19
|
+
output_error_if_debug_mode(e)
|
20
|
+
exit(-1)
|
21
|
+
end
|
22
|
+
|
23
|
+
map %w[--version -v] => :version
|
24
|
+
desc 'version', 'version'
|
25
|
+
def version
|
26
|
+
puts FusicCliRuby::VERSION
|
27
|
+
end
|
28
|
+
|
29
|
+
private
|
30
|
+
|
31
|
+
def output_error_if_debug_mode(exception)
|
32
|
+
return unless options[:debug]
|
33
|
+
|
34
|
+
warn(exception.message)
|
35
|
+
warn(exception.backtrace)
|
36
|
+
end
|
37
|
+
|
38
|
+
class << self
|
39
|
+
private
|
40
|
+
|
41
|
+
def exit_on_failure?
|
42
|
+
true
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'thor'
|
4
|
+
require 'pry'
|
5
|
+
require 'launchy'
|
6
|
+
require 'fusic_cli_ruby'
|
7
|
+
|
8
|
+
module FusicCliRuby
|
9
|
+
class WebSite
|
10
|
+
def initialize(launcher)
|
11
|
+
@launcher = launcher
|
12
|
+
end
|
13
|
+
|
14
|
+
def top(options = {})
|
15
|
+
url = 'https://fusic.co.jp/'
|
16
|
+
@launcher.open(url, options)
|
17
|
+
puts url
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
metadata
ADDED
@@ -0,0 +1,90 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: fusic-cli-ruby
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Yuhei Okazaki
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2021-09-09 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: launchy
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 2.5.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 2.5.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: thor
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.1.0
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 1.1.0
|
41
|
+
description: git@github.com:fusic/fusic-cli-ruby.git
|
42
|
+
email:
|
43
|
+
- okazaki@fusic.co.jp
|
44
|
+
executables:
|
45
|
+
- fusic
|
46
|
+
extensions: []
|
47
|
+
extra_rdoc_files: []
|
48
|
+
files:
|
49
|
+
- ".gitignore"
|
50
|
+
- ".rspec"
|
51
|
+
- ".rubocop.yml"
|
52
|
+
- ".travis.yml"
|
53
|
+
- Gemfile
|
54
|
+
- Gemfile.lock
|
55
|
+
- README.md
|
56
|
+
- Rakefile
|
57
|
+
- bin/console
|
58
|
+
- bin/setup
|
59
|
+
- exe/fusic
|
60
|
+
- fusic-cli-ruby.gemspec
|
61
|
+
- lib/fusic_cli_ruby.rb
|
62
|
+
- lib/fusic_cli_ruby/cli.rb
|
63
|
+
- lib/fusic_cli_ruby/version.rb
|
64
|
+
- lib/fusic_cli_ruby/web_site.rb
|
65
|
+
homepage: https://github.com/fusic/fusic-cli-ruby
|
66
|
+
licenses: []
|
67
|
+
metadata:
|
68
|
+
homepage_uri: https://github.com/fusic/fusic-cli-ruby
|
69
|
+
source_code_uri: https://github.com/fusic/fusic-cli-ruby
|
70
|
+
changelog_uri: https://github.com/fusic/fusic-cli-ruby/blob/master/CHANGELOG.md
|
71
|
+
post_install_message:
|
72
|
+
rdoc_options: []
|
73
|
+
require_paths:
|
74
|
+
- lib
|
75
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
76
|
+
requirements:
|
77
|
+
- - ">="
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: 2.7.0
|
80
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
81
|
+
requirements:
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: '0'
|
85
|
+
requirements: []
|
86
|
+
rubygems_version: 3.1.6
|
87
|
+
signing_key:
|
88
|
+
specification_version: 4
|
89
|
+
summary: This is Fusic CLI.
|
90
|
+
test_files: []
|