instapusher 0.1.6 → 0.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/lib/instapusher/commands.rb +3 -1
- data/lib/instapusher/git.rb +2 -2
- data/lib/instapusher/job_submission.rb +6 -7
- data/lib/instapusher/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ccf47f331db0d63f10218933ba3de941f23a368a
|
4
|
+
data.tar.gz: d6cdba7f1bb5aa5465bfa326ccdfdd44c6ac2ae8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5eefe9d5ed03814a03dc7fbd16ef105e86f48dd76ce770446868c95a408bb5a9755ce565548336f2ced57fe608c0ac467b626ce8de3c3432e83af8aa17c88094
|
7
|
+
data.tar.gz: faa00d41d405c03b2236da8d6091b872726acf06856f9f66d2a84c81cf5fcdeea9afed00c016c2f51350df03294ed6969819a4e8f45035554d6c9d8fa4099c03
|
data/lib/instapusher/commands.rb
CHANGED
@@ -7,9 +7,10 @@ module Instapusher
|
|
7
7
|
|
8
8
|
attr_reader :debug, :api_key, :branch_name, :project_name, :staging
|
9
9
|
|
10
|
-
def initialize init_options
|
10
|
+
def initialize init_options
|
11
11
|
@debug = init_options[:debug]
|
12
12
|
@staging = init_options[:staging]
|
13
|
+
@local = init_options[:local]
|
13
14
|
|
14
15
|
git = Git.new
|
15
16
|
@branch_name = init_options[:project_name] || ENV['INSTAPUSHER_BRANCH'] || git.current_branch
|
@@ -36,6 +37,7 @@ module Instapusher
|
|
36
37
|
def options
|
37
38
|
@options ||= begin
|
38
39
|
{ project: project_name,
|
40
|
+
local: @local,
|
39
41
|
branch: branch_name,
|
40
42
|
owner: Git.new.repo_owner,
|
41
43
|
version: VERSION,
|
data/lib/instapusher/git.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module Instapusher
|
2
2
|
|
3
3
|
class RepoOwnerIdentifierService
|
4
|
-
|
4
|
+
|
5
5
|
attr_reader :string
|
6
6
|
|
7
7
|
def initialize string
|
@@ -32,7 +32,7 @@ module Instapusher
|
|
32
32
|
def current_branch
|
33
33
|
result = %x{git branch}.split("\n")
|
34
34
|
if result.empty?
|
35
|
-
raise "It seems your app is not a git
|
35
|
+
raise "It seems your app is not a git repository. Please check."
|
36
36
|
else
|
37
37
|
result.select { |b| b =~ /^\*/ }.first.split(" ").last.strip
|
38
38
|
end
|
@@ -8,6 +8,8 @@ module Instapusher
|
|
8
8
|
def initialize debug, options
|
9
9
|
@debug = debug
|
10
10
|
@options = options
|
11
|
+
|
12
|
+
puts "options is #{options.inspect}"
|
11
13
|
end
|
12
14
|
|
13
15
|
def success?
|
@@ -36,10 +38,10 @@ module Instapusher
|
|
36
38
|
|
37
39
|
response = Net::HTTP.post_form URI.parse(url_to_submit_job), options
|
38
40
|
raw_body = response.body
|
39
|
-
puts "
|
41
|
+
puts "response raw body: #{raw_body}" if debug
|
40
42
|
|
41
43
|
@response_body = ::JSON.parse(raw_body)
|
42
|
-
puts "
|
44
|
+
puts "JSON parsed response raw body: #{response_body.inspect}" if debug
|
43
45
|
@job_status_url = response_body['status_url']
|
44
46
|
end
|
45
47
|
|
@@ -52,11 +54,8 @@ module Instapusher
|
|
52
54
|
else
|
53
55
|
ENV['INSTAPUSHER_HOST'] || DEFAULT_HOSTNAME
|
54
56
|
end
|
55
|
-
|
56
|
-
|
57
|
-
else
|
58
|
-
"http://#{hostname}/api/v1/jobs.json"
|
59
|
-
end
|
57
|
+
protocol = use_ssl? ? 'https' : 'http'
|
58
|
+
"#{protocol}://#{hostname}/api/v1/jobs.json"
|
60
59
|
end
|
61
60
|
end
|
62
61
|
|
data/lib/instapusher/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: instapusher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Neeraj Singh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-11-
|
11
|
+
date: 2014-11-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hashr
|