cody 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/cody/command.rb +8 -8
- data/lib/cody/completer.rb +9 -9
- data/lib/cody/core.rb +3 -3
- data/lib/cody/evaluate.rb +1 -1
- data/lib/cody/init.rb +1 -1
- data/lib/cody/project.rb +2 -2
- data/lib/cody/role.rb +1 -1
- data/lib/cody/schedule.rb +1 -1
- data/lib/cody/setting.rb +3 -3
- data/lib/cody/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad625a79860778a09fc071a9d2ed0477840cab76406a695bfdd4d989105b70d8
|
4
|
+
data.tar.gz: '044687e64d9f121f16b3be6941c67da8d4aca15241f18d473c19d815c9456fd8'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 93bfa129e67f2c71e7fb13ea9643155ffde3ad90ba9ff09d151fa652f4e5974de065a05c4baaf82add4371ad8065c9805ee52c74fac96e5d721567fdd3c6a418
|
7
|
+
data.tar.gz: 9356282a4e1ef3c3f6cb6716f557aa81ee8638328f4708564b093f60a892db215e6d59161e0df4d8c2d1eb755e24866f9512f53cc712627f9973f02844b394a3
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,9 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
This project *tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
|
5
5
|
|
6
|
+
## [0.7.1]
|
7
|
+
- fix renaming
|
8
|
+
|
6
9
|
## [0.7.0]
|
7
10
|
- Rename to Cody
|
8
11
|
- Breaking changes: .cody folder, CODY_ENV, -cody stack name suffix
|
data/lib/cody/command.rb
CHANGED
@@ -18,23 +18,23 @@ module Cody
|
|
18
18
|
class << self
|
19
19
|
def dispatch(m, args, options, config)
|
20
20
|
# Allow calling for help via:
|
21
|
-
#
|
22
|
-
#
|
23
|
-
#
|
24
|
-
#
|
21
|
+
# cody command help
|
22
|
+
# cody command -h
|
23
|
+
# cody command --help
|
24
|
+
# cody command -D
|
25
25
|
#
|
26
26
|
# as well thor's normal way:
|
27
27
|
#
|
28
|
-
#
|
28
|
+
# cody help command
|
29
29
|
help_flags = Thor::HELP_MAPPINGS + ["help"]
|
30
30
|
if args.length > 1 && !(args & help_flags).empty?
|
31
31
|
args -= help_flags
|
32
32
|
args.insert(-2, "help")
|
33
33
|
end
|
34
34
|
|
35
|
-
#
|
36
|
-
#
|
37
|
-
#
|
35
|
+
# cody version
|
36
|
+
# cody --version
|
37
|
+
# cody -v
|
38
38
|
version_flags = ["--version", "-v"]
|
39
39
|
if args.length == 1 && !(args & version_flags).empty?
|
40
40
|
args = ["version"]
|
data/lib/cody/completer.rb
CHANGED
@@ -48,15 +48,15 @@ Fortunately, negative and positive arity values are processed the same way. So w
|
|
48
48
|
|
49
49
|
Here are some test cases, hit TAB after typing the command:
|
50
50
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
51
|
+
cody completion
|
52
|
+
cody completion hello
|
53
|
+
cody completion hello name
|
54
|
+
cody completion hello name --
|
55
|
+
cody completion hello name --noop
|
56
|
+
|
57
|
+
cody completion
|
58
|
+
cody completion sub:goodbye
|
59
|
+
cody completion sub:goodbye name
|
60
60
|
|
61
61
|
## Subcommands and Thor::Group Registered Commands
|
62
62
|
|
data/lib/cody/core.rb
CHANGED
@@ -45,12 +45,12 @@ module Cody
|
|
45
45
|
end
|
46
46
|
memoize :settings
|
47
47
|
|
48
|
-
def
|
48
|
+
def check_cody_project!
|
49
49
|
check_path = "#{Cody.root}/.cody"
|
50
50
|
unless File.exist?(check_path)
|
51
|
-
puts "ERROR: No .cody folder found. Are you sure you are in a project with
|
51
|
+
puts "ERROR: No .cody folder found. Are you sure you are in a project with cody setup?".color(:red)
|
52
52
|
puts "Current directory: #{Dir.pwd}"
|
53
|
-
puts "If you want to set up
|
53
|
+
puts "If you want to set up cody for this project, please create a settings file via: cody init"
|
54
54
|
exit 1 unless ENV['TEST']
|
55
55
|
end
|
56
56
|
end
|
data/lib/cody/evaluate.rb
CHANGED
data/lib/cody/init.rb
CHANGED
data/lib/cody/project.rb
CHANGED
@@ -62,11 +62,11 @@ module Cody
|
|
62
62
|
end
|
63
63
|
|
64
64
|
def get_project_path
|
65
|
-
|
65
|
+
lookup_cody_file("project.rb")
|
66
66
|
end
|
67
67
|
|
68
68
|
def build_spec
|
69
|
-
|
69
|
+
lookup_cody_file("buildspec.yml")
|
70
70
|
end
|
71
71
|
end
|
72
72
|
end
|
data/lib/cody/role.rb
CHANGED
data/lib/cody/schedule.rb
CHANGED
data/lib/cody/setting.rb
CHANGED
@@ -4,14 +4,14 @@ require 'render_me_pretty'
|
|
4
4
|
module Cody
|
5
5
|
class Setting
|
6
6
|
extend Memoist
|
7
|
-
def initialize(
|
8
|
-
@
|
7
|
+
def initialize(check_cody_project=true)
|
8
|
+
@check_cody_project = check_cody_project
|
9
9
|
end
|
10
10
|
|
11
11
|
# data contains the settings.yml config. The order or precedence for settings
|
12
12
|
# is the project ufo/settings.yml and then the ~/.cody/settings.yml.
|
13
13
|
def data
|
14
|
-
Cody.
|
14
|
+
Cody.check_cody_project! if @check_cody_project
|
15
15
|
return {} unless File.exist?(project_settings_path)
|
16
16
|
|
17
17
|
# project based settings files
|
data/lib/cody/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cody
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tung Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-10-
|
11
|
+
date: 2019-10-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|