c3d 0.4.6 → 0.4.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3ede85fedd89ab7f962ec8e1da3560592cf8bf26
4
- data.tar.gz: acabdc85e45e7371b4c1ee1fbf30b46e13ce5066
3
+ metadata.gz: 8c496f93bbf5c8060470bf6d0615ae1842d1caf4
4
+ data.tar.gz: f95355f2f631fbd5e656a7c5573c27ecf2756587
5
5
  SHA512:
6
- metadata.gz: 9a417e6ec5791e38619c285eee8a32ac5f73dd237f59b4759ace364d0ecf459e39aa61fab5df0a4b4119e476afceb158b6e6c1d59421892ca219233005e8e5ca
7
- data.tar.gz: bf35339e15063635843c088b90ed99a61442921c011142f6eb3566dda0fc05d2ecfbb905f6b72e374db5d230dfffd3e3c1aced341710be53be5bad2945496ef9
6
+ metadata.gz: 24cdc7831a657716a6fb42f098580c76039aeec2b6161e0623219ff295ed136ba2e84f68e67c9a10c60aa520e42e9bc1c0a0f5dba8ec2db8116266f13b036f34
7
+ data.tar.gz: 7ca634f3b9eef8fd7cd5e2a778b32a2777b6456b28757f1e416e8f0b1f1b73ad946095f1a350a597fe32f9a13f894b5624402b05a01bc5d0cd43a48399fff76f
@@ -103,6 +103,7 @@ module C3D
103
103
 
104
104
  def get_the_blob blob, contract
105
105
  begin
106
+ btih = blob[2..41]
106
107
  dn = blob[42..-1]
107
108
  blob_file = File.join(ENV['BLOBS_DIR'], dn)
108
109
  if File.exists? blob_file
@@ -111,9 +112,13 @@ module C3D
111
112
  sha1_trun = sha1_full[0..23]
112
113
  if sha1_trun == dn
113
114
  @content << { contract => blob }
114
- puts "[C3D::#{Time.now.strftime( "%F %T" )}] Assembling >>\t" + contract
115
+ puts "[C3D::#{Time.now.strftime( "%F %T" )}] Adding to cache >>\t" + contract
115
116
  return true
116
117
  end
118
+ else
119
+ link = "magnet:?xt=urn:btih:" + btih + "&dn=" + dn
120
+ torrent = $puller.create link
121
+ @content << { contract => "currently acquiring please check back." }
117
122
  end
118
123
  return false
119
124
  rescue
data/lib/c3d/version.rb CHANGED
@@ -1 +1 @@
1
- VERSION ||= "0.4.6"
1
+ VERSION ||= "0.4.7"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: c3d
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.6
4
+ version: 0.4.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Casey Kuhlman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-19 00:00:00.000000000 Z
11
+ date: 2014-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty