deployments 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +4 -10
- data/lib/deployments/project.rb +3 -5
- data/lib/deployments/version.rb +1 -1
- data/spec/build_spec.rb +5 -10
- metadata +1 -1
data/README.md
CHANGED
@@ -56,16 +56,10 @@ Request params:
|
|
56
56
|
{
|
57
57
|
{
|
58
58
|
:author => "author",
|
59
|
-
:commit_attributes =>
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
},
|
64
|
-
{
|
65
|
-
"sha" => "commit id",
|
66
|
-
"message" => "Change readme file"
|
67
|
-
}
|
68
|
-
],
|
59
|
+
:commit_attributes => {
|
60
|
+
"commit id" => "Add readme file",
|
61
|
+
"commit id" => "Change readme file"
|
62
|
+
},
|
69
63
|
:env => "staging",
|
70
64
|
:version => "1.0.1",
|
71
65
|
:domain => "staging.example.com"
|
data/lib/deployments/project.rb
CHANGED
@@ -12,11 +12,9 @@ module Deployments
|
|
12
12
|
def commits
|
13
13
|
commits = between_tags(repo) if has_commits_between_tags?
|
14
14
|
|
15
|
-
(commits || repo.commits).
|
16
|
-
|
17
|
-
|
18
|
-
"message" => commit.message
|
19
|
-
}
|
15
|
+
(commits || repo.commits).inject({}) do |hash, commit|
|
16
|
+
hash[commit.id] = commit.message
|
17
|
+
hash
|
20
18
|
end
|
21
19
|
end
|
22
20
|
|
data/lib/deployments/version.rb
CHANGED
data/spec/build_spec.rb
CHANGED
@@ -43,16 +43,11 @@ describe Build do
|
|
43
43
|
end
|
44
44
|
|
45
45
|
it "should return commits of the git project between the latests tags" do
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
{
|
52
|
-
"sha" => "45bedbc8cbb57792e00ad8dd9c9e7740ff3c2da5",
|
53
|
-
"message" => "Added README file"
|
54
|
-
},
|
55
|
-
]
|
46
|
+
hash = {}
|
47
|
+
hash["dc7671f8a112706b6ee2404bae958fb8079dbda0"] = "Added deployments section to the README file"
|
48
|
+
hash["45bedbc8cbb57792e00ad8dd9c9e7740ff3c2da5"] = "Added README file"
|
49
|
+
|
50
|
+
params[:commit_attributes].should == hash
|
56
51
|
end
|
57
52
|
end
|
58
53
|
end
|