metior 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Changelog.md +12 -1
- data/lib/metior.rb +6 -3
- data/lib/metior/vcs.rb +3 -3
- data/lib/metior/version.rb +1 -1
- metadata +4 -4
data/Changelog.md
CHANGED
@@ -1,4 +1,15 @@
|
|
1
|
-
# Changelog
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
## Version 0.1.2
|
4
|
+
|
5
|
+
**June 10<sup>th</sup>, 2011**
|
6
|
+
|
7
|
+
* Fixed Bundler integration
|
8
|
+
* Fixed Metior.simple_stats with default branch
|
9
|
+
|
10
|
+
See the
|
11
|
+
[Git history](https://github.com/koraktor/metior/compare/0.1.1...0.1.2) for
|
12
|
+
version 0.1.2
|
2
13
|
|
3
14
|
## Version 0.1.1
|
4
15
|
|
data/lib/metior.rb
CHANGED
@@ -3,11 +3,14 @@
|
|
3
3
|
#
|
4
4
|
# Copyright (c) 2011, Sebastian Staudt
|
5
5
|
|
6
|
+
require 'bundler'
|
7
|
+
|
6
8
|
libdir = File.dirname(__FILE__)
|
9
|
+
Dir.chdir libdir do
|
10
|
+
Bundler.setup
|
11
|
+
end
|
7
12
|
$LOAD_PATH.unshift(libdir) unless $LOAD_PATH.include?(libdir)
|
8
13
|
|
9
|
-
require 'bundler'
|
10
|
-
|
11
14
|
require 'core_ext/object'
|
12
15
|
require 'metior/git'
|
13
16
|
require 'metior/github'
|
@@ -38,7 +41,7 @@ module Metior
|
|
38
41
|
# @return [Hash] The calculated stats for the given repository and branch
|
39
42
|
def self.simple_stats(type, path, branch = nil)
|
40
43
|
repo = repository type, path
|
41
|
-
branch ||= vcs::DEFAULT_BRANCH
|
44
|
+
branch ||= vcs(type)::DEFAULT_BRANCH
|
42
45
|
|
43
46
|
{
|
44
47
|
:authors => repo.authors(branch).values,
|
data/lib/metior/vcs.rb
CHANGED
@@ -48,7 +48,7 @@ module Metior
|
|
48
48
|
# Trying to access either the `Actor`, `Commit` or `Repository` class
|
49
49
|
# in a VCS `Module` will trigger auto-loading first.
|
50
50
|
#
|
51
|
-
# @param [Symbol] The symbolic name of the missing constant
|
51
|
+
# @param [Symbol] const The symbolic name of the missing constant
|
52
52
|
# @see #init
|
53
53
|
def const_missing(const)
|
54
54
|
init if [:Actor, :Commit, :Repository].include?(const)
|
@@ -62,9 +62,9 @@ module Metior
|
|
62
62
|
# met. Afterwards the `Actor`, `Commit` and `Repository` classes are
|
63
63
|
# required.
|
64
64
|
#
|
65
|
-
# @see Bundler.
|
65
|
+
# @see Bundler.require
|
66
66
|
def init
|
67
|
-
Bundler.
|
67
|
+
Bundler.require self::NAME
|
68
68
|
|
69
69
|
path = self::NAME.to_s
|
70
70
|
require "metior/#{path}/actor"
|
data/lib/metior/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metior
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 2
|
10
|
+
version: 0.1.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Sebastian Staudt
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-06-
|
18
|
+
date: 2011-06-09 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
type: :runtime
|