deployments 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -30,7 +30,7 @@ module Deployments
30
30
  end
31
31
 
32
32
  def previous_tag
33
- tag_name = File.read(VERSION_FILE) if File.exists?(VERSION_FILE)
33
+ tag_name = File.read(VERSION_FILE).strip if File.exists?(VERSION_FILE)
34
34
  tag_name ||= tag_names[tag_names.size - 2]
35
35
 
36
36
  find_repo_tag(tag_name)
@@ -1,3 +1,3 @@
1
1
  module Deployments
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
data/spec/project_spec.rb CHANGED
@@ -60,10 +60,11 @@ describe Project do
60
60
 
61
61
  context "when we have version.txt file in public folder" do
62
62
  let(:project_path) { './spec/fixtures/repositories/tags/dot_git' }
63
+ let(:tag_name) { "1.1.1" }
63
64
 
64
65
  before do
65
66
  File.open(VERSION_FILE, "w") do |file|
66
- file.write "1.1.1"
67
+ file.write tag_name
67
68
  end
68
69
  end
69
70
 
@@ -73,6 +74,15 @@ describe Project do
73
74
  project.commits.to_s.should include("Change readme file")
74
75
  project.commits.to_s.should include("Add empty space to readme file")
75
76
  end
77
+
78
+ context "with empty characters at the end of tag name" do
79
+ let(:tag_name) { "1.1.1\r\n" }
80
+
81
+ it "should use version file for collecting commits" do
82
+ project.commits.to_s.should include("Change readme file")
83
+ project.commits.to_s.should include("Add empty space to readme file")
84
+ end
85
+ end
76
86
  end
77
87
 
78
88
  context "with one commit between tags" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deployments
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: