diff --git a/lib/git_stats.rb b/lib/git_stats.rb index 56423d4ee..1173d3eef 100644 --- a/lib/git_stats.rb +++ b/lib/git_stats.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- module GitStats end @@ -11,4 +12,4 @@ require 'lazy_high_charts' require 'launchy' require 'i18n' -require 'git_stats/base' \ No newline at end of file +require 'git_stats/base' diff --git a/lib/git_stats/base.rb b/lib/git_stats/base.rb index 9393548d7..48258e715 100644 --- a/lib/git_stats/base.rb +++ b/lib/git_stats/base.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- require 'git_stats/core_extensions/hash' require 'git_stats/core_extensions/string' require 'git_stats/core_extensions/symbol' diff --git a/lib/git_stats/by_field_finder.rb b/lib/git_stats/by_field_finder.rb index eadcb508d..6311b9210 100644 --- a/lib/git_stats/by_field_finder.rb +++ b/lib/git_stats/by_field_finder.rb @@ -1,6 +1,7 @@ +# -*- encoding : utf-8 -*- module ByFieldFinder def method_missing(name, *args, &block) field = name[/^by_(.*)$/, 1] field ? find { |e| e.send(field) == args.first } : super end -end \ No newline at end of file +end diff --git a/lib/git_stats/cli.rb b/lib/git_stats/cli.rb index c62769ba0..7656c42e3 100644 --- a/lib/git_stats/cli.rb +++ b/lib/git_stats/cli.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- require "git_stats" class GitStats::CLI diff --git a/lib/git_stats/core_extensions/hash.rb b/lib/git_stats/core_extensions/hash.rb index 6eb313194..13b8e2027 100644 --- a/lib/git_stats/core_extensions/hash.rb +++ b/lib/git_stats/core_extensions/hash.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class Hash def to_key_indexed_array(params = {}) raise ArgumentError.new('all the keys must be numbers to convert to key indexed array') unless all? { |k, v| k.is_a? Numeric } @@ -5,4 +6,4 @@ class Hash default = params[:default] inject(Array.new(min_size, default)) { |acc, (k, v)| acc[k] = v; acc }.map { |e| e || default } end -end \ No newline at end of file +end diff --git a/lib/git_stats/core_extensions/string.rb b/lib/git_stats/core_extensions/string.rb index 8ec0a0c20..c4bbc7add 100644 --- a/lib/git_stats/core_extensions/string.rb +++ b/lib/git_stats/core_extensions/string.rb @@ -1,5 +1,6 @@ +# -*- encoding : utf-8 -*- class String def absolute_path Pathname.new(__FILE__).expand_path.join(self).cleanpath.to_s end -end \ No newline at end of file +end diff --git a/lib/git_stats/core_extensions/symbol.rb b/lib/git_stats/core_extensions/symbol.rb index af856c7d4..6d9efd952 100644 --- a/lib/git_stats/core_extensions/symbol.rb +++ b/lib/git_stats/core_extensions/symbol.rb @@ -1,5 +1,6 @@ +# -*- encoding : utf-8 -*- class Symbol def t I18n.t self end -end \ No newline at end of file +end diff --git a/lib/git_stats/generator.rb b/lib/git_stats/generator.rb index c9b0516eb..98c151327 100644 --- a/lib/git_stats/generator.rb +++ b/lib/git_stats/generator.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- module GitStats class Generator delegate :add_command_observer, to: :@repo @@ -28,4 +29,4 @@ module GitStats end end -end \ No newline at end of file +end diff --git a/lib/git_stats/git_data/activity.rb b/lib/git_stats/git_data/activity.rb index 5ad06fd4a..e19bd6130 100644 --- a/lib/git_stats/git_data/activity.rb +++ b/lib/git_stats/git_data/activity.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- module GitStats module GitData class Activity @@ -74,4 +75,4 @@ module GitStats end end -end \ No newline at end of file +end diff --git a/lib/git_stats/git_data/author.rb b/lib/git_stats/git_data/author.rb index ec6200728..1c0f714b1 100644 --- a/lib/git_stats/git_data/author.rb +++ b/lib/git_stats/git_data/author.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- require 'git_stats/hash_initializable' module GitStats @@ -63,4 +64,4 @@ module GitStats end end -end \ No newline at end of file +end diff --git a/lib/git_stats/git_data/blob.rb b/lib/git_stats/git_data/blob.rb index f0ef85ba9..e824d98f9 100644 --- a/lib/git_stats/git_data/blob.rb +++ b/lib/git_stats/git_data/blob.rb @@ -1,3 +1,5 @@ +# -*- encoding : utf-8 -*- + require 'git_stats/hash_initializable' module GitStats @@ -33,4 +35,4 @@ module GitStats end end -end \ No newline at end of file +end diff --git a/lib/git_stats/git_data/command_parser.rb b/lib/git_stats/git_data/command_parser.rb index d0c410895..756fd6a0e 100644 --- a/lib/git_stats/git_data/command_parser.rb +++ b/lib/git_stats/git_data/command_parser.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- module GitStats module GitData class CommandParser @@ -29,4 +30,4 @@ module GitStats end end -end \ No newline at end of file +end diff --git a/lib/git_stats/git_data/command_runner.rb b/lib/git_stats/git_data/command_runner.rb index 9ff16c947..9ad11f192 100644 --- a/lib/git_stats/git_data/command_runner.rb +++ b/lib/git_stats/git_data/command_runner.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- module GitStats module GitData class CommandRunner @@ -6,4 +7,4 @@ module GitStats end end end -end \ No newline at end of file +end diff --git a/lib/git_stats/git_data/commit.rb b/lib/git_stats/git_data/commit.rb index 7ffa7abcc..146cd56cd 100644 --- a/lib/git_stats/git_data/commit.rb +++ b/lib/git_stats/git_data/commit.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- require 'git_stats/hash_initializable' module GitStats @@ -59,4 +60,4 @@ module GitStats end end end -end \ No newline at end of file +end diff --git a/lib/git_stats/git_data/repo.rb b/lib/git_stats/git_data/repo.rb index 1fe49f297..c218aaa7c 100644 --- a/lib/git_stats/git_data/repo.rb +++ b/lib/git_stats/git_data/repo.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- require 'git_stats/hash_initializable' module GitStats @@ -133,4 +134,4 @@ module GitStats end end -end \ No newline at end of file +end diff --git a/lib/git_stats/git_data/short_stat.rb b/lib/git_stats/git_data/short_stat.rb index 85bf5b2eb..a02897665 100644 --- a/lib/git_stats/git_data/short_stat.rb +++ b/lib/git_stats/git_data/short_stat.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- module GitStats module GitData class ShortStat @@ -29,4 +30,4 @@ module GitStats end end end -end \ No newline at end of file +end diff --git a/lib/git_stats/hash_initializable.rb b/lib/git_stats/hash_initializable.rb index 864e44332..22a193259 100644 --- a/lib/git_stats/hash_initializable.rb +++ b/lib/git_stats/hash_initializable.rb @@ -1,6 +1,7 @@ +# -*- encoding : utf-8 -*- module HashInitializable def initialize(params = {}) raise "pass a Hash to initialize #{self.class}" unless params.is_a? Hash params.each { |k, v| instance_variable_set("@#{k}", v) } end -end \ No newline at end of file +end diff --git a/lib/git_stats/i18n.rb b/lib/git_stats/i18n.rb index 4981fd2bb..1534acc8e 100644 --- a/lib/git_stats/i18n.rb +++ b/lib/git_stats/i18n.rb @@ -1 +1,2 @@ -I18n.load_path += Dir['../../../../config/locales/*.yml'.absolute_path] \ No newline at end of file +# -*- encoding : utf-8 -*- +I18n.load_path += Dir['../../../../config/locales/*.yml'.absolute_path] diff --git a/lib/git_stats/stats_view/charts/activity_charts.rb b/lib/git_stats/stats_view/charts/activity_charts.rb index a8e011783..49da77ba9 100644 --- a/lib/git_stats/stats_view/charts/activity_charts.rb +++ b/lib/git_stats/stats_view/charts/activity_charts.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- module GitStats module StatsView module Charts diff --git a/lib/git_stats/stats_view/charts/authors_charts.rb b/lib/git_stats/stats_view/charts/authors_charts.rb index 1380b9235..99bbef628 100644 --- a/lib/git_stats/stats_view/charts/authors_charts.rb +++ b/lib/git_stats/stats_view/charts/authors_charts.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- module GitStats module StatsView module Charts diff --git a/lib/git_stats/stats_view/charts/chart.rb b/lib/git_stats/stats_view/charts/chart.rb index d423ba1f1..47fd6164e 100644 --- a/lib/git_stats/stats_view/charts/chart.rb +++ b/lib/git_stats/stats_view/charts/chart.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- module GitStats module StatsView module Charts diff --git a/lib/git_stats/stats_view/charts/charts.rb b/lib/git_stats/stats_view/charts/charts.rb index 43b696029..ce3184b87 100644 --- a/lib/git_stats/stats_view/charts/charts.rb +++ b/lib/git_stats/stats_view/charts/charts.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- module GitStats module StatsView module Charts @@ -31,4 +32,4 @@ module GitStats end end end -end \ No newline at end of file +end diff --git a/lib/git_stats/stats_view/charts/repo_charts.rb b/lib/git_stats/stats_view/charts/repo_charts.rb index 9c4f578cd..a761cb159 100644 --- a/lib/git_stats/stats_view/charts/repo_charts.rb +++ b/lib/git_stats/stats_view/charts/repo_charts.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- module GitStats module StatsView module Charts diff --git a/lib/git_stats/stats_view/template.rb b/lib/git_stats/stats_view/template.rb index 32137a1e4..f11639ad8 100644 --- a/lib/git_stats/stats_view/template.rb +++ b/lib/git_stats/stats_view/template.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- module GitStats module StatsView class Template @@ -16,4 +17,4 @@ module GitStats end end end -end \ No newline at end of file +end diff --git a/lib/git_stats/stats_view/view.rb b/lib/git_stats/stats_view/view.rb index 2bb387b8e..324785f37 100644 --- a/lib/git_stats/stats_view/view.rb +++ b/lib/git_stats/stats_view/view.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- module GitStats module StatsView class View @@ -68,4 +69,4 @@ module GitStats end end -end \ No newline at end of file +end diff --git a/lib/git_stats/stats_view/view_data.rb b/lib/git_stats/stats_view/view_data.rb index 41b419772..1b740a5b0 100644 --- a/lib/git_stats/stats_view/view_data.rb +++ b/lib/git_stats/stats_view/view_data.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- module GitStats module StatsView class ViewData @@ -27,4 +28,4 @@ module GitStats end end -end \ No newline at end of file +end diff --git a/lib/git_stats/version.rb b/lib/git_stats/version.rb index 4f534b336..1110a67fd 100644 --- a/lib/git_stats/version.rb +++ b/lib/git_stats/version.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- module GitStats VERSION = "0.0.1" end diff --git a/spec/by_field_finder_spec.rb b/spec/by_field_finder_spec.rb index 5d1177abd..790b9f67f 100644 --- a/spec/by_field_finder_spec.rb +++ b/spec/by_field_finder_spec.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- require 'spec_helper' describe ByFieldFinder do @@ -21,4 +22,4 @@ describe ByFieldFinder do it 'should throw exception if elements doesnt respond to given field' do expect { sut.by_non_existing_field }.to raise_error end -end \ No newline at end of file +end diff --git a/spec/factories.rb b/spec/factories.rb index eb339df5f..3b2518abd 100644 --- a/spec/factories.rb +++ b/spec/factories.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- FactoryGirl.define do initialize_with { new(attributes) } @@ -21,4 +22,4 @@ FactoryGirl.define do association :repo, strategy: :build association :author, strategy: :build end -end \ No newline at end of file +end diff --git a/spec/git_data/activity_spec.rb b/spec/git_data/activity_spec.rb index 68fe0253e..2806138f0 100644 --- a/spec/git_data/activity_spec.rb +++ b/spec/git_data/activity_spec.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- require 'spec_helper' describe GitStats::GitData::Activity do @@ -34,4 +35,4 @@ describe GitStats::GitData::Activity do it 'by_year_month should count commits by day of year and by month' do activity.by_year_month.should == {2011 => {6 => 1, 9 => 1}, 2012 => {5 => 3}} end -end \ No newline at end of file +end diff --git a/spec/git_data/author_spec.rb b/spec/git_data/author_spec.rb index b07378245..e30ebb1bd 100644 --- a/spec/git_data/author_spec.rb +++ b/spec/git_data/author_spec.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- require 'spec_helper' describe GitStats::GitData::Author do @@ -21,4 +22,4 @@ describe GitStats::GitData::Author do author.deletions.should == 100 end -end \ No newline at end of file +end diff --git a/spec/git_data/blob_spec.rb b/spec/git_data/blob_spec.rb index af7497f4d..e77fc0b8a 100644 --- a/spec/git_data/blob_spec.rb +++ b/spec/git_data/blob_spec.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- require 'spec_helper' describe GitStats::GitData::Blob do @@ -21,4 +22,4 @@ describe GitStats::GitData::Blob do png_blob.should be_binary end -end \ No newline at end of file +end diff --git a/spec/git_data/cli_spec.rb b/spec/git_data/cli_spec.rb index b7a3169ed..c66e1bbed 100644 --- a/spec/git_data/cli_spec.rb +++ b/spec/git_data/cli_spec.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- require 'spec_helper' describe GitStats::CLI do @@ -16,4 +17,4 @@ describe GitStats::CLI do expect { subject.start("only one argument") }.to raise_error expect { subject.start("too", "much", "arguments") }.to raise_error end -end \ No newline at end of file +end diff --git a/spec/git_data/command_observer_spec.rb b/spec/git_data/command_observer_spec.rb index 8decdbda4..58b23189a 100644 --- a/spec/git_data/command_observer_spec.rb +++ b/spec/git_data/command_observer_spec.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- require 'spec_helper' describe GitStats::GitData::Repo do @@ -31,4 +32,4 @@ describe GitStats::GitData::Repo do end end -end \ No newline at end of file +end diff --git a/spec/git_data/commit_range_spec.rb b/spec/git_data/commit_range_spec.rb index 958a4b813..79c13411c 100644 --- a/spec/git_data/commit_range_spec.rb +++ b/spec/git_data/commit_range_spec.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- require 'spec_helper' describe GitStats::GitData::Repo do @@ -43,4 +44,4 @@ describe GitStats::GitData::Repo do end end -end \ No newline at end of file +end diff --git a/spec/git_data/commit_spec.rb b/spec/git_data/commit_spec.rb index 7854cc29f..879de4321 100644 --- a/spec/git_data/commit_spec.rb +++ b/spec/git_data/commit_spec.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- require 'spec_helper' describe GitStats::GitData::Commit do @@ -44,4 +45,4 @@ describe GitStats::GitData::Commit do end end end -end \ No newline at end of file +end diff --git a/spec/git_data/generator_spec.rb b/spec/git_data/generator_spec.rb index a56566ab2..8e3dccd32 100644 --- a/spec/git_data/generator_spec.rb +++ b/spec/git_data/generator_spec.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- require 'spec_helper' describe GitStats::Generator do @@ -42,4 +43,4 @@ describe GitStats::Generator do generator.render_all end -end \ No newline at end of file +end diff --git a/spec/git_data/repo_spec.rb b/spec/git_data/repo_spec.rb index 268dd0da9..ebf6a1855 100644 --- a/spec/git_data/repo_spec.rb +++ b/spec/git_data/repo_spec.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- require 'spec_helper' describe GitStats::GitData::Repo do @@ -42,4 +43,4 @@ ce34874|1347482927|2012-09-12 22:48:47 +0200|joe.doe@gmail.com repo.project_version.should == 'xyz' end end -end \ No newline at end of file +end diff --git a/spec/git_data/short_stat_spec.rb b/spec/git_data/short_stat_spec.rb index d19a3ecf2..1abc6d737 100644 --- a/spec/git_data/short_stat_spec.rb +++ b/spec/git_data/short_stat_spec.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- require 'spec_helper' describe GitStats::GitData::ShortStat do @@ -24,4 +25,4 @@ describe GitStats::GitData::ShortStat do end end end -end \ No newline at end of file +end diff --git a/spec/hash_extension_spec.rb b/spec/hash_extension_spec.rb index 478a22db1..b71446e38 100644 --- a/spec/hash_extension_spec.rb +++ b/spec/hash_extension_spec.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- require 'spec_helper' describe Hash do @@ -22,4 +23,4 @@ describe Hash do end end end -end \ No newline at end of file +end diff --git a/spec/integration/activity_spec.rb b/spec/integration/activity_spec.rb index b9a5b7506..8e77ed7e7 100644 --- a/spec/integration/activity_spec.rb +++ b/spec/integration/activity_spec.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- require 'integration/shared' describe GitStats::GitData::Activity do @@ -29,4 +30,4 @@ describe GitStats::GitData::Activity do activity.by_year_month.should == {2012 => {10 => 10}} end -end \ No newline at end of file +end diff --git a/spec/integration/author_spec.rb b/spec/integration/author_spec.rb index 630adb54d..29a5c1be4 100644 --- a/spec/integration/author_spec.rb +++ b/spec/integration/author_spec.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- require 'integration/shared' describe GitStats::GitData::Activity do @@ -63,4 +64,4 @@ describe GitStats::GitData::Activity do jd.deletions_by_date.map { |d, s| s }.should == [0, 0] end end -end \ No newline at end of file +end diff --git a/spec/integration/file_spec.rb b/spec/integration/file_spec.rb index e15e2b130..04dcbb734 100644 --- a/spec/integration/file_spec.rb +++ b/spec/integration/file_spec.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- require 'integration/shared' describe GitStats::GitData::Repo do @@ -27,4 +28,4 @@ test end -end \ No newline at end of file +end diff --git a/spec/integration/repo_spec.rb b/spec/integration/repo_spec.rb index af0ea0354..49e0c0c5a 100644 --- a/spec/integration/repo_spec.rb +++ b/spec/integration/repo_spec.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- require 'integration/shared' describe GitStats::GitData::Repo do @@ -64,4 +65,4 @@ describe GitStats::GitData::Repo do repo.deletions_by_author.values.should == [10, 0] end -end \ No newline at end of file +end diff --git a/spec/integration/shared.rb b/spec/integration/shared.rb index 3a8c7e464..09a433f0a 100644 --- a/spec/integration/shared.rb +++ b/spec/integration/shared.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- require 'spec_helper' shared_context "shared" do @@ -33,4 +34,4 @@ shared_context "shared" do build(:author, repo: repo, name: "Tomasz Gieniusz", email: "tomasz.gieniusz@gmail.com"), build(:author, repo: repo, name: "John Doe", email: "john.doe@gmail.com"), ] } -end \ No newline at end of file +end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index db075f216..844d048c2 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- require 'simplecov' SimpleCov.start