diggit-developers_activity 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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 71638ee6852dbb61205bdf7303993fc3347c502d
4
- data.tar.gz: 48894190544defc4725a2ab20d3c6b2d7aafff4b
3
+ metadata.gz: c3c7d217ca505374751b64929de4eacf24782866
4
+ data.tar.gz: db7875ea6bc22b63a0e90bb2c63440754796c5e4
5
5
  SHA512:
6
- metadata.gz: 2b151cfb487f4feda08c1b2ff2dfad6b46d577ac5d3e9c5eddc7f6f36cbe882081e5f8f8cf4853148c1d34fe8ea84eb552c8387244666f2577e54ae6f5099fee
7
- data.tar.gz: 859420e059b4ad353ec9bb9432a77311de2cd2bbfe45dea19828ec7d1d8150b603cb691135a052efd168924346deb5451fe3f104b2cee3b67f2c1a69acb93c39
6
+ metadata.gz: 7e3808eb255e831a89893b64eff894c3e9e423de0e306bc9ac7d59854e207dae8439abc0d7254c93081cd4121080176a2c0ef48b5c72cb4af78f6d8b4b332962
7
+ data.tar.gz: a8d7067e11b50627c18150ff64ebdb92bd52a88459ad0ec891373937548a2db8b2de8d19b611fcf50cdffdc8a164c0146ccd243f2b8874aecbf582afa9d21ccb
data/.gitignore CHANGED
@@ -32,4 +32,7 @@ build/
32
32
  # .ruby-gemset
33
33
 
34
34
  # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
35
- .rvmrc
35
+ .rvmrc
36
+
37
+ .tags*
38
+ *gemtags
data/.rubocop.yml ADDED
@@ -0,0 +1,59 @@
1
+ AllCops:
2
+ Exclude:
3
+ - 'spec/dgit/sources/**/*'
4
+ - 'tmp/**/*'
5
+
6
+ ModuleLength:
7
+ Exclude:
8
+ - 'bin/dgit'
9
+
10
+ Metrics/LineLength:
11
+ Max: 120
12
+
13
+ Metrics/ClassLength:
14
+ Max: 200
15
+
16
+ Metrics/ModuleLength:
17
+ Max: 200
18
+
19
+ Metrics/ParameterLists:
20
+ Max: 15
21
+
22
+ Style/Tab:
23
+ Enabled: false
24
+
25
+ Style/IndentationWidth:
26
+ Enabled: false
27
+
28
+ Style/StringLiterals:
29
+ Enabled: false
30
+
31
+ Metrics/AbcSize:
32
+ Max: 50
33
+
34
+ Metrics/MethodLength:
35
+ Max: 50
36
+
37
+ Metrics/CyclomaticComplexity:
38
+ Max: 10
39
+
40
+ Metrics/PerceivedComplexity:
41
+ Max: 10
42
+
43
+ Style/ModuleFunction:
44
+ Enabled: false
45
+
46
+ Style/BracesAroundHashParameters:
47
+ Enabled: false
48
+
49
+ Style/AlignHash:
50
+ Enabled: false
51
+
52
+ Style/Documentation:
53
+ Enabled: false
54
+
55
+ Style/MultilineOperationIndentation:
56
+ EnforcedStyle: indented
57
+
58
+ Style/AsciiComments:
59
+ Enabled: false
data/Gemfile.lock ADDED
@@ -0,0 +1,30 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ diggit-developers_activity (1.0.3)
5
+ diggit (~> 2.0)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ diggit (2.1.0)
11
+ formatador (~> 0.2)
12
+ gli (~> 2.13)
13
+ oj (~> 2.10)
14
+ rugged (~> 0.21)
15
+ formatador (0.2.5)
16
+ gli (2.13.4)
17
+ oj (2.14.3)
18
+ rake (10.4.2)
19
+ rugged (0.23.3)
20
+
21
+ PLATFORMS
22
+ ruby
23
+
24
+ DEPENDENCIES
25
+ bundler (~> 1.7)
26
+ diggit-developers_activity!
27
+ rake (~> 10.0)
28
+
29
+ BUNDLED WITH
30
+ 1.11.2
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env ruby
2
+ # encoding: utf-8
3
+
4
+ require 'fileutils'
5
+
6
+ DGIT_FOLDER = '.dgit'
7
+
8
+ puts 'Creating symlinks to analyses and joins'
9
+ analyses_dir = File.expand_path('../lib/diggit/developers_activity/analyses', File.dirname(__FILE__))
10
+ home = File.join(Dir.home, DGIT_FOLDER, 'plugins', 'analysis')
11
+ FileUtils.mkdir_p(home)
12
+ FileUtils.rm(File.join(home, 'developers_activity'))
13
+ FileUtils.ln_sf(analyses_dir, File.join(home, 'developers_activity'))
14
+
15
+ joins_dir = File.expand_path('../lib/diggit/developers_activity/joins', File.dirname(__FILE__))
16
+ home = File.join(Dir.home, DGIT_FOLDER, 'plugins', 'join')
17
+ FileUtils.mkdir_p(home)
18
+ FileUtils.rm(File.join(home, 'developers_activity'))
19
+ FileUtils.ln_sf(joins_dir, File.join(home, 'developers_activity'))
20
+ puts 'Done'
File without changes
@@ -19,19 +19,18 @@ module Diggit
19
19
  end
20
20
 
21
21
  def load_options
22
- @releases = src_opt[@source]["releases"]
23
22
  @all_releases = false
24
23
  @all_releases = @options["all_releases"] if @options.key? "all_releases"
25
-
26
- Authors.read_options(src_opt[@source])
27
-
28
- source_options = src_opt[@source]
29
24
  if @options.key? 'alternative_modules'
30
25
  source_options['modules'] = Oj.load_file(@options['alternative_modules'])[@source.url]['modules']
31
26
  end
32
- Modules.read_options(@source, source_options, db.client)
33
-
34
27
  @modules_metrics = @options.key?("modules_metrics") ? @options["modules_metrics"] : true
28
+
29
+ return if src_opt[@source].nil?
30
+ @releases = src_opt[@source]["releases"]
31
+ Authors.read_options(src_opt[@source])
32
+ source_options = src_opt[@source]
33
+ Modules.read_options(@source, source_options, db.client)
35
34
  end
36
35
  end
37
36
  end
@@ -14,15 +14,22 @@ module Diggit
14
14
  super
15
15
  puts('Extracting project-level activity')
16
16
 
17
- r_last = repo.lookup(src_opt[@source]["R_last"])
18
- r_first = repo.lookup(src_opt[@source]["R_first"])
17
+ unless src_opt[@source].nil?
18
+ r_last = repo.lookup(src_opt[@source]["R_last"])
19
+ r_first = repo.lookup(src_opt[@source]["R_first"])
20
+ end
19
21
 
20
22
  walker = Rugged::Walker.new(repo)
21
- walker.push_range("#{r_first.oid}..#{r_last.oid}")
23
+ if src_opt[@source].nil?
24
+ walker.push(repo.head.target.oid)
25
+ else
26
+ walker.push_range("#{r_first.oid}..#{r_last.oid}")
27
+ end
22
28
  devs = []
23
29
  walker.each do |commit|
24
30
  t = commit.author[:time]
25
31
  author = Authors.get_author(commit)
32
+ puts "plop #{author}"
26
33
  devs << { project: @source.url, author: author, time: t }
27
34
  end
28
35
 
@@ -3,5 +3,5 @@ https://github.com/matthieu-foucault/jquery.git
3
3
  https://github.com/rails/rails.git
4
4
  https://github.com/jenkinsci/jenkins.git
5
5
  https://github.com/ansible/ansible.git
6
- # https://github.com/mono/mono.git
7
- # https://github.com/sebastianbergmann/phpunit.git
6
+ https://github.com/mono/mono.git
7
+ https://github.com/sebastianbergmann/phpunit.git
@@ -1,5 +1,5 @@
1
1
  module Diggit
2
2
  module DevelopersActivity
3
- VERSION = "1.0.2"
3
+ VERSION = "1.0.3"
4
4
  end
5
5
  end
@@ -17,8 +17,6 @@ module Diggit
17
17
  DGIT_FOLDER = '.dgit'
18
18
 
19
19
  def init
20
- link_analyses_folder
21
- link_joins_folder
22
20
  Dig.init_dir('.')
23
21
  Dig.init('.')
24
22
  Dig.it.config.add_analysis('cloc_per_file')
@@ -37,20 +35,6 @@ module Diggit
37
35
  FileUtils.cp(File.join(dataset_dir, OPTIONS_FILE), DGIT_FOLDER)
38
36
  FileUtils.cp(File.join(dataset_dir, SOURCES_OPTIONS_FILE), DGIT_FOLDER)
39
37
  end
40
-
41
- def link_analyses_folder
42
- analyses_dir = File.expand_path('analyses', File.dirname(__FILE__))
43
- home = File.join(Dir.home, DGIT_FOLDER, 'plugins', 'analysis')
44
- FileUtils.mkdir_p(home)
45
- FileUtils.ln_sf(analyses_dir, File.join(home, 'developers_activity'))
46
- end
47
-
48
- def link_joins_folder
49
- analyses_dir = File.expand_path('joins', File.dirname(__FILE__))
50
- home = File.join(Dir.home, DGIT_FOLDER, 'plugins', 'join')
51
- FileUtils.mkdir_p(home)
52
- FileUtils.ln_sf(analyses_dir, File.join(home, 'developers_activity'))
53
- end
54
38
  end
55
39
  end
56
40
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: diggit-developers_activity
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthieu Foucault
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-05 00:00:00.000000000 Z
11
+ date: 2016-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -59,15 +59,19 @@ description: |-
59
59
  email:
60
60
  - foucault.matthieu@gmail.com
61
61
  executables:
62
+ - diggit-developers_activity-setup
62
63
  - diggit-init-dev-activity-workspace
63
64
  extensions: []
64
65
  extra_rdoc_files: []
65
66
  files:
66
67
  - ".gitignore"
68
+ - ".rubocop.yml"
67
69
  - Gemfile
70
+ - Gemfile.lock
68
71
  - LICENSE.txt
69
72
  - README.md
70
73
  - Rakefile
74
+ - bin/diggit-developers_activity-setup
71
75
  - bin/diggit-init-dev-activity-workspace
72
76
  - diggit-developers_activity.gemspec
73
77
  - lib/diggit/developers_activity.rb
@@ -113,3 +117,4 @@ signing_key:
113
117
  specification_version: 4
114
118
  summary: Analyses and dataset for the diggit tool.
115
119
  test_files: []
120
+ has_rdoc: