remreq 0.1.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.
data/.autotest ADDED
@@ -0,0 +1,35 @@
1
+ # -*- ruby -*-
2
+
3
+ require 'autotest/restart'
4
+ require 'fileutils'
5
+ puts 'blah'
6
+ =begin
7
+ Autotest.add_hook :run_command do |at|
8
+ tmp = File.expand_path(File.dirname(__FILE__) + '/tmp')
9
+ FileUtils.chmod 0700, tmp
10
+ end
11
+
12
+ Autotest.add_hook :initialize do |at|
13
+ base = File.expand_path(File.dirname(__FILE__))
14
+ `ruby #{base}/test/post.rb`
15
+ end
16
+ =end
17
+ # Autotest.add_hook :initialize do |at|
18
+ # at.extra_files << "../some/external/dependency.rb"
19
+ #
20
+ # at.libs << ":../some/external"
21
+ #
22
+ # at.add_exception 'vendor'
23
+ #
24
+ # at.add_mapping(/dependency.rb/) do |f, _|
25
+ # at.files_matching(/test_.*rb$/)
26
+ # end
27
+ #
28
+ # %w(TestA TestB).each do |klass|
29
+ # at.extra_class_map[klass] = "test/test_misc.rb"
30
+ # end
31
+ # end
32
+
33
+ # Autotest.add_hook :run_command do |at|
34
+ # system "rake build"
35
+ # end
data/History.txt ADDED
@@ -0,0 +1,6 @@
1
+ === 0.1.0 / 2011-11-06
2
+
3
+ * 1 major enhancement
4
+
5
+ * Birthday!
6
+
data/Manifest.txt ADDED
@@ -0,0 +1,8 @@
1
+ .autotest
2
+ History.txt
3
+ Manifest.txt
4
+ README.txt
5
+ Rakefile
6
+ lib/remreq.rb
7
+ tmp/.placeholder
8
+ bin/set_perms.rb
data/README.txt ADDED
@@ -0,0 +1,45 @@
1
+ = remreq
2
+
3
+ * https://github.com/ccyphers
4
+
5
+ == DESCRIPTION:
6
+
7
+ Remote require capabilities.
8
+
9
+ == FEATURES/PROBLEMS:
10
+
11
+ Given a url to a ruby file download and require.
12
+
13
+ == SYNOPSIS:
14
+
15
+ remote_require 'http://someurl.com/file1.rb', http://someurl.com/file.N.rb'
16
+
17
+ == INSTALL:
18
+
19
+ * gem install remreq
20
+ ruby </path/to/installed/gem/bin/set_perms.rb
21
+
22
+ == LICENSE:
23
+
24
+ (The MIT License)
25
+
26
+ Copyright (c) 2011 Cliff Cyphers
27
+
28
+ Permission is hereby granted, free of charge, to any person obtaining
29
+ a copy of this software and associated documentation files (the
30
+ 'Software'), to deal in the Software without restriction, including
31
+ without limitation the rights to use, copy, modify, merge, publish,
32
+ distribute, sublicense, and/or sell copies of the Software, and to
33
+ permit persons to whom the Software is furnished to do so, subject to
34
+ the following conditions:
35
+
36
+ The above copyright notice and this permission notice shall be
37
+ included in all copies or substantial portions of the Software.
38
+
39
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
40
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
41
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
42
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
43
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
44
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
45
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ # -*- ruby -*-
2
+
3
+ require 'rubygems'
4
+ require 'hoe'
5
+
6
+ Hoe.spec 'remreq' do
7
+ developer('Cliff Cyphers', 'cliff.cyphers@gmail.com')
8
+ extra_deps << ['platform_helpers', '0.1.3']
9
+ extra_deps << ['curb', '0.7.16']
10
+ end
11
+
12
+ # vim: syntax=ruby
data/bin/set_perms.rb ADDED
@@ -0,0 +1,4 @@
1
+ require 'fileutils'
2
+
3
+ tmp = File.expand_path(File.dirname(__FILE__) + '/../tmp')
4
+ FileUtils.chmod 0777, tmp
data/lib/remreq.rb ADDED
@@ -0,0 +1,32 @@
1
+ require 'platform_helpers'
2
+ require 'curb'
3
+ require 'fileutils'
4
+
5
+
6
+ class Remreq
7
+ VERSION = '0.1.0'
8
+ end
9
+
10
+ module Kernel
11
+ def remote_require(*urls)
12
+ raise ArgumentError unless urls.length > 0
13
+ urls.each { |url|
14
+ b = Curl::Easy.new
15
+ # b.proxy_url='http://127.0.0.1:3128'
16
+ b.useragent='Ruby/Curb'
17
+ b.enable_cookies=true
18
+ b.follow_location=true
19
+ b.max_redirects=5
20
+ b.url = url
21
+ b.perform
22
+ base = File.expand_path(File.dirname(__FILE__) + '/../tmp')
23
+ file = base + "/#{Token.provide}.rb"
24
+ fd = File.open(file, 'w+')
25
+ fd.puts b.body_str
26
+ fd.close
27
+ require file
28
+ FileUtils.rm_f file
29
+ }
30
+ end
31
+ end
32
+
data/tmp/.placeholder ADDED
File without changes
metadata ADDED
@@ -0,0 +1,92 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: remreq
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Cliff Cyphers
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2011-11-06 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: platform_helpers
16
+ requirement: &84283690 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - =
20
+ - !ruby/object:Gem::Version
21
+ version: 0.1.3
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *84283690
25
+ - !ruby/object:Gem::Dependency
26
+ name: curb
27
+ requirement: &84283480 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - =
31
+ - !ruby/object:Gem::Version
32
+ version: 0.7.16
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: *84283480
36
+ - !ruby/object:Gem::Dependency
37
+ name: hoe
38
+ requirement: &84283270 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ~>
42
+ - !ruby/object:Gem::Version
43
+ version: '2.12'
44
+ type: :development
45
+ prerelease: false
46
+ version_requirements: *84283270
47
+ description: Remote require capabilities.
48
+ email:
49
+ - cliff.cyphers@gmail.com
50
+ executables:
51
+ - set_perms.rb
52
+ extensions: []
53
+ extra_rdoc_files:
54
+ - History.txt
55
+ - Manifest.txt
56
+ - README.txt
57
+ files:
58
+ - .autotest
59
+ - History.txt
60
+ - Manifest.txt
61
+ - README.txt
62
+ - Rakefile
63
+ - lib/remreq.rb
64
+ - tmp/.placeholder
65
+ - bin/set_perms.rb
66
+ homepage: https://github.com/ccyphers
67
+ licenses: []
68
+ post_install_message:
69
+ rdoc_options:
70
+ - --main
71
+ - README.txt
72
+ require_paths:
73
+ - lib
74
+ required_ruby_version: !ruby/object:Gem::Requirement
75
+ none: false
76
+ requirements:
77
+ - - ! '>='
78
+ - !ruby/object:Gem::Version
79
+ version: '0'
80
+ required_rubygems_version: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ requirements: []
87
+ rubyforge_project: remreq
88
+ rubygems_version: 1.8.11
89
+ signing_key:
90
+ specification_version: 3
91
+ summary: Remote require capabilities.
92
+ test_files: []