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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2f710fcc8d68880d359f589244dc112aa599fd91
4
- data.tar.gz: bae937e9f03819394cb2613d833dd9901f7970d8
3
+ metadata.gz: 5979df6333915ecd151a97462cced6b08096598e
4
+ data.tar.gz: 24ccf7c8931f55e6ffef052e5aaff94d1bfcfc74
5
5
  SHA512:
6
- metadata.gz: 4d2f8013830024aaf81330c57a5035b63a6891bef636847911377ee8c989937d60d67943dc82cf77158e8cf672a36341639ead8238728bd7a11aa4114cf57297
7
- data.tar.gz: 0cb0c45f1ff4eb9cfd145d33e94e3385e0b6834428948e5c3b0fa4554add948b95c08e2e0fa5378b39a926bc108f90502f1a0704905805bb2b5b8e01f0b8ac3f
6
+ metadata.gz: d4af13cf62eb6c879dc0fdba4dc40e8ab9e1e5a7a50e85c8e863ef921daf052cc742b6b43c8086359a36fdd1d24b8d3cbb3aea16ba6ef68122e4e69966c4611b
7
+ data.tar.gz: 37f5e0cbbefc9227843e7aad91b47c798d51f2990c669c568e03ef31aba80ca92a8d5aa84972fdea0e889a110b8030cf24b72961567b2f5aa50abe406c1e7152
data/README.md CHANGED
@@ -65,6 +65,12 @@ export HEROKU_USERNAME=heroku_username
65
65
  export ID_RSA=id_rsa
66
66
  ```
67
67
 
68
+ Create Heroku App:
69
+
70
+ ```ruby
71
+ GithubHerokuDeployer.create
72
+ ```
73
+
68
74
  Deploy:
69
75
 
70
76
  ```ruby
@@ -36,10 +36,15 @@ module GithubHerokuDeployer
36
36
  yield(configuration)
37
37
  end
38
38
 
39
- def deploy(options={}, &block)
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
@@ -1,3 +1,3 @@
1
1
  module GithubHerokuDeployer
2
- VERSION = "0.3.1"
2
+ VERSION = "0.4.0"
3
3
  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.3.1
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: 2014-11-04 00:00:00.000000000 Z
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.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: