pipe2me-client 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pipe2me/cli.rb +5 -0
- data/lib/pipe2me/ext/file_ext.rb +4 -11
- data/lib/pipe2me/ext/shell_format.rb +1 -1
- data/lib/pipe2me/tunnel/openssl.rb +1 -1
- data/lib/pipe2me/version.rb +1 -1
- data/rakelib/gem.rake +32 -0
- data/rakelib/test.rake +16 -0
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f9f132b1573f1f4fb103d1862ef4a0f4c8bc70f3
|
4
|
+
data.tar.gz: 680041d4879c6b15e81e6e68c8b57d6a76ab702e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 06cb41c0cfb69a9e275d798d0938e220092a7c8cc45eb36ac75557777598f8a825f2377d36a5162cc490e36816281f736d0c772b7de38649d97b2a01f7b6425e
|
7
|
+
data.tar.gz: d77b13376efe3a4b6bc34431b3d82d8b72190f5d1c1712b2b63fe37f792c03e38924ded69cd0274c001224ac21b52a6b08a6e29d7ee3bd13a2fba46f5a9de81a
|
data/lib/pipe2me/cli.rb
CHANGED
@@ -3,6 +3,11 @@ require "thor"
|
|
3
3
|
class Pipe2me::CLI < Thor
|
4
4
|
def self.exit_on_failure?; true; end
|
5
5
|
|
6
|
+
desc "version", "print version information"
|
7
|
+
def version
|
8
|
+
puts Pipe2me::VERSION
|
9
|
+
end
|
10
|
+
|
6
11
|
desc "setup", "fetch a new tunnel setup"
|
7
12
|
option :server, :default => "http://test.pipe2.me:8080"
|
8
13
|
option :auth, :required => true # "auth token"
|
data/lib/pipe2me/ext/file_ext.rb
CHANGED
@@ -1,16 +1,9 @@
|
|
1
1
|
require "tempfile"
|
2
2
|
|
3
3
|
class File
|
4
|
-
def self.
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
tmpfile.write data if data
|
9
|
-
tmpfile.close
|
10
|
-
FileUtils.mv tmpfile.path, path # atomic replace
|
11
|
-
tmpfile.unlink # deletes the temp file
|
12
|
-
rescue
|
13
|
-
tmpfile.close! rescue nil # close and deletes the temp file
|
14
|
-
raise
|
4
|
+
def self.write(path, data=nil)
|
5
|
+
open path, "w" do |io|
|
6
|
+
io.write data
|
7
|
+
end
|
15
8
|
end
|
16
9
|
end
|
data/lib/pipe2me/version.rb
CHANGED
data/rakelib/gem.rake
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
# Add "rake release and rake install"
|
2
|
+
require "bundler/setup"
|
3
|
+
Bundler::GemHelper.install_tasks
|
4
|
+
|
5
|
+
task :release => :changelog
|
6
|
+
|
7
|
+
# update CHANGELOG file
|
8
|
+
task :changelog do
|
9
|
+
require "simple/ui"
|
10
|
+
FileUtils.cp "CHANGELOG.md", "CHANGELOG.old.md"
|
11
|
+
last_version = `git tag -l 'v[0-9]*' | sort -n | tail -n 1`
|
12
|
+
last_version.chomp!
|
13
|
+
|
14
|
+
current_version = `bin/pipe2me version`.chomp
|
15
|
+
UI.success "Changes from #{last_version} .. #{current_version}:"
|
16
|
+
|
17
|
+
changes = `git log --format=format:'- %s [%an]' #{last_version}..HEAD`
|
18
|
+
UI.warn "\n#{changes}\n"
|
19
|
+
|
20
|
+
system "git reset CHANGELOG.md > /dev/null"
|
21
|
+
system "git checkout CHANGELOG.md"
|
22
|
+
|
23
|
+
old_changelog = File.read "CHANGELOG.md"
|
24
|
+
File.open "CHANGELOG.md", "w" do |io|
|
25
|
+
io.write "# v#{current_version}: #{Time.now.strftime "%c"}\n\n"
|
26
|
+
io.write changes
|
27
|
+
io.write "\n\n"
|
28
|
+
io.write old_changelog
|
29
|
+
end
|
30
|
+
|
31
|
+
system "git commit -m 'Updates CHANGELOG.md' CHANGELOG.md"
|
32
|
+
end
|
data/rakelib/test.rake
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
task :test => "test:debug"
|
2
|
+
namespace :test do
|
3
|
+
# run a debug test - a test against pipe2.dev. This is the default
|
4
|
+
# test scenario.
|
5
|
+
task :debug do
|
6
|
+
FileUtils.mkdir_p "tmp"
|
7
|
+
system "TEST_ENV=debug roundup test/*-test.sh"
|
8
|
+
end
|
9
|
+
|
10
|
+
# run a release test - a test against test.pipe2.me. Please run this
|
11
|
+
# test before releasing a new version.
|
12
|
+
task :release do
|
13
|
+
FileUtils.mkdir_p "tmp"
|
14
|
+
system "TEST_ENV=release roundup test/*-test.sh"
|
15
|
+
end
|
16
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pipe2me-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- radiospiel
|
@@ -66,7 +66,7 @@ dependencies:
|
|
66
66
|
- - '>='
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
-
description: pipe2.me command line client V0.2.
|
69
|
+
description: pipe2.me command line client V0.2.1; (c) The kink team, 2013, 2014.
|
70
70
|
email: contact@kinko.me
|
71
71
|
executables:
|
72
72
|
- pipe2me
|
@@ -92,6 +92,8 @@ files:
|
|
92
92
|
- lib/pipe2me/tunnel/openssl.rb
|
93
93
|
- lib/pipe2me/tunnel/ssh.rb
|
94
94
|
- lib/pipe2me/version.rb
|
95
|
+
- rakelib/gem.rake
|
96
|
+
- rakelib/test.rake
|
95
97
|
- test/000-roundup-test.sh
|
96
98
|
- test/auth-token-test.sh
|
97
99
|
- test/env-test.sh
|
@@ -127,5 +129,5 @@ rubyforge_project:
|
|
127
129
|
rubygems_version: 2.2.1
|
128
130
|
signing_key:
|
129
131
|
specification_version: 4
|
130
|
-
summary: pipe2.me command line client V0.2.
|
132
|
+
summary: pipe2.me command line client V0.2.1; (c) The kink team, 2013, 2014.
|
131
133
|
test_files: []
|