pv 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,5 @@
1
+ class Object
2
+ def present?
3
+ not nil?
4
+ end
5
+ end
data/lib/pv.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require 'core_ext/string'
2
+ require 'core_ext/object'
2
3
 
3
4
  require 'pv/configuration'
4
5
  require 'pv/command'
@@ -1,5 +1,4 @@
1
1
  require 'thor'
2
- require 'active_support/all'
3
2
 
4
3
  module Pv
5
4
  class Command < Thor
@@ -1,3 +1,5 @@
1
+ require 'core_ext/object'
2
+
1
3
  module Pv
2
4
  class Story
3
5
  attr_accessor :story_type, :requested_by, :owned_by, :current_state,
@@ -15,6 +17,10 @@ module Pv
15
17
  new Pv.tracker.stories.select { |s| s.id == by_id.to_i }.first
16
18
  end
17
19
 
20
+ def self.present?
21
+ not nil?
22
+ end
23
+
18
24
  # Render this Story in plain text.
19
25
  def render
20
26
  source = IO.read "#{Pv.root}/lib/templates/story.txt.erb"
@@ -1,3 +1,3 @@
1
1
  module Pv
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
data/pv.gemspec CHANGED
@@ -19,6 +19,4 @@ Gem::Specification.new do |gem|
19
19
 
20
20
  gem.add_dependency 'pivotal-tracker'
21
21
  gem.add_dependency 'thor'
22
- gem.add_dependency 'active_support'
23
- gem.add_dependency 'i18n'
24
22
  end
@@ -0,0 +1,13 @@
1
+ require 'core_ext/object'
2
+
3
+ describe Object do
4
+ subject { Object.new }
5
+
6
+ it "should be present when instantiated" do
7
+ subject.should be_present
8
+ end
9
+
10
+ it "should not be present when nil" do
11
+ nil.should_not be_present
12
+ end
13
+ end
@@ -8,7 +8,7 @@ describe String do
8
8
  subject.titleize.should == "Not Yet Started"
9
9
  end
10
10
 
11
- it "returns the same string if no words are found" do
11
+ it "returns a blank string if that's what was given" do
12
12
  subject = " "
13
13
 
14
14
  subject.titleize.should be_blank
@@ -37,7 +37,7 @@ describe String do
37
37
  it "returns 'true' if spaces exist" do
38
38
  subject = " "
39
39
 
40
- subject.should be_blank
40
+ subject.should_not be_blank
41
41
  end
42
42
  end
43
43
  end
@@ -1,5 +1,6 @@
1
1
  require 'spec_helper'
2
2
  require 'pv/story'
3
+ require 'core_ext/object'
3
4
 
4
5
  module Pv
5
6
  describe Story do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pv
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -43,38 +43,6 @@ dependencies:
43
43
  - - ! '>='
44
44
  - !ruby/object:Gem::Version
45
45
  version: '0'
46
- - !ruby/object:Gem::Dependency
47
- name: active_support
48
- requirement: !ruby/object:Gem::Requirement
49
- none: false
50
- requirements:
51
- - - ! '>='
52
- - !ruby/object:Gem::Version
53
- version: '0'
54
- type: :runtime
55
- prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
- requirements:
59
- - - ! '>='
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- - !ruby/object:Gem::Dependency
63
- name: i18n
64
- requirement: !ruby/object:Gem::Requirement
65
- none: false
66
- requirements:
67
- - - ! '>='
68
- - !ruby/object:Gem::Version
69
- version: '0'
70
- type: :runtime
71
- prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
- requirements:
75
- - - ! '>='
76
- - !ruby/object:Gem::Version
77
- version: '0'
78
46
  description: A command-line interface to Pivotal Tracker.
79
47
  email:
80
48
  - tubbo@psychedeli.ca
@@ -90,6 +58,7 @@ files:
90
58
  - README.md
91
59
  - Rakefile
92
60
  - bin/pv
61
+ - lib/core_ext/object.rb
93
62
  - lib/core_ext/string.rb
94
63
  - lib/pv.rb
95
64
  - lib/pv/bug_tracker.rb
@@ -100,15 +69,16 @@ files:
100
69
  - lib/templates/help.txt
101
70
  - lib/templates/story.txt.erb
102
71
  - pv.gemspec
103
- - spec/bug_tracker_spec.rb
104
- - spec/configuration_spec.rb
72
+ - spec/extensions/object_spec.rb
105
73
  - spec/extensions/string_spec.rb
106
74
  - spec/fixtures/cassettes/pivotal_client_connection.yml
107
75
  - spec/fixtures/cassettes/pivotal_find_story.yml
108
76
  - spec/fixtures/cassettes/pivotal_project_stories_search.yml
109
77
  - spec/fixtures/pv.yml
78
+ - spec/models/bug_tracker_spec.rb
79
+ - spec/models/configuration_spec.rb
80
+ - spec/models/story_spec.rb
110
81
  - spec/spec_helper.rb
111
- - spec/story_spec.rb
112
82
  homepage: http://github.com/tubbo/pv
113
83
  licenses: []
114
84
  post_install_message:
@@ -134,12 +104,13 @@ signing_key:
134
104
  specification_version: 3
135
105
  summary: A command-line interface to Pivotal Tracker.
136
106
  test_files:
137
- - spec/bug_tracker_spec.rb
138
- - spec/configuration_spec.rb
107
+ - spec/extensions/object_spec.rb
139
108
  - spec/extensions/string_spec.rb
140
109
  - spec/fixtures/cassettes/pivotal_client_connection.yml
141
110
  - spec/fixtures/cassettes/pivotal_find_story.yml
142
111
  - spec/fixtures/cassettes/pivotal_project_stories_search.yml
143
112
  - spec/fixtures/pv.yml
113
+ - spec/models/bug_tracker_spec.rb
114
+ - spec/models/configuration_spec.rb
115
+ - spec/models/story_spec.rb
144
116
  - spec/spec_helper.rb
145
- - spec/story_spec.rb