github_heroku_deployer 0.3.1 → 0.4.0
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/README.md +6 -0
- data/lib/github_heroku_deployer.rb +6 -1
- data/lib/github_heroku_deployer/version.rb +1 -1
- data/spec/lib/github_heroku_deployer_spec.rb +28 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5979df6333915ecd151a97462cced6b08096598e
|
4
|
+
data.tar.gz: 24ccf7c8931f55e6ffef052e5aaff94d1bfcfc74
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4af13cf62eb6c879dc0fdba4dc40e8ab9e1e5a7a50e85c8e863ef921daf052cc742b6b43c8086359a36fdd1d24b8d3cbb3aea16ba6ef68122e4e69966c4611b
|
7
|
+
data.tar.gz: 37f5e0cbbefc9227843e7aad91b47c798d51f2990c669c568e03ef31aba80ca92a8d5aa84972fdea0e889a110b8030cf24b72961567b2f5aa50abe406c1e7152
|
data/README.md
CHANGED
@@ -36,10 +36,15 @@ module GithubHerokuDeployer
|
|
36
36
|
yield(configuration)
|
37
37
|
end
|
38
38
|
|
39
|
-
def
|
39
|
+
def create(options={}, &block)
|
40
40
|
options = configuration.merge(options)
|
41
41
|
validate_options(options)
|
42
42
|
heroku_find_or_create_app(options)
|
43
|
+
end
|
44
|
+
|
45
|
+
def deploy(options={}, &block)
|
46
|
+
options = configuration.merge(options)
|
47
|
+
validate_options(options)
|
43
48
|
git_push_app_to_heroku(options, &block)
|
44
49
|
true
|
45
50
|
end
|
@@ -5,6 +5,7 @@ describe GithubHerokuDeployer do
|
|
5
5
|
it { should respond_to :configuration }
|
6
6
|
it { should respond_to :configure }
|
7
7
|
it { should respond_to :deploy }
|
8
|
+
it { should respond_to :create }
|
8
9
|
|
9
10
|
describe "::configuration" do
|
10
11
|
it "should be the configuration object" do
|
@@ -111,11 +112,37 @@ describe GithubHerokuDeployer do
|
|
111
112
|
GithubHerokuDeployer::Git.any_instance.stub(:push_app_to_heroku)
|
112
113
|
end
|
113
114
|
it "accepts organization option" do
|
114
|
-
GithubHerokuDeployer.should_receive(:heroku_find_or_create_app).with(hash_including(organization: "test-org"))
|
115
115
|
GithubHerokuDeployer.deploy({organization: "test-org"})
|
116
116
|
end
|
117
117
|
end
|
118
118
|
end
|
119
119
|
end
|
120
|
+
|
121
|
+
describe "::create" do
|
122
|
+
context "when unconfigured" do
|
123
|
+
before :each do
|
124
|
+
GithubHerokuDeployer.configure do |config|
|
125
|
+
config.github_repo = nil
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
it "requires github_repo to be set" do
|
130
|
+
lambda { GithubHerokuDeployer.create }.should(
|
131
|
+
raise_error ::GithubHerokuDeployer::ConfigurationException)
|
132
|
+
end
|
133
|
+
end
|
134
|
+
|
135
|
+
context "when configured" do
|
136
|
+
context "passing an organization" do
|
137
|
+
before do
|
138
|
+
GithubHerokuDeployer::Heroku.any_instance.stub(:new)
|
139
|
+
end
|
140
|
+
it "accepts organization option" do
|
141
|
+
GithubHerokuDeployer.should_receive(:heroku_find_or_create_app).with(hash_including(organization: "test-org"))
|
142
|
+
GithubHerokuDeployer.create({organization: "test-org", github_repo:"foo"})
|
143
|
+
end
|
144
|
+
end
|
145
|
+
end
|
146
|
+
end
|
120
147
|
end
|
121
148
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: github_heroku_deployer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jessica Lynn Suttles
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2015-04-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: heroku-api
|
@@ -168,7 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
168
168
|
version: '0'
|
169
169
|
requirements: []
|
170
170
|
rubyforge_project:
|
171
|
-
rubygems_version: 2.2.
|
171
|
+
rubygems_version: 2.2.0
|
172
172
|
signing_key:
|
173
173
|
specification_version: 4
|
174
174
|
summary: Deploys public and private Github repos to Heroku
|
@@ -178,3 +178,4 @@ test_files:
|
|
178
178
|
- spec/lib/github_heroku_deployer/heroku_spec.rb
|
179
179
|
- spec/lib/github_heroku_deployer_spec.rb
|
180
180
|
- spec/spec_helper.rb
|
181
|
+
has_rdoc:
|