stakeholder_management_strategy 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: d10fcb1a990b572f4e9e41d7fecae6543176e018
4
+ data.tar.gz: 0fdd5452896df89abb6b4c38e5a745d1517c5f79
5
+ SHA512:
6
+ metadata.gz: de5950369e9176d51d4cdc3a1b91940eaa78d3482eba061eee8676fb0251f65d590fb0739f20219c8f3116d89f0df8ec1d63eb0307811a213ae2686a8884f6ce
7
+ data.tar.gz: e7b39f4f7fce93a5131c6841a8cbf4d2bd26d33691186544b57747ecfb74b8972f9ca7a07a3a958f89ed5e32c99a954addeff31ac376c6d713d8a9511f243c88
data/.gitignore ADDED
@@ -0,0 +1,22 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
18
+ *.bundle
19
+ *.so
20
+ *.o
21
+ *.a
22
+ mkmf.log
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --color
2
+ --warnings
3
+ --require spec_helper
data/.ruby-gemset ADDED
@@ -0,0 +1 @@
1
+ stakeholder_management_strategy
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ ruby-2.1.2
data/.travis.yml ADDED
@@ -0,0 +1,3 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.1.2
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in stakeholder_management_strategy.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 Nigel Lowry
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,29 @@
1
+ # StakeholderManagementStrategy
2
+
3
+ TODO: Write a gem description
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'stakeholder_management_strategy'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install stakeholder_management_strategy
18
+
19
+ ## Usage
20
+
21
+ TODO: Write usage instructions here
22
+
23
+ ## Contributing
24
+
25
+ 1. Fork it ( https://github.com/[my-github-username]/stakeholder_management_strategy/fork )
26
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
27
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
28
+ 4. Push to the branch (`git push origin my-new-feature`)
29
+ 5. Create a new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ require 'rspec/core/rake_task'
4
+ require 'cucumber'
5
+ require 'cucumber/rake/task'
6
+
7
+ task default: [:spec, :cucumber]
8
+
9
+ RSpec::Core::RakeTask.new
10
+ Cucumber::Rake::Task.new
@@ -0,0 +1,22 @@
1
+ Feature: Management approach
2
+
3
+ As a business analyst
4
+ I want to know what strategy to use with a stakeholder
5
+ So that I can manage them effectively
6
+
7
+ Scenario Outline: Management strategy
8
+ Given the stakeholder has <Power> power/influence
9
+ And <Interest> interest in the project
10
+ Then the management strategy should be <Strategy>
11
+
12
+ Examples:
13
+ | Power | Interest | Strategy |
14
+ | No | No | Ignore |
15
+ | No | Some | Keep informed |
16
+ | No | High | Keep informed |
17
+ | Some | No | Keep onside |
18
+ | Some | Some | Keep onside |
19
+ | Some | High | Keep onside |
20
+ | High | No | Watch |
21
+ | High | Some | Keep satisfied |
22
+ | High | High | Constant, active management |
@@ -0,0 +1,11 @@
1
+ Given /^the stakeholder has (#{CAPTURE_A_WORD}) power\/influence$/ do |p|
2
+ @power = p
3
+ end
4
+
5
+ And /^(#{CAPTURE_A_WORD}) interest in the project$/ do |i|
6
+ @interest = i
7
+ end
8
+
9
+ Then /^the management strategy should be (#{CAPTURE_A_WORD})$/ do |s|
10
+ expect(StakeholderManagementStrategy.strategy(power: @power, interest: @interest)).to eq(s)
11
+ end
@@ -0,0 +1 @@
1
+ require File.join(File.dirname(__FILE__), '..', '..', 'lib', 'stakeholder_management_strategy')
@@ -0,0 +1,3 @@
1
+ CAPTURE_A_WORD = Transform /^(.*)$/ do |level|
2
+ level.gsub(/ /, '_').delete(',').downcase.to_sym
3
+ end
@@ -0,0 +1,31 @@
1
+ require "stakeholder_management_strategy/version"
2
+ require 'active_support/all'
3
+
4
+ module StakeholderManagementStrategy
5
+ @@LEVELS = [:no, :some, :high]
6
+
7
+ def self.strategy(power:, interest:)
8
+ raise unless [power, interest].all? {|dimension| dimension.in? @@LEVELS }
9
+
10
+ case power
11
+ when :high
12
+ case interest
13
+ when :no
14
+ :watch
15
+ when :some
16
+ :keep_satisfied
17
+ when :high
18
+ :constant_active_management
19
+ end
20
+ when :some
21
+ :keep_onside
22
+ when :no
23
+ case interest
24
+ when :no
25
+ :ignore
26
+ else
27
+ :keep_informed
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,3 @@
1
+ module StakeholderManagementStrategy
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,78 @@
1
+ # This file was generated by the `rspec --init` command. Conventionally, all
2
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
+ # The generated `.rspec` file contains `--require spec_helper` which will cause this
4
+ # file to always be loaded, without a need to explicitly require it in any files.
5
+ #
6
+ # Given that it is always loaded, you are encouraged to keep this file as
7
+ # light-weight as possible. Requiring heavyweight dependencies from this file
8
+ # will add to the boot time of your test suite on EVERY test run, even for an
9
+ # individual file that may not need all of that loaded. Instead, make a
10
+ # separate helper file that requires this one and then use it only in the specs
11
+ # that actually need it.
12
+ #
13
+ # The `.rspec` file also contains a few flags that are not defaults but that
14
+ # users commonly want.
15
+ #
16
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
17
+ RSpec.configure do |config|
18
+ # The settings below are suggested to provide a good initial experience
19
+ # with RSpec, but feel free to customize to your heart's content.
20
+ =begin
21
+ # These two settings work together to allow you to limit a spec run
22
+ # to individual examples or groups you care about by tagging them with
23
+ # `:focus` metadata. When nothing is tagged with `:focus`, all examples
24
+ # get run.
25
+ config.filter_run :focus
26
+ config.run_all_when_everything_filtered = true
27
+
28
+ # Many RSpec users commonly either run the entire suite or an individual
29
+ # file, and it's useful to allow more verbose output when running an
30
+ # individual spec file.
31
+ if config.files_to_run.one?
32
+ # Use the documentation formatter for detailed output,
33
+ # unless a formatter has already been configured
34
+ # (e.g. via a command-line flag).
35
+ config.default_formatter = 'doc'
36
+ end
37
+
38
+ # Print the 10 slowest examples and example groups at the
39
+ # end of the spec run, to help surface which specs are running
40
+ # particularly slow.
41
+ config.profile_examples = 10
42
+
43
+ # Run specs in random order to surface order dependencies. If you find an
44
+ # order dependency and want to debug it, you can fix the order by providing
45
+ # the seed, which is printed after each run.
46
+ # --seed 1234
47
+ config.order = :random
48
+
49
+ # Seed global randomization in this process using the `--seed` CLI option.
50
+ # Setting this allows you to use `--seed` to deterministically reproduce
51
+ # test failures related to randomization by passing the same `--seed` value
52
+ # as the one that triggered the failure.
53
+ Kernel.srand config.seed
54
+
55
+ # rspec-expectations config goes here. You can use an alternate
56
+ # assertion/expectation library such as wrong or the stdlib/minitest
57
+ # assertions if you prefer.
58
+ config.expect_with :rspec do |expectations|
59
+ # Enable only the newer, non-monkey-patching expect syntax.
60
+ # For more details, see:
61
+ # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
62
+ expectations.syntax = :expect
63
+ end
64
+
65
+ # rspec-mocks config goes here. You can use an alternate test double
66
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
67
+ config.mock_with :rspec do |mocks|
68
+ # Enable only the newer, non-monkey-patching expect syntax.
69
+ # For more details, see:
70
+ # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
71
+ mocks.syntax = :expect
72
+
73
+ # Prevents you from mocking or stubbing a method that does not exist on
74
+ # a real object. This is generally recommended.
75
+ mocks.verify_partial_doubles = true
76
+ end
77
+ =end
78
+ end
@@ -0,0 +1,37 @@
1
+ require 'spec_helper'
2
+ require 'stakeholder_management_strategy'
3
+
4
+ describe StakeholderManagementStrategy do
5
+ describe '.strategy' do
6
+ context 'errors' do
7
+ specify { expect { StakeholderManagementStrategy.strategy }.to raise_error }
8
+ specify { expect { StakeholderManagementStrategy.strategy power: :no }.to raise_error }
9
+ specify { expect { StakeholderManagementStrategy.strategy interest: :no }.to raise_error }
10
+
11
+ specify { expect { StakeholderManagementStrategy.strategy power: :no, interest: nil }.to raise_error }
12
+ specify { expect { StakeholderManagementStrategy.strategy power: nil, interest: :no }.to raise_error }
13
+ specify { expect { StakeholderManagementStrategy.strategy power: nil, interest: nil }.to raise_error }
14
+
15
+ specify { expect { StakeholderManagementStrategy.strategy power: :no, influence: :no }.to raise_error }
16
+
17
+ specify { expect { StakeholderManagementStrategy.strategy power: :no, interest: :low }.to raise_error }
18
+ specify { expect { StakeholderManagementStrategy.strategy power: :low, interest: :no }.to raise_error }
19
+
20
+ specify { expect { StakeholderManagementStrategy.strategy power: :no, interest: :no, name: 'Barry' }.to raise_error }
21
+ end
22
+
23
+ context 'strategies' do
24
+ specify { expect(StakeholderManagementStrategy.strategy power: :no, interest: :no).to eq(:ignore) }
25
+ specify { expect(StakeholderManagementStrategy.strategy power: :no, interest: :some).to eq(:keep_informed) }
26
+ specify { expect(StakeholderManagementStrategy.strategy power: :no, interest: :high).to eq(:keep_informed) }
27
+
28
+ specify { expect(StakeholderManagementStrategy.strategy power: :some, interest: :no).to eq(:keep_onside) }
29
+ specify { expect(StakeholderManagementStrategy.strategy power: :some, interest: :some).to eq(:keep_onside) }
30
+ specify { expect(StakeholderManagementStrategy.strategy power: :some, interest: :high).to eq(:keep_onside) }
31
+
32
+ specify { expect(StakeholderManagementStrategy.strategy power: :high, interest: :no).to eq(:watch) }
33
+ specify { expect(StakeholderManagementStrategy.strategy power: :high, interest: :some).to eq(:keep_satisfied) }
34
+ specify { expect(StakeholderManagementStrategy.strategy power: :high, interest: :high).to eq(:constant_active_management) }
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,26 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'stakeholder_management_strategy/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "stakeholder_management_strategy"
8
+ spec.version = StakeholderManagementStrategy::VERSION
9
+ spec.authors = ["Nigel Lowry"]
10
+ spec.email = ["nigel-lowry@ultra.eclipse.co.uk"]
11
+ spec.summary = %q{Small gem to tell you what stakeholder management strategy to use given a stakeholder's power/influence and interest.}
12
+ spec.description = %q{Implements the power/interest grid as laid out within the BCS ISEB International Diploma in Business Analysis syllabus.}
13
+ spec.homepage = ""
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.6"
22
+ spec.add_development_dependency "rake"
23
+ spec.add_development_dependency "rspec"
24
+ spec.add_development_dependency "cucumber"
25
+ spec.add_runtime_dependency "activesupport"
26
+ end
metadata ADDED
@@ -0,0 +1,140 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: stakeholder_management_strategy
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Nigel Lowry
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-08-23 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.6'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.6'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: cucumber
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: activesupport
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ description: Implements the power/interest grid as laid out within the BCS ISEB International
84
+ Diploma in Business Analysis syllabus.
85
+ email:
86
+ - nigel-lowry@ultra.eclipse.co.uk
87
+ executables: []
88
+ extensions: []
89
+ extra_rdoc_files: []
90
+ files:
91
+ - ".gitignore"
92
+ - ".rspec"
93
+ - ".ruby-gemset"
94
+ - ".ruby-version"
95
+ - ".travis.yml"
96
+ - Gemfile
97
+ - LICENSE.txt
98
+ - README.md
99
+ - Rakefile
100
+ - features/stakeholder_management_approach.feature
101
+ - features/step_definitions/management_strategy_steps.rb
102
+ - features/support/env.rb
103
+ - features/support/transforms.rb
104
+ - lib/stakeholder_management_strategy.rb
105
+ - lib/stakeholder_management_strategy/version.rb
106
+ - spec/spec_helper.rb
107
+ - spec/stakeholder_management_strategy_spec.rb
108
+ - stakeholder_management_strategy.gemspec
109
+ homepage: ''
110
+ licenses:
111
+ - MIT
112
+ metadata: {}
113
+ post_install_message:
114
+ rdoc_options: []
115
+ require_paths:
116
+ - lib
117
+ required_ruby_version: !ruby/object:Gem::Requirement
118
+ requirements:
119
+ - - ">="
120
+ - !ruby/object:Gem::Version
121
+ version: '0'
122
+ required_rubygems_version: !ruby/object:Gem::Requirement
123
+ requirements:
124
+ - - ">="
125
+ - !ruby/object:Gem::Version
126
+ version: '0'
127
+ requirements: []
128
+ rubyforge_project:
129
+ rubygems_version: 2.2.2
130
+ signing_key:
131
+ specification_version: 4
132
+ summary: Small gem to tell you what stakeholder management strategy to use given a
133
+ stakeholder's power/influence and interest.
134
+ test_files:
135
+ - features/stakeholder_management_approach.feature
136
+ - features/step_definitions/management_strategy_steps.rb
137
+ - features/support/env.rb
138
+ - features/support/transforms.rb
139
+ - spec/spec_helper.rb
140
+ - spec/stakeholder_management_strategy_spec.rb