learn-submit 1.1.6 → 1.1.7

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: eb476bd74d99ea3df4aeb3763bc36a69ba6fa955
4
- data.tar.gz: d0a19d788cf61e77f5c107397c52aac3c7b5b7fe
3
+ metadata.gz: 9517ce44fc87974bc5910af238aa67b5c34d63d9
4
+ data.tar.gz: 24165e50ea22b2b9e20bf2a12bbe206da60035c0
5
5
  SHA512:
6
- metadata.gz: 99c24462fcb74dcb94d94f1179a63bfdeea6d1e5a48bb5c76a74462e43d4e8d05ca516e2058f198a4a97e3a97f3f475ed975fd66b549797a1298bc3e5b21e15a
7
- data.tar.gz: 712cac102abfcfac8e1791338b8e5ce14352c895d54a5d88fdeacb956a328bc6d36e4f8efbe9675944e129dadb2e056d25766bb09d0028dbce16e15bf523fb18
6
+ metadata.gz: df221ac7311ef21e3a15794c064f122cd501a341c185704c33d9acffe75396c788e962d84bb0029e79f562276d911ddfe81ea788723525eb4cffbdd7bd8a1c08
7
+ data.tar.gz: 0a82d3c1f00feabc468254c8473c528c590be838dcbb9cefa060d9d193c675212379f19fc02dcd11fc252616add9ce80680e284e4ae92e67b0b952fd3973eb99
data/learn-submit.gemspec CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["Flatiron School"]
10
10
  spec.email = ["learn@flatironschool.com"]
11
11
  spec.summary = %q{Submit your lessons to Learn.co}
12
- spec.homepage = "https://learn.co"
12
+ spec.homepage = "https://github.com/learn-co/learn-submit"
13
13
  spec.license = "MIT"
14
14
 
15
15
  spec.files = `git ls-files -z`.split("\x0")
@@ -50,8 +50,10 @@ module LearnSubmit
50
50
  end
51
51
 
52
52
  def submit!(retries=3)
53
- puts 'Submitting lesson...'
54
- File.write(file_path, 'Opening a Pull Request...')
53
+ if retries >= 2
54
+ puts 'Submitting lesson...'
55
+ File.write(file_path, 'Opening a Pull Request...')
56
+ end
55
57
  repo_name = git.repo_name
56
58
  branch_name = git.branch_name
57
59
  sleep(1)
@@ -81,15 +83,20 @@ module LearnSubmit
81
83
  File.write(file_path, 'ERROR: Error connecting to learn.')
82
84
  exit 1
83
85
  else
84
- puts pr_response.message
85
-
86
- if pr_response.message.match(/looks the same/)
87
- File.write(file_path, 'ERROR: Nothing to submit')
86
+ if retries > 0
87
+ sleep(2)
88
+ submit!(0)
88
89
  else
89
- File.write(file_path, 'Done.')
90
- end
90
+ puts pr_response.message
91
91
 
92
- exit 1
92
+ if pr_response.message.match(/looks the same/)
93
+ File.write(file_path, 'ERROR: Nothing to submit')
94
+ else
95
+ File.write(file_path, 'Done.')
96
+ end
97
+
98
+ exit 1
99
+ end
93
100
  end
94
101
  end
95
102
  end
@@ -1,3 +1,3 @@
1
1
  module LearnSubmit
2
- VERSION = '1.1.6'
2
+ VERSION = '1.1.7'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: learn-submit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.6
4
+ version: 1.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Flatiron School
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-13 00:00:00.000000000 Z
11
+ date: 2015-10-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -99,7 +99,7 @@ files:
99
99
  - lib/learn_submit/submission.rb
100
100
  - lib/learn_submit/submission/git_interactor.rb
101
101
  - lib/learn_submit/version.rb
102
- homepage: https://learn.co
102
+ homepage: https://github.com/learn-co/learn-submit
103
103
  licenses:
104
104
  - MIT
105
105
  metadata: {}