clitasks 0.0.7 → 0.0.8

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: 00013787a9a3c911364f377a0547e73e5f658bb8
4
- data.tar.gz: 9ee7258c4e655f8cc627f4728a91b391b66cd139
3
+ metadata.gz: 5b0d4cafe1410d3ed83196f84382135d7762a120
4
+ data.tar.gz: 82d69286f933b07c14096fcad05f5991a698aa34
5
5
  SHA512:
6
- metadata.gz: f6e6a08e04794725c48724ac4cadf5952f997520475786a646d16afd286d3e7d91b605f5c1716fa051b06bbfb2bfcdf9a4109e7b6a2f523ded8b25a88280be4d
7
- data.tar.gz: 62c66aace63be1048f077ed67adb31001545e8bc2f73f108ae3a5488a4521eed6fd783bb33b1a2ca0b85bb445f02260a2f974b7d74c916aebc0bb84393057d48
6
+ metadata.gz: fe17ef8eef377b8e68e975af43f5e5660e888c05f17c6d1c90487bedc11b350f9a7bc73204b166ec88616f85e0ae884ff2c9e764f51d5f56356668166af3323d
7
+ data.tar.gz: 74f6ca704ccc6eb148a56d01562de3ee53a47f9a9e388e5cdba9b33be05f49843a774b82c1cacc52401e74a352b609dcb0de4740489e0a6aee4f7ed984c3a4fa
@@ -1,16 +1,30 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ clitasks (0.0.7)
5
+ activesupport (~> 4.0)
6
+
1
7
  GEM
2
8
  remote: https://rubygems.org/
3
9
  specs:
10
+ activesupport (4.1.1)
11
+ i18n (~> 0.6, >= 0.6.9)
12
+ json (~> 1.7, >= 1.7.7)
13
+ minitest (~> 5.1)
14
+ thread_safe (~> 0.1)
15
+ tzinfo (~> 1.1)
16
+ i18n (0.6.9)
17
+ json (1.8.1)
4
18
  minitest (5.3.3)
5
- prettyprint (0.0.1)
6
- thor
7
19
  rake (10.3.1)
8
- thor (0.19.1)
20
+ thread_safe (0.3.3)
21
+ tzinfo (1.1.0)
22
+ thread_safe (~> 0.1)
9
23
 
10
24
  PLATFORMS
11
25
  ruby
12
26
 
13
27
  DEPENDENCIES
14
- minitest
15
- prettyprint
16
- rake
28
+ clitasks!
29
+ minitest (~> 5.3)
30
+ rake (~> 10.3)
data/README.md CHANGED
@@ -66,6 +66,7 @@ It is being developed with the following goals in mind:
66
66
  * REPL-style interactive console for viewing/updating stories
67
67
  * Some intuitive story navigator, list by type, open in vim, etc.
68
68
  * Web-interface/hosting for non-developers
69
+ * Plugins for integrating with Jira, Pivotal Tracker, Github's issues/tickets, etc.
69
70
  * Shell integration
70
71
  * create new stories (task create 'change the title on the homepage')
71
72
  * change their status (task start a2c45a)
@@ -8,12 +8,8 @@ Gem::Specification.new do |s|
8
8
  s.date = '2014-04-26'
9
9
  s.authors = ['Joshua "unixsuperhero" Toyota']
10
10
  s.email = 'jearsh@gmail.com'
11
- s.files = Dir['lib/**/*'] + Dir['test/**/*_test.rb'] + [
12
- 'bin/task',
13
- 'Rakefile',
14
- ]
15
11
  s.files = Dir['**/*'].reject{|f|
16
- /^(doc|stories|tmp)/.match(f)
12
+ /^(doc|stories|tmp)|^clitasks.*[.]gem$/.match(f)
17
13
  }.keep_if{|f|
18
14
  File.file?(f)
19
15
  }
@@ -5,16 +5,29 @@ require 'yaml'
5
5
  require 'active_support'
6
6
  require 'active_support/core_ext'
7
7
 
8
- require 'clitasks/configuration'
9
- require 'clitasks/world'
10
- require 'clitasks/simple_dsl'
11
- require 'clitasks/story_reader'
12
- require 'clitasks/story'
13
- require 'clitasks/runner'
14
- require 'clitasks/link_builder'
15
- require 'clitasks/viewer'
16
- require 'clitasks/version'
17
- require 'clitasks/commands'
8
+ if ENV['CLIT_ENV'] == 'test'
9
+ require './lib/clitasks/configuration'
10
+ require './lib/clitasks/world'
11
+ require './lib/clitasks/simple_dsl'
12
+ require './lib/clitasks/story_reader'
13
+ require './lib/clitasks/story'
14
+ require './lib/clitasks/runner'
15
+ require './lib/clitasks/link_builder'
16
+ require './lib/clitasks/viewer'
17
+ require './lib/clitasks/version'
18
+ require './lib/clitasks/commands'
19
+ else
20
+ require 'clitasks/configuration'
21
+ require 'clitasks/world'
22
+ require 'clitasks/simple_dsl'
23
+ require 'clitasks/story_reader'
24
+ require 'clitasks/story'
25
+ require 'clitasks/runner'
26
+ require 'clitasks/link_builder'
27
+ require 'clitasks/viewer'
28
+ require 'clitasks/version'
29
+ require 'clitasks/commands'
30
+ end
18
31
 
19
32
  module CliTasks
20
33
  end
@@ -3,11 +3,13 @@ module CliTasks
3
3
  attr_accessor :file
4
4
  attr_reader :id, :status, :points, :name, :description
5
5
  def initialize(builder)
6
- builder.instance_variables.each{|name| instance_variable_set name, builder.instance_variable_get(name) }
6
+ builder.instance_variables.each{|name|
7
+ instance_variable_set name, builder.instance_variable_get(name)
8
+ }
7
9
  end
8
10
 
9
11
  def id
10
- @id ||= File.basename(file).sub(/[.]rb$/, '')
12
+ @id ||= File.basename(file, '.rb')
11
13
  end
12
14
 
13
15
  def tags
@@ -1,3 +1,7 @@
1
1
  module CliTasks
2
- VERSION = '0.0.7' unless const_defined? :VERSION
2
+ VERSION = '0.0.8' unless const_defined? :VERSION
3
+
4
+ if ENV['CLIT_ENV'] == 'test'
5
+ TEST_VERSION = '0.0.1' unless const_defined? :TEST_VERSION
6
+ end
3
7
  end
@@ -0,0 +1,4 @@
1
+ ENV['CLIT_ENV'] = 'test'
2
+
3
+ require 'minitest/autorun'
4
+ require './lib/clitasks'
@@ -0,0 +1,25 @@
1
+ require './test/test_helper'
2
+
3
+ describe CliTasks do
4
+ describe CliTasks::Story do
5
+ describe '#initialize' do
6
+ it 'should copy instance variables' do
7
+ o = Object.new.tap{|obj|
8
+ obj.instance_variable_set(:@name, 'Lorem Ipsum Feature')
9
+ obj.instance_variable_set(:@status, :finished)
10
+ }
11
+ story = CliTasks::Story.new(o)
12
+ story.name.must_equal 'Lorem Ipsum Feature'
13
+ story.status.must_equal :finished
14
+ end
15
+ end
16
+
17
+ describe '#id' do
18
+ it 'should return basename without .rb' do
19
+ story = CliTasks::Story.new(Object.new)
20
+ story.file = 'stories/index/base_name.rb'
21
+ story.id.must_equal 'base_name'
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,23 @@
1
+ require './test/test_helper'
2
+
3
+ describe CliTasks do
4
+ describe 'TEST_VERSION' do
5
+ it 'should exist' do
6
+ CliTasks::TEST_VERSION.must_be :present?
7
+ end
8
+
9
+ it 'should equal v0.0.1' do
10
+ CliTasks::TEST_VERSION.must_equal '0.0.1'
11
+ end
12
+ end
13
+
14
+ describe 'CliTasks::VERSION' do
15
+ it 'should be a string' do
16
+ CliTasks::VERSION.class.must_equal String
17
+ end
18
+
19
+ it 'should match the SEMVER format' do
20
+ CliTasks::VERSION.must_match /^\d+\.\d+\.\d+/
21
+ end
22
+ end
23
+ end
@@ -1,5 +1,4 @@
1
- require 'minitest/autorun'
2
- require './lib/clitasks'
1
+ require './test/test_helper'
3
2
 
4
3
  describe CliTasks::LinkBuilder do
5
4
  describe '#link' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clitasks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua "unixsuperhero" Toyota
@@ -79,8 +79,10 @@ files:
79
79
  - lib/clitasks/version.rb
80
80
  - lib/clitasks/viewer.rb
81
81
  - lib/clitasks/world.rb
82
+ - test/test_helper.rb
83
+ - test/unit/lib/clitasks/story_test.rb
84
+ - test/unit/lib/clitasks/version_test.rb
82
85
  - test/unit/link_builder_test.rb
83
- - test/unit/string_ext_test.rb
84
86
  homepage: http://github.com/unixsuperhero/clitasks
85
87
  licenses:
86
88
  - MIT
@@ -1,39 +0,0 @@
1
- require 'minitest/autorun'
2
- require './lib/clitasks'
3
-
4
- describe 'New methods added to String class' do
5
- let(:sample) { 'Hello World! This Is a @#$%&ing test' }
6
-
7
- describe '#underscore' do
8
- it 'should take any consecutive \W and sub with a single ?_' do
9
- sample.underscore.must_equal 'Hello_World_This_Is_a_ing_test'
10
- end
11
- end
12
- describe '#strip_chr' do
13
- it 'should remove any char passed in from beginning or end' do
14
- sample.strip_chr('Hest ').must_equal 'llo World! This Is a @#$%&ing'
15
- end
16
- end
17
- describe '#sanitize' do
18
- it 'should sub any consecutive \W with spaces' do
19
- sample.sanitize.must_equal 'Hello World This Is a ing test'
20
- end
21
- end
22
- describe '#filenameify' do
23
- it 'should downcase the string' do
24
- sample.filenameify.match(/[A-Z]/).must_equal nil
25
- end
26
- it 'should convert consecutive \W into a single underscore' do
27
- sample.filenameify.match(/\W/).must_equal nil
28
- sample.filenameify.match(/\W\W+/).must_equal nil
29
- sample.filenameify[/_/].must_equal '_'
30
- end
31
- it 'should remove any leading or trailing underscores' do
32
- '_has leading and trailing underscores_'.filenameify.match(/^_/).must_equal nil
33
- '_has leading and trailing underscores_'.filenameify.match(/_$/).must_equal nil
34
- end
35
- it 'should return an exceptable filename' do
36
- sample.filenameify.must_equal 'hello_world_this_is_a_ing_test'
37
- end
38
- end
39
- end