agile-cli 0.0.4 → 0.0.5

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: cf709b7f98d5b7c1d22b1a7923262f21e1e0e3b3c57eb0481e82ef1701caf7a8
4
- data.tar.gz: fbc6780142bc69ab9324b1e3808c2b552860c3a3eb8abeed7d8e61abfebb5793
3
+ metadata.gz: 14b155b5b9fab883875e11c330781f6633060d1147c8c256001998c3293c4304
4
+ data.tar.gz: b223e7e159f4cc94855a3828fb972df8533e236f5635f8483a6dc71b3a91d2cf
5
5
  SHA512:
6
- metadata.gz: 2f8c2fb35e73ac875e0a7c6644e8d0e4d01bc1ec874fd85e97f4aeea7d42712a4c6ba2e080d6a3f18493733adb86b1f61783ad84a1096cc3ef67e35bafa99bdf
7
- data.tar.gz: f50a63d7edb207cb94a61cddf55b8a7f30961b337180c5b618b20ab9774a840b2449f465c5ee37f83e2e117744aa5418aefc871b77fa852146bc107c8017fce7
6
+ metadata.gz: f7e2dbfb8555b6053ca749fb9126caea577c8f7d108182ff6e2f049f0206ff5fd847be35d06cb382995f25a7240ad6c75bf2d04da7dcf2a85bb14368337ece19
7
+ data.tar.gz: f0352fb2da24660eb87b5bf65e6fcb0e4f3668c9d8e714935e40259c203e49e1876518f215b93534104336288f3ee85d7e694124b1d2e9076070304bdba4c447
data/Gemfile.lock CHANGED
@@ -1,7 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- agile-cli (0.0.4)
4
+
5
+ agile-cli (0.0.8)
6
+ rainbow
5
7
  thor
6
8
 
7
9
  GEM
data/README.md CHANGED
@@ -2,9 +2,7 @@
2
2
 
3
3
  Add this line to your application's Gemfile:
4
4
 
5
- ```ruby
6
- gem 'agile-cli'
7
- ```
5
+ $ gem 'agile-cli'
8
6
 
9
7
  And then execute:
10
8
 
@@ -16,13 +14,30 @@ Or install it yourself as:
16
14
 
17
15
  ## Getting Started
18
16
 
19
- ### Installation
20
- ```
21
- $ gem install agile-cli
22
-
23
- ```
24
17
  ### Using
25
- ```
18
+
19
+ If your want to see available commands, use:
20
+
26
21
  $ agile
27
22
 
28
- ```
23
+ or
24
+
25
+ $ agile help
26
+
27
+ ```
28
+ $ agile
29
+ agile hello # Print hello world
30
+ agile help [COMMAND] # Describe available commands or one specific command
31
+ agile values # Shows core agile values
32
+ agile version # Displays the version
33
+ ...
34
+
35
+ ```
36
+
37
+ You can see the core values of agile at any time:
38
+
39
+ $ agile values
40
+
41
+ and principles:
42
+
43
+ $ agile principles
data/agile-cli.gemspec CHANGED
@@ -13,13 +13,16 @@ Gem::Specification.new do |spec|
13
13
  spec.require_paths = ["lib"]
14
14
  spec.executables = ["agile"]
15
15
 
16
+ spec.add_dependency "rainbow"
16
17
  spec.add_dependency "thor"
17
18
 
18
19
  spec.add_development_dependency "bundler", "~> 1.17"
20
+ spec.add_development_dependency "factory_bot", "~> 5.0.2"
19
21
  spec.add_development_dependency "pry"
20
22
  spec.add_development_dependency "rake", "~> 10.0"
21
23
  spec.add_development_dependency "reek"
22
24
  spec.add_development_dependency "rspec", "~> 3.0"
23
25
  spec.add_development_dependency "rubocop"
26
+ spec.add_development_dependency "timecop", "~> 0.9.1"
24
27
  spec.add_development_dependency "simplecov"
25
28
  end
@@ -0,0 +1,43 @@
1
+ Our highest priority is to satisfy the customer
2
+ through early and continuous delivery
3
+ of valuable software.
4
+
5
+ Welcome changing requirements, even late in
6
+ development. Agile processes harness change for
7
+ the customer's competitive advantage.
8
+
9
+ Deliver working software frequently, from a
10
+ couple of weeks to a couple of months, with a
11
+ preference to the shorter timescale.
12
+
13
+ Business people and developers must work
14
+ together daily throughout the project.
15
+
16
+ Build projects around motivated individuals.
17
+
18
+ Give them the environment and support they need,
19
+ and trust them to get the job done.
20
+
21
+ The most efficient and effective method of
22
+ conveying information to and within a development
23
+ team is face-to-face conversation.
24
+
25
+ Working software is the primary measure of progress.
26
+
27
+ Agile processes promote sustainable development.
28
+
29
+ The sponsors, developers, and users should be able
30
+ to maintain a constant pace indefinitely.
31
+
32
+ Continuous attention to technical excellence
33
+ and good design enhances agility.
34
+
35
+ Simplicity--the art of maximizing the amount
36
+ of work not done--is essential.
37
+
38
+ The best architectures, requirements, and designs
39
+ emerge from self-organizing teams.
40
+
41
+ At regular intervals, the team reflects on how
42
+ to become more effective, then tunes and adjusts
43
+ its behavior accordingly.
@@ -0,0 +1,4 @@
1
+ Individuals and interactions over processes and tools
2
+ Working software over comprehensive documentation
3
+ Customer collaboration over contract negotiation
4
+ Responding to change over following a plan
@@ -1,6 +1,6 @@
1
1
  module Agile
2
2
  class CLI < Thor
3
- desc "hello", "Print hello world"
3
+ desc Rainbow("hello").cornflower, Rainbow("Print hello world").darkgoldenrod
4
4
  def hello
5
5
  say "Hello world!"
6
6
  end
@@ -0,0 +1,28 @@
1
+ # rubocop: disable Metrics/AbcSize
2
+ # :reek:disable
3
+ module Agile
4
+ class CLI < Thor
5
+ class << self
6
+ def help(shell, subcommand = false)
7
+ list = printable_commands(true, subcommand)
8
+ Thor::Util.thor_classes_in(self).each do |klass|
9
+ list += klass.printable_commands(false)
10
+ end
11
+ list.sort! { |a, b| a[0] <=> b[0] }
12
+ list.reject! { |l| l[0].split[1] == "help" }
13
+
14
+ if defined?(@package_name) && @package_name
15
+ shell.say "#{@package_name} commands:"
16
+ else
17
+ shell.say Rainbow("Commands:").whitesmoke
18
+ end
19
+
20
+ shell.print_table(list, indent: 2, truncate: true)
21
+ shell.say
22
+ class_options_help(shell)
23
+ shell.say Rainbow("All commands can be run with -h (or --help) for more information.").whitesmoke
24
+ end
25
+ end
26
+ end
27
+ end
28
+ # rubocop: enable Metrics/AbcSize
@@ -0,0 +1,8 @@
1
+ module Agile
2
+ class CLI < Thor
3
+ desc Rainbow("principles").cornflower, Rainbow("Shows twelwe agile principles").darkgoldenrod
4
+ def principles
5
+ say File.read("lib/agile/agile_principles.txt")
6
+ end
7
+ end
8
+ end
@@ -1,11 +1,8 @@
1
1
  module Agile
2
2
  class CLI < Thor
3
- desc "values", "Shows core agile values"
3
+ desc Rainbow("values").cornflower, Rainbow("Shows core agile values").darkgoldenrod
4
4
  def values
5
- say "Individuals and interactions over processes and tools"
6
- say "Working software over comprehensive documentation"
7
- say "Customer collaboration over contract negotiation"
8
- say "Responding to change over following a plan"
5
+ say File.read("lib/agile/agile_values.txt")
9
6
  end
10
7
  end
11
8
  end
@@ -1,6 +1,6 @@
1
1
  module Agile
2
2
  class CLI < Thor
3
- desc "version", "Displays the version"
3
+ desc Rainbow("version").cornflower, Rainbow("Displays the version").darkgoldenrod
4
4
  def version
5
5
  say "agile #{Agile::VERSION}"
6
6
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Agile
4
- VERSION = "0.0.4"
4
+ VERSION = "0.0.5"
5
5
  end
data/lib/agile.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require "thor"
2
+ require "rainbow"
2
3
  require "agile/constants"
3
4
  Dir[File.join(__dir__, "agile/commands", "*.rb")].each { |file| require file }
4
5
 
@@ -0,0 +1,17 @@
1
+ require "agile/commands/hello"
2
+
3
+ RSpec.describe Agile::CLI do
4
+ describe "#hello" do
5
+ subject(:cli) { described_class.new }
6
+
7
+ before do
8
+ allow(cli).to receive(:say).with("Hello world!")
9
+ end
10
+
11
+ it "greets you" do
12
+ cli.hello
13
+
14
+ expect(cli).to have_received(:say).with("Hello world!")
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,17 @@
1
+ require "agile/commands/principles"
2
+
3
+ RSpec.describe Agile::CLI do
4
+ describe "#principles" do
5
+ subject(:cli) { described_class.new }
6
+
7
+ before do
8
+ allow(cli).to receive(:say).with(File.read("lib/agile/agile_principles.txt"))
9
+ end
10
+
11
+ it "returns twelwe principles" do
12
+ cli.principles
13
+
14
+ expect(cli).to have_received(:say).with(File.read("lib/agile/agile_principles.txt"))
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,16 @@
1
+ require "agile/commands/hello"
2
+
3
+ RSpec.describe Agile::CLI do
4
+ describe "#values" do
5
+ subject(:cli) { described_class.new }
6
+
7
+ before do
8
+ allow(cli).to receive(:say).with(File.read("lib/agile/agile_values.txt"))
9
+ end
10
+
11
+ it "returns agile values" do
12
+ cli.values
13
+ expect(cli).to have_received(:say).with(File.read("lib/agile/agile_values.txt"))
14
+ end
15
+ end
16
+ end
@@ -5,13 +5,13 @@ RSpec.describe Agile::CLI do
5
5
  subject(:cli) { described_class.new }
6
6
 
7
7
  before do
8
- allow(cli).to receive(:say).with("agile 0.0.3")
8
+ allow(cli).to receive(:say).with("agile #{Agile::VERSION}")
9
9
  end
10
10
 
11
11
  it "has a version number" do
12
12
  cli.version
13
13
 
14
- expect(cli).to have_received(:say).with("agile 0.0.3")
14
+ expect(cli).to have_received(:say).with("agile #{Agile::VERSION}")
15
15
  end
16
16
  end
17
17
  end
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: agile-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - rubizza-camp
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-07 00:00:00.000000000 Z
11
+ date: 2019-08-08 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rainbow
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: thor
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -38,6 +52,20 @@ dependencies:
38
52
  - - "~>"
39
53
  - !ruby/object:Gem::Version
40
54
  version: '1.17'
55
+ - !ruby/object:Gem::Dependency
56
+ name: factory_bot
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 5.0.2
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 5.0.2
41
69
  - !ruby/object:Gem::Dependency
42
70
  name: pry
43
71
  requirement: !ruby/object:Gem::Requirement
@@ -108,6 +136,20 @@ dependencies:
108
136
  - - ">="
109
137
  - !ruby/object:Gem::Version
110
138
  version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: timecop
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: 0.9.1
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: 0.9.1
111
153
  - !ruby/object:Gem::Dependency
112
154
  name: simplecov
113
155
  requirement: !ruby/object:Gem::Requirement
@@ -144,10 +186,17 @@ files:
144
186
  - bin/agile
145
187
  - bin/setup
146
188
  - lib/agile.rb
189
+ - lib/agile/agile_principles.txt
190
+ - lib/agile/agile_values.txt
147
191
  - lib/agile/commands/hello.rb
192
+ - lib/agile/commands/help.rb
193
+ - lib/agile/commands/principles.rb
148
194
  - lib/agile/commands/values.rb
149
195
  - lib/agile/commands/version.rb
150
196
  - lib/agile/constants.rb
197
+ - spec/agile/hello_spec.rb
198
+ - spec/agile/principles_spec.rb
199
+ - spec/agile/values_spec.rb
151
200
  - spec/agile/version_spec.rb
152
201
  - spec/spec_helper.rb
153
202
  homepage: https://github.com/rubizza-camp/AgileCli