bumperok 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: b0ad05457b0669ad9c5a046b0cc646a42c127869
4
+ data.tar.gz: 89cdfeaf68dd983c3e76e6e9a960222ff06cda47
5
+ SHA512:
6
+ metadata.gz: 9c1e64eab0da41f4cf92ed1a48fa5f5b1e0a61645dc15468e74ec492f4f212660b3705d41cb819f898a158fa738918c5da19977bb7d1890d219d948e18d46e5c
7
+ data.tar.gz: 6011d422363734b1784e8eb17f56bdf9c9f0706f095db5ed00d3a13d886c976778a691f13b6a8c94cce4fec4a3ff555a2111ac46d0c0042e56793167d9d5d316
data/.autotest ADDED
@@ -0,0 +1,25 @@
1
+ # -*- ruby -*-
2
+
3
+ require "autotest/restart"
4
+
5
+ # Autotest.add_hook :initialize do |at|
6
+ # at.testlib = "minitest/unit"
7
+ #
8
+ # at.extra_files << "../some/external/dependency.rb"
9
+ #
10
+ # at.libs << ":../some/external"
11
+ #
12
+ # at.add_exception "vendor"
13
+ #
14
+ # at.add_mapping(/dependency.rb/) do |f, _|
15
+ # at.files_matching(/test_.*rb$/)
16
+ # end
17
+ #
18
+ # %w(TestA TestB).each do |klass|
19
+ # at.extra_class_map[klass] = "test/test_misc.rb"
20
+ # end
21
+ # end
22
+
23
+ # Autotest.add_hook :run_command do |at|
24
+ # system "rake build"
25
+ # end
data/History.txt ADDED
@@ -0,0 +1,6 @@
1
+ === 1.0.0 / 2015-11-05
2
+
3
+ * 1 major enhancement
4
+
5
+ * Birthday!
6
+
data/Manifest.txt ADDED
@@ -0,0 +1,8 @@
1
+ .autotest
2
+ History.txt
3
+ Manifest.txt
4
+ README.txt
5
+ Rakefile
6
+ bin/bumper
7
+ lib/bumper.rb
8
+ test/test_bumper.rb
data/README.txt ADDED
@@ -0,0 +1,61 @@
1
+ = bumper
2
+
3
+ home :: http://git.sibext.com/snacks/bumper
4
+ code :: git@src.sibext.com:snacks/bumper.git
5
+ rdoc :: FIX (url)
6
+ bugs :: FIX (url)
7
+ ... etc ...
8
+
9
+ == DESCRIPTION:
10
+
11
+ FIX (describe your package)
12
+
13
+ == FEATURES/PROBLEMS:
14
+
15
+ * FIX (list of features or problems)
16
+
17
+ == SYNOPSIS:
18
+
19
+ FIX (code sample of usage)
20
+
21
+ == REQUIREMENTS:
22
+
23
+ * FIX (list of requirements)
24
+
25
+ == INSTALL:
26
+
27
+ * FIX (sudo gem install, anything else)
28
+
29
+ == DEVELOPERS:
30
+
31
+ After checking out the source, run:
32
+
33
+ $ rake newb
34
+
35
+ This task will install any missing dependencies, run the tests/specs,
36
+ and generate the RDoc.
37
+
38
+ == LICENSE:
39
+
40
+ (The MIT License)
41
+
42
+ Copyright (c) 2015 FIX
43
+
44
+ Permission is hereby granted, free of charge, to any person obtaining
45
+ a copy of this software and associated documentation files (the
46
+ 'Software'), to deal in the Software without restriction, including
47
+ without limitation the rights to use, copy, modify, merge, publish,
48
+ distribute, sublicense, and/or sell copies of the Software, and to
49
+ permit persons to whom the Software is furnished to do so, subject to
50
+ the following conditions:
51
+
52
+ The above copyright notice and this permission notice shall be
53
+ included in all copies or substantial portions of the Software.
54
+
55
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
56
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
57
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
58
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
59
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
60
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
61
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1,20 @@
1
+ # -*- ruby -*-
2
+
3
+ require "rubygems"
4
+ require "hoe"
5
+
6
+ # Hoe.plugin :compiler
7
+ # Hoe.plugin :gem_prelude_sucks
8
+ # Hoe.plugin :inline
9
+ # Hoe.plugin :minitest
10
+ # Hoe.plugin :racc
11
+ # Hoe.plugin :rcov
12
+ # Hoe.plugin :rdoc
13
+
14
+ Hoe.spec "bumperok" do
15
+ developer("Nikolay Moskvin", "moskvin@sibext.com")
16
+ license "MIT"
17
+ dependency 'git', '~> 1.2'
18
+ end
19
+
20
+ # vim: syntax=ruby
data/bin/bumper ADDED
@@ -0,0 +1,34 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'optparse'
4
+ require 'ostruct'
5
+ require 'bumper'
6
+
7
+ options = OpenStruct.new
8
+
9
+ OptionParser.new do |opts|
10
+ opts.banner = "Usage: mezzo_hub [options]"
11
+
12
+ opts.on("-cCMD", "--command=CMD", "Commands: bump, tag") do |c|
13
+ options.cmd = c
14
+ end
15
+
16
+ opts.on("-tTAG", "--tag=TAG", "Name of release git tag") do |t|
17
+ options.tag = t
18
+ end
19
+
20
+ opts.on("-gGIT", "--git-path=GIT", "Working folder for git") do |g|
21
+ options.git_path = g
22
+ end
23
+
24
+ end.parse!
25
+
26
+ if options.cmd and options.cmd == 'tag'
27
+ if options.tag and options.git_path
28
+ Bumper.tag options.git_path, options.tag
29
+ else
30
+ p "Bad options"
31
+ end
32
+ else
33
+ raise "#{options.cmd} is unsupported command"
34
+ end
data/lib/bumper.rb ADDED
@@ -0,0 +1,16 @@
1
+ require 'git'
2
+ require 'logger'
3
+ require 'git-ssh-wrapper'
4
+
5
+ class Bumper
6
+ VERSION = "0.0.1"
7
+
8
+ def self.tag git_path, tag_name
9
+ wrapper = GitSSHWrapper.with_wrapper(private_key_path: '~/.ssh/bumber_at_sibext', log_level: 'ERROR') do |w|
10
+ w.set_env
11
+ `git '--git-dir=#{git_path}/.git' '--work-tree=#{git_path}' tag '-f' '#{tag_name}' '-m tagged by Bumber'` # 2>&1
12
+ `git '--git-dir=#{git_path}/.git' '--work-tree=#{git_path}' push '--force' 'origin' 'refs/tags/#{tag_name}'`
13
+ end
14
+ end
15
+
16
+ end
@@ -0,0 +1,10 @@
1
+ gem "minitest"
2
+ require "minitest/autorun"
3
+ require "bumper"
4
+
5
+ class TestBumper < Minitest::Test
6
+ def test_tag
7
+ result = Bumper.tag "/Users/moskvin/src/snacks/damper", "v0.0.1"
8
+ assert_equal 0, result
9
+ end
10
+ end
metadata ADDED
@@ -0,0 +1,100 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: bumperok
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Nikolay Moskvin
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-11-05 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: git
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.2'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.2'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rdoc
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '4.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '4.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: hoe
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.14'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.14'
55
+ description: FIX (describe your package)
56
+ email:
57
+ - moskvin@sibext.com
58
+ executables:
59
+ - bumper
60
+ extensions: []
61
+ extra_rdoc_files:
62
+ - History.txt
63
+ - Manifest.txt
64
+ - README.txt
65
+ files:
66
+ - ".autotest"
67
+ - History.txt
68
+ - Manifest.txt
69
+ - README.txt
70
+ - Rakefile
71
+ - bin/bumper
72
+ - lib/bumper.rb
73
+ - test/test_bumper.rb
74
+ homepage: http://git.sibext.com/snacks/bumper
75
+ licenses:
76
+ - MIT
77
+ metadata: {}
78
+ post_install_message:
79
+ rdoc_options:
80
+ - "--main"
81
+ - README.txt
82
+ require_paths:
83
+ - lib
84
+ required_ruby_version: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ required_rubygems_version: !ruby/object:Gem::Requirement
90
+ requirements:
91
+ - - ">="
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
94
+ requirements: []
95
+ rubyforge_project:
96
+ rubygems_version: 2.4.5.1
97
+ signing_key:
98
+ specification_version: 4
99
+ summary: FIX (describe your package)
100
+ test_files: []