slack_resources 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/.circleci/preparation.rb +39 -2
- data/Gemfile.lock +2 -2
- data/lib/slack_resources/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d294305ce317a688605fd30111343ceea6b07a62c39afc0eebf5b0d1b51b72be
|
4
|
+
data.tar.gz: e7aa3c3b2eabc96fc3f549bfc493112a981e20172f45aba85fb0dcd3afdd7393
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 55ba35b521d86ca65dc916a2caec9da6e800210cce1fd36d14b9c5d90d84076a28598f6e36a8d47e216366b783e7570416bff3b3558e9552b12f0ca66ebb2211
|
7
|
+
data.tar.gz: 7520541cbf6d5d9d507cb20a99a9824be980512f29b9f7e67a81d0161979a92ee40ea7dd43bf4cff75f0ec0fd081be14a401d07a60cbd865de24e2cead429f4b
|
data/.circleci/preparation.rb
CHANGED
@@ -1,10 +1,47 @@
|
|
1
1
|
class Preparation
|
2
|
+
VERSION_FILE_PATH = './lib/slack_resources/version.rb'
|
3
|
+
|
2
4
|
def initialize(params)
|
3
|
-
@
|
5
|
+
@version = params[0]
|
4
6
|
end
|
5
7
|
|
6
8
|
def execute!
|
7
|
-
|
9
|
+
major, minor, tiny = fetch_version
|
10
|
+
|
11
|
+
major += 1 if major?
|
12
|
+
minor += 1 if minor?
|
13
|
+
tiny += 1 if tiny?
|
14
|
+
|
15
|
+
next_version = [major, minor, tiny].join('.')
|
16
|
+
|
17
|
+
File.write(VERSION_FILE_PATH, <<~VER)
|
18
|
+
module SlackResources
|
19
|
+
VERSION = '#{next_version}'.freeze
|
20
|
+
end
|
21
|
+
VER
|
22
|
+
|
23
|
+
result = `gem build slack_resources.gemspec`
|
24
|
+
puts result
|
25
|
+
gem_file = result.match(/File: *(.+)\n/m)[1]
|
26
|
+
puts `gem push #{gem_file}`
|
27
|
+
end
|
28
|
+
|
29
|
+
private
|
30
|
+
|
31
|
+
def fetch_version
|
32
|
+
`gem search slack_resources`.match(/\(([\d.]+)\)/)[1].split('.').map(&:to_i)
|
33
|
+
end
|
34
|
+
|
35
|
+
def major?
|
36
|
+
@version == 'major'
|
37
|
+
end
|
38
|
+
|
39
|
+
def minor?
|
40
|
+
@version == 'minor'
|
41
|
+
end
|
42
|
+
|
43
|
+
def tiny?
|
44
|
+
!major? && !minor?
|
8
45
|
end
|
9
46
|
end
|
10
47
|
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
|
4
|
+
slack_resources (0.1.1)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
@@ -87,7 +87,7 @@ DEPENDENCIES
|
|
87
87
|
rake (~> 10.0)
|
88
88
|
rest-client (~> 2.0)
|
89
89
|
rspec (~> 3.0)
|
90
|
-
|
90
|
+
slack_resources!
|
91
91
|
|
92
92
|
BUNDLED WITH
|
93
93
|
1.16.1
|