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 CHANGED
@@ -56,16 +56,10 @@ Request params:
56
56
  {
57
57
  {
58
58
  :author => "author",
59
- :commit_attributes => [
60
- {
61
- "sha" => "commit id",
62
- "message" => "Add readme file",
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"
@@ -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).map do |commit|
16
- {
17
- "sha" => commit.id,
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
 
@@ -1,3 +1,3 @@
1
1
  module Deployments
2
- VERSION = "0.0.9"
2
+ VERSION = "0.0.10"
3
3
  end
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
- params[:commit_attributes].should == [
47
- {
48
- "sha" => "dc7671f8a112706b6ee2404bae958fb8079dbda0",
49
- "message" => "Added deployments section to the README file"
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
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.0.9
4
+ version: 0.0.10
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: