simple_changelog 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,12 +4,12 @@ module SimpleChangelog
4
4
  datetime.to_date.to_formatted_s :long
5
5
  end
6
6
 
7
- def highlight_commit_tags(commit_message)
7
+ def highlight_commit_tags(commit_message)
8
8
  highlighted_message = commit_message.gsub(/\[[^\[\]]+\]/) do |tag|
9
9
  tag_class = tag.gsub(/[^A-Za-z]/, '').downcase
10
10
  content_tag(:span, class: tag_class) { tag }
11
11
  end
12
-
12
+
13
13
  highlighted_message.html_safe
14
14
  end
15
15
 
@@ -10,7 +10,7 @@ module SimpleChangelog
10
10
  history = {}
11
11
 
12
12
  if @tags.any? || @commits.any?
13
- middle_tags = convert_tags(@tags).sort_by { |t| t.name }
13
+ middle_tags = convert_tags(@tags).sort_by { |t| t.date }
14
14
  tags = [tail_tag] + middle_tags
15
15
  tags << head_tag if has_head_commits?(middle_tags)
16
16
  tags.reverse!
@@ -26,7 +26,7 @@ module SimpleChangelog
26
26
  if @tags.empty?
27
27
  @commits.empty? ? '' : 'HEAD'
28
28
  else
29
- last_tag = @tags.sort_by { |t| t.name }.last
29
+ last_tag = @tags.sort_by { |t| t.tag_date }.last
30
30
  last_tag.name
31
31
  end
32
32
  end
@@ -35,7 +35,7 @@ module SimpleChangelog
35
35
 
36
36
  def has_head_commits?(middle_tags)
37
37
  commit = @repo.commits('master', 1).first
38
- !middle_tags.any? { |t| t.commit_id == commit.id }
38
+ middle_tags.none? { |t| t.commit_id == commit.id }
39
39
  end
40
40
 
41
41
  def head_tag
@@ -1,3 +1,3 @@
1
1
  module SimpleChangelog
2
- VERSION = "0.0.10"
2
+ VERSION = "0.0.11"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_changelog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-20 00:00:00.000000000 Z
12
+ date: 2013-01-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -83,28 +83,28 @@ executables: []
83
83
  extensions: []
84
84
  extra_rdoc_files: []
85
85
  files:
86
- - app/models/simple_changelog/repository.rb
87
- - app/models/simple_changelog/commit.rb
88
- - app/models/simple_changelog/tag.rb
89
- - app/assets/stylesheets/simple_changelog/repositories.css
90
- - app/assets/stylesheets/simple_changelog/application.css
91
- - app/assets/javascripts/simple_changelog/repositories.js
92
- - app/assets/javascripts/simple_changelog/application.js
86
+ - app/helpers/simple_changelog/repositories_helper.rb
87
+ - app/helpers/simple_changelog/application_helper.rb
93
88
  - app/controllers/simple_changelog/application_controller.rb
94
89
  - app/controllers/simple_changelog/repositories_controller.rb
90
+ - app/models/simple_changelog/tag.rb
91
+ - app/models/simple_changelog/commit.rb
92
+ - app/models/simple_changelog/repository.rb
93
+ - app/views/simple_changelog/repositories/_commit.html.erb
95
94
  - app/views/simple_changelog/repositories/_version_tag.html.erb
96
95
  - app/views/simple_changelog/repositories/show.html.erb
97
- - app/views/simple_changelog/repositories/_commit.html.erb
98
96
  - app/views/layouts/simple_changelog/application.html.erb
99
- - app/helpers/simple_changelog/application_helper.rb
100
- - app/helpers/simple_changelog/repositories_helper.rb
97
+ - app/assets/javascripts/simple_changelog/application.js
98
+ - app/assets/javascripts/simple_changelog/repositories.js
99
+ - app/assets/stylesheets/simple_changelog/repositories.css
100
+ - app/assets/stylesheets/simple_changelog/application.css
101
101
  - config/routes.rb
102
+ - lib/simple_changelog.rb
102
103
  - lib/tasks/simple_changelog_tasks.rake
103
- - lib/generators/templates/README
104
- - lib/generators/simple_changelog/install_generator.rb
105
104
  - lib/simple_changelog/engine.rb
106
105
  - lib/simple_changelog/version.rb
107
- - lib/simple_changelog.rb
106
+ - lib/generators/simple_changelog/install_generator.rb
107
+ - lib/generators/templates/README
108
108
  - MIT-LICENSE
109
109
  - Rakefile
110
110
  - README.rdoc