dev_oops 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop-http---relaxed-ruby-style-rubocop-yml +153 -0
- data/.rubocop.yml +28 -0
- data/Gemfile +5 -3
- data/Rakefile +5 -3
- data/bin/console +4 -3
- data/dev_oops.gemspec +3 -0
- data/exe/dev_oops +1 -0
- data/lib/dev_oops.rb +24 -10
- data/lib/dev_oops/version.rb +3 -1
- data/package.json +12 -0
- data/templates/empty_script.tt +12 -0
- data/yarn.lock +15 -0
- metadata +20 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4fc1235dee51577f3b186c51f265c08d75f0f6488828b6d5ed350d762ebead3
|
4
|
+
data.tar.gz: 29be0998f2a4ea6de8f0134a7dcd9abb093ec0f7b00dcaed5650590e7528ca33
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97cd48d5a6952c0518e427cdc03310f7e5ef9d8271178649af24e32e293edfd2f97b18cc4a67edd93a12e4b387ba8177f9d9359c6beaa4b3c5baafc227388520
|
7
|
+
data.tar.gz: daa244988f221b9d2aa115c9394888e3b575bce7ffc4d269277735ec3473e647fc45ff751e26193b073df2ffd53e1775729e434b5ce56471649813001fd2d993
|
@@ -0,0 +1,153 @@
|
|
1
|
+
# Relaxed.Ruby.Style
|
2
|
+
## Version 2.5
|
3
|
+
|
4
|
+
Style/Alias:
|
5
|
+
Enabled: false
|
6
|
+
StyleGuide: https://relaxed.ruby.style/#stylealias
|
7
|
+
|
8
|
+
Style/AsciiComments:
|
9
|
+
Enabled: false
|
10
|
+
StyleGuide: https://relaxed.ruby.style/#styleasciicomments
|
11
|
+
|
12
|
+
Style/BeginBlock:
|
13
|
+
Enabled: false
|
14
|
+
StyleGuide: https://relaxed.ruby.style/#stylebeginblock
|
15
|
+
|
16
|
+
Style/BlockDelimiters:
|
17
|
+
Enabled: false
|
18
|
+
StyleGuide: https://relaxed.ruby.style/#styleblockdelimiters
|
19
|
+
|
20
|
+
Style/CommentAnnotation:
|
21
|
+
Enabled: false
|
22
|
+
StyleGuide: https://relaxed.ruby.style/#stylecommentannotation
|
23
|
+
|
24
|
+
Style/Documentation:
|
25
|
+
Enabled: false
|
26
|
+
StyleGuide: https://relaxed.ruby.style/#styledocumentation
|
27
|
+
|
28
|
+
Layout/DotPosition:
|
29
|
+
Enabled: false
|
30
|
+
StyleGuide: https://relaxed.ruby.style/#layoutdotposition
|
31
|
+
|
32
|
+
Style/DoubleNegation:
|
33
|
+
Enabled: false
|
34
|
+
StyleGuide: https://relaxed.ruby.style/#styledoublenegation
|
35
|
+
|
36
|
+
Style/EndBlock:
|
37
|
+
Enabled: false
|
38
|
+
StyleGuide: https://relaxed.ruby.style/#styleendblock
|
39
|
+
|
40
|
+
Style/FormatString:
|
41
|
+
Enabled: false
|
42
|
+
StyleGuide: https://relaxed.ruby.style/#styleformatstring
|
43
|
+
|
44
|
+
Style/IfUnlessModifier:
|
45
|
+
Enabled: false
|
46
|
+
StyleGuide: https://relaxed.ruby.style/#styleifunlessmodifier
|
47
|
+
|
48
|
+
Style/Lambda:
|
49
|
+
Enabled: false
|
50
|
+
StyleGuide: https://relaxed.ruby.style/#stylelambda
|
51
|
+
|
52
|
+
Style/ModuleFunction:
|
53
|
+
Enabled: false
|
54
|
+
StyleGuide: https://relaxed.ruby.style/#stylemodulefunction
|
55
|
+
|
56
|
+
Style/MultilineBlockChain:
|
57
|
+
Enabled: false
|
58
|
+
StyleGuide: https://relaxed.ruby.style/#stylemultilineblockchain
|
59
|
+
|
60
|
+
Style/NegatedIf:
|
61
|
+
Enabled: false
|
62
|
+
StyleGuide: https://relaxed.ruby.style/#stylenegatedif
|
63
|
+
|
64
|
+
Style/NegatedWhile:
|
65
|
+
Enabled: false
|
66
|
+
StyleGuide: https://relaxed.ruby.style/#stylenegatedwhile
|
67
|
+
|
68
|
+
Style/NumericPredicate:
|
69
|
+
Enabled: false
|
70
|
+
StyleGuide: https://relaxed.ruby.style/#stylenumericpredicate
|
71
|
+
|
72
|
+
Style/ParallelAssignment:
|
73
|
+
Enabled: false
|
74
|
+
StyleGuide: https://relaxed.ruby.style/#styleparallelassignment
|
75
|
+
|
76
|
+
Style/PercentLiteralDelimiters:
|
77
|
+
Enabled: false
|
78
|
+
StyleGuide: https://relaxed.ruby.style/#stylepercentliteraldelimiters
|
79
|
+
|
80
|
+
Style/PerlBackrefs:
|
81
|
+
Enabled: false
|
82
|
+
StyleGuide: https://relaxed.ruby.style/#styleperlbackrefs
|
83
|
+
|
84
|
+
Style/Semicolon:
|
85
|
+
Enabled: false
|
86
|
+
StyleGuide: https://relaxed.ruby.style/#stylesemicolon
|
87
|
+
|
88
|
+
Style/SignalException:
|
89
|
+
Enabled: false
|
90
|
+
StyleGuide: https://relaxed.ruby.style/#stylesignalexception
|
91
|
+
|
92
|
+
Style/SingleLineBlockParams:
|
93
|
+
Enabled: false
|
94
|
+
StyleGuide: https://relaxed.ruby.style/#stylesinglelineblockparams
|
95
|
+
|
96
|
+
Style/SingleLineMethods:
|
97
|
+
Enabled: false
|
98
|
+
StyleGuide: https://relaxed.ruby.style/#stylesinglelinemethods
|
99
|
+
|
100
|
+
Layout/SpaceBeforeBlockBraces:
|
101
|
+
Enabled: false
|
102
|
+
StyleGuide: https://relaxed.ruby.style/#layoutspacebeforeblockbraces
|
103
|
+
|
104
|
+
Layout/SpaceInsideParens:
|
105
|
+
Enabled: false
|
106
|
+
StyleGuide: https://relaxed.ruby.style/#layoutspaceinsideparens
|
107
|
+
|
108
|
+
Style/SpecialGlobalVars:
|
109
|
+
Enabled: false
|
110
|
+
StyleGuide: https://relaxed.ruby.style/#stylespecialglobalvars
|
111
|
+
|
112
|
+
Style/StringLiterals:
|
113
|
+
Enabled: false
|
114
|
+
StyleGuide: https://relaxed.ruby.style/#stylestringliterals
|
115
|
+
|
116
|
+
Style/TrailingCommaInArguments:
|
117
|
+
Enabled: false
|
118
|
+
StyleGuide: https://relaxed.ruby.style/#styletrailingcommainarguments
|
119
|
+
|
120
|
+
Style/TrailingCommaInArrayLiteral:
|
121
|
+
Enabled: false
|
122
|
+
StyleGuide: https://relaxed.ruby.style/#styletrailingcommainarrayliteral
|
123
|
+
|
124
|
+
Style/TrailingCommaInHashLiteral:
|
125
|
+
Enabled: false
|
126
|
+
StyleGuide: https://relaxed.ruby.style/#styletrailingcommainhashliteral
|
127
|
+
|
128
|
+
Style/SymbolArray:
|
129
|
+
Enabled: false
|
130
|
+
StyleGuide: http://relaxed.ruby.style/#stylesymbolarray
|
131
|
+
|
132
|
+
Style/WhileUntilModifier:
|
133
|
+
Enabled: false
|
134
|
+
StyleGuide: https://relaxed.ruby.style/#stylewhileuntilmodifier
|
135
|
+
|
136
|
+
Style/WordArray:
|
137
|
+
Enabled: false
|
138
|
+
StyleGuide: https://relaxed.ruby.style/#stylewordarray
|
139
|
+
|
140
|
+
Lint/AmbiguousRegexpLiteral:
|
141
|
+
Enabled: false
|
142
|
+
StyleGuide: https://relaxed.ruby.style/#lintambiguousregexpliteral
|
143
|
+
|
144
|
+
Lint/AssignmentInCondition:
|
145
|
+
Enabled: false
|
146
|
+
StyleGuide: https://relaxed.ruby.style/#lintassignmentincondition
|
147
|
+
|
148
|
+
Layout/LineLength:
|
149
|
+
Enabled: false
|
150
|
+
|
151
|
+
Metrics:
|
152
|
+
Enabled: false
|
153
|
+
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
inherit_from:
|
2
|
+
- http://relaxed.ruby.style/rubocop.yml
|
3
|
+
|
4
|
+
inherit_gem:
|
5
|
+
prettier: rubocop.yml
|
6
|
+
|
7
|
+
require:
|
8
|
+
- rubocop-performance
|
9
|
+
|
10
|
+
AllCops:
|
11
|
+
NewCops: enable
|
12
|
+
DisplayStyleGuide: true
|
13
|
+
DisplayCopNames: true
|
14
|
+
SuggestExtensions: false
|
15
|
+
Exclude:
|
16
|
+
- "bin/*"
|
17
|
+
- "node_modules/**/*"
|
18
|
+
|
19
|
+
Gemspec/RequiredRubyVersion:
|
20
|
+
Enabled: false
|
21
|
+
|
22
|
+
Style/GlobalVars:
|
23
|
+
Enabled: false
|
24
|
+
|
25
|
+
Metrics/BlockLength:
|
26
|
+
Exclude:
|
27
|
+
- "spec/**/*.rb"
|
28
|
+
- "Guardfile"
|
data/Gemfile
CHANGED
@@ -1,7 +1,9 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
source 'https://rubygems.org'
|
2
4
|
|
3
5
|
# Specify your gem's dependencies in dev_oops.gemspec
|
4
6
|
gemspec
|
5
7
|
|
6
|
-
gem
|
7
|
-
gem
|
8
|
+
gem 'rake', '~> 12.0'
|
9
|
+
gem 'rspec', '~> 3.0'
|
data/Rakefile
CHANGED
data/bin/console
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
2
3
|
|
3
|
-
require
|
4
|
-
require
|
4
|
+
require 'bundler/setup'
|
5
|
+
require 'dev_oops'
|
5
6
|
|
6
7
|
# You can add fixtures and/or initialization code here to make experimenting
|
7
8
|
# with your gem easier. You can also use a different console, if you like.
|
@@ -10,5 +11,5 @@ require "dev_oops"
|
|
10
11
|
# require "pry"
|
11
12
|
# Pry.start
|
12
13
|
|
13
|
-
require
|
14
|
+
require 'irb'
|
14
15
|
IRB.start(__FILE__)
|
data/dev_oops.gemspec
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require_relative 'lib/dev_oops/version'
|
2
4
|
|
3
5
|
Gem::Specification.new do |spec|
|
@@ -29,6 +31,7 @@ Gem::Specification.new do |spec|
|
|
29
31
|
|
30
32
|
spec.add_development_dependency 'prettier'
|
31
33
|
spec.add_development_dependency 'rubocop'
|
34
|
+
spec.add_development_dependency 'rubocop-performance'
|
32
35
|
spec.add_development_dependency 'solargraph'
|
33
36
|
|
34
37
|
spec.post_install_message = 'Run `dev_oops install` to create the base directory for dev_oops'
|
data/exe/dev_oops
CHANGED
data/lib/dev_oops.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'dev_oops/version'
|
2
4
|
|
3
5
|
require 'fileutils'
|
@@ -5,7 +7,9 @@ require 'json'
|
|
5
7
|
require 'thor'
|
6
8
|
|
7
9
|
module DevOops
|
8
|
-
class Error < StandardError
|
10
|
+
class Error < StandardError
|
11
|
+
end
|
12
|
+
|
9
13
|
# Your code goes here...
|
10
14
|
|
11
15
|
CONFIG_DIR = "#{ENV['HOME']}/.dev_oops"
|
@@ -26,11 +30,12 @@ module DevOops
|
|
26
30
|
{
|
27
31
|
name: script_name,
|
28
32
|
desc: json_config['desc'],
|
29
|
-
usage: "#{script_name} #{json_config['usage']}",
|
33
|
+
usage: "#{script_name} #{json_config['usage'] || ''}",
|
30
34
|
command: json_config['command'],
|
31
|
-
script_location:
|
32
|
-
|
33
|
-
|
35
|
+
script_location:
|
36
|
+
json_config['script_location'] || script_location,
|
37
|
+
args: json_config['args'],
|
38
|
+
},
|
34
39
|
)
|
35
40
|
end
|
36
41
|
end
|
@@ -71,17 +76,19 @@ module DevOops
|
|
71
76
|
argument :script_name, desc: 'name of the script'
|
72
77
|
|
73
78
|
def remove_sh
|
74
|
-
|
79
|
+
return unless File.exist?("#{CONFIG_DIR}/#{script_name}.sh")
|
80
|
+
FileUtils.remove "#{CONFIG_DIR}/#{script_name}.sh"
|
75
81
|
end
|
76
82
|
|
77
83
|
def remove_json
|
78
|
-
|
84
|
+
return unless File.exist?("#{CONFIG_DIR}/#{script_name}.json")
|
85
|
+
FileUtils.remove "#{CONFIG_DIR}/#{script_name}.json"
|
79
86
|
end
|
80
87
|
end
|
81
88
|
|
82
89
|
class Runner < Thor
|
83
90
|
include Thor::Actions
|
84
|
-
REGISTERED_CLASS_METHODS = {}
|
91
|
+
REGISTERED_CLASS_METHODS = {} # rubocop:disable Style/MutableConstant
|
85
92
|
|
86
93
|
def self.source_root
|
87
94
|
"#{File.dirname(__FILE__)}/.."
|
@@ -109,10 +116,14 @@ module DevOops
|
|
109
116
|
end
|
110
117
|
end
|
111
118
|
|
119
|
+
define_singleton_method('banner') { config.usage }
|
120
|
+
|
112
121
|
define_method('perform') do
|
113
122
|
env_vars = options.map { |k, v| "#{k}=#{v}" }.join(' ')
|
114
123
|
|
115
|
-
|
124
|
+
if config.command && !config.command.empty?
|
125
|
+
system("#{env_vars} #{config.command}")
|
126
|
+
end
|
116
127
|
if config.script_location && !config.script_location.empty?
|
117
128
|
location =
|
118
129
|
if config.script_location.start_with?('/')
|
@@ -124,6 +135,7 @@ module DevOops
|
|
124
135
|
end
|
125
136
|
end
|
126
137
|
end
|
138
|
+
|
127
139
|
register(new_action, config.name, config.usage, config.desc)
|
128
140
|
end
|
129
141
|
|
@@ -132,7 +144,7 @@ module DevOops
|
|
132
144
|
EditScriptSh,
|
133
145
|
'edit_sh',
|
134
146
|
'edit_sh SCRIPT_NAME',
|
135
|
-
'Edit the script bash'
|
147
|
+
'Edit the script bash',
|
136
148
|
)
|
137
149
|
register(RemoveScript, 'rm', 'rm SCRIPT_NAME', 'Remove a script')
|
138
150
|
|
@@ -152,5 +164,7 @@ module DevOops
|
|
152
164
|
super
|
153
165
|
end
|
154
166
|
end
|
167
|
+
|
168
|
+
private
|
155
169
|
end
|
156
170
|
end
|
data/lib/dev_oops/version.rb
CHANGED
data/package.json
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
{
|
2
|
+
"name": "dev_oops",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"main": "index.js",
|
5
|
+
"repository": "git@github.com:zaratan/dev_oops.git",
|
6
|
+
"author": "Denis <Zaratan> Pasin <zaratan@hey.com>",
|
7
|
+
"license": "MIT",
|
8
|
+
"devDependencies": {
|
9
|
+
"@prettier/plugin-ruby": "^1.5.5",
|
10
|
+
"prettier": "^2.2.1"
|
11
|
+
}
|
12
|
+
}
|
data/yarn.lock
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
2
|
+
# yarn lockfile v1
|
3
|
+
|
4
|
+
|
5
|
+
"@prettier/plugin-ruby@^1.5.5":
|
6
|
+
version "1.5.5"
|
7
|
+
resolved "https://registry.yarnpkg.com/@prettier/plugin-ruby/-/plugin-ruby-1.5.5.tgz#9e206fc856a182a292fcfab9043f53c7a3d0af97"
|
8
|
+
integrity sha512-b387GdXU+LrnY+oaKWRUI5EnsUvrQ0G1jUSVPkvUTGzp/w+BB9/n4SICVPY3V9/wYsvWpAZq4LkE4FdBufXUtA==
|
9
|
+
dependencies:
|
10
|
+
prettier ">=1.10"
|
11
|
+
|
12
|
+
prettier@>=1.10, prettier@^2.2.1:
|
13
|
+
version "2.2.1"
|
14
|
+
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.2.1.tgz#795a1a78dd52f073da0cd42b21f9c91381923ff5"
|
15
|
+
integrity sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dev_oops
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Denis <Zaratan> Pasin
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rubocop-performance
|
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'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: solargraph
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -77,6 +91,8 @@ extra_rdoc_files: []
|
|
77
91
|
files:
|
78
92
|
- ".gitignore"
|
79
93
|
- ".rspec"
|
94
|
+
- ".rubocop-http---relaxed-ruby-style-rubocop-yml"
|
95
|
+
- ".rubocop.yml"
|
80
96
|
- ".travis.yml"
|
81
97
|
- CODE_OF_CONDUCT.md
|
82
98
|
- Gemfile
|
@@ -89,6 +105,9 @@ files:
|
|
89
105
|
- exe/dev_oops
|
90
106
|
- lib/dev_oops.rb
|
91
107
|
- lib/dev_oops/version.rb
|
108
|
+
- package.json
|
109
|
+
- templates/empty_script.tt
|
110
|
+
- yarn.lock
|
92
111
|
homepage: https://zaratan.fr
|
93
112
|
licenses:
|
94
113
|
- MIT
|