sambot 0.1.147 → 0.1.149
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sambot/chef/cookbook.rb +7 -0
- data/lib/sambot/cli.rb +5 -0
- data/lib/sambot/config.rb +16 -0
- data/lib/sambot/templates/pre-push +1 -0
- data/lib/sambot/version.rb +1 -1
- data/sambot.gemspec +1 -8
- metadata +3 -31
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f909df3b8631452da807440d31362e22945b2ea
|
4
|
+
data.tar.gz: 3f24d450765bacc6ebfb4d07391d9c09c05a9180
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26837ca0baee424e27eac4534839ef3e34e1113c7d240206f55efc5d731806762bf40307a45d0c60c808cc71151d5fcc4a01b2d2653408988ebb76bf6c7079b5
|
7
|
+
data.tar.gz: 111717b5e21d4a9b721eba0df7a9eb2299a5f1ce5d9af78dadc2193e38403adee5c33efb0ce5bba1267e2fb45e7cb00ae6d846344d28b3ae0bea86a570a37558
|
data/lib/sambot/chef/cookbook.rb
CHANGED
@@ -48,6 +48,13 @@ module Sambot
|
|
48
48
|
UI.info('The cookbook has been successfully cleaned.')
|
49
49
|
end
|
50
50
|
|
51
|
+
def bump()
|
52
|
+
new_version = Config.new.bump_version
|
53
|
+
UI.info("You have bumped the version of this cookbook to #{new_version}.")
|
54
|
+
`git add .config.yml`
|
55
|
+
`git commit -m "Bumping the cookbook version"`
|
56
|
+
end
|
57
|
+
|
51
58
|
def generate(config)
|
52
59
|
Git.init(config[:name])
|
53
60
|
Dir.chdir(config[:name]) do
|
data/lib/sambot/cli.rb
CHANGED
@@ -14,6 +14,11 @@ module Sambot
|
|
14
14
|
execute { Chef::Cookbook.clean() }
|
15
15
|
end
|
16
16
|
|
17
|
+
desc 'clean', 'Bump the patch version of a cookbook'
|
18
|
+
def bump
|
19
|
+
execute { Chef::Cookbook.bump() }
|
20
|
+
end
|
21
|
+
|
17
22
|
desc 'build', 'Builds a Chef cookbook from its configuration file'
|
18
23
|
def build
|
19
24
|
execute { Chef::Cookbook.build(config) }
|
data/lib/sambot/config.rb
CHANGED
@@ -1,12 +1,21 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'yaml'
|
4
|
+
require 'semantic'
|
4
5
|
|
5
6
|
module Sambot
|
6
7
|
class Config
|
7
8
|
|
8
9
|
CONFIGURATION_FILENAME = '.config.yml'.freeze
|
9
10
|
|
11
|
+
def bump_version(path = nil)
|
12
|
+
path ||= File.join(Dir.getwd, CONFIGURATION_FILENAME)
|
13
|
+
config = YAML.load_file(path)
|
14
|
+
version = config['version']
|
15
|
+
config['version'] = bump(version)
|
16
|
+
File.write(path, YAML.dump(config))
|
17
|
+
end
|
18
|
+
|
10
19
|
def read(path = nil)
|
11
20
|
path ||= File.join(Dir.getwd, CONFIGURATION_FILENAME)
|
12
21
|
raise ApplicationError, "The configuration file was not found at #{path}." unless File.exist?(path)
|
@@ -26,5 +35,12 @@ module Sambot
|
|
26
35
|
config
|
27
36
|
end
|
28
37
|
|
38
|
+
private
|
39
|
+
|
40
|
+
def bump(version)
|
41
|
+
version_info = Semantic::Version.new version
|
42
|
+
"#{version_info.major}.#{version_info.minor}.#{version_info.patch}"
|
43
|
+
end
|
44
|
+
|
29
45
|
end
|
30
46
|
end
|
data/lib/sambot/version.rb
CHANGED
data/sambot.gemspec
CHANGED
@@ -21,23 +21,16 @@ Gem::Specification.new do |spec|
|
|
21
21
|
|
22
22
|
spec.add_dependency 'thor-hollaback'
|
23
23
|
spec.add_dependency 'git'
|
24
|
-
#spec.add_dependency 'slack-ruby-bot'
|
25
|
-
#spec.add_dependency 'celluloid-io'
|
26
24
|
spec.add_dependency 'process_exists'
|
27
25
|
spec.add_dependency 'climate_control'
|
28
26
|
spec.add_dependency 'vault'
|
29
|
-
spec.add_dependency 'hosts'
|
30
27
|
spec.add_dependency 'fog'
|
31
28
|
spec.add_dependency 'rhcl'
|
32
|
-
#spec.add_dependency 'restforce'
|
33
29
|
spec.add_dependency 'ridley'
|
34
|
-
spec.add_dependency 'dante'
|
35
30
|
spec.add_dependency 'net-ssh'
|
36
|
-
#spec.add_dependency 'eventmachine'
|
37
|
-
#spec.add_dependency 'faye-websocket'
|
38
31
|
spec.add_dependency 'titan'
|
39
32
|
spec.add_dependency 'open4'
|
40
|
-
spec.add_dependency '
|
33
|
+
spec.add_dependency 'semantic'
|
41
34
|
spec.add_dependency 'chef', '~> 12.18'
|
42
35
|
spec.add_dependency 'thor', '~> 0.19'
|
43
36
|
spec.add_dependency 'erubis', '~> 2.7', '>= 2.7.0'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sambot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.149
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Olivier Kouame
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07-
|
11
|
+
date: 2017-07-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor-hollaback
|
@@ -80,20 +80,6 @@ dependencies:
|
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: hosts
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - ">="
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
90
|
-
type: :runtime
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - ">="
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
97
83
|
- !ruby/object:Gem::Dependency
|
98
84
|
name: fog
|
99
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -136,20 +122,6 @@ dependencies:
|
|
136
122
|
- - ">="
|
137
123
|
- !ruby/object:Gem::Version
|
138
124
|
version: '0'
|
139
|
-
- !ruby/object:Gem::Dependency
|
140
|
-
name: dante
|
141
|
-
requirement: !ruby/object:Gem::Requirement
|
142
|
-
requirements:
|
143
|
-
- - ">="
|
144
|
-
- !ruby/object:Gem::Version
|
145
|
-
version: '0'
|
146
|
-
type: :runtime
|
147
|
-
prerelease: false
|
148
|
-
version_requirements: !ruby/object:Gem::Requirement
|
149
|
-
requirements:
|
150
|
-
- - ">="
|
151
|
-
- !ruby/object:Gem::Version
|
152
|
-
version: '0'
|
153
125
|
- !ruby/object:Gem::Dependency
|
154
126
|
name: net-ssh
|
155
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -193,7 +165,7 @@ dependencies:
|
|
193
165
|
- !ruby/object:Gem::Version
|
194
166
|
version: '0'
|
195
167
|
- !ruby/object:Gem::Dependency
|
196
|
-
name:
|
168
|
+
name: semantic
|
197
169
|
requirement: !ruby/object:Gem::Requirement
|
198
170
|
requirements:
|
199
171
|
- - ">="
|