pastehub 0.4.1 → 0.4.2

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: 300e17e0bff6735ae6db0a197c415affc8c0a6d3
4
- data.tar.gz: 3ae5d75cd033afb65875970336c4853d1256682e
3
+ metadata.gz: 943838932edce14917fcbcd38e7fa3938fd9e397
4
+ data.tar.gz: b171ec293084b4f79cf2a0136cecc007f6f0be23
5
5
  SHA512:
6
- metadata.gz: 8d6711785ce25257563c8b6839c5a17a8ab730e1968763ceedb3edc97f4e2d210b2dbfbe09313f565d801a0db2e7b63edb54e98cc3a40cb7e08a2db49bd03851
7
- data.tar.gz: 159303dc2b151b59ef9308f59703803c8bac8e68c09b99b9b933b97c3ad1d8b43c96af63b123110d48fd706a3b84197d2df20871511461f3715b88ffdfb32f07
6
+ metadata.gz: 8bb36630f691fc242faf5db860742d486ecd2e7c3f0dafd156a474105ba1ac6be9ff1ddf3cdcc7a139d4ec7bf54ccea7ce939d2327922694d267607e0a3193a9
7
+ data.tar.gz: c9711b80d42e0f4f26f19a4493d6ccfe2c3b10cd885d2ba9102b3138be0d518d0ca4e9546d2730faba53b935d6fa440f43af438b5b8e7a28865f72dccb1f28d5
data/Rakefile CHANGED
@@ -7,10 +7,6 @@
7
7
  # 3. install pastehub-x.x.x.gem to clean environment and test
8
8
  # 4. rake release
9
9
  # 5. gem push pkg/pastehub-x.x.x.gem ( need gem version 1.3.6 or higer. Please "gem update --system" to update )
10
- #
11
- # Test environment:
12
- # 1. gem install fake_dynamo --version 0.1.3
13
- # 2. fake_dynamo --port 4567
14
10
 
15
11
 
16
12
  require 'rake'
@@ -53,26 +49,9 @@ task :test do
53
49
  sh "ruby -I ./lib `which rspec` -b ./test/libclientsync_spec.rb "
54
50
  sh "ruby -I ./lib `which rspec` -b ./test/libsyncentry_spec.rb "
55
51
  sh "ruby -I ./lib `which rspec` -b ./test/libutil_spec.rb "
52
+ sh "ruby -I ./lib `which rspec` -b ./test/libclipboard_spec.rb "
56
53
  end
57
54
 
58
- task :win32_test do
59
- sh "rm -f /tmp/usertmp.db"
60
- sh "rspec -I ./lib -b ./test/libclipboard_spec.rb "
61
- sh "rspec -I ./lib -b ./test/libstore_spec.rb "
62
- sh "rspec -I ./lib -b ./test/libconfig_spec.rb "
63
- sh "rspec -I ./lib -b ./test/libutil_spec.rb "
64
- sh "rspec -I ./lib -b ./test/libcrypt_spec.rb "
65
- sh "rspec -I ./lib -b ./test/libauth_spec.rb "
66
- # sh "rspec -I ./lib -b ./test/libauth2_spec.rb "
67
- sh "rspec -I ./lib -b ./test/libclient_spec.rb "
68
- sh "rspec -I ./lib -b ./test/liblog_spec.rb "
69
- # sh "rspec -I ./lib -b ./test/libmasterdb_spec.rb "
70
- # sh "rspec -I ./lib -b ./test/libuserdb_spec.rb "
71
-
72
-
73
- end
74
-
75
-
76
55
  task :sync do
77
56
  sh "ruby -I ./lib bin/PastehubSync -v"
78
57
  end
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 4
4
- :patch: 1
4
+ :patch: 2
@@ -91,7 +91,12 @@ def main( argv )
91
91
  else
92
92
  x
93
93
  end
94
- command = sprintf( "%s -title 'PasteHub' -message '\\%s' ", notifier_path, str )
94
+ url_option = ''
95
+ util = PasteHub::Util.new
96
+ if util.pulloutURL( str )
97
+ url_option = '-open \'' + util.pulloutURL( str ) + '\''
98
+ end
99
+ command = sprintf( "%s -title 'PasteHub' -message '\\%s' %s", notifier_path, str, url_option )
95
100
  system( command )
96
101
  }
97
102
  else
@@ -69,5 +69,16 @@ module PasteHub
69
69
  str
70
70
  end
71
71
  end
72
+
73
+ # pullout URL string from the string
74
+ def pulloutURL( str )
75
+ m = str.match( /(^|[\t\s])(http[s]?:\/\/[^\t\s]+)/ )
76
+ if m
77
+ return m[2]
78
+ else
79
+ return nil
80
+ end
81
+ end
82
+
72
83
  end
73
84
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pastehub
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kiyoka Nishiyama
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-09 00:00:00.000000000 Z
11
+ date: 2014-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: clipboard