git_local 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9ef9a96b275649d0b6999c92557745d0f9379210
4
- data.tar.gz: 4c8a19310d66ec680911d89c44817cd1bcb56cb0
3
+ metadata.gz: 9086c6ff95c3260c0353545b5627a3540f1eefed
4
+ data.tar.gz: a3bdd5d37c1ec3cbe1c4d0ed323ee8ae82922d89
5
5
  SHA512:
6
- metadata.gz: 5e364bfcd816ff9d7717bc27fa85444db4d0f8a58dd25777fcce56a801b33e89005b91b5e17d0b36537842160d3d8bed1110dd96295015c6b890ab411c8dcd9f
7
- data.tar.gz: dbf980ee598e33d92665506531b1830598c56abfd771cae388aacade4926b86cd6f44a9ef7f6bf8abb35392544785358e7a7df29de9384ee9e7a92a28030688d
6
+ metadata.gz: 983c5c166ccc721d3af4e15655ec0eeb8a3415fce75c89967aa8f9e83fbf2502ee7c993303382269c0325d049480d96db03db05ab1adc26fb0cdfbfb405645c7
7
+ data.tar.gz: aea43f2f191d3c9a7bf34d0ca32179f85d42c8e5717708616e9f4180eb6167d89e6de6a87ea3622290c1b83267fb229ed234d3e5a89a342b8258c55201a9b48c
@@ -0,0 +1,126 @@
1
+ Style/Semicolon:
2
+ Enabled: true
3
+
4
+ Lint/AmbiguousBlockAssociation:
5
+ Enabled: false
6
+
7
+ Lint/AssignmentInCondition:
8
+ Enabled: true
9
+
10
+ Lint/EndAlignment:
11
+ Enabled: true
12
+
13
+ Lint/HandleExceptions:
14
+ Enabled: true
15
+
16
+ Lint/IneffectiveAccessModifier:
17
+ Enabled: true
18
+
19
+ Lint/UselessAccessModifier:
20
+ Enabled: true
21
+
22
+ Lint/RescueException:
23
+ Enabled: true
24
+
25
+ Metrics/AbcSize:
26
+ Enabled: true
27
+ Max: 100
28
+
29
+ Metrics/BlockLength:
30
+ Enabled: true
31
+ Max: 1200
32
+
33
+ Metrics/BlockNesting:
34
+ Enabled: true
35
+ Max: 6
36
+
37
+ Metrics/ClassLength:
38
+ Enabled: true
39
+ Max: 500
40
+
41
+ Metrics/CyclomaticComplexity:
42
+ Enabled: true
43
+ Max: 25
44
+
45
+ Metrics/LineLength:
46
+ Enabled: true
47
+ Max: 70000
48
+
49
+ Metrics/MethodLength:
50
+ Enabled: true
51
+ Max: 100
52
+
53
+ Metrics/ModuleLength:
54
+ Enabled: true
55
+ Max: 500
56
+
57
+ Metrics/ParameterLists:
58
+ Enabled: true
59
+ Max: 6
60
+
61
+ Metrics/PerceivedComplexity:
62
+ Enabled: true
63
+ Max: 26
64
+
65
+ Style/DotPosition:
66
+ EnforcedStyle: trailing
67
+
68
+ Style/MultilineMethodCallIndentation:
69
+ EnforcedStyle: indented_relative_to_receiver
70
+
71
+ Style/SpecialGlobalVars:
72
+ EnforcedStyle: use_perl_names
73
+
74
+ Style/StringLiterals:
75
+ EnforcedStyle: double_quotes
76
+
77
+ Performance/StartWith:
78
+ Enabled: false
79
+
80
+ Performance/TimesMap:
81
+ Enabled: false
82
+
83
+ Security/YAMLLoad:
84
+ Enabled: false
85
+
86
+ Style/AndOr:
87
+ Enabled: false
88
+
89
+ Style/CaseIndentation:
90
+ Enabled: false
91
+
92
+ Style/Documentation:
93
+ Enabled: false
94
+
95
+ Style/EmptyMethod:
96
+ Enabled: false
97
+
98
+ Style/FrozenStringLiteralComment:
99
+ Enabled: false
100
+
101
+ Style/MutableConstant:
102
+ Enabled: false
103
+
104
+ Style/NumericLiteralPrefix:
105
+ Enabled: false
106
+
107
+ Style/NumericLiterals:
108
+ Enabled: false
109
+
110
+ Style/NumericPredicate:
111
+ Enabled: false
112
+
113
+ Style/RedundantParentheses:
114
+ Enabled: false
115
+
116
+ Style/RegexpLiteral:
117
+ Enabled: false
118
+
119
+ Style/UnneededPercentQ:
120
+ Enabled: false
121
+
122
+ Style/VariableName:
123
+ Enabled: true
124
+
125
+ Style/WordArray:
126
+ Enabled: false
data/Gemfile CHANGED
@@ -1,3 +1,3 @@
1
- source 'https://rubygems.org'
1
+ source "https://rubygems.org"
2
2
 
3
3
  gemspec
@@ -1,18 +1,24 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- git_local (0.0.4)
4
+ git_local (0.0.5)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
+ ast (2.3.0)
10
+ builder (3.2.3)
9
11
  coderay (1.1.1)
10
12
  diff-lcs (1.3)
11
13
  method_source (0.8.2)
14
+ parser (2.4.0.0)
15
+ ast (~> 2.2)
16
+ powerpack (0.1.1)
12
17
  pry (0.10.4)
13
18
  coderay (~> 1.1.0)
14
19
  method_source (~> 0.8.1)
15
20
  slop (~> 3.4)
21
+ rainbow (2.2.1)
16
22
  rake (10.5.0)
17
23
  rspec (3.5.0)
18
24
  rspec-core (~> 3.5.0)
@@ -27,7 +33,18 @@ GEM
27
33
  diff-lcs (>= 1.2.0, < 2.0)
28
34
  rspec-support (~> 3.5.0)
29
35
  rspec-support (3.5.0)
36
+ rspec_junit_formatter (0.2.3)
37
+ builder (< 4)
38
+ rspec-core (>= 2, < 4, != 2.12.0)
39
+ rubocop (0.47.1)
40
+ parser (>= 2.3.3.1, < 3.0)
41
+ powerpack (~> 0.1)
42
+ rainbow (>= 1.99.1, < 3.0)
43
+ ruby-progressbar (~> 1.7)
44
+ unicode-display_width (~> 1.0, >= 1.0.1)
45
+ ruby-progressbar (1.8.1)
30
46
  slop (3.6.0)
47
+ unicode-display_width (1.1.3)
31
48
 
32
49
  PLATFORMS
33
50
  ruby
@@ -38,6 +55,8 @@ DEPENDENCIES
38
55
  pry (~> 0.10.4)
39
56
  rake (~> 10.0)
40
57
  rspec (~> 3.0)
58
+ rspec_junit_formatter
59
+ rubocop
41
60
 
42
61
  BUNDLED WITH
43
- 1.12.4
62
+ 1.14.6
data/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  A lightweight git command line wrapper in Ruby
4
4
 
5
+ [![CircleCI](https://circleci.com/gh/GalvanizeOpenSource/git_local/tree/master.svg?style=svg)](https://circleci.com/gh/GalvanizeOpenSource/git_local/tree/master)
6
+
5
7
  ## Installation
6
8
 
7
9
  Add this line to your application's Gemfile:
@@ -0,0 +1,12 @@
1
+ dependencies:
2
+ pre:
3
+ - gem install bundler
4
+
5
+ test:
6
+ pre:
7
+ - bundle exec rubocop
8
+ override:
9
+ - bundle exec rspec -r rspec_junit_formatter --format progress --format RspecJunitFormatter -o $CIRCLE_TEST_REPORTS/rspec/junit.xml:
10
+ parallel: true
11
+ files:
12
+ - spec/**/*.rb
@@ -1,7 +1,7 @@
1
1
  # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'git_local/version'
2
+ lib = File.expand_path("../lib", __FILE__)
3
+ $:.unshift(lib) unless $:.include?(lib)
4
+ require "git_local/version"
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "git_local"
@@ -22,6 +22,8 @@ Gem::Specification.new do |spec|
22
22
  spec.add_development_dependency "pry", "~> 0.10.4"
23
23
  spec.add_development_dependency "rake", "~> 10.0"
24
24
  spec.add_development_dependency "rspec", "~> 3.0"
25
+ spec.add_development_dependency "rspec_junit_formatter"
26
+ spec.add_development_dependency "rubocop"
25
27
 
26
- spec.required_ruby_version = '~> 2.0'
28
+ spec.required_ruby_version = "~> 2.0"
27
29
  end
@@ -17,7 +17,7 @@ module GitLocal
17
17
  return contents if max_lines.nil?
18
18
 
19
19
  File.foreach(path).first(max_lines).join
20
- rescue StandardError => e
20
+ rescue StandardError
21
21
  raise NotFound
22
22
  end
23
23
 
@@ -1,7 +1,6 @@
1
1
  module GitLocal
2
2
  class Repository
3
3
  class NotFound < StandardError
4
-
5
4
  end
6
5
 
7
6
  class InvalidArgument < StandardError
@@ -54,10 +53,10 @@ module GitLocal
54
53
  Process.wait(popened_io.pid)
55
54
 
56
55
  popened_io = IO.popen("(cd #{path} && git remote update && git rev-parse origin/#{branch}) 2>&1")
57
- out = popened_io.map { |line| line.chomp } || []
56
+ out = popened_io.map(&:chomp) || []
58
57
  remote = popened_io.read.chomp
59
58
  Process.wait(popened_io.pid)
60
- raise NotFound.new.exception(out.join(' ')) unless $?.to_i == 0
59
+ raise NotFound.new.exception(out.join(" ")) unless $?.to_i == 0
61
60
 
62
61
  remote != head
63
62
  end
@@ -69,7 +68,7 @@ module GitLocal
69
68
  def check_for_special_characters(*args)
70
69
  regexp = Regexp.new(/([A-Za-z0-9\-\_\/#]+)/)
71
70
  args.each do |arg|
72
- raise InvalidArgument if arg.gsub(regexp, '').length > 0
71
+ raise InvalidArgument unless arg.gsub(regexp, "").empty?
73
72
  end
74
73
  end
75
74
 
@@ -81,10 +80,10 @@ module GitLocal
81
80
  FileUtils.makedirs(repo_path) unless Dir.exist?(repo_path)
82
81
 
83
82
  popened_io = IO.popen("(cd #{repo_path} && git clone git@github.com:#{org_repo}.git --branch #{branch} --single-branch #{branch} && cd #{path}) 2>&1")
84
- out = popened_io.map { |line| line.chomp } || []
83
+ out = popened_io.map(&:chomp) || []
85
84
  Process.wait(popened_io.pid)
86
85
 
87
- raise NotFound.new.exception(out.join(' ')) unless $?.to_i == 0
86
+ raise NotFound.new.exception(out.join(" ")) unless $?.to_i == 0
88
87
  end
89
88
 
90
89
  def org_repo
@@ -1,4 +1,5 @@
1
- require 'fileutils'
1
+ require "fileutils"
2
+ require "securerandom"
2
3
 
3
4
  module GitLocal
4
5
  module TestHelpers
@@ -1,3 +1,3 @@
1
1
  module GitLocal
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git_local
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Galvanize Product
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-04-26 00:00:00.000000000 Z
11
+ date: 2017-04-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -66,6 +66,34 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '3.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rspec_junit_formatter
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rubocop
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
69
97
  description:
70
98
  email:
71
99
  - dev@galvanize.com
@@ -75,11 +103,13 @@ extra_rdoc_files: []
75
103
  files:
76
104
  - ".gitignore"
77
105
  - ".rspec"
106
+ - ".rubocop.yml"
78
107
  - Gemfile
79
108
  - Gemfile.lock
80
109
  - LICENSE.txt
81
110
  - README.md
82
111
  - bin/setup
112
+ - circle.yml
83
113
  - git_local.gemspec
84
114
  - lib/git_local.rb
85
115
  - lib/git_local/object.rb
@@ -106,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
106
136
  version: '0'
107
137
  requirements: []
108
138
  rubyforge_project:
109
- rubygems_version: 2.5.1
139
+ rubygems_version: 2.6.11
110
140
  signing_key:
111
141
  specification_version: 4
112
142
  summary: A lightweight git command line wrapper in Ruby