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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f8dc3db936e304bc7bbe9a46ca4f15abc27c9ae3633d233ed30125d1fa4f9dac
4
- data.tar.gz: ac21512366ff00cbca6e1353ea629d8bcc763f21ee76fd72dab691f5d8067e0d
3
+ metadata.gz: d294305ce317a688605fd30111343ceea6b07a62c39afc0eebf5b0d1b51b72be
4
+ data.tar.gz: e7aa3c3b2eabc96fc3f549bfc493112a981e20172f45aba85fb0dcd3afdd7393
5
5
  SHA512:
6
- metadata.gz: 6996b10694f5a3e400dc90368865764ad0741ab549662ee836656bbd104e6da432645ff4945b84aec7d2158a463426ba5ac8367d71108783f9125bf3f2efc463
7
- data.tar.gz: 2aaa56fa07cac1af32652c9c1086e8d4d26cfc04902b65405db3e7c68d134438cd0c2181e049bd3271996bf8e32687343df6f722dbafea64d23181f06d1fb8b1
6
+ metadata.gz: 55ba35b521d86ca65dc916a2caec9da6e800210cce1fd36d14b9c5d90d84076a28598f6e36a8d47e216366b783e7570416bff3b3558e9552b12f0ca66ebb2211
7
+ data.tar.gz: 7520541cbf6d5d9d507cb20a99a9824be980512f29b9f7e67a81d0161979a92ee40ea7dd43bf4cff75f0ec0fd081be14a401d07a60cbd865de24e2cead429f4b
@@ -1,10 +1,47 @@
1
1
  class Preparation
2
+ VERSION_FILE_PATH = './lib/slack_resources/version.rb'
3
+
2
4
  def initialize(params)
3
- @params = params
5
+ @version = params[0]
4
6
  end
5
7
 
6
8
  def execute!
7
- p `gem search slack_resources`
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
- slack_app_request_handler (0.1.0)
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
- slack_app_request_handler!
90
+ slack_resources!
91
91
 
92
92
  BUNDLED WITH
93
93
  1.16.1
@@ -1,3 +1,3 @@
1
1
  module SlackResources
2
- VERSION = '0.1.0'.freeze
2
+ VERSION = '0.1.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slack_resources
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - mmmpa