captain_hoog 1.0.1 → 1.0.2

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
  SHA1:
3
- metadata.gz: 90a0156f2d2ceb92d76f79340d5def6d7a7322cb
4
- data.tar.gz: da5dd7da0c3059b88fcc4be4d207fee81ac5911a
3
+ metadata.gz: d1878da510a740ed27d3cf1f5cce4e3a73e6d46f
4
+ data.tar.gz: d7599d7cd72adc61c6ccec8d4ffbcf037339868f
5
5
  SHA512:
6
- metadata.gz: 85516122ffae7b7c311f68d7cffa4067b06d0078e4d0ddc0e1b1dd20b9b59266ed84407fef622115afce0d34561bcbd422b9c5cd613d2388388d2aaa9fb7a231
7
- data.tar.gz: 06a158fa3f4cb7ddce69300e84d0b2120fd948e6a9434fec005e08f60b8575a69b0b5fceb59b1d8cf71213a50719b0d1ae9f161a8cd910d4ed0dc61d4c558f04
6
+ metadata.gz: 48942a77df1cb93995ec9893e9e00ad5906aa667b32b107bb4b8a0ecdc8cd673f3baa515bbdec39ded1624325bfd6cb6145475b77d7c25efc4bdf38c90a7c33e
7
+ data.tar.gz: a885954742363a1d5f5226af584a52e9eb4dd90a51e3189ebbc103462ade5a21df5cb75dc17161f264140d6e1e70939f59c98b456547d80ac49b5ecff6c8f808
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # CaptainHoog
2
2
 
3
+ [![Build Status](https://travis-ci.org/GateprotectGmbH/captain_hoog.svg)](https://travis-ci.org/GateprotectGmbH/captain_hoog)
4
+
3
5
  Okay. That's not such a funny gem name. But it's a reference to Git and the subject
4
6
  of the gem: the Git Hooks.
5
7
 
data/bin/githoog CHANGED
@@ -19,6 +19,8 @@ class GitHookInstall < Thor
19
19
  class_option :project_dir, type: :string, default: Dir.getwd
20
20
  class_option :plugins_dir, type: :string, default: Dir.getwd
21
21
 
22
+ map %w[--version -v] => :__print_version
23
+
22
24
  desc "install","Installs the hook into your Git repository"
23
25
  def install(*args)
24
26
  check_if_git_present
@@ -55,6 +57,11 @@ class GitHookInstall < Thor
55
57
  puts "The #{options[:from]} hook is moved to #{options[:to]} hook.".green
56
58
  end
57
59
  end
60
+
61
+ desc "version, -v", "Prints out the version"
62
+ def __print_version
63
+ puts CaptainHoog::VERSION
64
+ end
58
65
 
59
66
  private
60
67
 
data/changelog.md CHANGED
@@ -1,3 +1,13 @@
1
+ ## 1.0.2 (2015-05-27)
2
+
3
+ Features:
4
+
5
+ - new command line argument --version, -v prints version number
6
+
7
+ Bugfixes:
8
+
9
+ - Fix an issue that complains about plugin being nil while executing
10
+
1
11
  ## 1.0.1 (2015-05-06)
2
12
 
3
13
  Features:
@@ -42,6 +42,14 @@ Then(/^a "(.*?)" hook file did not exists$/) do |hook_type|
42
42
  expect(File.exists?(hooks_path(hook_type))).to be false
43
43
  end
44
44
 
45
+ Given(/^I type in "(.*?)"$/) do |arg1|
46
+ run_simple(arg1)
47
+ end
48
+
49
+ Then(/^I should see the current version$/) do
50
+ expect(all_stdout.split(/\n/).first).to match(/\d{1,}.\d{1,}.\d{1,}/)
51
+ end
52
+
45
53
  When(/^I run the move script with "(.*?)" from flag and "(.*?)" to flag$/) do |from, to|
46
54
  cmd = "ruby #{bin_path}/bin/githoog move --from #{from} --to #{to}"
47
55
  run_simple(unescape(cmd), false)
@@ -0,0 +1,8 @@
1
+ Feature: Getting the gems version number printed to stdout
2
+ In order to get the version printed out to stdout
3
+ As developer
4
+ I want to type in githoog --version to know about the current version
5
+
6
+ Scenario: Getting the version printed to stdout
7
+ Given I type in "githoog --version"
8
+ Then I should see the current version
@@ -28,7 +28,7 @@ module CaptainHoog
28
28
  #
29
29
  # Returns nothing
30
30
  def eval_plugin
31
- instance_eval(@code)
31
+ instance_eval(@code) && git
32
32
  end
33
33
 
34
34
  # Public: Executes a plugin and stores the results in a Hash.
@@ -1,3 +1,3 @@
1
1
  module CaptainHoog
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: captain_hoog
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Schmidt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-06 00:00:00.000000000 Z
11
+ date: 2015-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize
@@ -159,6 +159,7 @@ files:
159
159
  - features/support/env.rb
160
160
  - features/support/steps/hooks_steps.rb
161
161
  - features/support/world.rb
162
+ - features/version.feature
162
163
  - lib/captain_hoog.rb
163
164
  - lib/captain_hoog/config/hook_types.yml
164
165
  - lib/captain_hoog/core_ext.rb
@@ -231,6 +232,7 @@ test_files:
231
232
  - features/support/env.rb
232
233
  - features/support/steps/hooks_steps.rb
233
234
  - features/support/world.rb
235
+ - features/version.feature
234
236
  - spec/fixtures/code/helper.rb
235
237
  - spec/fixtures/config/cucumber/hoogfile.yml
236
238
  - spec/fixtures/config/spec/hoogfile.yml