tunnel-vmc-plugin 0.2.0 → 0.2.1.rc1

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.
data/Rakefile CHANGED
@@ -1,47 +1,38 @@
1
1
  require "rake"
2
+ require "rspec/core/rake_task"
2
3
 
3
4
  $LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
4
5
  require "tunnel-vmc-plugin/version"
5
6
 
7
+ RSpec::Core::RakeTask.new(:spec)
6
8
  task :default => :spec
7
9
 
8
- desc "Run specs"
9
- task :spec => ["bundler:install", "test:spec"]
10
-
11
- desc "Run integration tests"
12
- task :test => ["bundler:install", "test:integration"]
13
-
14
- task :build do
15
- sh "gem build tunnel-vmc-plugin.gemspec"
16
- end
17
-
18
- task :install => :build do
19
- sh "gem install --local tunnel-vmc-plugin-#{VMCTunnel::VERSION}.gem"
20
- end
21
-
22
- task :uninstall do
23
- sh "gem uninstall tunnel-vmc-plugin"
24
- end
25
-
26
- task :reinstall => [:uninstall, :install]
10
+ namespace :deploy do
11
+ def last_staging_sha
12
+ `git rev-parse latest-staging`.strip
13
+ end
27
14
 
28
- task :release => :build do
29
- sh "gem push tunnel-vmc-plugin-#{VMCTunnel::VERSION}.gem"
30
- end
15
+ def last_release_sha
16
+ `git rev-parse latest-release`.strip
17
+ end
31
18
 
32
- namespace "bundler" do
33
- desc "Install gems"
34
- task "install" do
35
- sh("bundle install")
19
+ def last_staging_ref_was_released?
20
+ last_staging_sha == last_release_sha
36
21
  end
37
- end
38
22
 
39
- namespace "test" do
40
- task "spec" do |t|
41
- # nothing
23
+ task :staging, :version do |_, args|
24
+ sh "gem bump --push #{"--version #{args.version}" if args.version}" if last_staging_ref_was_released?
25
+ sh "git tag -f latest-staging"
26
+ sh "git push origin :latest-staging"
27
+ sh "git push origin latest-staging"
42
28
  end
43
29
 
44
- task "integration" do |t|
45
- sh("cd spec && bundle exec rake spec")
30
+ task :gem do
31
+ sh "git fetch"
32
+ sh "git checkout #{last_staging_sha}"
33
+ sh "gem release --tag"
34
+ sh "git tag -f latest-release"
35
+ sh "git push origin :latest-release"
36
+ sh "git push origin latest-release"
46
37
  end
47
38
  end
@@ -130,6 +130,7 @@ class CFTunnel
130
130
  app.name = HELPER_NAME
131
131
  app.framework = @client.framework_by_name("sinatra")
132
132
  app.runtime = @client.runtime_by_name("ruby19")
133
+ app.command = "bundle exec ruby server.rb -p $VCAP_APP_PORT"
133
134
  app.total_instances = 1
134
135
  app.memory = 64
135
136
  app.env = { "CALDECOTT_AUTH" => token }
@@ -1,3 +1,3 @@
1
1
  module VMCTunnel
2
- VERSION = "0.2.0".freeze
2
+ VERSION = "0.2.1.rc1".freeze
3
3
  end
data/spec/spec_helper.rb CHANGED
@@ -11,5 +11,5 @@ require "#{SPEC_ROOT}/../lib/tunnel-vmc-plugin/plugin"
11
11
  RSpec.configure do |c|
12
12
  c.include Fake::FakeMethods
13
13
  c.mock_with :rr
14
- c.include VMC::TestSupport::FakeHomeDir
15
- end
14
+ c.include FakeHomeDir
15
+ end
metadata CHANGED
@@ -1,13 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tunnel-vmc-plugin
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
5
- prerelease:
4
+ hash: -3286651314
5
+ prerelease: 6
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 0
10
- version: 0.2.0
9
+ - 1
10
+ - rc
11
+ - 1
12
+ version: 0.2.1.rc1
11
13
  platform: ruby
12
14
  authors:
13
15
  - Alex Suraci
@@ -15,7 +17,7 @@ autorequire:
15
17
  bindir: bin
16
18
  cert_chain: []
17
19
 
18
- date: 2013-02-06 00:00:00 Z
20
+ date: 2013-03-01 00:00:00 Z
19
21
  dependencies:
20
22
  - !ruby/object:Gem::Dependency
21
23
  name: cfoundry
@@ -194,12 +196,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
194
196
  required_rubygems_version: !ruby/object:Gem::Requirement
195
197
  none: false
196
198
  requirements:
197
- - - ">="
199
+ - - ">"
198
200
  - !ruby/object:Gem::Version
199
- hash: 3
201
+ hash: 25
200
202
  segments:
201
- - 0
202
- version: "0"
203
+ - 1
204
+ - 3
205
+ - 1
206
+ version: 1.3.1
203
207
  requirements: []
204
208
 
205
209
  rubyforge_project: tunnel-vmc-plugin