Skip to content

Commit

Permalink
Merge pull request #5 from nikolalsvk/sort-actual-groups
Browse files Browse the repository at this point in the history
Sort groups that are not comment groups
  • Loading branch information
nikolalsvk authored Jul 31, 2017
2 parents 3250ae6 + 028190f commit fd9a9c7
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ PLATFORMS

DEPENDENCIES
ordinare!
rspec
rspec (~> 3.6, >= 3.6)

BUNDLED WITH
1.15.1
1.15.2
2 changes: 1 addition & 1 deletion lib/ordinare.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def sort(path = "Gemfile")

def find_ranges_of_gems(content)
gems = content.each_with_index.map do |line, index|
if line.start_with?("gem ")
if line.strip.start_with?("gem ")
index
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/ordinare/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Ordinare
VERSION = "0.2.4"
VERSION = "0.2.5"
end
5 changes: 5 additions & 0 deletions spec/fixtures/group_gemfile/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ gem "authenticator"
gem "rails-assets"
gem "jquery"
gem "angular"

group :test do
gem "webmock"
gem "cucumber-rails"
end
5 changes: 5 additions & 0 deletions spec/fixtures/group_gemfile/Gemfile.ordered
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ gem "devise"
gem "angular"
gem "jquery"
gem "rails-assets"

group :test do
gem "cucumber-rails"
gem "webmock"
end

0 comments on commit fd9a9c7

Please sign in to comment.