git_stats 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -6,6 +6,7 @@ It browses the repository and outputs html page with statistics.
6
6
  ## Examples
7
7
  * [devise](http://tomgi.github.com/git_stats/examples/devise/index.html)
8
8
  * [devise_invitable](http://tomgi.github.com/git_stats/examples/devise_invitable/index.html)
9
+ * [john](http://tomgi.github.com/git_stats/examples/john/index.html)
9
10
  * [jquery](http://tomgi.github.com/git_stats/examples/jquery/index.html)
10
11
  * [merit](http://tomgi.github.com/git_stats/examples/merit/index.html)
11
12
  * [paperclip](http://tomgi.github.com/git_stats/examples/paperclip/index.html)
@@ -40,4 +41,4 @@ It browses the repository and outputs html page with statistics.
40
41
  3. Commit your changes (`git commit -am 'Added some feature'`)
41
42
  4. Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
42
43
  5. Push to the branch (`git push origin my-new-feature`)
43
- 6. Create new Pull Request
44
+ 6. Create new Pull Request
data/git_stats.gemspec CHANGED
@@ -17,6 +17,8 @@ Gem::Specification.new do |gem|
17
17
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
18
  gem.require_paths = ["lib"]
19
19
 
20
+ gem.required_ruby_version = Gem::Requirement.new(">= 1.9.2")
21
+
20
22
  gem.add_dependency('activesupport')
21
23
  gem.add_dependency('actionpack')
22
24
  gem.add_dependency('tilt')
@@ -5,7 +5,7 @@ module GitStats
5
5
  delegate :render_all, to: :@view
6
6
 
7
7
  def initialize(repo_path, out_path)
8
- validate_paths(repo_path, out_path)
8
+ validate_repo_path(repo_path)
9
9
 
10
10
  @repo = GitData::Repo.new(path: repo_path)
11
11
  view_data = StatsView::ViewData.new(@repo)
@@ -15,18 +15,12 @@ module GitStats
15
15
  end
16
16
 
17
17
  private
18
- def validate_paths(repo_path, out_path)
19
- validate_repo_path(repo_path)
20
- validate_out_path(out_path)
21
- end
18
+
22
19
 
23
20
  def validate_repo_path(repo_path)
24
21
  raise ArgumentError, "#{repo_path} is not a git repository" unless Dir.exists?("#{repo_path}/.git")
25
22
  end
26
23
 
27
- def validate_out_path(out_path)
28
- raise ArgumentError, "#{out_path} is not a directory" unless Dir.exists?(out_path)
29
- end
30
24
  end
31
25
 
32
26
  end
@@ -60,9 +60,14 @@ module GitStats
60
60
  end
61
61
 
62
62
  def prepare_static_content
63
+ create_out_dir
63
64
  FileUtils.cp_r(Dir["../../../../templates/static/*".absolute_path], @out_path)
64
65
  end
65
66
 
67
+ def create_out_dir
68
+ FileUtils.mkdir_p(@out_path) unless Dir.exists?(@out_path)
69
+ end
70
+
66
71
  def prepare_assets
67
72
  FileUtils.cp_r('../../../../templates/assets'.absolute_path, @out_path)
68
73
  end
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module GitStats
3
- VERSION = "1.0.2"
3
+ VERSION = "1.0.3"
4
4
  end
@@ -13,11 +13,6 @@ describe GitStats::Generator do
13
13
  expect { generator }.to raise_error(ArgumentError)
14
14
  end
15
15
 
16
- it "should raise exception if given out directory doesn't exist" do
17
- Dir.should_receive(:exists?).with(out_path).and_return(false)
18
- expect { generator }.to raise_error(ArgumentError)
19
- end
20
-
21
16
  it 'should pass command observer to repo' do
22
17
  repo = double('repo')
23
18
  GitStats::GitData::Repo.should_receive(:new).with(path: repo_path).and_return(repo)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git_stats
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
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-10-24 00:00:00.000000000 Z
12
+ date: 2012-11-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -217,7 +217,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
217
217
  requirements:
218
218
  - - ! '>='
219
219
  - !ruby/object:Gem::Version
220
- version: '0'
220
+ version: 1.9.2
221
221
  required_rubygems_version: !ruby/object:Gem::Requirement
222
222
  none: false
223
223
  requirements: