learn-submit 1.1.6 → 1.1.7
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 +4 -4
- data/learn-submit.gemspec +1 -1
- data/lib/learn_submit/submission.rb +16 -9
- data/lib/learn_submit/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9517ce44fc87974bc5910af238aa67b5c34d63d9
|
|
4
|
+
data.tar.gz: 24165e50ea22b2b9e20bf2a12bbe206da60035c0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|
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
|
-
|
|
54
|
-
|
|
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
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
File.write(file_path, 'ERROR: Nothing to submit')
|
|
86
|
+
if retries > 0
|
|
87
|
+
sleep(2)
|
|
88
|
+
submit!(0)
|
|
88
89
|
else
|
|
89
|
-
|
|
90
|
-
end
|
|
90
|
+
puts pr_response.message
|
|
91
91
|
|
|
92
|
-
|
|
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
|
data/lib/learn_submit/version.rb
CHANGED
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.
|
|
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-
|
|
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
|
|
102
|
+
homepage: https://github.com/learn-co/learn-submit
|
|
103
103
|
licenses:
|
|
104
104
|
- MIT
|
|
105
105
|
metadata: {}
|